diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/sis900.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/sis900.c')
-rw-r--r-- | drivers/net/sis900.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index c072f7f36acf..cc0c731c4f09 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c | |||
@@ -106,7 +106,7 @@ static const char * card_names[] = { | |||
106 | "SiS 900 PCI Fast Ethernet", | 106 | "SiS 900 PCI Fast Ethernet", |
107 | "SiS 7016 PCI Fast Ethernet" | 107 | "SiS 7016 PCI Fast Ethernet" |
108 | }; | 108 | }; |
109 | static struct pci_device_id sis900_pci_tbl [] = { | 109 | static DEFINE_PCI_DEVICE_TABLE(sis900_pci_tbl) = { |
110 | {PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_900, | 110 | {PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_900, |
111 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_900}, | 111 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, SIS_900}, |
112 | {PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7016, | 112 | {PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7016, |
@@ -1016,7 +1016,7 @@ sis900_open(struct net_device *net_dev) | |||
1016 | /* Equalizer workaround Rule */ | 1016 | /* Equalizer workaround Rule */ |
1017 | sis630_set_eq(net_dev, sis_priv->chipset_rev); | 1017 | sis630_set_eq(net_dev, sis_priv->chipset_rev); |
1018 | 1018 | ||
1019 | ret = request_irq(net_dev->irq, &sis900_interrupt, IRQF_SHARED, | 1019 | ret = request_irq(net_dev->irq, sis900_interrupt, IRQF_SHARED, |
1020 | net_dev->name, net_dev); | 1020 | net_dev->name, net_dev); |
1021 | if (ret) | 1021 | if (ret) |
1022 | return ret; | 1022 | return ret; |
@@ -1760,7 +1760,7 @@ static int sis900_rx(struct net_device *net_dev) | |||
1760 | sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, | 1760 | sis_priv->rx_ring[entry].bufptr, RX_BUF_SIZE, |
1761 | PCI_DMA_FROMDEVICE); | 1761 | PCI_DMA_FROMDEVICE); |
1762 | 1762 | ||
1763 | /* refill the Rx buffer, what if there is not enought | 1763 | /* refill the Rx buffer, what if there is not enough |
1764 | * memory for new socket buffer ?? */ | 1764 | * memory for new socket buffer ?? */ |
1765 | if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { | 1765 | if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) { |
1766 | /* | 1766 | /* |
@@ -1775,7 +1775,7 @@ static int sis900_rx(struct net_device *net_dev) | |||
1775 | } | 1775 | } |
1776 | 1776 | ||
1777 | /* This situation should never happen, but due to | 1777 | /* This situation should never happen, but due to |
1778 | some unknow bugs, it is possible that | 1778 | some unknown bugs, it is possible that |
1779 | we are working on NULL sk_buff :-( */ | 1779 | we are working on NULL sk_buff :-( */ |
1780 | if (sis_priv->rx_skbuff[entry] == NULL) { | 1780 | if (sis_priv->rx_skbuff[entry] == NULL) { |
1781 | if (netif_msg_rx_err(sis_priv)) | 1781 | if (netif_msg_rx_err(sis_priv)) |
@@ -2288,7 +2288,7 @@ static void set_rx_mode(struct net_device *net_dev) | |||
2288 | rx_mode = RFPromiscuous; | 2288 | rx_mode = RFPromiscuous; |
2289 | for (i = 0; i < table_entries; i++) | 2289 | for (i = 0; i < table_entries; i++) |
2290 | mc_filter[i] = 0xffff; | 2290 | mc_filter[i] = 0xffff; |
2291 | } else if ((net_dev->mc_count > multicast_filter_limit) || | 2291 | } else if ((netdev_mc_count(net_dev) > multicast_filter_limit) || |
2292 | (net_dev->flags & IFF_ALLMULTI)) { | 2292 | (net_dev->flags & IFF_ALLMULTI)) { |
2293 | /* too many multicast addresses or accept all multicast packet */ | 2293 | /* too many multicast addresses or accept all multicast packet */ |
2294 | rx_mode = RFAAB | RFAAM; | 2294 | rx_mode = RFAAB | RFAAM; |
@@ -2300,9 +2300,8 @@ static void set_rx_mode(struct net_device *net_dev) | |||
2300 | * packets */ | 2300 | * packets */ |
2301 | struct dev_mc_list *mclist; | 2301 | struct dev_mc_list *mclist; |
2302 | rx_mode = RFAAB; | 2302 | rx_mode = RFAAB; |
2303 | for (i = 0, mclist = net_dev->mc_list; | 2303 | |
2304 | mclist && i < net_dev->mc_count; | 2304 | netdev_for_each_mc_addr(mclist, net_dev) { |
2305 | i++, mclist = mclist->next) { | ||
2306 | unsigned int bit_nr = | 2305 | unsigned int bit_nr = |
2307 | sis900_mcast_bitnr(mclist->dmi_addr, sis_priv->chipset_rev); | 2306 | sis900_mcast_bitnr(mclist->dmi_addr, sis_priv->chipset_rev); |
2308 | mc_filter[bit_nr >> 4] |= (1 << (bit_nr & 0xf)); | 2307 | mc_filter[bit_nr >> 4] |= (1 << (bit_nr & 0xf)); |