mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather...
authorSreekanth Reddy <sreekanth.reddy@avagotech.com>
Tue, 30 Jun 2015 06:55:01 +0000 (12:25 +0530)
committerJames Bottomley <JBottomley@Odin.com>
Thu, 27 Aug 2015 18:08:29 +0000 (11:08 -0700)
commit62f5c74c97037c7c00fdefb69dcfe39810c34a05
tree351b71bdc4de480c0725fed9a6be13822b7e3061
parent3898f08e8ccfc8b7b4c297960ecdde970869e950
mpt3sas: Return host busy error status to SML when DMA mapping of scatter gather list fails for a SCSI command

scsi_dma_map API will return a negative value (i.e. -ENOMEM)
if DMA mapping of sg lists fails and zero if the sg list in the
SCSI cmd is NULL. But drivers doesn't handled sg list DMA mapping
failure case properly.

So, Updated the code to return host busy error status to SCSI MID Layer(SML),
when DMA mapping of scatter gather list fails for a SCSI command.
So that SML will retry this SCSI cmd after some time.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@avagotech.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/mpt3sas/mpt3sas_base.c