Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757278Ab0LSVWy (ORCPT ); Sun, 19 Dec 2010 16:22:54 -0500 Received: from nm5.bullet.mail.ac4.yahoo.com ([98.139.52.202]:26247 "HELO nm5.bullet.mail.ac4.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757295Ab0LSVWt (ORCPT ); Sun, 19 Dec 2010 16:22:49 -0500 X-Yahoo-Newman-Id: 74159.45774.bm@omp1054.mail.ac4.yahoo.com X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: fHTa2vwVM1kGc1iJ8UBPszN_8Eal3kwKed5sXkt97T3uOaD 2BIeFSF8mXsoyKo13HaImznxN5scJ2_4An6LRTeuRiURc92OU3hERTKNA769 QChhnkYKpo_QjvhoMXz0jnOC4h_wo004RuZidowsCbnPuz1wzSsQmlMymcoB mPM_LkidVqgqImK9cnhGkT313mXMbrJ1EQvr7GhsB2t0LesLaziTcp2Zb812 93oH6TF5Y8hSYAChJ0yaTQfVDIujcXp2UCL_1Tc4Bv6jT.7xAyU18htpNXLb FjshaWt7VCnt_vxH_W3KcedvvkOCHJB9ZTCq95H2sFTI2.MEkPjcCDoouDrW i.VLypbhU829WB_5Yu5Cqs2j5G6O4 X-Yahoo-Newman-Property: ymail-3 From: "Nicholas A. Bellinger" To: linux-scsi , linux-kernel , James Bottomley , Jeff Garzik , Christoph Hellwig , FUJITA Tomonori , Hannes Reinecke , Mike Christie Cc: Mike Anderson , Tejun Heo , Vasu Dev , Tim Chen , Andi Kleen , Ravi Anand , Andrew Vasquez , Joe Eykholt , James Smart , Douglas Gilbert , adam radford , Kashyap Desai , MPTFusionLinux , Nicholas Bellinger Subject: [PATCH 07/12] qla2xxx: Convert to host_lock less w/ interrupts disabled externally Date: Sun, 19 Dec 2010 13:22:02 -0800 Message-Id: <1292793727-31957-8-git-send-email-nab@linux-iscsi.org> X-Mailer: git-send-email 1.5.6.5 In-Reply-To: <1292793727-31957-1-git-send-email-nab@linux-iscsi.org> References: <1292793727-31957-1-git-send-email-nab@linux-iscsi.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2261 Lines: 73 From: Nicholas Bellinger This patch converts qla2xxx to run in host_lock less mode with the new IRQ_DISABLE_SCSI_QCMD() that disables interrupts while calling ->queuecommand() dispatch. It also drops the legacy host_lock unlock optimization. Signed-off-by: Nicholas A. Bellinger --- drivers/scsi/qla2xxx/qla_os.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 2c0876c..c6cdfeb 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -534,7 +534,8 @@ qla2x00_get_new_sp(scsi_qla_host_t *vha, fc_port_t *fcport, } static int -qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) +qla2xxx_queuecommand_irq_disable(struct scsi_cmnd *cmd, + void (*done)(struct scsi_cmnd *)) { scsi_qla_host_t *vha = shost_priv(cmd->device->host); fc_port_t *fcport = (struct fc_port *) cmd->device->hostdata; @@ -544,7 +545,6 @@ qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *) srb_t *sp; int rval; - spin_unlock_irq(vha->host->host_lock); if (ha->flags.eeh_busy) { if (ha->flags.pci_channel_io_perm_failure) cmd->result = DID_NO_CONNECT << 16; @@ -585,8 +585,6 @@ qla2xxx_queuecommand_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *) if (rval != QLA_SUCCESS) goto qc24_host_busy_free_sp; - spin_lock_irq(vha->host->host_lock); - return 0; qc24_host_busy_free_sp: @@ -594,21 +592,18 @@ qc24_host_busy_free_sp: mempool_free(sp, ha->srb_mempool); qc24_host_busy_lock: - spin_lock_irq(vha->host->host_lock); return SCSI_MLQUEUE_HOST_BUSY; qc24_target_busy: - spin_lock_irq(vha->host->host_lock); return SCSI_MLQUEUE_TARGET_BUSY; qc24_fail_command: - spin_lock_irq(vha->host->host_lock); done(cmd); return 0; } -static DEF_SCSI_QCMD(qla2xxx_queuecommand) +static IRQ_DISABLE_SCSI_QCMD(qla2xxx_queuecommand) /* -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/