]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitdaed6d1d9a2f1b88b363ef41285bbed03a1c4bf4
tree351b71bdc4de480c0725fed9a6be13822b7e3061
parenta0f502a0a5246ef5272036f364ba690180c48cf3
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