ALi driver bug in new kernel

From: cjtsai@ali.com.tw
Date: Mon May 29 2000 - 04:34:42 EST


Hi,
in ali15x3.c:
unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif) {
       ...
        /*
         * Ultra66 cable detection (from Host View)
         * m5229, 0x4a, bit0: primary, bit1: secondary 80 pin
         *
         * 0x4a, bit0 is 0 => primary channel
         * has 80-pin (from host view)
         *
         * 0x4a, bit1 is 0 => secondary channel
         * has 80-pin (from host view)
         */
        pci_read_config_byte(dev, 0x4a, &tmpbyte);
        ata66 = (!(tmpbyte & ata66mask)) ? 1 : 0;
        __restore_flags(flags);

        return(ata66);
}

The cable detection result is meaningless for chip revision < 0xC2,
I suggest change the block of code to:
unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif) {
        ...
        return (hwif->channel) ? cable_80_pin[1] : cable_80_pin[0] ;
}

Best Regards.
C.J.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:20 EST