diff options
Diffstat (limited to 'drivers/net/forcedeth.c')
| -rw-r--r-- | drivers/net/forcedeth.c | 17 | 
1 files changed, 10 insertions, 7 deletions
| diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index ca05e5662029..a1c0e7bb70e8 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | #include <linux/init.h> | 59 | #include <linux/init.h> | 
| 60 | #include <linux/if_vlan.h> | 60 | #include <linux/if_vlan.h> | 
| 61 | #include <linux/dma-mapping.h> | 61 | #include <linux/dma-mapping.h> | 
| 62 | #include <linux/slab.h> | ||
| 62 | 63 | ||
| 63 | #include <asm/irq.h> | 64 | #include <asm/irq.h> | 
| 64 | #include <asm/io.h> | 65 | #include <asm/io.h> | 
| @@ -2147,7 +2148,7 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 2147 | unsigned int i; | 2148 | unsigned int i; | 
| 2148 | u32 offset = 0; | 2149 | u32 offset = 0; | 
| 2149 | u32 bcnt; | 2150 | u32 bcnt; | 
| 2150 | u32 size = skb->len-skb->data_len; | 2151 | u32 size = skb_headlen(skb); | 
| 2151 | u32 entries = (size >> NV_TX2_TSO_MAX_SHIFT) + ((size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0); | 2152 | u32 entries = (size >> NV_TX2_TSO_MAX_SHIFT) + ((size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0); | 
| 2152 | u32 empty_slots; | 2153 | u32 empty_slots; | 
| 2153 | struct ring_desc* put_tx; | 2154 | struct ring_desc* put_tx; | 
| @@ -2268,7 +2269,7 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb, | |||
| 2268 | unsigned int i; | 2269 | unsigned int i; | 
| 2269 | u32 offset = 0; | 2270 | u32 offset = 0; | 
| 2270 | u32 bcnt; | 2271 | u32 bcnt; | 
| 2271 | u32 size = skb->len-skb->data_len; | 2272 | u32 size = skb_headlen(skb); | 
| 2272 | u32 entries = (size >> NV_TX2_TSO_MAX_SHIFT) + ((size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0); | 2273 | u32 entries = (size >> NV_TX2_TSO_MAX_SHIFT) + ((size & (NV_TX2_TSO_MAX_SIZE-1)) ? 1 : 0); | 
| 2273 | u32 empty_slots; | 2274 | u32 empty_slots; | 
| 2274 | struct ring_desc_ex* put_tx; | 2275 | struct ring_desc_ex* put_tx; | 
| @@ -3103,12 +3104,14 @@ static void nv_set_multicast(struct net_device *dev) | |||
| 3103 | if (dev->flags & IFF_ALLMULTI) { | 3104 | if (dev->flags & IFF_ALLMULTI) { | 
| 3104 | alwaysOn[0] = alwaysOn[1] = alwaysOff[0] = alwaysOff[1] = 0; | 3105 | alwaysOn[0] = alwaysOn[1] = alwaysOff[0] = alwaysOff[1] = 0; | 
| 3105 | } else { | 3106 | } else { | 
| 3106 | struct dev_mc_list *walk; | 3107 | struct netdev_hw_addr *ha; | 
| 3107 | 3108 | ||
| 3108 | netdev_for_each_mc_addr(walk, dev) { | 3109 | netdev_for_each_mc_addr(ha, dev) { | 
| 3110 | unsigned char *addr = ha->addr; | ||
| 3109 | u32 a, b; | 3111 | u32 a, b; | 
| 3110 | a = le32_to_cpu(*(__le32 *) walk->dmi_addr); | 3112 | |
| 3111 | b = le16_to_cpu(*(__le16 *) (&walk->dmi_addr[4])); | 3113 | a = le32_to_cpu(*(__le32 *) addr); | 
| 3114 | b = le16_to_cpu(*(__le16 *) (&addr[4])); | ||
| 3112 | alwaysOn[0] &= a; | 3115 | alwaysOn[0] &= a; | 
| 3113 | alwaysOff[0] &= ~a; | 3116 | alwaysOff[0] &= ~a; | 
| 3114 | alwaysOn[1] &= b; | 3117 | alwaysOn[1] &= b; | 
| @@ -5898,7 +5901,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
| 5898 | /* Limit the number of tx's outstanding for hw bug */ | 5901 | /* Limit the number of tx's outstanding for hw bug */ | 
| 5899 | if (id->driver_data & DEV_NEED_TX_LIMIT) { | 5902 | if (id->driver_data & DEV_NEED_TX_LIMIT) { | 
| 5900 | np->tx_limit = 1; | 5903 | np->tx_limit = 1; | 
| 5901 | if ((id->driver_data & DEV_NEED_TX_LIMIT2) && | 5904 | if (((id->driver_data & DEV_NEED_TX_LIMIT2) == DEV_NEED_TX_LIMIT2) && | 
| 5902 | pci_dev->revision >= 0xA2) | 5905 | pci_dev->revision >= 0xA2) | 
| 5903 | np->tx_limit = 0; | 5906 | np->tx_limit = 0; | 
| 5904 | } | 5907 | } | 
