aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>2011-12-14 10:46:23 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-01-10 18:01:21 -0500
commit00c4a09bb0840457f5f8f5753a562e5e19a91baf (patch)
tree9cfb371be94166a419ffbae18eb90c1813cf3843 /drivers/scsi
parentcced5041ed5a2d1352186510944b0ddfbdbe4c0b (diff)
[SCSI] libcxgbi: do not print a message when memory allocation fails
In alloc_pdu, libcxgbi tries to allocate a skb with GFP_ATOMIC, which may potentially fail. When it happens, the current code prints a warning message. When the system is under IO stress, this failure may happen lots of times and it usually scares users. Instead of printing the warning message, the code now increases the tx_dropped statistics for the ethernet interface wich is doing the iscsi task. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Acked-by: Karen Xie <kxie@chelsio.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index c5360ffb4bed..d3ff9cd40234 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -1868,8 +1868,9 @@ int cxgbi_conn_alloc_pdu(struct iscsi_task *task, u8 opcode)
1868 1868
1869 tdata->skb = alloc_skb(cdev->skb_tx_rsvd + headroom, GFP_ATOMIC); 1869 tdata->skb = alloc_skb(cdev->skb_tx_rsvd + headroom, GFP_ATOMIC);
1870 if (!tdata->skb) { 1870 if (!tdata->skb) {
1871 pr_warn("alloc skb %u+%u, opcode 0x%x failed.\n", 1871 struct cxgbi_sock *csk = cconn->cep->csk;
1872 cdev->skb_tx_rsvd, headroom, opcode); 1872 struct net_device *ndev = cdev->ports[csk->port_id];
1873 ndev->stats.tx_dropped++;
1873 return -ENOMEM; 1874 return -ENOMEM;
1874 } 1875 }
1875 1876