]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/atm/lanai.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / drivers / atm / lanai.c
index 36226271b83c75d6bc6950abe0ce20419a44d4e5..cac09e353be8d0d87135c7f17e1fb8eaba7a95e8 100644 (file)
@@ -39,7 +39,7 @@
  * o  lanai_change_qos() isn't written yet
  *
  * o  There aren't any ioctl's yet -- I'd like to eventually support
- *    setting loopback and LED modes that way.  (see lanai_ioctl)
+ *    setting loopback and LED modes that way.
  *
  * o  If the segmentation engine or DMA gets shut down we should restart
  *    card as per section 17.0i.  (see lanai_reset)
@@ -1972,7 +1972,7 @@ static int __devinit lanai_pci_start(struct lanai_dev *lanai)
                    "(itf %d): No suitable DMA available.\n", lanai->number);
                return -EBUSY;
        }
-       if (pci_set_consistent_dma_mask(pci, 0xFFFFFFFF) != 0) {
+       if (pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK) != 0) {
                printk(KERN_WARNING DEV_LABEL
                    "(itf %d): No suitable DMA available.\n", lanai->number);
                return -EBUSY;
@@ -2435,93 +2435,6 @@ static int lanai_open(struct atm_vcc *atmvcc)
        return result;
 }
 
-#if 0
-/* ioctl operations for card */
-/* NOTE: these are all DEBUGGING ONLY currently */
-static int lanai_ioctl(struct atm_dev *atmdev, unsigned int cmd, void __user *arg)
-{
-       int result = 0;
-       struct lanai_dev *lanai = (struct lanai_dev *) atmdev->dev_data;
-       switch(cmd) {
-               case 2106275:
-                       shutdown_atm_dev(atmdev);
-                       return 0;
-               case 2200000: {
-                       unsigned long flags;
-                       spin_lock_irqsave(&lanai->servicelock, flags);
-                       run_service(lanai);
-                       spin_unlock_irqrestore(&lanai->servicelock, flags);
-                       return 0; }
-               case 2200002:
-                       get_statistics(lanai);
-                       return 0;
-               case 2200003: {
-                       unsigned int i;
-                       for (i = 0; i <= 0x5C ; i += 4) {
-                               if (i==0x48) /* Write-only butt reg */
-                                       continue;
-                               printk(KERN_CRIT DEV_LABEL "  0x%02X: "
-                                   "0x%08X\n", i,
-                                   (unsigned int) readl(lanai->base + i));
-                               barrier(); mb();
-                               pcistatus_check(lanai, 0);
-                               barrier(); mb();
-                       }
-                       return 0; }
-               case 2200004: {
-                       u8 b;
-                       u16 w;
-                       u32 dw;
-                       struct pci_dev *pci = lanai->pci;
-                       (void) pci_read_config_word(pci, PCI_VENDOR_ID, &w);
-                       DPRINTK("vendor = 0x%X\n", (unsigned int) w);
-                       (void) pci_read_config_word(pci, PCI_DEVICE_ID, &w);
-                       DPRINTK("device = 0x%X\n", (unsigned int) w);
-                       (void) pci_read_config_word(pci, PCI_COMMAND, &w);
-                       DPRINTK("command = 0x%X\n", (unsigned int) w);
-                       (void) pci_read_config_word(pci, PCI_STATUS, &w);
-                       DPRINTK("status = 0x%X\n", (unsigned int) w);
-                       (void) pci_read_config_dword(pci,
-                           PCI_CLASS_REVISION, &dw);
-                       DPRINTK("class/revision = 0x%X\n", (unsigned int) dw);
-                       (void) pci_read_config_byte(pci,
-                           PCI_CACHE_LINE_SIZE, &b);
-                       DPRINTK("cache line size = 0x%X\n", (unsigned int) b);
-                       (void) pci_read_config_byte(pci, PCI_LATENCY_TIMER, &b);
-                       DPRINTK("latency = %d (0x%X)\n",
-                           (int) b, (unsigned int) b);
-                       (void) pci_read_config_byte(pci, PCI_HEADER_TYPE, &b);
-                       DPRINTK("header type = 0x%X\n", (unsigned int) b);
-                       (void) pci_read_config_byte(pci, PCI_BIST, &b);
-                       DPRINTK("bist = 0x%X\n", (unsigned int) b);
-                       /* skipping a few here */
-                       (void) pci_read_config_byte(pci,
-                           PCI_INTERRUPT_LINE, &b);
-                       DPRINTK("pci_int_line = 0x%X\n", (unsigned int) b);
-                       (void) pci_read_config_byte(pci,
-                           PCI_INTERRUPT_PIN, &b);
-                       DPRINTK("pci_int_pin = 0x%X\n", (unsigned int) b);
-                       (void) pci_read_config_byte(pci, PCI_MIN_GNT, &b);
-                       DPRINTK("min_gnt = 0x%X\n", (unsigned int) b);
-                       (void) pci_read_config_byte(pci, PCI_MAX_LAT, &b);
-                       DPRINTK("max_lat = 0x%X\n", (unsigned int) b); }
-                       return 0;
-#ifdef USE_POWERDOWN
-               case 2200005:
-                       DPRINTK("Coming out of powerdown\n");
-                       lanai->conf1 &= ~CONFIG1_POWERDOWN;
-                       conf1_write(lanai);
-                       return 0;
-#endif
-               default:
-                       result = -ENOIOCTLCMD;
-       }
-       return result;
-}
-#else /* !0 */
-#define lanai_ioctl NULL
-#endif /* 0 */
-
 static int lanai_send(struct atm_vcc *atmvcc, struct sk_buff *skb)
 {
        struct lanai_vcc *lvcc = (struct lanai_vcc *) atmvcc->dev_data;
@@ -2679,7 +2592,6 @@ static const struct atmdev_ops ops = {
        .dev_close      = lanai_dev_close,
        .open           = lanai_open,
        .close          = lanai_close,
-       .ioctl          = lanai_ioctl,
        .getsockopt     = NULL,
        .setsockopt     = NULL,
        .send           = lanai_send,
@@ -2761,6 +2673,7 @@ static void __exit lanai_module_exit(void)
         * gone, so there isn't much to do
         */
        DPRINTK("cleanup_module()\n");
+       pci_unregister_driver(&lanai_driver);
 }
 
 module_init(lanai_module_init);