diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-03-23 02:25:38 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-03-23 02:25:38 +0000 |
commit | 16b5d462f73eb29d1f67fa01cc1ea66afdc72569 (patch) | |
tree | 5407bd573f4840e473ea27cbe61e5c7a07131fcd /drivers/parport | |
parent | ce8a076e11e7e5ee36007f9a3eee5bb3744cb8f6 (diff) |
Merge with Linux 2.3.99-pre2.
Diffstat (limited to 'drivers/parport')
-rw-r--r-- | drivers/parport/ChangeLog | 25 | ||||
-rw-r--r-- | drivers/parport/parport_pc.c | 69 |
2 files changed, 80 insertions, 14 deletions
diff --git a/drivers/parport/ChangeLog b/drivers/parport/ChangeLog index 8d01df21e..d2bb93c74 100644 --- a/drivers/parport/ChangeLog +++ b/drivers/parport/ChangeLog @@ -1,4 +1,23 @@ -2000-03-13 <twaugh@redhat.com> +2000-03-16 Tim Waugh <twaugh@redhat.com> + + * parport_pc.c (parport_ECP_supported): This seems to trigger on + machines that don't have an IRQ conflict; toned down the warning + message accordingly. + +2000-03-16 Gunther Mayer <gunther.mayer@braunschweig.netsurf.de> + + * parport_pc.c (show_parconfig_smsc37c669): Fix typo. + (decode_winbond): More IDs. + (winbond_check): Protect against false positives. + (winbond_check2): Likewise. + (smsc_check): Likewise. + +2000-03-15 Tim Waugh <twaugh@redhat.com> + + * parport_pc.c (cleanup_module): Don't call pci_unregister_driver + if we didn't call pci_register_driver first. + +2000-03-13 Tim Waugh <twaugh@redhat.com> * parport_pc.c (parport_pc_init): Moved from asm/parport.h. @@ -19,12 +38,12 @@ (parport_pc_find_ports): New function. (init_module): Make superio a config option, not a parameter. -2000-03-10 <twaugh@redhat.com> +2000-03-10 Tim Waugh <twaugh@redhat.com> * parport_pc.c (decode_winbond): Use correct 83877ATF chip ID. (decode_winbond): Fix typo. -2000-03-09 <twaugh@redhat.com> +2000-03-09 Tim Waugh <twaugh@redhat.com> * parport_pc.c: Integrate SuperIO PCI probe with normal PCI card probe, so that the MODULE_DEVICE_TABLE is complete. diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 7117c847e..dbbd12864 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -1060,7 +1060,7 @@ static void __devinit show_parconfig_smsc37c669(int io, int key) (cr23*4 >=0x100) ?"yes":"no", (cr1 & 4) ? "yes" : "no"); printk("SMSC LPT Config: Port mode=%s, EPP version =%s\n", (cr1 & 0x08 ) ? "Standard mode only (SPP)" : modes[cr4 & 0x03], - (cr4 & 40) ? "1.7" : "1.9"); + (cr4 & 0x40) ? "1.7" : "1.9"); /* Heuristics ! BIOS setup for this mainboard device limits the choices to standard settings, i.e. io-address and IRQ @@ -1172,12 +1172,15 @@ static void __devinit decode_winbond(int efer, int key, int devid, int devrev, i /* Values are from public data sheets pdf files, I can just confirm 83977TF is correct :-) */ - if (id == 0x9773) type="83977TF"; + if (id == 0x9771) type="83977F/AF"; + else if (id == 0x9773) type="83977TF / SMSC 97w33x/97w34x"; else if (id == 0x9774) type="83977ATF"; else if ((id & ~0x0f) == 0x5270) type="83977CTF / SMSC 97w36x"; - else if ((id & ~0x0f) == 0x52f0) type="83977EF / SMSC 97x35x"; + else if ((id & ~0x0f) == 0x52f0) type="83977EF / SMSC 97w35x"; else if ((id & ~0x0f) == 0x5210) type="83627"; else if ((id & ~0x0f) == 0x6010) type="83697HF"; + else if ((oldid &0x0f ) == 0x0a) { type="83877F"; progif=1;} + else if ((oldid &0x0f ) == 0x0b) { type="83877AF"; progif=1;} else if ((oldid &0x0f ) == 0x0c) { type="83877TF"; progif=1;} else if ((oldid &0x0f ) == 0x0d) { type="83877ATF"; progif=1;} else progif=0; @@ -1225,7 +1228,15 @@ static void __devinit decode_smsc(int efer, int key, int devid, int devrev) static void __devinit winbond_check(int io, int key) { - int devid,devrev,oldid; + int devid,devrev,oldid,x_devid,x_devrev,x_oldid; + + /* First probe without key */ + outb(0x20,io); + x_devid=inb(io+1); + outb(0x21,io); + x_devrev=inb(io+1); + outb(0x09,io); + x_oldid=inb(io+1); outb(key,io); outb(key,io); /* Write Magic Sequence to EFER, extended @@ -1238,12 +1249,23 @@ static void __devinit winbond_check(int io, int key) oldid=inb(io+1); outb(0xaa,io); /* Magic Seal */ + if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid)) + return; /* protection against false positives */ + decode_winbond(io,key,devid,devrev,oldid); } static void __devinit winbond_check2(int io,int key) { - int devid,devrev,oldid; + int devid,devrev,oldid,x_devid,x_devrev,x_oldid; + + /* First probe without the key */ + outb(0x20,io+2); + x_devid=inb(io+2); + outb(0x21,io+1); + x_devrev=inb(io+2); + outb(0x09,io+1); + x_oldid=inb(io+2); outb(key,io); /* Write Magic Byte to EFER, extended funtion enable register */ @@ -1255,23 +1277,44 @@ static void __devinit winbond_check2(int io,int key) oldid=inb(io+2); outb(0xaa,io); /* Magic Seal */ + if ((x_devid == devid) && (x_devrev == devrev) && (x_oldid == oldid)) + return; /* protection against false positives */ + decode_winbond(io,key,devid,devrev,oldid); } static void __devinit smsc_check(int io, int key) { - int devid,devrev; + int id,rev,oldid,oldrev,x_id,x_rev,x_oldid,x_oldrev; + + /* First probe without the key */ + outb(0x0d,io); + x_oldid=inb(io+1); + outb(0x0e,io); + x_oldrev=inb(io+1); + outb(0x20,io); + x_id=inb(io+1); + outb(0x21,io); + x_rev=inb(io+1); outb(key,io); outb(key,io); /* Write Magic Sequence to EFER, extended funtion enable register */ outb(0x0d,io); /* Write EFIR, extended function index register */ - devid=inb(io+1); /* Read EFDR, extended function data register */ + oldid=inb(io+1); /* Read EFDR, extended function data register */ outb(0x0e,io); - devrev=inb(io+1); + oldrev=inb(io+1); + outb(0x20,io); + id=inb(io+1); + outb(0x21,io); + rev=inb(io+1); outb(0xaa,io); /* Magic Seal */ - decode_smsc(io,key,devid,devrev); + if ((x_id == id) && (x_oldrev == oldrev) && + (x_oldid == oldid) && (x_rev == rev)) + return; /* protection against false positives */ + + decode_smsc(io,key,oldid,oldrev); } @@ -1584,7 +1627,8 @@ static int __devinit parport_ECP_supported(struct parport *pb) configb = inb (CONFIGB (pb)); if (!(configb & 0x40)) { - printk (KERN_WARNING "0x%lx: IRQ conflict!\n", pb->base); + printk (KERN_WARNING "0x%lx: possible IRQ conflict!\n", + pb->base); pb->irq = PARPORT_IRQ_NONE; } printk (KERN_DEBUG "0x%lx: ECP port cfgA=0x%02x cfgB=0x%02x\n", @@ -2487,7 +2531,10 @@ int init_module(void) void cleanup_module(void) { struct parport *p = parport_enumerate(), *tmp; - pci_unregister_driver (&parport_pc_pci_driver); + + if (!user_specified) + pci_unregister_driver (&parport_pc_pci_driver); + while (p) { tmp = p->next; if (p->modes & PARPORT_MODE_PCSPP) { |