Skip to content

Commit b8c80b8

Browse files
tlfalcondavem330
authored andcommitted
ibmvnic: Halt TX and report carrier off on H_CLOSED return code
This patch disables transmissions and reports carrier off if xmit function returns that the hardware TX queue is closed. The driver can then await a signal from firmware to determine the correct reset method. Signed-off-by: Thomas Falcon <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 8cb31cf commit b8c80b8

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,8 +1111,14 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev)
11111111
dev_kfree_skb_any(skb);
11121112
tx_buff->skb = NULL;
11131113

1114-
if (lpar_rc == H_CLOSED)
1115-
netif_stop_subqueue(netdev, queue_num);
1114+
if (lpar_rc == H_CLOSED) {
1115+
/* Disable TX and report carrier off if queue is closed.
1116+
* Firmware guarantees that a signal will be sent to the
1117+
* driver, triggering a reset or some other action.
1118+
*/
1119+
netif_tx_stop_all_queues(netdev);
1120+
netif_carrier_off(netdev);
1121+
}
11161122

11171123
tx_send_failed++;
11181124
tx_dropped++;

0 commit comments

Comments
 (0)