diff options
Diffstat (limited to 'drivers/net/ps3_gelic_net.c')
-rw-r--r-- | drivers/net/ps3_gelic_net.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/ps3_gelic_net.c b/drivers/net/ps3_gelic_net.c index a849f6f23a17..87d6b8f36304 100644 --- a/drivers/net/ps3_gelic_net.c +++ b/drivers/net/ps3_gelic_net.c | |||
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/module.h> | 32 | #include <linux/module.h> |
33 | #include <linux/slab.h> | ||
33 | 34 | ||
34 | #include <linux/etherdevice.h> | 35 | #include <linux/etherdevice.h> |
35 | #include <linux/ethtool.h> | 36 | #include <linux/ethtool.h> |
@@ -326,7 +327,7 @@ static int gelic_descr_prepare_rx(struct gelic_card *card, | |||
326 | unsigned int bufsize; | 327 | unsigned int bufsize; |
327 | 328 | ||
328 | if (gelic_descr_get_status(descr) != GELIC_DESCR_DMA_NOT_IN_USE) | 329 | if (gelic_descr_get_status(descr) != GELIC_DESCR_DMA_NOT_IN_USE) |
329 | dev_info(ctodev(card), "%s: ERROR status \n", __func__); | 330 | dev_info(ctodev(card), "%s: ERROR status\n", __func__); |
330 | /* we need to round up the buffer size to a multiple of 128 */ | 331 | /* we need to round up the buffer size to a multiple of 128 */ |
331 | bufsize = ALIGN(GELIC_NET_MAX_MTU, GELIC_NET_RXBUF_ALIGN); | 332 | bufsize = ALIGN(GELIC_NET_MAX_MTU, GELIC_NET_RXBUF_ALIGN); |
332 | 333 | ||
@@ -546,7 +547,7 @@ out: | |||
546 | void gelic_net_set_multi(struct net_device *netdev) | 547 | void gelic_net_set_multi(struct net_device *netdev) |
547 | { | 548 | { |
548 | struct gelic_card *card = netdev_card(netdev); | 549 | struct gelic_card *card = netdev_card(netdev); |
549 | struct dev_mc_list *mc; | 550 | struct netdev_hw_addr *ha; |
550 | unsigned int i; | 551 | unsigned int i; |
551 | uint8_t *p; | 552 | uint8_t *p; |
552 | u64 addr; | 553 | u64 addr; |
@@ -580,9 +581,9 @@ void gelic_net_set_multi(struct net_device *netdev) | |||
580 | } | 581 | } |
581 | 582 | ||
582 | /* set multicast addresses */ | 583 | /* set multicast addresses */ |
583 | netdev_for_each_mc_addr(mc, netdev) { | 584 | netdev_for_each_mc_addr(ha, netdev) { |
584 | addr = 0; | 585 | addr = 0; |
585 | p = mc->dmi_addr; | 586 | p = ha->addr; |
586 | for (i = 0; i < ETH_ALEN; i++) { | 587 | for (i = 0; i < ETH_ALEN; i++) { |
587 | addr <<= 8; | 588 | addr <<= 8; |
588 | addr |= *p++; | 589 | addr |= *p++; |
@@ -902,9 +903,6 @@ int gelic_net_xmit(struct sk_buff *skb, struct net_device *netdev) | |||
902 | gelic_descr_release_tx(card, descr->next); | 903 | gelic_descr_release_tx(card, descr->next); |
903 | card->tx_chain.tail = descr->next->next; | 904 | card->tx_chain.tail = descr->next->next; |
904 | dev_info(ctodev(card), "%s: kick failure\n", __func__); | 905 | dev_info(ctodev(card), "%s: kick failure\n", __func__); |
905 | } else { | ||
906 | /* OK, DMA started/reserved */ | ||
907 | netdev->trans_start = jiffies; | ||
908 | } | 906 | } |
909 | 907 | ||
910 | spin_unlock_irqrestore(&card->tx_lock, flags); | 908 | spin_unlock_irqrestore(&card->tx_lock, flags); |
@@ -1434,7 +1432,7 @@ static void gelic_net_tx_timeout_task(struct work_struct *work) | |||
1434 | container_of(work, struct gelic_card, tx_timeout_task); | 1432 | container_of(work, struct gelic_card, tx_timeout_task); |
1435 | struct net_device *netdev = card->netdev[GELIC_PORT_ETHERNET_0]; | 1433 | struct net_device *netdev = card->netdev[GELIC_PORT_ETHERNET_0]; |
1436 | 1434 | ||
1437 | dev_info(ctodev(card), "%s:Timed out. Restarting... \n", __func__); | 1435 | dev_info(ctodev(card), "%s:Timed out. Restarting...\n", __func__); |
1438 | 1436 | ||
1439 | if (!(netdev->flags & IFF_UP)) | 1437 | if (!(netdev->flags & IFF_UP)) |
1440 | goto out; | 1438 | goto out; |