Bug FreeBSD 4.8 ATA driver

soralx at cydem.org.ua soralx at cydem.org.ua
Tue Aug 26 21:35:09 PDT 2003


> > I am reading FreeBSD ATA drivers because I want to use them as base for
> > my ATA driver and I found a total nonsence: in ata-dma.c in FreeBSD 4.8,
> > there is line
> >
> > if (!((pci_read_config(parent,0x40,4)>>(ch->unit<<8))&0x4000)) {
> >
> > if ch->unit is 1, config word is shifted by 256 bytes, which gives
> > undefined result in C. How was this meant? What should it do?
>
> 	Hm, it should be (IMHO)
> if (!((pci_read_config(parent,0x40,4)>>(ch->unit<<5))&0x4000))
>
> 	but I can't verify it as have no access to documentation for PIIX3 nor
> acces to the PIIX3 hardware now.

I have PIIX3 contorller on a machine with FreeBSD 4.8-RELEASE; I am willing to
test whatever needed.

26.08.2003; 22:32:58
[SorAlx]  http://cydem.org.ua/


More information about the freebsd-hackers mailing list