parport: add support for the Quatech SPPXP-100 Parallel port PCI ExpressCard
[safe/jmp/linux-2.6] / drivers / parport / parport_pc.c
index 7bfbad5..db26b40 100644 (file)
@@ -272,13 +272,6 @@ static int clear_epp_timeout(struct parport *pb)
  * of these are in parport_pc.h.
  */
 
-static irqreturn_t parport_pc_interrupt(int irq, void *dev_id)
-{
-       parport_generic_irq(irq, (struct parport *) dev_id);
-       /* FIXME! Was it really ours? */
-       return IRQ_HANDLED;
-}
-
 static void parport_pc_init_state(struct pardevice *dev, struct parport_state *s)
 {
        s->u.pc.ctr = 0xc;
@@ -2301,7 +2294,7 @@ struct parport *parport_pc_probe_port (unsigned long int base,
                EPP_res = NULL;
        }
        if (p->irq != PARPORT_IRQ_NONE) {
-               if (request_irq (p->irq, parport_pc_interrupt,
+               if (request_irq (p->irq, parport_irq_handler,
                                 0, p->name, p)) {
                        printk (KERN_WARNING "%s: irq %d in use, "
                                "resorting to polled operation\n",
@@ -2424,7 +2417,6 @@ static int __devinit sio_ite_8872_probe (struct pci_dev *pdev, int autoirq,
        u32 ite8872set;
        u32 ite8872_lpt, ite8872_lpthi;
        u8 ite8872_irq, type;
-       char *fake_name = "parport probe";
        int irq;
        int i;
 
@@ -2432,11 +2424,11 @@ static int __devinit sio_ite_8872_probe (struct pci_dev *pdev, int autoirq,
        
        // make sure which one chip
        for(i = 0; i < 5; i++) {
-               base_res = request_region(inta_addr[i], 0x8, fake_name);
+               base_res = request_region(inta_addr[i], 32, "it887x");
                if (base_res) {
                        int test;
                        pci_write_config_dword (pdev, 0x60,
-                                               0xe7000000 | inta_addr[i]);
+                                               0xe5000000 | inta_addr[i]);
                        pci_write_config_dword (pdev, 0x78,
                                                0x00000000 | inta_addr[i]);
                        test = inb (inta_addr[i]);
@@ -2775,6 +2767,7 @@ enum parport_pc_pci_cards {
        netmos_9755,
        netmos_9805,
        netmos_9815,
+       quatech_sppxp100,
 };
 
 
@@ -2851,6 +2844,7 @@ static struct parport_pc_pci {
         /* netmos_9755 */               { 2, { { 0, 1 }, { 2, 3 },} }, /* untested */
        /* netmos_9805 */               { 1, { { 0, -1 }, } }, /* untested */
        /* netmos_9815 */               { 2, { { 0, -1 }, { 2, -1 }, } }, /* untested */
+       /* quatech_sppxp100 */          { 1, { { 0, 1 }, } },
 };
 
 static const struct pci_device_id parport_pc_pci_tbl[] = {
@@ -2934,6 +2928,9 @@ static const struct pci_device_id parport_pc_pci_tbl[] = {
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9805 },
        { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9815,
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9815 },
+       /* Quatech SPPXP-100 Parallel port PCI ExpressCard */
+       { PCI_VENDOR_ID_QUATECH, PCI_DEVICE_ID_QUATECH_SPPXP_100,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, quatech_sppxp100 },
        { 0, } /* terminate list */
 };
 MODULE_DEVICE_TABLE(pci,parport_pc_pci_tbl);
@@ -3446,7 +3443,6 @@ static void __exit parport_pc_exit(void)
                pnp_unregister_driver (&parport_pc_pnp_driver);
        platform_driver_unregister(&parport_pc_platform_driver);
 
-       spin_lock(&ports_lock);
        while (!list_empty(&ports_list)) {
                struct parport_pc_private *priv;
                struct parport *port;
@@ -3456,11 +3452,8 @@ static void __exit parport_pc_exit(void)
                if (port->dev && port->dev->bus == &platform_bus_type)
                        platform_device_unregister(
                                to_platform_device(port->dev));
-               spin_unlock(&ports_lock);
                parport_pc_unregister_port(port);
-               spin_lock(&ports_lock);
        }
-       spin_unlock(&ports_lock);
 }
 
 MODULE_AUTHOR("Phil Blundell, Tim Waugh, others");