aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-10-15 20:46:50 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:00:42 -0500
commit5c20848a096fb1880ded99816be79d78ca1cd696 (patch)
treecbe373d4aa097c60a52d81dc652eccd16cf3921f /drivers/scsi
parent42a6a91833f1e0f5ee5b5ef98e9f00167b615f46 (diff)
[SCSI] libfc: convert to scsi_track_queue_full
This converts the libfc using scsi_track_queue_full to track the queue full from the change_queue_depth callback. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Vasu Dev <vasu.dev@intel.com> Acked-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-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);