From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasu Dev Subject: [PATCH 10/10] zfcp: Adapt change_queue_depth for queue full tracking Date: Thu, 03 Sep 2009 15:23:20 -0700 Message-ID: <20090903222320.24946.11461.stgit@vi1.jf.intel.com> References: <20090903221910.24946.39993.stgit@vi1.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com ([134.134.136.20]:54507 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932405AbZICWXS (ORCPT ); Thu, 3 Sep 2009 18:23:18 -0400 In-Reply-To: <20090903221910.24946.39993.stgit@vi1.jf.intel.com> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: James Bottomley , linux-scsi@vger.kernel.org Cc: Andrew Vasquez , James Smart , Mike Christie , Robert Love , Christof Schmitt From: Christof Schmitt Adapt the change_queue_depth callback in zfcp for the new reason parameter. Simply pass each call back to the SCSI midlayer, there are no resource adjustments necessary for zfcp. Signed-off-by: Christof Schmitt Signed-off-by: Vasu Dev --- drivers/s390/scsi/zfcp_scsi.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index bdff1bf..287ebb8 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -31,9 +31,21 @@ char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) static int zfcp_scsi_change_queue_depth(struct scsi_device *sdev, int depth, int reason) { - if (reason != SCSI_QDEPTH_DEFAULT) + switch (reason) { + case SCSI_QDEPTH_DEFAULT: + scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); + break; + case SCSI_QDEPTH_QFULL: + scsi_track_queue_full(sdev, depth); + break; + case SCSI_QDEPTH_RAMP_UP: + if (depth <= default_depth) + scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), + depth); + break; + default: return -EOPNOTSUPP; - scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); + } return sdev->queue_depth; }