diff options
Diffstat (limited to 'drivers/net/tokenring/3c359.c')
-rw-r--r-- | drivers/net/tokenring/3c359.c | 113 |
1 files changed, 57 insertions, 56 deletions
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c index 0fb930feea45..10800f16a231 100644 --- a/drivers/net/tokenring/3c359.c +++ b/drivers/net/tokenring/3c359.c | |||
@@ -63,6 +63,7 @@ | |||
63 | #include <linux/spinlock.h> | 63 | #include <linux/spinlock.h> |
64 | #include <linux/bitops.h> | 64 | #include <linux/bitops.h> |
65 | #include <linux/firmware.h> | 65 | #include <linux/firmware.h> |
66 | #include <linux/slab.h> | ||
66 | 67 | ||
67 | #include <net/checksum.h> | 68 | #include <net/checksum.h> |
68 | 69 | ||
@@ -76,7 +77,7 @@ static char version[] __devinitdata = | |||
76 | 77 | ||
77 | #define FW_NAME "3com/3C359.bin" | 78 | #define FW_NAME "3com/3C359.bin" |
78 | MODULE_AUTHOR("Mike Phillips <mikep@linuxtr.net>") ; | 79 | MODULE_AUTHOR("Mike Phillips <mikep@linuxtr.net>") ; |
79 | MODULE_DESCRIPTION("3Com 3C359 Velocity XL Token Ring Adapter Driver \n") ; | 80 | MODULE_DESCRIPTION("3Com 3C359 Velocity XL Token Ring Adapter Driver\n") ; |
80 | MODULE_FIRMWARE(FW_NAME); | 81 | MODULE_FIRMWARE(FW_NAME); |
81 | 82 | ||
82 | /* Module parameters */ | 83 | /* Module parameters */ |
@@ -162,19 +163,19 @@ static void print_tx_state(struct net_device *dev) | |||
162 | u8 __iomem *xl_mmio = xl_priv->xl_mmio ; | 163 | u8 __iomem *xl_mmio = xl_priv->xl_mmio ; |
163 | int i ; | 164 | int i ; |
164 | 165 | ||
165 | printk("tx_ring_head: %d, tx_ring_tail: %d, free_ent: %d \n",xl_priv->tx_ring_head, | 166 | printk("tx_ring_head: %d, tx_ring_tail: %d, free_ent: %d\n",xl_priv->tx_ring_head, |
166 | xl_priv->tx_ring_tail, xl_priv->free_ring_entries) ; | 167 | xl_priv->tx_ring_tail, xl_priv->free_ring_entries) ; |
167 | printk("Ring , Address , FSH , DnNextPtr, Buffer, Buffer_Len \n"); | 168 | printk("Ring , Address , FSH , DnNextPtr, Buffer, Buffer_Len\n"); |
168 | for (i = 0; i < 16; i++) { | 169 | for (i = 0; i < 16; i++) { |
169 | txd = &(xl_priv->xl_tx_ring[i]) ; | 170 | txd = &(xl_priv->xl_tx_ring[i]) ; |
170 | printk("%d, %08lx, %08x, %08x, %08x, %08x \n", i, virt_to_bus(txd), | 171 | printk("%d, %08lx, %08x, %08x, %08x, %08x\n", i, virt_to_bus(txd), |
171 | txd->framestartheader, txd->dnnextptr, txd->buffer, txd->buffer_length ) ; | 172 | txd->framestartheader, txd->dnnextptr, txd->buffer, txd->buffer_length ) ; |
172 | } | 173 | } |
173 | 174 | ||
174 | printk("DNLISTPTR = %04x \n", readl(xl_mmio + MMIO_DNLISTPTR) ); | 175 | printk("DNLISTPTR = %04x\n", readl(xl_mmio + MMIO_DNLISTPTR) ); |
175 | 176 | ||
176 | printk("DmaCtl = %04x \n", readl(xl_mmio + MMIO_DMA_CTRL) ); | 177 | printk("DmaCtl = %04x\n", readl(xl_mmio + MMIO_DMA_CTRL) ); |
177 | printk("Queue status = %0x \n",netif_running(dev) ) ; | 178 | printk("Queue status = %0x\n",netif_running(dev) ) ; |
178 | } | 179 | } |
179 | 180 | ||
180 | static void print_rx_state(struct net_device *dev) | 181 | static void print_rx_state(struct net_device *dev) |
@@ -185,19 +186,19 @@ static void print_rx_state(struct net_device *dev) | |||
185 | u8 __iomem *xl_mmio = xl_priv->xl_mmio ; | 186 | u8 __iomem *xl_mmio = xl_priv->xl_mmio ; |
186 | int i ; | 187 | int i ; |
187 | 188 | ||
188 | printk("rx_ring_tail: %d \n", xl_priv->rx_ring_tail) ; | 189 | printk("rx_ring_tail: %d\n", xl_priv->rx_ring_tail); |
189 | printk("Ring , Address , FrameState , UPNextPtr, FragAddr, Frag_Len \n"); | 190 | printk("Ring , Address , FrameState , UPNextPtr, FragAddr, Frag_Len\n"); |
190 | for (i = 0; i < 16; i++) { | 191 | for (i = 0; i < 16; i++) { |
191 | /* rxd = (struct xl_rx_desc *)xl_priv->rx_ring_dma_addr + (i * sizeof(struct xl_rx_desc)) ; */ | 192 | /* rxd = (struct xl_rx_desc *)xl_priv->rx_ring_dma_addr + (i * sizeof(struct xl_rx_desc)) ; */ |
192 | rxd = &(xl_priv->xl_rx_ring[i]) ; | 193 | rxd = &(xl_priv->xl_rx_ring[i]) ; |
193 | printk("%d, %08lx, %08x, %08x, %08x, %08x \n", i, virt_to_bus(rxd), | 194 | printk("%d, %08lx, %08x, %08x, %08x, %08x\n", i, virt_to_bus(rxd), |
194 | rxd->framestatus, rxd->upnextptr, rxd->upfragaddr, rxd->upfraglen ) ; | 195 | rxd->framestatus, rxd->upnextptr, rxd->upfragaddr, rxd->upfraglen ) ; |
195 | } | 196 | } |
196 | 197 | ||
197 | printk("UPLISTPTR = %04x \n", readl(xl_mmio + MMIO_UPLISTPTR) ); | 198 | printk("UPLISTPTR = %04x\n", readl(xl_mmio + MMIO_UPLISTPTR)); |
198 | 199 | ||
199 | printk("DmaCtl = %04x \n", readl(xl_mmio + MMIO_DMA_CTRL) ); | 200 | printk("DmaCtl = %04x\n", readl(xl_mmio + MMIO_DMA_CTRL)); |
200 | printk("Queue status = %0x \n",netif_running(dev) ) ; | 201 | printk("Queue status = %0x\n",netif_running(dev)); |
201 | } | 202 | } |
202 | #endif | 203 | #endif |
203 | 204 | ||
@@ -390,7 +391,7 @@ static int __devinit xl_init(struct net_device *dev) | |||
390 | struct xl_private *xl_priv = netdev_priv(dev); | 391 | struct xl_private *xl_priv = netdev_priv(dev); |
391 | int err; | 392 | int err; |
392 | 393 | ||
393 | printk(KERN_INFO "%s \n", version); | 394 | printk(KERN_INFO "%s\n", version); |
394 | printk(KERN_INFO "%s: I/O at %hx, MMIO at %p, using irq %d\n", | 395 | printk(KERN_INFO "%s: I/O at %hx, MMIO at %p, using irq %d\n", |
395 | xl_priv->xl_card_name, (unsigned int)dev->base_addr ,xl_priv->xl_mmio, dev->irq); | 396 | xl_priv->xl_card_name, (unsigned int)dev->base_addr ,xl_priv->xl_mmio, dev->irq); |
396 | 397 | ||
@@ -462,7 +463,7 @@ static int xl_hw_reset(struct net_device *dev) | |||
462 | writel( (IO_WORD_READ | PMBAR),xl_mmio + MMIO_MAC_ACCESS_CMD); | 463 | writel( (IO_WORD_READ | PMBAR),xl_mmio + MMIO_MAC_ACCESS_CMD); |
463 | 464 | ||
464 | #if XL_DEBUG | 465 | #if XL_DEBUG |
465 | printk(KERN_INFO "Read from PMBAR = %04x \n", readw(xl_mmio + MMIO_MACDATA)) ; | 466 | printk(KERN_INFO "Read from PMBAR = %04x\n", readw(xl_mmio + MMIO_MACDATA)); |
466 | #endif | 467 | #endif |
467 | 468 | ||
468 | if ( readw( (xl_mmio + MMIO_MACDATA)) & PMB_CPHOLD ) { | 469 | if ( readw( (xl_mmio + MMIO_MACDATA)) & PMB_CPHOLD ) { |
@@ -590,9 +591,9 @@ static int xl_hw_reset(struct net_device *dev) | |||
590 | #if XL_DEBUG | 591 | #if XL_DEBUG |
591 | writel(IO_WORD_READ | SWITCHSETTINGS, xl_mmio + MMIO_MAC_ACCESS_CMD) ; | 592 | writel(IO_WORD_READ | SWITCHSETTINGS, xl_mmio + MMIO_MAC_ACCESS_CMD) ; |
592 | if ( readw(xl_mmio + MMIO_MACDATA) & 2) { | 593 | if ( readw(xl_mmio + MMIO_MACDATA) & 2) { |
593 | printk(KERN_INFO "Default ring speed 4 mbps \n") ; | 594 | printk(KERN_INFO "Default ring speed 4 mbps\n"); |
594 | } else { | 595 | } else { |
595 | printk(KERN_INFO "Default ring speed 16 mbps \n") ; | 596 | printk(KERN_INFO "Default ring speed 16 mbps\n"); |
596 | } | 597 | } |
597 | printk(KERN_INFO "%s: xl_priv->srb = %04x\n",xl_priv->xl_card_name, xl_priv->srb); | 598 | printk(KERN_INFO "%s: xl_priv->srb = %04x\n",xl_priv->xl_card_name, xl_priv->srb); |
598 | #endif | 599 | #endif |
@@ -650,7 +651,7 @@ static int xl_open(struct net_device *dev) | |||
650 | 651 | ||
651 | if (open_err != 0) { /* Something went wrong with the open command */ | 652 | if (open_err != 0) { /* Something went wrong with the open command */ |
652 | if (open_err & 0x07) { /* Wrong speed, retry at different speed */ | 653 | if (open_err & 0x07) { /* Wrong speed, retry at different speed */ |
653 | printk(KERN_WARNING "%s: Open Error, retrying at different ringspeed \n", dev->name) ; | 654 | printk(KERN_WARNING "%s: Open Error, retrying at different ringspeed\n", dev->name); |
654 | switchsettings = switchsettings ^ 2 ; | 655 | switchsettings = switchsettings ^ 2 ; |
655 | xl_ee_write(dev,0x08,switchsettings) ; | 656 | xl_ee_write(dev,0x08,switchsettings) ; |
656 | xl_hw_reset(dev) ; | 657 | xl_hw_reset(dev) ; |
@@ -702,7 +703,7 @@ static int xl_open(struct net_device *dev) | |||
702 | } | 703 | } |
703 | 704 | ||
704 | if (i==0) { | 705 | if (i==0) { |
705 | printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers. Adapter disabled \n",dev->name) ; | 706 | printk(KERN_WARNING "%s: Not enough memory to allocate rx buffers. Adapter disabled\n",dev->name); |
706 | free_irq(dev->irq,dev) ; | 707 | free_irq(dev->irq,dev) ; |
707 | kfree(xl_priv->xl_tx_ring); | 708 | kfree(xl_priv->xl_tx_ring); |
708 | kfree(xl_priv->xl_rx_ring); | 709 | kfree(xl_priv->xl_rx_ring); |
@@ -852,7 +853,7 @@ static int xl_open_hw(struct net_device *dev) | |||
852 | 853 | ||
853 | writel( (MEM_WORD_READ | 0xD0000 | xl_priv->srb) + 12, xl_mmio + MMIO_MAC_ACCESS_CMD) ; | 854 | writel( (MEM_WORD_READ | 0xD0000 | xl_priv->srb) + 12, xl_mmio + MMIO_MAC_ACCESS_CMD) ; |
854 | xl_priv->arb = swab16(readw(xl_mmio + MMIO_MACDATA)) ; | 855 | xl_priv->arb = swab16(readw(xl_mmio + MMIO_MACDATA)) ; |
855 | printk(", ARB: %04x \n",xl_priv->arb ) ; | 856 | printk(", ARB: %04x\n",xl_priv->arb ); |
856 | writel( (MEM_WORD_READ | 0xD0000 | xl_priv->srb) + 14, xl_mmio + MMIO_MAC_ACCESS_CMD) ; | 857 | writel( (MEM_WORD_READ | 0xD0000 | xl_priv->srb) + 14, xl_mmio + MMIO_MAC_ACCESS_CMD) ; |
857 | vsoff = swab16(readw(xl_mmio + MMIO_MACDATA)) ; | 858 | vsoff = swab16(readw(xl_mmio + MMIO_MACDATA)) ; |
858 | 859 | ||
@@ -866,7 +867,7 @@ static int xl_open_hw(struct net_device *dev) | |||
866 | ver_str[i] = readb(xl_mmio + MMIO_MACDATA) ; | 867 | ver_str[i] = readb(xl_mmio + MMIO_MACDATA) ; |
867 | } | 868 | } |
868 | ver_str[i] = '\0' ; | 869 | ver_str[i] = '\0' ; |
869 | printk(KERN_INFO "%s: Microcode version String: %s \n",dev->name,ver_str); | 870 | printk(KERN_INFO "%s: Microcode version String: %s\n",dev->name,ver_str); |
870 | } | 871 | } |
871 | 872 | ||
872 | /* | 873 | /* |
@@ -990,7 +991,7 @@ static void xl_rx(struct net_device *dev) | |||
990 | skb = dev_alloc_skb(xl_priv->pkt_buf_sz) ; | 991 | skb = dev_alloc_skb(xl_priv->pkt_buf_sz) ; |
991 | 992 | ||
992 | if (skb==NULL) { /* Still need to fix the rx ring */ | 993 | if (skb==NULL) { /* Still need to fix the rx ring */ |
993 | printk(KERN_WARNING "%s: dev_alloc_skb failed in rx, single buffer \n",dev->name) ; | 994 | printk(KERN_WARNING "%s: dev_alloc_skb failed in rx, single buffer\n",dev->name); |
994 | adv_rx_ring(dev) ; | 995 | adv_rx_ring(dev) ; |
995 | dev->stats.rx_dropped++ ; | 996 | dev->stats.rx_dropped++ ; |
996 | writel(ACK_INTERRUPT | UPCOMPACK | LATCH_ACK , xl_mmio + MMIO_COMMAND) ; | 997 | writel(ACK_INTERRUPT | UPCOMPACK | LATCH_ACK , xl_mmio + MMIO_COMMAND) ; |
@@ -1091,7 +1092,7 @@ static irqreturn_t xl_interrupt(int irq, void *dev_id) | |||
1091 | */ | 1092 | */ |
1092 | if (intstatus == 0x0001) { | 1093 | if (intstatus == 0x0001) { |
1093 | writel(ACK_INTERRUPT | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; | 1094 | writel(ACK_INTERRUPT | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; |
1094 | printk(KERN_INFO "%s: 00001 int received \n",dev->name) ; | 1095 | printk(KERN_INFO "%s: 00001 int received\n",dev->name); |
1095 | } else { | 1096 | } else { |
1096 | if (intstatus & (HOSTERRINT | SRBRINT | ARBCINT | UPCOMPINT | DNCOMPINT | HARDERRINT | (1<<8) | TXUNDERRUN | ASBFINT)) { | 1097 | if (intstatus & (HOSTERRINT | SRBRINT | ARBCINT | UPCOMPINT | DNCOMPINT | HARDERRINT | (1<<8) | TXUNDERRUN | ASBFINT)) { |
1097 | 1098 | ||
@@ -1102,9 +1103,9 @@ static irqreturn_t xl_interrupt(int irq, void *dev_id) | |||
1102 | */ | 1103 | */ |
1103 | 1104 | ||
1104 | if (intstatus & HOSTERRINT) { | 1105 | if (intstatus & HOSTERRINT) { |
1105 | printk(KERN_WARNING "%s: Host Error, performing global reset, intstatus = %04x \n",dev->name,intstatus) ; | 1106 | printk(KERN_WARNING "%s: Host Error, performing global reset, intstatus = %04x\n",dev->name,intstatus); |
1106 | writew( GLOBAL_RESET, xl_mmio + MMIO_COMMAND ) ; | 1107 | writew( GLOBAL_RESET, xl_mmio + MMIO_COMMAND ) ; |
1107 | printk(KERN_WARNING "%s: Resetting hardware: \n", dev->name); | 1108 | printk(KERN_WARNING "%s: Resetting hardware:\n", dev->name); |
1108 | netif_stop_queue(dev) ; | 1109 | netif_stop_queue(dev) ; |
1109 | xl_freemem(dev) ; | 1110 | xl_freemem(dev) ; |
1110 | free_irq(dev->irq,dev); | 1111 | free_irq(dev->irq,dev); |
@@ -1127,7 +1128,7 @@ static irqreturn_t xl_interrupt(int irq, void *dev_id) | |||
1127 | Must put a timeout check here ! */ | 1128 | Must put a timeout check here ! */ |
1128 | /* Empty Loop */ | 1129 | /* Empty Loop */ |
1129 | } | 1130 | } |
1130 | printk(KERN_WARNING "%s: TX Underrun received \n",dev->name) ; | 1131 | printk(KERN_WARNING "%s: TX Underrun received\n",dev->name); |
1131 | writel(ACK_INTERRUPT | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; | 1132 | writel(ACK_INTERRUPT | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; |
1132 | } /* TxUnderRun */ | 1133 | } /* TxUnderRun */ |
1133 | 1134 | ||
@@ -1156,13 +1157,13 @@ static irqreturn_t xl_interrupt(int irq, void *dev_id) | |||
1156 | macstatus = readw(xl_mmio + MMIO_MACDATA) ; | 1157 | macstatus = readw(xl_mmio + MMIO_MACDATA) ; |
1157 | printk(KERN_WARNING "%s: MacStatusError, details: ", dev->name); | 1158 | printk(KERN_WARNING "%s: MacStatusError, details: ", dev->name); |
1158 | if (macstatus & (1<<14)) | 1159 | if (macstatus & (1<<14)) |
1159 | printk(KERN_WARNING "tchk error: Unrecoverable error \n") ; | 1160 | printk(KERN_WARNING "tchk error: Unrecoverable error\n"); |
1160 | if (macstatus & (1<<3)) | 1161 | if (macstatus & (1<<3)) |
1161 | printk(KERN_WARNING "eint error: Internal watchdog timer expired \n") ; | 1162 | printk(KERN_WARNING "eint error: Internal watchdog timer expired\n"); |
1162 | if (macstatus & (1<<2)) | 1163 | if (macstatus & (1<<2)) |
1163 | printk(KERN_WARNING "aint error: Host tried to perform invalid operation \n") ; | 1164 | printk(KERN_WARNING "aint error: Host tried to perform invalid operation\n"); |
1164 | printk(KERN_WARNING "Instatus = %02x, macstatus = %02x\n",intstatus,macstatus) ; | 1165 | printk(KERN_WARNING "Instatus = %02x, macstatus = %02x\n",intstatus,macstatus) ; |
1165 | printk(KERN_WARNING "%s: Resetting hardware: \n", dev->name); | 1166 | printk(KERN_WARNING "%s: Resetting hardware:\n", dev->name); |
1166 | netif_stop_queue(dev) ; | 1167 | netif_stop_queue(dev) ; |
1167 | xl_freemem(dev) ; | 1168 | xl_freemem(dev) ; |
1168 | free_irq(dev->irq,dev); | 1169 | free_irq(dev->irq,dev); |
@@ -1174,7 +1175,7 @@ static irqreturn_t xl_interrupt(int irq, void *dev_id) | |||
1174 | return IRQ_HANDLED; | 1175 | return IRQ_HANDLED; |
1175 | } | 1176 | } |
1176 | } else { | 1177 | } else { |
1177 | printk(KERN_WARNING "%s: Received Unknown interrupt : %04x \n", dev->name, intstatus) ; | 1178 | printk(KERN_WARNING "%s: Received Unknown interrupt : %04x\n", dev->name, intstatus); |
1178 | writel(ACK_INTERRUPT | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; | 1179 | writel(ACK_INTERRUPT | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; |
1179 | } | 1180 | } |
1180 | } | 1181 | } |
@@ -1349,11 +1350,11 @@ static int xl_close(struct net_device *dev) | |||
1349 | 1350 | ||
1350 | writel(MEM_BYTE_READ | 0xd0000 | xl_priv->srb, xl_mmio + MMIO_MAC_ACCESS_CMD); | 1351 | writel(MEM_BYTE_READ | 0xd0000 | xl_priv->srb, xl_mmio + MMIO_MAC_ACCESS_CMD); |
1351 | if (readb(xl_mmio + MMIO_MACDATA) != CLOSE_NIC) { | 1352 | if (readb(xl_mmio + MMIO_MACDATA) != CLOSE_NIC) { |
1352 | printk(KERN_INFO "%s: CLOSE_NIC did not get a CLOSE_NIC response \n",dev->name) ; | 1353 | printk(KERN_INFO "%s: CLOSE_NIC did not get a CLOSE_NIC response\n",dev->name); |
1353 | } else { | 1354 | } else { |
1354 | writel((MEM_BYTE_READ | 0xd0000 | xl_priv->srb) +2, xl_mmio + MMIO_MAC_ACCESS_CMD) ; | 1355 | writel((MEM_BYTE_READ | 0xd0000 | xl_priv->srb) +2, xl_mmio + MMIO_MAC_ACCESS_CMD) ; |
1355 | if (readb(xl_mmio + MMIO_MACDATA)==0) { | 1356 | if (readb(xl_mmio + MMIO_MACDATA)==0) { |
1356 | printk(KERN_INFO "%s: Adapter has been closed \n",dev->name) ; | 1357 | printk(KERN_INFO "%s: Adapter has been closed\n",dev->name); |
1357 | writew(ACK_INTERRUPT | SRBRACK | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; | 1358 | writew(ACK_INTERRUPT | SRBRACK | LATCH_ACK, xl_mmio + MMIO_COMMAND) ; |
1358 | 1359 | ||
1359 | xl_freemem(dev) ; | 1360 | xl_freemem(dev) ; |
@@ -1390,7 +1391,7 @@ static int xl_close(struct net_device *dev) | |||
1390 | static void xl_set_rx_mode(struct net_device *dev) | 1391 | static void xl_set_rx_mode(struct net_device *dev) |
1391 | { | 1392 | { |
1392 | struct xl_private *xl_priv = netdev_priv(dev); | 1393 | struct xl_private *xl_priv = netdev_priv(dev); |
1393 | struct dev_mc_list *dmi; | 1394 | struct netdev_hw_addr *ha; |
1394 | unsigned char dev_mc_address[4] ; | 1395 | unsigned char dev_mc_address[4] ; |
1395 | u16 options ; | 1396 | u16 options ; |
1396 | 1397 | ||
@@ -1407,11 +1408,11 @@ static void xl_set_rx_mode(struct net_device *dev) | |||
1407 | 1408 | ||
1408 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; | 1409 | dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; |
1409 | 1410 | ||
1410 | netdev_for_each_mc_addr(dmi, dev) { | 1411 | netdev_for_each_mc_addr(ha, dev) { |
1411 | dev_mc_address[0] |= dmi->dmi_addr[2] ; | 1412 | dev_mc_address[0] |= ha->addr[2]; |
1412 | dev_mc_address[1] |= dmi->dmi_addr[3] ; | 1413 | dev_mc_address[1] |= ha->addr[3]; |
1413 | dev_mc_address[2] |= dmi->dmi_addr[4] ; | 1414 | dev_mc_address[2] |= ha->addr[4]; |
1414 | dev_mc_address[3] |= dmi->dmi_addr[5] ; | 1415 | dev_mc_address[3] |= ha->addr[5]; |
1415 | } | 1416 | } |
1416 | 1417 | ||
1417 | if (memcmp(xl_priv->xl_functional_addr,dev_mc_address,4) != 0) { /* Options have changed, run the command */ | 1418 | if (memcmp(xl_priv->xl_functional_addr,dev_mc_address,4) != 0) { /* Options have changed, run the command */ |
@@ -1446,11 +1447,11 @@ static void xl_srb_bh(struct net_device *dev) | |||
1446 | printk(KERN_INFO "%s: Command: %d - Invalid Command code\n",dev->name,srb_cmd) ; | 1447 | printk(KERN_INFO "%s: Command: %d - Invalid Command code\n",dev->name,srb_cmd) ; |
1447 | break ; | 1448 | break ; |
1448 | case 4: | 1449 | case 4: |
1449 | printk(KERN_INFO "%s: Command: %d - Adapter is closed, must be open for this command \n",dev->name,srb_cmd) ; | 1450 | printk(KERN_INFO "%s: Command: %d - Adapter is closed, must be open for this command\n",dev->name,srb_cmd); |
1450 | break ; | 1451 | break ; |
1451 | 1452 | ||
1452 | case 6: | 1453 | case 6: |
1453 | printk(KERN_INFO "%s: Command: %d - Options Invalid for command \n",dev->name,srb_cmd) ; | 1454 | printk(KERN_INFO "%s: Command: %d - Options Invalid for command\n",dev->name,srb_cmd); |
1454 | break ; | 1455 | break ; |
1455 | 1456 | ||
1456 | case 0: /* Successful command execution */ | 1457 | case 0: /* Successful command execution */ |
@@ -1471,11 +1472,11 @@ static void xl_srb_bh(struct net_device *dev) | |||
1471 | break ; | 1472 | break ; |
1472 | case SET_FUNC_ADDRESS: | 1473 | case SET_FUNC_ADDRESS: |
1473 | if(xl_priv->xl_message_level) | 1474 | if(xl_priv->xl_message_level) |
1474 | printk(KERN_INFO "%s: Functional Address Set \n",dev->name) ; | 1475 | printk(KERN_INFO "%s: Functional Address Set\n",dev->name); |
1475 | break ; | 1476 | break ; |
1476 | case CLOSE_NIC: | 1477 | case CLOSE_NIC: |
1477 | if(xl_priv->xl_message_level) | 1478 | if(xl_priv->xl_message_level) |
1478 | printk(KERN_INFO "%s: Received CLOSE_NIC interrupt in interrupt handler \n",dev->name) ; | 1479 | printk(KERN_INFO "%s: Received CLOSE_NIC interrupt in interrupt handler\n",dev->name); |
1479 | break ; | 1480 | break ; |
1480 | case SET_MULTICAST_MODE: | 1481 | case SET_MULTICAST_MODE: |
1481 | if(xl_priv->xl_message_level) | 1482 | if(xl_priv->xl_message_level) |
@@ -1484,9 +1485,9 @@ static void xl_srb_bh(struct net_device *dev) | |||
1484 | case SET_RECEIVE_MODE: | 1485 | case SET_RECEIVE_MODE: |
1485 | if(xl_priv->xl_message_level) { | 1486 | if(xl_priv->xl_message_level) { |
1486 | if (xl_priv->xl_copy_all_options == 0x0004) | 1487 | if (xl_priv->xl_copy_all_options == 0x0004) |
1487 | printk(KERN_INFO "%s: Entering promiscuous mode \n", dev->name) ; | 1488 | printk(KERN_INFO "%s: Entering promiscuous mode\n", dev->name); |
1488 | else | 1489 | else |
1489 | printk(KERN_INFO "%s: Entering normal receive mode \n",dev->name) ; | 1490 | printk(KERN_INFO "%s: Entering normal receive mode\n",dev->name); |
1490 | } | 1491 | } |
1491 | break ; | 1492 | break ; |
1492 | 1493 | ||
@@ -1556,20 +1557,20 @@ static void xl_arb_cmd(struct net_device *dev) | |||
1556 | xl_freemem(dev) ; | 1557 | xl_freemem(dev) ; |
1557 | free_irq(dev->irq,dev); | 1558 | free_irq(dev->irq,dev); |
1558 | 1559 | ||
1559 | printk(KERN_WARNING "%s: Adapter has been closed \n", dev->name) ; | 1560 | printk(KERN_WARNING "%s: Adapter has been closed\n", dev->name); |
1560 | } /* If serious error */ | 1561 | } /* If serious error */ |
1561 | 1562 | ||
1562 | if (xl_priv->xl_message_level) { | 1563 | if (xl_priv->xl_message_level) { |
1563 | if (lan_status_diff & LSC_SIG_LOSS) | 1564 | if (lan_status_diff & LSC_SIG_LOSS) |
1564 | printk(KERN_WARNING "%s: No receive signal detected \n", dev->name) ; | 1565 | printk(KERN_WARNING "%s: No receive signal detected\n", dev->name); |
1565 | if (lan_status_diff & LSC_HARD_ERR) | 1566 | if (lan_status_diff & LSC_HARD_ERR) |
1566 | printk(KERN_INFO "%s: Beaconing \n",dev->name); | 1567 | printk(KERN_INFO "%s: Beaconing\n",dev->name); |
1567 | if (lan_status_diff & LSC_SOFT_ERR) | 1568 | if (lan_status_diff & LSC_SOFT_ERR) |
1568 | printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame \n",dev->name); | 1569 | printk(KERN_WARNING "%s: Adapter transmitted Soft Error Report Mac Frame\n",dev->name); |
1569 | if (lan_status_diff & LSC_TRAN_BCN) | 1570 | if (lan_status_diff & LSC_TRAN_BCN) |
1570 | printk(KERN_INFO "%s: We are tranmitting the beacon, aaah\n",dev->name); | 1571 | printk(KERN_INFO "%s: We are tranmitting the beacon, aaah\n",dev->name); |
1571 | if (lan_status_diff & LSC_SS) | 1572 | if (lan_status_diff & LSC_SS) |
1572 | printk(KERN_INFO "%s: Single Station on the ring \n", dev->name); | 1573 | printk(KERN_INFO "%s: Single Station on the ring\n", dev->name); |
1573 | if (lan_status_diff & LSC_RING_REC) | 1574 | if (lan_status_diff & LSC_RING_REC) |
1574 | printk(KERN_INFO "%s: Ring recovery ongoing\n",dev->name); | 1575 | printk(KERN_INFO "%s: Ring recovery ongoing\n",dev->name); |
1575 | if (lan_status_diff & LSC_FDX_MODE) | 1576 | if (lan_status_diff & LSC_FDX_MODE) |
@@ -1578,7 +1579,7 @@ static void xl_arb_cmd(struct net_device *dev) | |||
1578 | 1579 | ||
1579 | if (lan_status_diff & LSC_CO) { | 1580 | if (lan_status_diff & LSC_CO) { |
1580 | if (xl_priv->xl_message_level) | 1581 | if (xl_priv->xl_message_level) |
1581 | printk(KERN_INFO "%s: Counter Overflow \n", dev->name); | 1582 | printk(KERN_INFO "%s: Counter Overflow\n", dev->name); |
1582 | /* Issue READ.LOG command */ | 1583 | /* Issue READ.LOG command */ |
1583 | xl_srb_cmd(dev, READ_LOG) ; | 1584 | xl_srb_cmd(dev, READ_LOG) ; |
1584 | } | 1585 | } |
@@ -1594,7 +1595,7 @@ static void xl_arb_cmd(struct net_device *dev) | |||
1594 | } /* Lan.change.status */ | 1595 | } /* Lan.change.status */ |
1595 | else if ( arb_cmd == RECEIVE_DATA) { /* Received.Data */ | 1596 | else if ( arb_cmd == RECEIVE_DATA) { /* Received.Data */ |
1596 | #if XL_DEBUG | 1597 | #if XL_DEBUG |
1597 | printk(KERN_INFO "Received.Data \n") ; | 1598 | printk(KERN_INFO "Received.Data\n"); |
1598 | #endif | 1599 | #endif |
1599 | writel( ((MEM_WORD_READ | 0xD0000 | xl_priv->arb) + 6), xl_mmio + MMIO_MAC_ACCESS_CMD) ; | 1600 | writel( ((MEM_WORD_READ | 0xD0000 | xl_priv->arb) + 6), xl_mmio + MMIO_MAC_ACCESS_CMD) ; |
1600 | xl_priv->mac_buffer = swab16(readw(xl_mmio + MMIO_MACDATA)) ; | 1601 | xl_priv->mac_buffer = swab16(readw(xl_mmio + MMIO_MACDATA)) ; |
@@ -1629,7 +1630,7 @@ static void xl_arb_cmd(struct net_device *dev) | |||
1629 | xl_asb_cmd(dev) ; | 1630 | xl_asb_cmd(dev) ; |
1630 | 1631 | ||
1631 | } else { | 1632 | } else { |
1632 | printk(KERN_WARNING "%s: Received unknown arb (xl_priv) command: %02x \n",dev->name,arb_cmd) ; | 1633 | printk(KERN_WARNING "%s: Received unknown arb (xl_priv) command: %02x\n",dev->name,arb_cmd); |
1633 | } | 1634 | } |
1634 | 1635 | ||
1635 | /* Acknowledge the arb interrupt */ | 1636 | /* Acknowledge the arb interrupt */ |
@@ -1686,13 +1687,13 @@ static void xl_asb_bh(struct net_device *dev) | |||
1686 | ret_code = readb(xl_mmio + MMIO_MACDATA) ; | 1687 | ret_code = readb(xl_mmio + MMIO_MACDATA) ; |
1687 | switch (ret_code) { | 1688 | switch (ret_code) { |
1688 | case 0x01: | 1689 | case 0x01: |
1689 | printk(KERN_INFO "%s: ASB Command, unrecognized command code \n",dev->name) ; | 1690 | printk(KERN_INFO "%s: ASB Command, unrecognized command code\n",dev->name); |
1690 | break ; | 1691 | break ; |
1691 | case 0x26: | 1692 | case 0x26: |
1692 | printk(KERN_INFO "%s: ASB Command, unexpected receive buffer \n", dev->name) ; | 1693 | printk(KERN_INFO "%s: ASB Command, unexpected receive buffer\n", dev->name); |
1693 | break ; | 1694 | break ; |
1694 | case 0x40: | 1695 | case 0x40: |
1695 | printk(KERN_INFO "%s: ASB Command, Invalid Station ID \n", dev->name) ; | 1696 | printk(KERN_INFO "%s: ASB Command, Invalid Station ID\n", dev->name); |
1696 | break ; | 1697 | break ; |
1697 | } | 1698 | } |
1698 | xl_priv->asb_queued = 0 ; | 1699 | xl_priv->asb_queued = 0 ; |