patch-2.3.28 linux/drivers/block/alim15x3.c
Next file: linux/drivers/block/cmd640.c
Previous file: linux/drivers/block/ali14xx.c
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Fri Nov 12 10:12:11 1999
- Orig file:
v2.3.27/linux/drivers/block/alim15x3.c
- Orig date:
Fri Oct 22 13:21:47 1999
diff -u --recursive --new-file v2.3.27/linux/drivers/block/alim15x3.c linux/drivers/block/alim15x3.c
@@ -693,6 +693,31 @@
chip_is_1543c_e = ((tmpbyte & 0x1e) == 0x12) ? 1: 0;
}
+ if (m5229_revision == 0x20) {
+ /*
+ * check M1533 revision (offset 0x08)
+ */
+ pci_read_config_byte(isa_dev, 0x08, &tmpbyte);
+ if (tmpbyte == 0x0A) {
+ unsigned long flags;
+ pci_read_config_byte(dev, 0x4e, &tmpbyte);
+ save_flags(flags);
+ cli();
+ /*
+ * set bit 6
+ */
+ pci_write_config_byte(dev, 0x4e, tmpbyte | 0x40);
+ restore_flags(flags);
+
+ /*
+ * this special version is similar to revision 0xC2
+ * but does not support UDMA66
+ * (cable_80_pin[0] = 0; cable_80_pin[1] = 0;)
+ */
+ m5229_revision = 0xC2;
+ }
+ }
+
return 0;
}
@@ -742,7 +767,7 @@
}
hwif->tuneproc = &ali15x3_tune_drive;
- if ((hwif->dma_base) && (m5229_revision >= 0xC1)) {
+ if ((hwif->dma_base) && (m5229_revision >= 0x20)) {
/*
* M1543C or newer for DMAing
*/
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)