Re: Heads up: checking in change to ata-card.c

2003-08-14 Thread John Birrell
On Mon, Aug 04, 2003 at 10:45:39PM -0700, Stephen Casner wrote:
> I tried what I thought might be the equivalent patch (eliminating an
> else clause), but it did not solve the problem.  In 4.8-RELEASE I
> sometimes get a system hang and sometimes not, but even when it does
> not hang, I just get "Device not configured" when I try to mount
> /dev/acd0c.  The output I get is:
> 
>  /kernel: pccard: card inserted, slot 0
>  pccardd[49]: Card " "("NinjaATA-") [V1.0] [AP00 ] matched " " ("NinjaATA-") 
> [(null)] [(null)]
>  /kernel: ata2 at port 0x180-0x187,0x386 iomem 0xd4000-0xd4fff irq 9 slot 0 on 
> pccard0
>  pccardd[49]: ata2: NinjaATA inserted.

I saw similar behaviour with STABLE when trying to use a CompactFlash card
on a CPU board that didn't support the default range of I/O ports. This might
not be the case you have, but I saw output just like that quoted above. The
ata device gets reported, but there is no 'ad' device following it like there
normally is.

In my case the solution was to use the I/O port range hidden in the manufacturer's
notes on their web site. Once I set the port range in /etc/pccard.conf to
override the default, the CompactFlash card worked fine.

-- 
John Birrell
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-08-14 Thread Stephen Casner
On Tue, 5 Aug 2003, John Birrell wrote:

> On Mon, Aug 04, 2003 at 10:45:39PM -0700, Stephen Casner wrote:
> > I tried what I thought might be the equivalent patch (eliminating an
> > else clause), but it did not solve the problem.  In 4.8-RELEASE I
> > sometimes get a system hang and sometimes not, but even when it does
> > not hang, I just get "Device not configured" when I try to mount
> > /dev/acd0c.  The output I get is:
> >
> >  /kernel: pccard: card inserted, slot 0
> >  pccardd[49]: Card " "("NinjaATA-") [V1.0] [AP00 ] matched " " ("NinjaATA-") 
> > [(null)] [(null)]
> >  /kernel: ata2 at port 0x180-0x187,0x386 iomem 0xd4000-0xd4fff irq 9 slot 0 on 
> > pccard0
> >  pccardd[49]: ata2: NinjaATA inserted.
>
> I saw similar behaviour with STABLE when trying to use a CompactFlash card
> on a CPU board that didn't support the default range of I/O ports. This might
> not be the case you have, but I saw output just like that quoted above. The
> ata device gets reported, but there is no 'ad' device following it like there
> normally is.
>
> In my case the solution was to use the I/O port range hidden in the manufacturer's
> notes on their web site. Once I set the port range in /etc/pccard.conf to
> override the default, the CompactFlash card worked fine.

I had an opportunity to try the same CD-ROM drive on an identical
laptop that had a 4.2-STABLE system installed.  The drive works on
that version, and the console output is the same as what I quoted
above for 4.8.  That is, the same default port space is used.  The
only difference is another line follows for the acd0 device coming
up.  So, it looks like your solution for the CompactFlash card does
not apply.

-- Steve
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-08-07 Thread Stephen Casner
My question is really about -STABLE rather than -CURRENT, but it
involves a problem recently resolved in -CURRENT.

On Thu, 26 Jun 2003, Bill Paul started this thread regarding failed
support for the Sony PCMCIA CD-ROM drive ("NinjaATA-") in releases
since 4.5, including 4.8 and 5.1.  You folks resolved a patch for
ata-card.c that was applied in -CURRENT.  Can some equivalent patch be
made for -STABLE?

I tried what I thought might be the equivalent patch (eliminating an
else clause), but it did not solve the problem.  In 4.8-RELEASE I
sometimes get a system hang and sometimes not, but even when it does
not hang, I just get "Device not configured" when I try to mount
/dev/acd0c.  The output I get is:

 /kernel: pccard: card inserted, slot 0
 pccardd[49]: Card " "("NinjaATA-") [V1.0] [AP00 ] matched " " ("NinjaATA-") [(null)] 
[(null)]
 /kernel: ata2 at port 0x180-0x187,0x386 iomem 0xd4000-0xd4fff irq 9 slot 0 on pccard0
 pccardd[49]: ata2: NinjaATA inserted.

I don't get anything like Bill Paul's success case:

> ata2: <  NinjaATA-> at port 0x180-0x187,0x386-0x387 irq 9 function 0 config 33 on 
> pccard0> acd0: CDROM  at ata2-master PIO4

But I don't know what I should expect to see on success in -STABLE
vs. this message from -CURRENT.

-- Steve
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-27 Thread Terry Lambert
Soeren Schmidt wrote:
> I do have problems with the wording you use in the comments
> in that patch mentioned below, I will even say that I will remove
> that as soon as it appears *and* shoot the committer so it doesn't
> happen again to use your choice of wording..

While you are making those changes, be sure to change "ENXIO"
to "EDOOFUS"...

8-) 8-).

Lighten up!  Have a beer or something!

Bill's comments are often irascible, and the license wording in
his slight modification to the BSD license boilerplate gave the
IBM lawers fits, but he's not the only one who does this sort
of thing to the sources, and he's not even the worst offender.

Personally, Bill's comments have kept me from making mistakes
in the purchase of hardware in the past, even if they were a
bit biting...

