aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r--drivers/scsi/libfc/fc_fcp.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c
index beaab818d8de..c0dc8e151c65 100644
--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1815,21 +1815,6 @@ static void fc_io_compl(struct fc_fcp_pkt *fsp)
1815 sc_cmd->result = DID_OK << 16; 1815 sc_cmd->result = DID_OK << 16;
1816 if (fsp->scsi_resid) 1816 if (fsp->scsi_resid)
1817 CMD_RESID_LEN(sc_cmd) = fsp->scsi_resid; 1817 CMD_RESID_LEN(sc_cmd) = fsp->scsi_resid;
1818 } else if (fsp->cdb_status == QUEUE_FULL) {
1819 struct scsi_device *tmp_sdev;
1820 struct scsi_device *sdev = sc_cmd->device;
1821
1822 shost_for_each_device(tmp_sdev, sdev->host) {
1823 if (tmp_sdev->id != sdev->id)
1824 continue;
1825
1826 if (tmp_sdev->queue_depth > 1) {
1827 scsi_track_queue_full(tmp_sdev,
1828 tmp_sdev->
1829 queue_depth - 1);
1830 }
1831 }
1832 sc_cmd->result = (DID_OK << 16) | fsp->cdb_status;
1833 } else { 1818 } else {
1834 /* 1819 /*
1835 * transport level I/O was ok but scsi 1820 * transport level I/O was ok but scsi
@@ -2066,10 +2051,16 @@ EXPORT_SYMBOL(fc_slave_alloc);
2066 2051
2067int fc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) 2052int fc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
2068{ 2053{
2069 if (reason != SCSI_QDEPTH_DEFAULT) 2054 switch (reason) {
2055 case SCSI_QDEPTH_DEFAULT:
2056 scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth);
2057 break;
2058 case SCSI_QDEPTH_QFULL:
2059 scsi_track_queue_full(sdev, qdepth);
2060 break;
2061 default:
2070 return -EOPNOTSUPP; 2062 return -EOPNOTSUPP;
2071 2063 }
2072 scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth);
2073 return sdev->queue_depth; 2064 return sdev->queue_depth;
2074} 2065}
2075EXPORT_SYMBOL(fc_change_queue_depth); 2066EXPORT_SYMBOL(fc_change_queue_depth);