aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tokenring/lanstreamer.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/tokenring/lanstreamer.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/tokenring/lanstreamer.c')
-rw-r--r--drivers/net/tokenring/lanstreamer.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
index 26dca2b2bdbd..7a5fbf5a9d71 100644
--- a/drivers/net/tokenring/lanstreamer.c
+++ b/drivers/net/tokenring/lanstreamer.c
@@ -121,6 +121,7 @@
121#include <linux/spinlock.h> 121#include <linux/spinlock.h>
122#include <linux/bitops.h> 122#include <linux/bitops.h>
123#include <linux/jiffies.h> 123#include <linux/jiffies.h>
124#include <linux/slab.h>
124 125
125#include <net/net_namespace.h> 126#include <net/net_namespace.h>
126#include <net/checksum.h> 127#include <net/checksum.h>
@@ -146,7 +147,7 @@
146static char version[] = "LanStreamer.c v0.4.0 03/08/01 - Mike Sullivan\n" 147static char version[] = "LanStreamer.c v0.4.0 03/08/01 - Mike Sullivan\n"
147 " v0.5.3 11/13/02 - Kent Yoder"; 148 " v0.5.3 11/13/02 - Kent Yoder";
148 149
149static struct pci_device_id streamer_pci_tbl[] = { 150static DEFINE_PCI_DEVICE_TABLE(streamer_pci_tbl) = {
150 { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_TR, PCI_ANY_ID, PCI_ANY_ID,}, 151 { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_TR, PCI_ANY_ID, PCI_ANY_ID,},
151 {} /* terminating entry */ 152 {} /* terminating entry */
152}; 153};
@@ -596,7 +597,7 @@ static int streamer_open(struct net_device *dev)
596 rc=streamer_reset(dev); 597 rc=streamer_reset(dev);
597 } 598 }
598 599
599 if (request_irq(dev->irq, &streamer_interrupt, IRQF_SHARED, "lanstreamer", dev)) { 600 if (request_irq(dev->irq, streamer_interrupt, IRQF_SHARED, "lanstreamer", dev)) {
600 return -EAGAIN; 601 return -EAGAIN;
601 } 602 }
602#if STREAMER_DEBUG 603#if STREAMER_DEBUG
@@ -712,8 +713,8 @@ static int streamer_open(struct net_device *dev)
712 strcat(open_error, " - "); 713 strcat(open_error, " - ");
713 strcat(open_error, open_min_error[(error_code & 0x0f)]); 714 strcat(open_error, open_min_error[(error_code & 0x0f)]);
714 715
715 if (!streamer_priv->streamer_ring_speed 716 if (!streamer_priv->streamer_ring_speed &&
716 && ((error_code & 0x0f) == 0x0d)) 717 ((error_code & 0x0f) == 0x0d))
717 { 718 {
718 printk(KERN_WARNING "%s: Tried to autosense ring speed with no monitors present\n", dev->name); 719 printk(KERN_WARNING "%s: Tried to autosense ring speed with no monitors present\n", dev->name);
719 printk(KERN_WARNING "%s: Please try again with a specified ring speed \n", dev->name); 720 printk(KERN_WARNING "%s: Please try again with a specified ring speed \n", dev->name);
@@ -1032,8 +1033,8 @@ static irqreturn_t streamer_interrupt(int irq, void *dev_id)
1032 sisr = readw(streamer_mmio + SISR); 1033 sisr = readw(streamer_mmio + SISR);
1033 1034
1034 while((sisr & (SISR_MI | SISR_SRB_REPLY | SISR_ADAPTER_CHECK | SISR_ASB_FREE | 1035 while((sisr & (SISR_MI | SISR_SRB_REPLY | SISR_ADAPTER_CHECK | SISR_ASB_FREE |
1035 SISR_ARB_CMD | SISR_TRB_REPLY | SISR_PAR_ERR | SISR_SERR_ERR)) 1036 SISR_ARB_CMD | SISR_TRB_REPLY | SISR_PAR_ERR | SISR_SERR_ERR)) &&
1036 && (max_intr > 0)) { 1037 (max_intr > 0)) {
1037 1038
1038 if(sisr & SISR_PAR_ERR) { 1039 if(sisr & SISR_PAR_ERR) {
1039 writew(~SISR_PAR_ERR, streamer_mmio + SISR_RUM); 1040 writew(~SISR_PAR_ERR, streamer_mmio + SISR_RUM);
@@ -1268,7 +1269,6 @@ static void streamer_set_rx_mode(struct net_device *dev)
1268 __u8 options = 0; 1269 __u8 options = 0;
1269 struct dev_mc_list *dmi; 1270 struct dev_mc_list *dmi;
1270 unsigned char dev_mc_address[5]; 1271 unsigned char dev_mc_address[5];
1271 int i;
1272 1272
1273 writel(streamer_priv->srb, streamer_mmio + LAPA); 1273 writel(streamer_priv->srb, streamer_mmio + LAPA);
1274 options = streamer_priv->streamer_copy_all_options; 1274 options = streamer_priv->streamer_copy_all_options;
@@ -1303,8 +1303,7 @@ static void streamer_set_rx_mode(struct net_device *dev)
1303 writel(streamer_priv->srb,streamer_mmio+LAPA); 1303 writel(streamer_priv->srb,streamer_mmio+LAPA);
1304 dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ; 1304 dev_mc_address[0] = dev_mc_address[1] = dev_mc_address[2] = dev_mc_address[3] = 0 ;
1305 1305
1306 for (i=0,dmi=dev->mc_list;i < dev->mc_count; i++,dmi = dmi->next) 1306 netdev_for_each_mc_addr(dmi, dev) {
1307 {
1308 dev_mc_address[0] |= dmi->dmi_addr[2] ; 1307 dev_mc_address[0] |= dmi->dmi_addr[2] ;
1309 dev_mc_address[1] |= dmi->dmi_addr[3] ; 1308 dev_mc_address[1] |= dmi->dmi_addr[3] ;
1310 dev_mc_address[2] |= dmi->dmi_addr[4] ; 1309 dev_mc_address[2] |= dmi->dmi_addr[4] ;