diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/chelsio/sge.c | 19 | ||||
-rw-r--r-- | drivers/net/chelsio/sge.h | 2 |
2 files changed, 10 insertions, 11 deletions
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c index 53b41d99b00..2c5b849b7ba 100644 --- a/drivers/net/chelsio/sge.c +++ b/drivers/net/chelsio/sge.c | |||
@@ -1332,8 +1332,8 @@ intr_handler_t t1_select_intr_handler(adapter_t *adapter) | |||
1332 | * | 1332 | * |
1333 | * This runs with softirqs disabled. | 1333 | * This runs with softirqs disabled. |
1334 | */ | 1334 | */ |
1335 | unsigned int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, | 1335 | static int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, |
1336 | unsigned int qid, struct net_device *dev) | 1336 | unsigned int qid, struct net_device *dev) |
1337 | { | 1337 | { |
1338 | struct sge *sge = adapter->sge; | 1338 | struct sge *sge = adapter->sge; |
1339 | struct cmdQ *q = &sge->cmdQ[qid]; | 1339 | struct cmdQ *q = &sge->cmdQ[qid]; |
@@ -1352,9 +1352,10 @@ unsigned int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, | |||
1352 | set_bit(dev->if_port, &sge->stopped_tx_queues); | 1352 | set_bit(dev->if_port, &sge->stopped_tx_queues); |
1353 | sge->stats.cmdQ_full[3]++; | 1353 | sge->stats.cmdQ_full[3]++; |
1354 | spin_unlock(&q->lock); | 1354 | spin_unlock(&q->lock); |
1355 | CH_ERR("%s: Tx ring full while queue awake!\n", | 1355 | if (!netif_queue_stopped(dev)) |
1356 | adapter->name); | 1356 | CH_ERR("%s: Tx ring full while queue awake!\n", |
1357 | return 1; | 1357 | adapter->name); |
1358 | return NETDEV_TX_BUSY; | ||
1358 | } | 1359 | } |
1359 | if (unlikely(credits - count < q->stop_thres)) { | 1360 | if (unlikely(credits - count < q->stop_thres)) { |
1360 | sge->stats.cmdQ_full[3]++; | 1361 | sge->stats.cmdQ_full[3]++; |
@@ -1389,7 +1390,7 @@ unsigned int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, | |||
1389 | writel(F_CMDQ0_ENABLE, adapter->regs + A_SG_DOORBELL); | 1390 | writel(F_CMDQ0_ENABLE, adapter->regs + A_SG_DOORBELL); |
1390 | } | 1391 | } |
1391 | } | 1392 | } |
1392 | return 0; | 1393 | return NETDEV_TX_OK; |
1393 | } | 1394 | } |
1394 | 1395 | ||
1395 | #define MK_ETH_TYPE_MSS(type, mss) (((mss) & 0x3FFF) | ((type) << 14)) | 1396 | #define MK_ETH_TYPE_MSS(type, mss) (((mss) & 0x3FFF) | ((type) << 14)) |
@@ -1449,7 +1450,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1449 | if (unlikely(skb->len < ETH_HLEN || | 1450 | if (unlikely(skb->len < ETH_HLEN || |
1450 | skb->len > dev->mtu + eth_hdr_len(skb->data))) { | 1451 | skb->len > dev->mtu + eth_hdr_len(skb->data))) { |
1451 | dev_kfree_skb_any(skb); | 1452 | dev_kfree_skb_any(skb); |
1452 | return NET_XMIT_SUCCESS; | 1453 | return NETDEV_TX_OK; |
1453 | } | 1454 | } |
1454 | 1455 | ||
1455 | /* | 1456 | /* |
@@ -1467,7 +1468,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1467 | skb = skb_realloc_headroom(skb, sizeof(*cpl)); | 1468 | skb = skb_realloc_headroom(skb, sizeof(*cpl)); |
1468 | dev_kfree_skb_any(orig_skb); | 1469 | dev_kfree_skb_any(orig_skb); |
1469 | if (!skb) | 1470 | if (!skb) |
1470 | return -ENOMEM; | 1471 | return NETDEV_TX_OK; |
1471 | } | 1472 | } |
1472 | 1473 | ||
1473 | if (!(adapter->flags & UDP_CSUM_CAPABLE) && | 1474 | if (!(adapter->flags & UDP_CSUM_CAPABLE) && |
@@ -1475,7 +1476,7 @@ int t1_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
1475 | skb->nh.iph->protocol == IPPROTO_UDP) | 1476 | skb->nh.iph->protocol == IPPROTO_UDP) |
1476 | if (unlikely(skb_checksum_help(skb, 0))) { | 1477 | if (unlikely(skb_checksum_help(skb, 0))) { |
1477 | dev_kfree_skb_any(skb); | 1478 | dev_kfree_skb_any(skb); |
1478 | return -ENOMEM; | 1479 | return NETDEV_TX_OK; |
1479 | } | 1480 | } |
1480 | 1481 | ||
1481 | /* Hmmm, assuming to catch the gratious arp... and we'll use | 1482 | /* Hmmm, assuming to catch the gratious arp... and we'll use |
diff --git a/drivers/net/chelsio/sge.h b/drivers/net/chelsio/sge.h index 434b2558685..6d0d24a6364 100644 --- a/drivers/net/chelsio/sge.h +++ b/drivers/net/chelsio/sge.h | |||
@@ -89,8 +89,6 @@ int t1_sge_configure(struct sge *, struct sge_params *); | |||
89 | int t1_sge_set_coalesce_params(struct sge *, struct sge_params *); | 89 | int t1_sge_set_coalesce_params(struct sge *, struct sge_params *); |
90 | void t1_sge_destroy(struct sge *); | 90 | void t1_sge_destroy(struct sge *); |
91 | intr_handler_t t1_select_intr_handler(adapter_t *adapter); | 91 | intr_handler_t t1_select_intr_handler(adapter_t *adapter); |
92 | unsigned int t1_sge_tx(struct sk_buff *skb, struct adapter *adapter, | ||
93 | unsigned int qid, struct net_device *netdev); | ||
94 | int t1_start_xmit(struct sk_buff *skb, struct net_device *dev); | 92 | int t1_start_xmit(struct sk_buff *skb, struct net_device *dev); |
95 | void t1_set_vlan_accel(struct adapter *adapter, int on_off); | 93 | void t1_set_vlan_accel(struct adapter *adapter, int on_off); |
96 | void t1_sge_start(struct sge *); | 94 | void t1_sge_start(struct sge *); |