Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] mptsas : Send DID_NO_CONNECT for pending IOs of removed device

Driver is modified to return DID_NO_CONNECT for all pending I/O
requests for bus type SAS, if it founds the target is removed at
the firmware level.

Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Kashyap, Desai and committed by
James Bottomley
fea98403 c55b89fb

+11 -1
+11 -1
drivers/message/fusion/mptscsih.c
··· 628 628 return 1; 629 629 } 630 630 631 + if (ioc->bus_type == SAS) { 632 + VirtDevice *vdevice = sc->device->hostdata; 633 + 634 + if (!vdevice || !vdevice->vtarget || 635 + vdevice->vtarget->deleted) { 636 + sc->result = DID_NO_CONNECT << 16; 637 + goto out; 638 + } 639 + } 640 + 631 641 sc->host_scribble = NULL; 632 642 sc->result = DID_OK << 16; /* Set default reply as OK */ 633 643 pScsiReq = (SCSIIORequest_t *) mf; ··· 902 892 #endif 903 893 904 894 } /* end of address reply case */ 905 - 895 + out: 906 896 /* Unmap the DMA buffers, if any. */ 907 897 scsi_dma_unmap(sc); 908 898