-- Terry
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread Soeren Schmidt
It seems Bill Paul wrote:
> > In message <[EMAIL PROTECTED]>, "M. Warner Losh" writes:
> > >Here's a better patch, basesd on wpaul's input.  Bill, can you try it
> > >an see if it works for you?  If so, i would be better to commit this
> > >one.  If not, I'll work with you to fix it. 
> > 
> > FYI, I have a no-name ("PCMCIA"/"CD-ROM") drive that also requires
> > failure of the second IO range to be made non-fatal. How about just
> > deleting the `else' clause as in the patch below? It seems that
> > this can only affect CD-ROM drives that were otherwise not working,
> > so it should be fairly safe.
> 
> This patch also tests good with my drive.

Thats what I proposed on the unnamed IRC channel yesterday, its fine by
me as well, can we agree to commit just this then ?

> > Index: ata-card.c
> > ===
> > RCS file: /dump/FreeBSD-CVS/src/sys/dev/ata/ata-card.c,v
> > retrieving revision 1.14
> > diff -u -r1.14 ata-card.c
> > --- ata-card.c  17 Jun 2003 12:33:53 -  1.14
> > +++ ata-card.c  26 Jun 2003 23:00:01 -
> > @@ -131,10 +131,6 @@
> >  start + ATA_ALTOFFSET, ATA_ALTIOSIZE);
> > }
> >  }
> > -else {
> > -   bus_release_resource(dev, SYS_RES_IOPORT, rid, io);
> > -   return ENXIO;
> > -}
> >  
> >  /* allocate the altport range */
> >  rid = ATA_ALTADDR_RID;

-Søren
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread Wilko Bulte
On Thu, Jun 26, 2003 at 05:04:10PM -0700, David O'Brien wrote:
> On Thu, Jun 26, 2003 at 01:20:04PM -0600, M. Warner Losh wrote:
> > In message: <[EMAIL PROTECTED]>
> > [EMAIL PROTECTED] (Bill Paul) writes:
> > : P.S.: Be sure to join us next time when I ream out whoever it was that
> > :   broke support for my 3Com 3c575C cardbus ethernet NIC.
> > 
> > It looks like my 3ccfe575ct is working well as of lasts week's
> > current.
> > 
> > Any public reamings likely will result in some sanction from core.
> > Control your temper, or else.
> 
> Here comes the Great Core FreeBSD Censor Police!!!
> I can't believe Bill's email, elected this threat from Core.  Become a
> committer and loose rights others on this mailing list have.
> Feh, is a group hug next?

Come on...

-- 
|   / o / /_  _ [EMAIL PROTECTED]
|/|/ / / /(  (_)  Bulte 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread M. Warner Losh
This works for all my ata-like cards.  I've gone ahead and committed
it...

Warner
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread David O'Brien
On Thu, Jun 26, 2003 at 01:20:04PM -0600, M. Warner Losh wrote:
> In message: <[EMAIL PROTECTED]>
> [EMAIL PROTECTED] (Bill Paul) writes:
> : P.S.: Be sure to join us next time when I ream out whoever it was that
> :   broke support for my 3Com 3c575C cardbus ethernet NIC.
> 
> It looks like my 3ccfe575ct is working well as of lasts week's
> current.
> 
> Any public reamings likely will result in some sanction from core.
> Control your temper, or else.

Here comes the Great Core FreeBSD Censor Police!!!
I can't believe Bill's email, elected this threat from Core.  Become a
committer and loose rights others on this mailing list have.
Feh, is a group hug next?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread Bill Paul
> In message <[EMAIL PROTECTED]>, "M. Warner Losh" writes:
> >Here's a better patch, basesd on wpaul's input.  Bill, can you try it
> >an see if it works for you?  If so, i would be better to commit this
> >one.  If not, I'll work with you to fix it. 
> 
> FYI, I have a no-name ("PCMCIA"/"CD-ROM") drive that also requires
> failure of the second IO range to be made non-fatal. How about just
> deleting the `else' clause as in the patch below? It seems that
> this can only affect CD-ROM drives that were otherwise not working,
> so it should be fairly safe.

This patch also tests good with my drive.

-Bill

--
=
-Bill Paul(510) 749-2329 | Senior Engineer, Master of Unix-Fu
 [EMAIL PROTECTED] | Wind River Systems
=
  "If stupidity were a handicap, you'd have the best parking spot."
=

> Ian
> 
> Index: ata-card.c
> ===
> RCS file: /dump/FreeBSD-CVS/src/sys/dev/ata/ata-card.c,v
> retrieving revision 1.14
> diff -u -r1.14 ata-card.c
> --- ata-card.c17 Jun 2003 12:33:53 -  1.14
> +++ ata-card.c26 Jun 2003 23:00:01 -
> @@ -131,10 +131,6 @@
>start + ATA_ALTOFFSET, ATA_ALTIOSIZE);
>   }
>  }
> -else {
> - bus_release_resource(dev, SYS_RES_IOPORT, rid, io);
> - return ENXIO;
> -}
>  
>  /* allocate the altport range */
>  rid = ATA_ALTADDR_RID;
> 
> 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Heads up: checking in change to ata-card.c

2003-06-26 Thread Will Saxon

