Warning : previous patch was oviously bad for anything but ATA100 SIS controller. Thanks to John Fremlin for the proof-reading. New patch attached. John Fremlin wrote: > Lionel Bouton writes: > > [...] > > >>+static unsigned int capabilities = 0x00000000; >> > > Can't you make this per dev in some way? Is there a SIS standalone IDE controller? I'm not aware of such a beast, only know integrated chipsets. Anyhow here's a line of the original sis5513.c : static struct pci_dev *bmide_dev; If I'm not mistaken, the driver was not designed for multiple devices. I don't want to rewrite sis5513.c (yet), if there's need for such support, see end of mail. > > [...] > > >>+ if (capabilities && SIS5513_FLAG_ATA_100) { >> > > Typo? > > [...] > > >>+ if (capabilities && SIS5513_FLAG_ATA_100) { >> > > Ditto? > > [...] > > >>+ if (capabilities && SIS5513_FLAG_ATA_100) { >> > > Aarrgh > > Beginners like me should not code stuffed with chocolate! Can someone pass me a spare brown paper bag please? >>+ switch(timing) { /* active recovery >>+ v v */ >>+ case 4: test1 = 0x30|0x01; break; >>+ case 3: test1 = 0x30|0x03; break; >>+ case 2: test1 = 0x40|0x04; break; >>+ case 1: test1 = 0x60|0x07; break; >>+ default: break; >>+ } >>+ pci_write_config_byte(dev, drive_pci, test1); >>+ return; /* temporary hack for tests */ >> > > Is this the new magic you have added? > > [...] > It's a part of it yes. Other parts should fix the cycle time and the compatibility mode too. Less importantly the /proc/sis/ide should be correct now. > >>+ if (capabilities & SIS5513_FLAG_ATA_100) { >> > > Aaah much better > I'll punch one hole in my paper bag. > [...] > > I think that this driver needs to be tested on something that is not > ATA 100 :-) > It'll surely fail. How 3 simple chars can ruin your day... New patch attached should correct the problem. I've a rewritten sis5513.c in the works. I'll address code "prettiness" in this future one. If there's a need for multiple SIS IDE controller devices I'll put the support in this new one too. LB.