From: Yi Zou Date: Tue, 20 Jul 2010 22:19:10 +0000 (-0700) Subject: [SCSI] libfc: fix slowpath error from WARN_ON in fc_fcp_send_data X-Git-Tag: firefly_0821_release~9833^2~1305^2~73 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ba402804ac2447ad41f4919603bf3e6f6db63110;p=firefly-linux-kernel-4.4.55.git [SCSI] libfc: fix slowpath error from WARN_ON in fc_fcp_send_data This is exposed by a mpio test using EMC CLARiiON targets when LUN tresspassing happens, the burst length from the XFER_READY for the MODE SELECT(10) is 19 bytes, much smaller than FC_MIN_MAX_PAYLOAD as 256 bytes. This patch removes the related two WARN_ON()s. Signed-off-by: Yi Zou Signed-off-by: Robert Love Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index 8914f1e95b72..a0a3ae7d8611 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -580,10 +580,8 @@ static int fc_fcp_send_data(struct fc_fcp_pkt *fsp, struct fc_seq *seq, fsp, seq_blen, lport->lso_max, t_blen); } - WARN_ON(t_blen < FC_MIN_MAX_PAYLOAD); if (t_blen > 512) t_blen &= ~(512 - 1); /* round down to block size */ - WARN_ON(t_blen < FC_MIN_MAX_PAYLOAD); /* won't go below 256 */ sc = fsp->cmd; remaining = seq_blen;