Bug FreeBSD 4.8 ATA driver

Mikulas Patocka mikulas at artax.karlin.mff.cuni.cz
Tue Aug 19 16:39:40 PDT 2003


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



More information about the freebsd-hackers mailing list