[PATCH] adaptec 1210sa

From: Mickael Marchand
Date: Sun Dec 21 2003 - 21:06:32 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

reading linux-scsi I found a suggestion by Justin to make adaptec's 1210 sa
working. I made the corresponding patch for libata, and it actually works :)

it needs some redesign to only apply to aar1210 (as standard sil3112 does not
need it) and I guess some testing before inclusion.

the idea suggested by Justin was to clear bits 6 and 7 at 0x8a of pci
configuration space. (which I hope did fine :)

Thanks Justin :)

Cheers,
Mik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/5lFoyOYzc4nQ8j0RAo9LAJ90CMeKb8wcE9ZgGULpUmep2wScdQCfYQ7B
fjiz1d2FE1+HTxFXSG2Pc6s=
=aott
-----END PGP SIGNATURE-----
--- /usr/src/linux-2.6.0/drivers/scsi/sata_sil.c 2003-12-21 13:30:58.000000000 +0100
+++ linux-2.6.0/drivers/scsi/sata_sil.c 2003-12-22 02:46:32.000000000 +0100
@@ -276,6 +276,16 @@
goto err_out_regions;
}

+ //let's have fun
+ u8 v;
+ pci_read_config_byte(pdev, 0x8a, &v);
+ int mask = 0x3f; //clear 6 and 7 bits
+ if (v & ~mask) {
+ printk("Reenabling interrupts because Adaptec's BIOS disables them\n" );
+ v &= mask;
+ pci_write_config_byte(pdev, 0x8a, v);
+ }
+
memset(probe_ent, 0, sizeof(*probe_ent));
INIT_LIST_HEAD(&probe_ent->node);
probe_ent->pdev = pdev;