> -Original Message-
> From: Julian Elischer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2003 7:26 PM
> To: Will Saxon
> Cc: David Xu; Soeren Schmidt; Bill Paul; [EMAIL PROTECTED];
> [EMAIL PROTECTED]
> Subject: RE: Heads up: checking in change to ata-card.c
> 
> 
> Nvidia (I previously didn't know they made full chipsets)
> IDE interfaces got broken around FreeBSD 4.3 and at 4.8 they are still
> not working.. There is however a workaround which is to 
> disable the use
> of DMA on the devices (in the loader.conf file). if you don't 
> the system
> hangs during boot.
> 
> I have only sporadic access to one, but I don't have one myself which
> makes it hard to
> test more..
> I have not tested it on 5.x yet..

Well I am pretty sure this isn't an Nvidia chipset, actually I know it isn't:

atapci0:  port 0xb000-0xb00f at device 17.1 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
ad0: 9797MB  [19906/16/63] at ata0-master UDMA66
acd0: MODE_SENSE_BIG command timeout - resetting
ata1: resetting devices .. done
..repeat 19 more times..
acd0: CDROM  at ata1-master PIO4

Maybe there are some similarities though - Nvidia seemed to just pull a good chipset 
out of nowhere a couple of years ago, maybe they licensed some stuff from Via? I know 
they worked a lot on the Xbox but that is an Intel system - the nForce stuff is 
AMD-only.

I have 4 operable machines, 3 of them working with this 694D board, the other 
(ironically) a 230T also (which is working fine with a 4.8-PRERELEASE kernel from 
2/19). In a few weeks they will all be replaced by new P4 machines and I should have 
the ability to basically do whatever I want with them. So if this turns into a 
protracted issue that requires testing, I will be more than happy to test patches for 
4.x and 5.x, single and dual processor.

-Will

> 
> 
> 
> On Thu, 26 Jun 2003, Will Saxon wrote:
> 
> > 
> > 
> > > -Original Message-
> > > From: David Xu [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, June 26, 2003 6:30 PM
> > > To: Soeren Schmidt; Bill Paul
> > > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: Re: Heads up: checking in change to ata-card.c
> > > 
> > > 
> > > I have another problem different with Bill Paul's.
> > > I have a Tyan Tiger 230T dual CPU MB. On second IDE,
> > > there are MITSUBISHI 52X CDROM as master and a SONY
> > > CD-RW CRX140E 8X/4X/32X as slave. FreeBSD never got
> > > them to work, while MS Windows and Linux and NetBSD and
> > > OpenBSD all work well with these devices. FreeBSD always
> > > stuck at "MODE SENSE BIG", this sucks, I must disable
> > > second IDE in BIOS before booting into FreeBSD and
> > > reenable it before booting into another OS. I changed
> > > configuration several times, both DMA and PIO mode don't
> > > work, it works only when CR-RW is pulled.
> > > 
> > > David Xu
> > 
> > I started seeing this behavior also, but it started when I 
> swapped drives from a dead Via dual chipset board machine 
> (MSI 694D Pro, I think) into an athlon machine with an Asus 
> A7Vsomething. I can get correct model numbers, etc. if 
> helpful. This is a 4.8-RELEASE installation. I had to reboot 
> the first time with an old 4.4 GENERIC leftover from 
> installation, and I saw no errors, but after compiling a 
> uniprocessor kernel I started seeing the above behavior. 
> Although, I left it for awhile and eventually the machine 
> does boot after about 30 of the MODE_SENSE_BIG, resetting 
> devices lines.
> > 
> > -Will
> > ___
> > [EMAIL PROTECTED] mailing list
> > http://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to 
> "[EMAIL PROTECTED]"
> > 
> 
> 
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Heads up: checking in change to ata-card.c

2003-06-26 Thread Julian Elischer
Nvidia (I previously didn't know they made full chipsets)
IDE interfaces got broken around FreeBSD 4.3 and at 4.8 they are still
not working.. There is however a workaround which is to disable the use
of DMA on the devices (in the loader.conf file). if you don't the system
hangs during boot.

I have only sporadic access to one, but I don't have one myself which
makes it hard to
test more..
I have not tested it on 5.x yet..



On Thu, 26 Jun 2003, Will Saxon wrote:

> 
> 
> > -Original Message-
> > From: David Xu [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, June 26, 2003 6:30 PM
> > To: Soeren Schmidt; Bill Paul
> > Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: Re: Heads up: checking in change to ata-card.c
> > 
> > 
> > I have another problem different with Bill Paul's.
> > I have a Tyan Tiger 230T dual CPU MB. On second IDE,
> > there are MITSUBISHI 52X CDROM as master and a SONY
> > CD-RW CRX140E 8X/4X/32X as slave. FreeBSD never got
> > them to work, while MS Windows and Linux and NetBSD and
> > OpenBSD all work well with these devices. FreeBSD always
> > stuck at "MODE SENSE BIG", this sucks, I must disable
> > second IDE in BIOS before booting into FreeBSD and
> > reenable it before booting into another OS. I changed
> > configuration several times, both DMA and PIO mode don't
> > work, it works only when CR-RW is pulled.
> > 
> > David Xu
> 
> I started seeing this behavior also, but it started when I swapped drives from a 
> dead Via dual chipset board machine (MSI 694D Pro, I think) into an athlon machine 
> with an Asus A7Vsomething. I can get correct model numbers, etc. if helpful. This is 
> a 4.8-RELEASE installation. I had to reboot the first time with an old 4.4 GENERIC 
> leftover from installation, and I saw no errors, but after compiling a uniprocessor 
> kernel I started seeing the above behavior. Although, I left it for awhile and 
> eventually the machine does boot after about 30 of the MODE_SENSE_BIG, resetting 
> devices lines.
> 
> -Will
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


RE: Heads up: checking in change to ata-card.c

2003-06-26 Thread Will Saxon


> -Original Message-
> From: David Xu [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2003 6:30 PM
> To: Soeren Schmidt; Bill Paul
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Heads up: checking in change to ata-card.c
> 
> 
> I have another problem different with Bill Paul's.
> I have a Tyan Tiger 230T dual CPU MB. On second IDE,
> there are MITSUBISHI 52X CDROM as master and a SONY
> CD-RW CRX140E 8X/4X/32X as slave. FreeBSD never got
> them to work, while MS Windows and Linux and NetBSD and
> OpenBSD all work well with these devices. FreeBSD always
> stuck at "MODE SENSE BIG", this sucks, I must disable
> second IDE in BIOS before booting into FreeBSD and
> reenable it before booting into another OS. I changed
> configuration several times, both DMA and PIO mode don't
> work, it works only when CR-RW is pulled.
> 
> David Xu

I started seeing this behavior also, but it started when I swapped drives from a dead 
Via dual chipset board machine (MSI 694D Pro, I think) into an athlon machine with an 
Asus A7Vsomething. I can get correct model numbers, etc. if helpful. This is a 
4.8-RELEASE installation. I had to reboot the first time with an old 4.4 GENERIC 
leftover from installation, and I saw no errors, but after compiling a uniprocessor 
kernel I started seeing the above behavior. Although, I left it for awhile and 
eventually the machine does boot after about 30 of the MODE_SENSE_BIG, resetting 
devices lines.

-Will
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread Ian Dowse
In message <[EMAIL PROTECTED]>, "M. Warner Losh" writes:
>Here's a better patch, basesd on wpaul's input.  Bill, can you try it
>an see if it works for you?  If so, i would be better to commit this
>one.  If not, I'll work with you to fix it. 

FYI, I have a no-name ("PCMCIA"/"CD-ROM") drive that also requires
failure of the second IO range to be made non-fatal. How about just
deleting the `else' clause as in the patch below? It seems that
this can only affect CD-ROM drives that were otherwise not working,
so it should be fairly safe.

Ian

Index: ata-card.c
===
RCS file: /dump/FreeBSD-CVS/src/sys/dev/ata/ata-card.c,v
retrieving revision 1.14
diff -u -r1.14 ata-card.c
--- ata-card.c  17 Jun 2003 12:33:53 -  1.14
+++ ata-card.c  26 Jun 2003 23:00:01 -
@@ -131,10 +131,6 @@
 start + ATA_ALTOFFSET, ATA_ALTIOSIZE);
}
 }
-else {
-   bus_release_resource(dev, SYS_RES_IOPORT, rid, io);
-   return ENXIO;
-}
 
 /* allocate the altport range */
 rid = ATA_ALTADDR_RID;

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread Wilko Bulte
On Fri, Jun 27, 2003 at 06:30:17AM +0800, David Xu wrote:

I'm sure Soeren will be be glad to investigate, I don't think
it is very worthwhile for you to piggyback your problem
on top of Bill's controversial email..

Make code, not war ;-)

Wilko


> I have another problem different with Bill Paul's.
> I have a Tyan Tiger 230T dual CPU MB. On second IDE,
> there are MITSUBISHI 52X CDROM as master and a SONY
> CD-RW CRX140E 8X/4X/32X as slave. FreeBSD never got
> them to work, while MS Windows and Linux and NetBSD and
> OpenBSD all work well with these devices. FreeBSD always
> stuck at "MODE SENSE BIG", this sucks, I must disable
> second IDE in BIOS before booting into FreeBSD and
> reenable it before booting into another OS. I changed
> configuration several times, both DMA and PIO mode don't
> work, it works only when CR-RW is pulled.
> 
> David Xu
> 
> - Original Message - 
> From: "Soeren Schmidt" <[EMAIL PROTECTED]>
> To: "Bill Paul" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, June 27, 2003 3:03 AM
> Subject: Re: Heads up: checking in change to ata-card.c
> 
> 
> > 
> > I do have problems with the wording you use in the comments
> > in that patch mentioned below, I will even say that I will remove
> > that as soon as it appears *and* shoot the committer so it doesn't
> > happen again to use your choice of wording..
> > 
> > Now, I dont think this way is productive at all, and would appreciate
> > if we could have a civilized way of doing this instead...
> > 
> > This is exactly the crap that makes one wonder if the time used on
> > the project is well spent...
> > 
> > -Søren
> > 

... [snip snip ]
---end of quoted text---

-- 
|   / o / /_  _ 
|/|/ / / /(  (_)  Bulte [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread David Xu
I have another problem different with Bill Paul's.
I have a Tyan Tiger 230T dual CPU MB. On second IDE,
there are MITSUBISHI 52X CDROM as master and a SONY
CD-RW CRX140E 8X/4X/32X as slave. FreeBSD never got
them to work, while MS Windows and Linux and NetBSD and
OpenBSD all work well with these devices. FreeBSD always
stuck at "MODE SENSE BIG", this sucks, I must disable
second IDE in BIOS before booting into FreeBSD and
reenable it before booting into another OS. I changed
configuration several times, both DMA and PIO mode don't
work, it works only when CR-RW is pulled.

David Xu

- Original Message - 
From: "Soeren Schmidt" <[EMAIL PROTECTED]>
To: "Bill Paul" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, June 27, 2003 3:03 AM
Subject: Re: Heads up: checking in change to ata-card.c


> 
> I do have problems with the wording you use in the comments
> in that patch mentioned below, I will even say that I will remove
> that as soon as it appears *and* shoot the committer so it doesn't
> happen again to use your choice of wording..
> 
> Now, I dont think this way is productive at all, and would appreciate
> if we could have a civilized way of doing this instead...
> 
> This is exactly the crap that makes one wonder if the time used on
> the project is well spent...
> 
> -Søren
> 
> It seems Bill Paul wrote:
> > A long time ago, circa FreeBSD 4.3, my Sony PCMCIA CD-ROM drive with
> > brain-damaged Teac ATA controller drive worked, and the people were
> > content and all was right with the land. Then my 4.4 CD set arrived,
> > and I was disappointed to find the install kernel would lock up after
> > the driver was probed. Complaints were made and epithets were hurled,
> > and lo, in 4.5-RELEASE, all was well once again.
> > 
> > Then came 4.6-RELEASE, and it was broken again.
> > 
> > Then came 4.6.2, and it was still broken.
> > 
> > And in 4.7.
> > 
> > And 4.8.
> > 
> > And 5.0. (Yeah yeah, shut up.)
> > 
> > I just got my 5.1-RELEASE CDs and guess what? My CD-ROM drive STILL
> > doesn't work!!!
> > 
> > Guys, there's nothing more frustrating than getting a brand new CD
> > set in the mail and not being able to install via CD. So I'm not leaving
> > it up to chance anymore. I have a patch to make my drive work here:
> > 
> > http://www.freebsd.org/~wpaul/ata-card.c.diff-5.1
> > 
> > I have no idea what the altio port remapping goop in ata_pccard_probe()
> > is supposed to accomplish, but I'm telling you all right now, it doesn't
> > work with my drive. I have specifically added to code to skip the
> > remapping for drives with the product string of "NinjaATA-" (the problem
> > with the Teac controller is that its vendor/product ID is 0x/0x,
> > so there's really no better way to indentify it). This patch changes
> > this:
> > 
> > ata2: <  NinjaATA-> at port 0x180-0x187,0x386-0x387 irq 9 function 0 config 33 on 
> > pccard0
> > device_probe_and_attach: ata2 attach returned 6
> > 
> > Into this:
> > 
> > ata2: <  NinjaATA-> at port 0x180-0x187,0x386-0x387 irq 9 function 0 config 33 on 
> > pccard0
> > acd0: CDROM  at ata2-master PIO4
> > 
> > Now, I'm sending out this notification that I _WILL_ check this patch in
> > before I leave the office today. I'm not asking for permission. I've been
> > waiting for half a dozen releases for this to get fixed. When 5.2-RELEASE
> > arrives in my mailbox, it _WILL_ install from CD-ROM on my laptop or so
> > help me I will find the responsible parties and force them to listen to
> > RMS sing "Free The Software" -- _live_ -- until their ears bleed.
> > 
> > I have tested this patch. It compiles. It works. I can mount CDs
> > successfully and transfer stuff from them to my heart's content. I've
> > reduced the change down to the absolute minimum and insured that it
> > won't affect any other drives except mine. It's going in. Period.
> > I am not leaving it up for debate, because if I do, all that will
> > happen is that people will argue over what the more "correct" fix
> > should be, and at this point I _just_ _don't_ _care_. I want my
> > drive to work, and this does it. Understand? Good.
> > 
> > This concludes my announcement. Thank you all for your attention. Don't
> > forget to tip the waitress.
> > 
> > -Bill
> > 
> > P.S.: Be sure to join us next time when I ream out 

Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread Bill Paul
> Here's a better patch, basesd on wpaul's input.  Bill, can you try it
> an see if it works for you?  If so, i would be better to commit this
> one.  If not, I'll work with you to fix it. 

Close, but this doesn't quite do it. I thought something didn't look
right when I read it, and I tested it just to be certain. Detecting the
card via the table is fine, but you're not skipping the right piece of
code. The existing code logic says:

if (getting the altio port range with bus_get_resource() succeeds)
then (set the resource offset depending on port range size)
else
(release the ioport resource and bail with ENXIO)

With my drive, it's the bus_get_resource() that fails, so we end up
failing the probe with ENXIO. Your patch changes this to:

if (the ONE_REGION flag is not set?) and (getting the port range
 with bus_get_resource() succeeds)
then (set the resource offset depending on port range size)
else
(release the ioport resource and bail with ENXIO)

So if the ONE_REGION bit is set, we still bail with ENXIO. I put the
question mark up there because I think there's a typo:

-if (bus_get_resource(dev, SYS_RES_IOPORT, ATA_ALTADDR_RID, &tmp, &tmp)) {
+if ((ap == NULL || (ap->flags & ONE_REGION) != 0) &&
+  bus_get_resource(dev, SYS_RES_IOPORT, ATA_ALTADDR_RID, &tmp, &tmp)) {

I think this:

if ((ap == NULL || (ap->flags & ONE_REGION) != 0) && ...

should be this:

if ((ap == NULL || (ap->flags & ONE_REGION) == 0) && ...

I might be wrong. In any case, it still doesn't work. I think the logic
should be:

if (the ONE_REGION flag is not set)
then (do all the other stuff)

This way, we skip the whole altio remapping step entirely. I just tested
this and it seems to work. Here's a modified version of your patch
showing what I mean:

http://www.freebsd.org/~wpaul/ata-card.c.diff2

Also, since Soren asked, here are verbose boot messages in both the
failure and success cases:

http://www.freebsd.org/~wpaul/dmesg.bad
http://www.freebsd.org/~wpaul/dmesg.good

> If you are uninterested in working with us to get things in, then your
> patch will not lasts the evening as such an approach is unacceptibe.

Well, with all due respect, the fact that this is still broken is 
also unacceptable. All I want is to insure that this is fixed and
that it stays fixed. I don't care if it's your patch or mine, as
long as it works, and doesn't regress.

And for the record, if somebody came to me and said: "Bill! Your
 driver hasn't worked right on  in months! I'm at wit's end! You leave me *NO* alternative!
I'm just going to have to fix it for you! At gunpoint! No no, don't
try and stop me! This is for your own good!" well, then, gosh, I'd
let 'em.

But I guess that's just me.

-Bill

--
=
-Bill Paul(510) 749-2329 | Senior Engineer, Master of Unix-Fu
 [EMAIL PROTECTED] | Wind River Systems
=
  "If stupidity were a handicap, you'd have the best parking spot."
=
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread Julian Elischer


On Thu, 26 Jun 2003, Bill Paul wrote:

> 
> A long time ago, circa FreeBSD 4.3, my Sony PCMCIA CD-ROM drive with
> brain-damaged Teac ATA controller drive worked, and the people were
> content and all was right with the land. Then my 4.4 CD set arrived,
> and I was disappointed to find the install kernel would lock up after
> the driver was probed. Complaints were made and epithets were hurled,
> and lo, in 4.5-RELEASE, all was well once again.
> 
> Then came 4.6-RELEASE, and it was broken again.
> 
> Then came 4.6.2, and it was still broken.
> 
> And in 4.7.
> 
> And 4.8.
> 
> And 5.0. (Yeah yeah, shut up.)
> 
> I just got my 5.1-RELEASE CDs and guess what? My CD-ROM drive STILL
> doesn't work!!!
> 
> Guys, there's nothing more frustrating than getting a brand new CD
> set in the mail and not being able to install via CD. So I'm not leaving
> it up to chance anymore. I have a patch to make my drive work here:
> 
> http://www.freebsd.org/~wpaul/ata-card.c.diff-5.1
> 
> I have no idea what the altio port remapping goop in ata_pccard_probe()
> is supposed to accomplish, but I'm telling you all right now, it doesn't
> work with my drive. I have specifically added to code to skip the
> remapping for drives with the product string of "NinjaATA-" (the problem
> with the Teac controller is that its vendor/product ID is 0x/0x,
> so there's really no better way to indentify it). This patch changes
> this:
> 
> ata2: <  NinjaATA-> at port 0x180-0x187,0x386-0x387 irq 9 function 0 config 33 on 
> pccard0
> device_probe_and_attach: ata2 attach returned 6
> 
> Into this:
> 
> ata2: <  NinjaATA-> at port 0x180-0x187,0x386-0x387 irq 9 function 0 config 33 on 
> pccard0
> acd0: CDROM  at ata2-master PIO4

Someone also broke the NVidia ata chip between 4.3 and 4.4.
it too has remained broken.. I didn't know that nvidia made
such things until I saw this machine.. You CAN boot if you force it to
not allow DMA and only use PIO.

> 
> Now, I'm sending out this notification that I _WILL_ check this patch in
> before I leave the office today. I'm not asking for permission. I've been
> waiting for half a dozen releases for this to get fixed. When 5.2-RELEASE
> arrives in my mailbox, it _WILL_ install from CD-ROM on my laptop or so
> help me I will find the responsible parties and force them to listen to
> RMS sing "Free The Software" -- _live_ -- until their ears bleed.
> 
> I have tested this patch. It compiles. It works. I can mount CDs
> successfully and transfer stuff from them to my heart's content. I've
> reduced the change down to the absolute minimum and insured that it
> won't affect any other drives except mine. It's going in. Period.
> I am not leaving it up for debate, because if I do, all that will
> happen is that people will argue over what the more "correct" fix
> should be, and at this point I _just_ _don't_ _care_. I want my
> drive to work, and this does it. Understand? Good.
> 
> This concludes my announcement. Thank you all for your attention. Don't
> forget to tip the waitress.
> 
> -Bill
> 
> P.S.: Be sure to join us next time when I ream out whoever it was that
>   broke support for my 3Com 3c575C cardbus ethernet NIC.
> 
> --
> =
> -Bill Paul(510) 749-2329 | Senior Engineer, Master of Unix-Fu
>  [EMAIL PROTECTED] | Wind River Systems
> =
>   "If stupidity were a handicap, you'd have the best parking spot."
> =
> ___
> [EMAIL PROTECTED] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"
> 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread M. Warner Losh
In message: <[EMAIL PROTECTED]>
[EMAIL PROTECTED] (Bill Paul) writes:
: P.S.: Be sure to join us next time when I ream out whoever it was that
:   broke support for my 3Com 3c575C cardbus ethernet NIC.

It looks like my 3ccfe575ct is working well as of lasts week's
current.

Any public reamings likely will result in some sanction from core.
Control your temper, or else.

Warner
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread M. Warner Losh
Here's a better patch, basesd on wpaul's input.  Bill, can you try it
an see if it works for you?  If so, i would be better to commit this
one.  If not, I'll work with you to fix it. 

If you are uninterested in working with us to get things in, then your
patch will not lasts the evening as such an approach is unacceptibe.

Warner

Index: ata-card.c
===
RCS file: /home/ncvs/src/sys/dev/ata/ata-card.c,v
retrieving revision 1.14
diff -u -r1.14 ata-card.c
--- ata-card.c  17 Jun 2003 12:33:53 -  1.14
+++ ata-card.c  26 Jun 2003 19:12:34 -
@@ -44,17 +44,26 @@
 #include 
 #include 
 
-static const struct pccard_product ata_pccard_products[] = {
+struct ata_pccard_product 
+{
+struct pccard_product p;
+u_int  flags;
+#define ONE_REGION 1
+};
+
+
+
+static const struct ata_pccard_product ata_pccard_products[] = {
/* NetBSD has a few others that need to migrate into pccarddevs */
/* XXX */
-   PCMCIA_CARD(FREECOM, PCCARDIDE, 0),
-   PCMCIA_CARD(EXP, EXPMULTIMEDIA, 0),
-   PCMCIA_CARD(IODATA, CBIDE2, 0),
-   PCMCIA_CARD(OEM2, CDROM1, 0),
-   PCMCIA_CARD(OEM2, IDE, 0),
-   PCMCIA_CARD(PANASONIC, KXLC005, 0),
-   PCMCIA_CARD(TEAC, IDECARDII, 0),
-   {NULL}
+   { PCMCIA_CARD(FREECOM, PCCARDIDE, 0), 0 },
+   { PCMCIA_CARD(EXP, EXPMULTIMEDIA, 0), 0 },
+   { PCMCIA_CARD(IODATA, CBIDE2, 0), 0 },
+   { PCMCIA_CARD(OEM2, CDROM1, 0), 0 },
+   { PCMCIA_CARD(OEM2, IDE, 0), 0 },
+   { PCMCIA_CARD(PANASONIC, KXLC005, 0), 0 },
+   { PCMCIA_CARD(TEAC, IDECARDII, 0), ONE_REGION},
+   { {NULL}, 0}
 };
 
 static int
@@ -73,7 +82,7 @@
return (0);
 
 /* Match other devices here, primarily cdrom/dvd rom */
-if ((pp = pccard_product_lookup(dev, ata_pccard_products,
+if ((pp = pccard_product_lookup(dev, &ata_pccard_products[0].p,
   sizeof(ata_pccard_products[0]), NULL)) != NULL) {
if (pp->pp_name)
device_set_desc(dev, pp->pp_name);
@@ -96,6 +105,7 @@
 static int
 ata_pccard_probe(device_t dev)
 {
+const struct ata_pccard_product *ap;
 struct ata_channel *ch = device_get_softc(dev);
 struct resource *io, *altio;
 int i, rid, len, start, end;
@@ -116,12 +126,16 @@
 io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
start, end, ATA_IOSIZE, RF_ACTIVE);
 
+ap = (const struct ata_pccard_product *)pccard_product_lookup(dev,
+   &ata_pccard_products[0].p, sizeof(ata_pccard_products[0]), NULL);
+
 /* 
  * if we got more than the default ATA_IOSIZE ports, this is likely
  * a pccard system where the altio ports are located at offset 14
  * otherwise its the normal altio offset
  */
-if (bus_get_resource(dev, SYS_RES_IOPORT, ATA_ALTADDR_RID, &tmp, &tmp)) {
+if ((ap == NULL || (ap->flags & ONE_REGION) != 0) &&
+  bus_get_resource(dev, SYS_RES_IOPORT, ATA_ALTADDR_RID, &tmp, &tmp)) {
if (len > ATA_IOSIZE) {
bus_set_resource(dev, SYS_RES_IOPORT, ATA_ALTADDR_RID,
 start + ATA_PCCARD_ALTOFFSET, ATA_ALTIOSIZE);
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread Soeren Schmidt

I do have problems with the wording you use in the comments
in that patch mentioned below, I will even say that I will remove
that as soon as it appears *and* shoot the committer so it doesn't
happen again to use your choice of wording..

Now, I dont think this way is productive at all, and would appreciate
if we could have a civilized way of doing this instead...

This is exactly the crap that makes one wonder if the time used on
the project is well spent...

-Søren

It seems Bill Paul wrote:
> A long time ago, circa FreeBSD 4.3, my Sony PCMCIA CD-ROM drive with
> brain-damaged Teac ATA controller drive worked, and the people were
> content and all was right with the land. Then my 4.4 CD set arrived,
> and I was disappointed to find the install kernel would lock up after
> the driver was probed. Complaints were made and epithets were hurled,
> and lo, in 4.5-RELEASE, all was well once again.
> 
> Then came 4.6-RELEASE, and it was broken again.
> 
> Then came 4.6.2, and it was still broken.
> 
> And in 4.7.
> 
> And 4.8.
> 
> And 5.0. (Yeah yeah, shut up.)
> 
> I just got my 5.1-RELEASE CDs and guess what? My CD-ROM drive STILL
> doesn't work!!!
> 
> Guys, there's nothing more frustrating than getting a brand new CD
> set in the mail and not being able to install via CD. So I'm not leaving
> it up to chance anymore. I have a patch to make my drive work here:
> 
> http://www.freebsd.org/~wpaul/ata-card.c.diff-5.1
> 
> I have no idea what the altio port remapping goop in ata_pccard_probe()
> is supposed to accomplish, but I'm telling you all right now, it doesn't
> work with my drive. I have specifically added to code to skip the
> remapping for drives with the product string of "NinjaATA-" (the problem
> with the Teac controller is that its vendor/product ID is 0x/0x,
> so there's really no better way to indentify it). This patch changes
> this:
> 
> ata2: <  NinjaATA-> at port 0x180-0x187,0x386-0x387 irq 9 function 0 config 33 on 
> pccard0
> device_probe_and_attach: ata2 attach returned 6
> 
> Into this:
> 
> ata2: <  NinjaATA-> at port 0x180-0x187,0x386-0x387 irq 9 function 0 config 33 on 
> pccard0
> acd0: CDROM  at ata2-master PIO4
> 
> Now, I'm sending out this notification that I _WILL_ check this patch in
> before I leave the office today. I'm not asking for permission. I've been
> waiting for half a dozen releases for this to get fixed. When 5.2-RELEASE
> arrives in my mailbox, it _WILL_ install from CD-ROM on my laptop or so
> help me I will find the responsible parties and force them to listen to
> RMS sing "Free The Software" -- _live_ -- until their ears bleed.
> 
> I have tested this patch. It compiles. It works. I can mount CDs
> successfully and transfer stuff from them to my heart's content. I've
> reduced the change down to the absolute minimum and insured that it
> won't affect any other drives except mine. It's going in. Period.
> I am not leaving it up for debate, because if I do, all that will
> happen is that people will argue over what the more "correct" fix
> should be, and at this point I _just_ _don't_ _care_. I want my
> drive to work, and this does it. Understand? Good.
> 
> This concludes my announcement. Thank you all for your attention. Don't
> forget to tip the waitress.
> 
> -Bill
> 
> P.S.: Be sure to join us next time when I ream out whoever it was that
>   broke support for my 3Com 3c575C cardbus ethernet NIC.
> 
> --
> =
> -Bill Paul(510) 749-2329 | Senior Engineer, Master of Unix-Fu
>  [EMAIL PROTECTED] | Wind River Systems
> =
>   "If stupidity were a handicap, you'd have the best parking spot."
> =
> 

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Heads up: checking in change to ata-card.c

2003-06-26 Thread M. Warner Losh
Lose the attitude in the patch and email.  otherwise it looks good.
I'd rather that we had a table rather than doing the string coparison,
but I can fix that after your commit.

Warner
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Heads up: checking in change to ata-card.c

2003-06-26 Thread Bill Paul

A long time ago, circa FreeBSD 4.3, my Sony PCMCIA CD-ROM drive with
brain-damaged Teac ATA controller drive worked, and the people were
content and all was right with the land. Then my 4.4 CD set arrived,
and I was disappointed to find the install kernel would lock up after
the driver was probed. Complaints were made and epithets were hurled,
and lo, in 4.5-RELEASE, all was well once again.

Then came 4.6-RELEASE, and it was broken again.

Then came 4.6.2, and it was still broken.

And in 4.7.

And 4.8.

And 5.0. (Yeah yeah, shut up.)

I just got my 5.1-RELEASE CDs and guess what? My CD-ROM drive STILL
doesn't work!!!

Guys, there's nothing more frustrating than getting a brand new CD
set in the mail and not being able to install via CD. So I'm not leaving
it up to chance anymore. I have a patch to make my drive work here:

http://www.freebsd.org/~wpaul/ata-card.c.diff-5.1

I have no idea what the altio port remapping goop in ata_pccard_probe()
is supposed to accomplish, but I'm telling you all right now, it doesn't
work with my drive. I have specifically added to code to skip the
remapping for drives with the product string of "NinjaATA-" (the problem
with the Teac controller is that its vendor/product ID is 0x/0x,
so there's really no better way to indentify it). This patch changes
this:

ata2: <  NinjaATA-> at port 0x180-0x187,0x386-0x387 irq 9 function 0 config 33 on 
pccard0
device_probe_and_attach: ata2 attach returned 6

Into this:

ata2: <  NinjaATA-> at port 0x180-0x187,0x386-0x387 irq 9 function 0 config 33 on 
pccard0
acd0: CDROM  at ata2-master PIO4

Now, I'm sending out this notification that I _WILL_ check this patch in
before I leave the office today. I'm not asking for permission. I've been
waiting for half a dozen releases for this to get fixed. When 5.2-RELEASE
arrives in my mailbox, it _WILL_ install from CD-ROM on my laptop or so
help me I will find the responsible parties and force them to listen to
RMS sing "Free The Software" -- _live_ -- until their ears bleed.

I have tested this patch. It compiles. It works. I can mount CDs
successfully and transfer stuff from them to my heart's content. I've
reduced the change down to the absolute minimum and insured that it
won't affect any other drives except mine. It's going in. Period.
I am not leaving it up for debate, because if I do, all that will
happen is that people will argue over what the more "correct" fix
should be, and at this point I _just_ _don't_ _care_. I want my
drive to work, and this does it. Understand? Good.

This concludes my announcement. Thank you all for your attention. Don't
forget to tip the waitress.

-Bill

P.S.: Be sure to join us next time when I ream out whoever it was that
  broke support for my 3Com 3c575C cardbus ethernet NIC.

--
=
-Bill Paul(510) 749-2329 | Senior Engineer, Master of Unix-Fu
 [EMAIL PROTECTED] | Wind River Systems
=
  "If stupidity were a handicap, you'd have the best parking spot."
=
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"