diff options
Diffstat (limited to 'drivers/net/netxen')
-rw-r--r-- | drivers/net/netxen/netxen_nic_hw.c | 4 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 8 | ||||
-rw-r--r-- | drivers/net/netxen/netxen_nic_main.c | 3 |
3 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 9f5ced3eaf9d..23c974a7e0e4 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -526,7 +526,7 @@ netxen_send_cmd_descs(struct netxen_adapter *adapter, | |||
526 | producer = tx_ring->producer; | 526 | producer = tx_ring->producer; |
527 | consumer = tx_ring->sw_consumer; | 527 | consumer = tx_ring->sw_consumer; |
528 | 528 | ||
529 | if (nr_desc > find_diff_among(producer, consumer, tx_ring->num_desc)) { | 529 | if (nr_desc >= find_diff_among(producer, consumer, tx_ring->num_desc)) { |
530 | netif_tx_unlock_bh(adapter->netdev); | 530 | netif_tx_unlock_bh(adapter->netdev); |
531 | return -EBUSY; | 531 | return -EBUSY; |
532 | } | 532 | } |
@@ -752,7 +752,7 @@ int netxen_linkevent_request(struct netxen_adapter *adapter, int enable) | |||
752 | 752 | ||
753 | word = NX_NIC_H2C_OPCODE_GET_LINKEVENT | ((u64)adapter->portnum << 16); | 753 | word = NX_NIC_H2C_OPCODE_GET_LINKEVENT | ((u64)adapter->portnum << 16); |
754 | req.req_hdr = cpu_to_le64(word); | 754 | req.req_hdr = cpu_to_le64(word); |
755 | req.words[0] = cpu_to_le64(enable); | 755 | req.words[0] = cpu_to_le64(enable | (enable << 8)); |
756 | 756 | ||
757 | rv = netxen_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1); | 757 | rv = netxen_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1); |
758 | if (rv != 0) { | 758 | if (rv != 0) { |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index d18216779a09..de9ebbd841b7 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -1319,10 +1319,11 @@ int netxen_process_cmd_ring(struct netxen_adapter *adapter) | |||
1319 | break; | 1319 | break; |
1320 | } | 1320 | } |
1321 | 1321 | ||
1322 | if (count) { | 1322 | tx_ring->sw_consumer = sw_consumer; |
1323 | tx_ring->sw_consumer = sw_consumer; | 1323 | |
1324 | if (count && netif_running(netdev)) { | ||
1324 | smp_mb(); | 1325 | smp_mb(); |
1325 | if (netif_queue_stopped(netdev) && netif_running(netdev)) { | 1326 | if (netif_queue_stopped(netdev) && netif_carrier_ok(netdev)) { |
1326 | netif_tx_lock(netdev); | 1327 | netif_tx_lock(netdev); |
1327 | netif_wake_queue(netdev); | 1328 | netif_wake_queue(netdev); |
1328 | smp_mb(); | 1329 | smp_mb(); |
@@ -1450,7 +1451,6 @@ netxen_post_rx_buffers_nodb(struct netxen_adapter *adapter, | |||
1450 | rds_ring->producer = producer; | 1451 | rds_ring->producer = producer; |
1451 | NXWR32(adapter, rds_ring->crb_rcv_producer, | 1452 | NXWR32(adapter, rds_ring->crb_rcv_producer, |
1452 | (producer - 1) & (rds_ring->num_desc - 1)); | 1453 | (producer - 1) & (rds_ring->num_desc - 1)); |
1453 | wmb(); | ||
1454 | } | 1454 | } |
1455 | spin_unlock(&rds_ring->lock); | 1455 | spin_unlock(&rds_ring->lock); |
1456 | } | 1456 | } |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 5d79c19a6ec0..6a496b1909eb 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -809,6 +809,7 @@ netxen_nic_down(struct netxen_adapter *adapter, struct net_device *netdev) | |||
809 | { | 809 | { |
810 | netif_carrier_off(netdev); | 810 | netif_carrier_off(netdev); |
811 | netif_stop_queue(netdev); | 811 | netif_stop_queue(netdev); |
812 | smp_mb(); | ||
812 | netxen_napi_disable(adapter); | 813 | netxen_napi_disable(adapter); |
813 | 814 | ||
814 | if (adapter->stop_port) | 815 | if (adapter->stop_port) |
@@ -1340,7 +1341,7 @@ netxen_nic_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1340 | producer = tx_ring->producer; | 1341 | producer = tx_ring->producer; |
1341 | smp_mb(); | 1342 | smp_mb(); |
1342 | consumer = tx_ring->sw_consumer; | 1343 | consumer = tx_ring->sw_consumer; |
1343 | if ((no_of_desc+2) > find_diff_among(producer, consumer, num_txd)) { | 1344 | if ((no_of_desc+2) >= find_diff_among(producer, consumer, num_txd)) { |
1344 | netif_stop_queue(netdev); | 1345 | netif_stop_queue(netdev); |
1345 | smp_mb(); | 1346 | smp_mb(); |
1346 | return NETDEV_TX_BUSY; | 1347 | return NETDEV_TX_BUSY; |