diff options
Diffstat (limited to 'drivers/net/natsemi.c')
| -rw-r--r-- | drivers/net/natsemi.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c index 9a8d3ab4709b..797fe164ce27 100644 --- a/drivers/net/natsemi.c +++ b/drivers/net/natsemi.c | |||
| @@ -683,8 +683,8 @@ static ssize_t natsemi_set_dspcfg_workaround(struct device *dev, | |||
| 683 | /* Find out the new setting */ | 683 | /* Find out the new setting */ |
| 684 | if (!strncmp("on", buf, count - 1) || !strncmp("1", buf, count - 1)) | 684 | if (!strncmp("on", buf, count - 1) || !strncmp("1", buf, count - 1)) |
| 685 | new_setting = 1; | 685 | new_setting = 1; |
| 686 | else if (!strncmp("off", buf, count - 1) | 686 | else if (!strncmp("off", buf, count - 1) || |
| 687 | || !strncmp("0", buf, count - 1)) | 687 | !strncmp("0", buf, count - 1)) |
| 688 | new_setting = 0; | 688 | new_setting = 0; |
| 689 | else | 689 | else |
| 690 | return count; | 690 | return count; |
| @@ -757,8 +757,8 @@ static void __devinit natsemi_init_media (struct net_device *dev) | |||
| 757 | np->autoneg = (tmp & BMCR_ANENABLE)? AUTONEG_ENABLE: AUTONEG_DISABLE; | 757 | np->autoneg = (tmp & BMCR_ANENABLE)? AUTONEG_ENABLE: AUTONEG_DISABLE; |
| 758 | np->advertising= mdio_read(dev, MII_ADVERTISE); | 758 | np->advertising= mdio_read(dev, MII_ADVERTISE); |
| 759 | 759 | ||
| 760 | if ((np->advertising & ADVERTISE_ALL) != ADVERTISE_ALL | 760 | if ((np->advertising & ADVERTISE_ALL) != ADVERTISE_ALL && |
| 761 | && netif_msg_probe(np)) { | 761 | netif_msg_probe(np)) { |
| 762 | printk(KERN_INFO "natsemi %s: Transceiver default autonegotiation %s " | 762 | printk(KERN_INFO "natsemi %s: Transceiver default autonegotiation %s " |
| 763 | "10%s %s duplex.\n", | 763 | "10%s %s duplex.\n", |
| 764 | pci_name(np->pci_dev), | 764 | pci_name(np->pci_dev), |
| @@ -1153,8 +1153,8 @@ static void init_phy_fixup(struct net_device *dev) | |||
| 1153 | tmp = mdio_read(dev, MII_BMCR); | 1153 | tmp = mdio_read(dev, MII_BMCR); |
| 1154 | if (np->autoneg == AUTONEG_ENABLE) { | 1154 | if (np->autoneg == AUTONEG_ENABLE) { |
| 1155 | /* renegotiate if something changed */ | 1155 | /* renegotiate if something changed */ |
| 1156 | if ((tmp & BMCR_ANENABLE) == 0 | 1156 | if ((tmp & BMCR_ANENABLE) == 0 || |
| 1157 | || np->advertising != mdio_read(dev, MII_ADVERTISE)) | 1157 | np->advertising != mdio_read(dev, MII_ADVERTISE)) |
| 1158 | { | 1158 | { |
| 1159 | /* turn on autonegotiation and force negotiation */ | 1159 | /* turn on autonegotiation and force negotiation */ |
| 1160 | tmp |= (BMCR_ANENABLE | BMCR_ANRESTART); | 1160 | tmp |= (BMCR_ANENABLE | BMCR_ANRESTART); |
| @@ -2164,8 +2164,8 @@ static void netdev_tx_done(struct net_device *dev) | |||
| 2164 | dev_kfree_skb_irq(np->tx_skbuff[entry]); | 2164 | dev_kfree_skb_irq(np->tx_skbuff[entry]); |
| 2165 | np->tx_skbuff[entry] = NULL; | 2165 | np->tx_skbuff[entry] = NULL; |
| 2166 | } | 2166 | } |
| 2167 | if (netif_queue_stopped(dev) | 2167 | if (netif_queue_stopped(dev) && |
| 2168 | && np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) { | 2168 | np->cur_tx - np->dirty_tx < TX_QUEUE_LEN - 4) { |
| 2169 | /* The ring is no longer full, wake queue. */ | 2169 | /* The ring is no longer full, wake queue. */ |
| 2170 | netif_wake_queue(dev); | 2170 | netif_wake_queue(dev); |
| 2171 | } | 2171 | } |
| @@ -2343,8 +2343,8 @@ static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do) | |||
| 2343 | /* Omit CRC size. */ | 2343 | /* Omit CRC size. */ |
| 2344 | /* Check if the packet is long enough to accept | 2344 | /* Check if the packet is long enough to accept |
| 2345 | * without copying to a minimally-sized skbuff. */ | 2345 | * without copying to a minimally-sized skbuff. */ |
| 2346 | if (pkt_len < rx_copybreak | 2346 | if (pkt_len < rx_copybreak && |
| 2347 | && (skb = dev_alloc_skb(pkt_len + RX_OFFSET)) != NULL) { | 2347 | (skb = dev_alloc_skb(pkt_len + RX_OFFSET)) != NULL) { |
| 2348 | /* 16 byte align the IP header */ | 2348 | /* 16 byte align the IP header */ |
| 2349 | skb_reserve(skb, RX_OFFSET); | 2349 | skb_reserve(skb, RX_OFFSET); |
| 2350 | pci_dma_sync_single_for_cpu(np->pci_dev, | 2350 | pci_dma_sync_single_for_cpu(np->pci_dev, |
| @@ -2390,8 +2390,8 @@ static void netdev_error(struct net_device *dev, int intr_status) | |||
| 2390 | spin_lock(&np->lock); | 2390 | spin_lock(&np->lock); |
| 2391 | if (intr_status & LinkChange) { | 2391 | if (intr_status & LinkChange) { |
| 2392 | u16 lpa = mdio_read(dev, MII_LPA); | 2392 | u16 lpa = mdio_read(dev, MII_LPA); |
| 2393 | if (mdio_read(dev, MII_BMCR) & BMCR_ANENABLE | 2393 | if (mdio_read(dev, MII_BMCR) & BMCR_ANENABLE && |
| 2394 | && netif_msg_link(np)) { | 2394 | netif_msg_link(np)) { |
| 2395 | printk(KERN_INFO | 2395 | printk(KERN_INFO |
| 2396 | "%s: Autonegotiation advertising" | 2396 | "%s: Autonegotiation advertising" |
| 2397 | " %#04x partner %#04x.\n", dev->name, | 2397 | " %#04x partner %#04x.\n", dev->name, |
| @@ -2488,8 +2488,8 @@ static void __set_rx_mode(struct net_device *dev) | |||
| 2488 | if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ | 2488 | if (dev->flags & IFF_PROMISC) { /* Set promiscuous. */ |
| 2489 | rx_mode = RxFilterEnable | AcceptBroadcast | 2489 | rx_mode = RxFilterEnable | AcceptBroadcast |
| 2490 | | AcceptAllMulticast | AcceptAllPhys | AcceptMyPhys; | 2490 | | AcceptAllMulticast | AcceptAllPhys | AcceptMyPhys; |
| 2491 | } else if ((dev->mc_count > multicast_filter_limit) | 2491 | } else if ((dev->mc_count > multicast_filter_limit) || |
| 2492 | || (dev->flags & IFF_ALLMULTI)) { | 2492 | (dev->flags & IFF_ALLMULTI)) { |
| 2493 | rx_mode = RxFilterEnable | AcceptBroadcast | 2493 | rx_mode = RxFilterEnable | AcceptBroadcast |
| 2494 | | AcceptAllMulticast | AcceptMyPhys; | 2494 | | AcceptAllMulticast | AcceptMyPhys; |
| 2495 | } else { | 2495 | } else { |
