aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libfc
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-10-15 17:46:50 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 12:00:42 -0600
commit5c20848a096fb1880ded99816be79d78ca1cd696 (patch)
treecbe373d4aa097c60a52d81dc652eccd16cf3921f /drivers/scsi/libfc
parent42a6a91833f1e0f5ee5b5ef98e9f00167b615f46 (diff)
downloadkernel_samsung_tuna-5c20848a096fb1880ded99816be79d78ca1cd696.zip
kernel_samsung_tuna-5c20848a096fb1880ded99816be79d78ca1cd696.tar.gz
kernel_samsung_tuna-5c20848a096fb1880ded99816be79d78ca1cd696.tar.bz2
[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/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 beaab81..c0dc8e1 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)
sc_cmd->result = DID_OK << 16;
if (fsp->scsi_resid)
CMD_RESID_LEN(sc_cmd) = fsp->scsi_resid;
- } else if (fsp->cdb_status == QUEUE_FULL) {
- struct scsi_device *tmp_sdev;
- struct scsi_device *sdev = sc_cmd->device;
-
- shost_for_each_device(tmp_sdev, sdev->host) {
- if (tmp_sdev->id != sdev->id)
- continue;
-
- if (tmp_sdev->queue_depth > 1) {
- scsi_track_queue_full(tmp_sdev,
- tmp_sdev->
- queue_depth - 1);
- }
- }
- sc_cmd->result = (DID_OK << 16) | fsp->cdb_status;
} else {
/*
* transport level I/O was ok but scsi
@@ -2066,10 +2051,16 @@ EXPORT_SYMBOL(fc_slave_alloc);
int fc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
{
- if (reason != SCSI_QDEPTH_DEFAULT)
+ switch (reason) {
+ case SCSI_QDEPTH_DEFAULT:
+ scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth);
+ break;
+ case SCSI_QDEPTH_QFULL:
+ scsi_track_queue_full(sdev, qdepth);
+ break;
+ default:
return -EOPNOTSUPP;
-
- scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth);
+ }
return sdev->queue_depth;
}
EXPORT_SYMBOL(fc_change_queue_depth);