Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173624
b: refs/heads/master
c: 5c20848
h: refs/heads/master
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Dec 4, 2009
1 parent e262551 commit 7a31921
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42a6a91833f1e0f5ee5b5ef98e9f00167b615f46
refs/heads/master: 5c20848a096fb1880ded99816be79d78ca1cd696
27 changes: 9 additions & 18 deletions trunk/drivers/scsi/libfc/fc_fcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7a31921

Please sign in to comment.