Bug FreeBSD 4.8 ATA driver

Mikulas Patocka mikulas at artax.karlin.mff.cuni.cz
Tue Aug 19 18:24:15 PDT 2003



On Wed, 20 Aug 2003, Mikulas Patocka wrote:

> Hi
>
> 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?
>
> Mikulas

Another weird thing: variable word44 is set but never used.

Mikulas





More information about the freebsd-hackers mailing list