diff options
Diffstat (limited to 'drivers/scsi/cxgb3i/cxgb3i_pdu.c')
-rw-r--r-- | drivers/scsi/cxgb3i/cxgb3i_pdu.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/scsi/cxgb3i/cxgb3i_pdu.c b/drivers/scsi/cxgb3i/cxgb3i_pdu.c index 7eebc9a7cb35..709105071177 100644 --- a/drivers/scsi/cxgb3i/cxgb3i_pdu.c +++ b/drivers/scsi/cxgb3i/cxgb3i_pdu.c | |||
@@ -400,17 +400,18 @@ int cxgb3i_conn_xmit_pdu(struct iscsi_task *task) | |||
400 | return 0; | 400 | return 0; |
401 | } | 401 | } |
402 | 402 | ||
403 | if (err < 0 && err != -EAGAIN) { | 403 | if (err == -EAGAIN || err == -ENOBUFS) { |
404 | kfree_skb(skb); | 404 | /* reset skb to send when we are called again */ |
405 | cxgb3i_tx_debug("itt 0x%x, skb 0x%p, len %u/%u, xmit err %d.\n", | 405 | tdata->skb = skb; |
406 | task->itt, skb, skb->len, skb->data_len, err); | ||
407 | iscsi_conn_printk(KERN_ERR, task->conn, "xmit err %d.\n", err); | ||
408 | iscsi_conn_failure(task->conn, ISCSI_ERR_XMIT_FAILED); | ||
409 | return err; | 406 | return err; |
410 | } | 407 | } |
411 | /* reset skb to send when we are called again */ | 408 | |
412 | tdata->skb = skb; | 409 | kfree_skb(skb); |
413 | return -EAGAIN; | 410 | cxgb3i_tx_debug("itt 0x%x, skb 0x%p, len %u/%u, xmit err %d.\n", |
411 | task->itt, skb, skb->len, skb->data_len, err); | ||
412 | iscsi_conn_printk(KERN_ERR, task->conn, "xmit err %d.\n", err); | ||
413 | iscsi_conn_failure(task->conn, ISCSI_ERR_XMIT_FAILED); | ||
414 | return err; | ||
414 | } | 415 | } |
415 | 416 | ||
416 | int cxgb3i_pdu_init(void) | 417 | int cxgb3i_pdu_init(void) |