Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932504Ab0LSVWn (ORCPT ); Sun, 19 Dec 2010 16:22:43 -0500 Received: from nm12.bullet.mail.ac4.yahoo.com ([98.139.52.209]:47301 "HELO nm12.bullet.mail.ac4.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S932479Ab0LSVWk (ORCPT ); Sun, 19 Dec 2010 16:22:40 -0500 X-Yahoo-Newman-Id: 591921.41394.bm@omp1064.mail.ac4.yahoo.com X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: hTkxBYgVM1kXydbR0.OwPC9ThDeIj1d9_AVEK7j3yXhaMEh fUzzV5eoEbNlVVCXyPoQXizF1ZEshgr2QOEebFRpbIEkj2A7sNSO.Aljg4Zd fLVO_YcsLAgy4jLEa8Nmc.Zgw9a9EEnw14_KL0AUcPHtYTJ5W0TSErthleim Iit.MAlSTGrSeO4vVKadSW_ojnXV.gn2Ubv341tmiwH2SYIiw1a1cjsPrHQs gzPrHtw9WC1ktntA4fAMohCquh5Z80kN4DeEWwYvY8pNn4ZB1nrxJZVoYXWL GXdalZbKQheuTLHB7vQo1EFw8b2yentbfAw6cSSYWr6Jb_pPrfp_aFaKAYlt oV8mbCckPeSZ2i2Ra2SMnyqSMLQVuwRkR7dn8ydZn8vOpEV3m_VHuU.dtTi4 eCBhm7SsMRzDiaXO9GELDJJkmcVqqvrnunmuKjvMahDre4.LgoEat7NxNNQ- - 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 05/12] fnic: Convert to host_lock less w/ interrupts disabled externally Date: Sun, 19 Dec 2010 13:22:00 -0800 Message-Id: <1292793727-31957-6-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: 2106 Lines: 61 From: Nicholas Bellinger This patch converts fnic 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/fnic/fnic_scsi.c | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/fnic/fnic_scsi.c b/drivers/scsi/fnic/fnic_scsi.c index 22d0240..9f51beb 100644 --- a/drivers/scsi/fnic/fnic_scsi.c +++ b/drivers/scsi/fnic/fnic_scsi.c @@ -349,7 +349,8 @@ static inline int fnic_queue_wq_copy_desc(struct fnic *fnic, * Routine to send a scsi cdb * Called with host_lock held and interrupts disabled. */ -static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *)) +static int fnic_queuecommand_irq_disable(struct scsi_cmnd *sc, + void (*done)(struct scsi_cmnd *)) { struct fc_lport *lp; struct fc_rport *rport; @@ -373,13 +374,6 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_ if (lp->state != LPORT_ST_READY || !(lp->link_up)) return SCSI_MLQUEUE_HOST_BUSY; - /* - * Release host lock, use driver resource specific locks from here. - * Don't re-enable interrupts in case they were disabled prior to the - * caller disabling them. - */ - spin_unlock(lp->host->host_lock); - /* Get a new io_req for this SCSI IO */ fnic = lport_priv(lp); @@ -452,12 +446,10 @@ static int fnic_queuecommand_lck(struct scsi_cmnd *sc, void (*done)(struct scsi_ } } out: - /* acquire host lock before returning to SCSI */ - spin_lock(lp->host->host_lock); return ret; } -DEF_SCSI_QCMD(fnic_queuecommand) +IRQ_DISABLE_SCSI_QCMD(fnic_queuecommand) /* * fnic_fcpio_fw_reset_cmpl_handler -- 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/