Skip to content

Commit

Permalink
[SCSI] mptsas : Send DID_NO_CONNECT for pending IOs of removed device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kashyap, Desai authored and James Bottomley committed Sep 12, 2009
1 parent c55b89f commit fea9840
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion drivers/message/fusion/mptscsih.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,16 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
return 1;
}

if (ioc->bus_type == SAS) {
VirtDevice *vdevice = sc->device->hostdata;

if (!vdevice || !vdevice->vtarget ||
vdevice->vtarget->deleted) {
sc->result = DID_NO_CONNECT << 16;
goto out;
}
}

sc->host_scribble = NULL;
sc->result = DID_OK << 16; /* Set default reply as OK */
pScsiReq = (SCSIIORequest_t *) mf;
Expand Down Expand Up @@ -892,7 +902,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
#endif

} /* end of address reply case */

out:
/* Unmap the DMA buffers, if any. */
scsi_dma_unmap(sc);

Expand Down

0 comments on commit fea9840

Please sign in to comment.