qla2xxx: Convert to host_lock less w/ interrupts disabled externally
Subsystems (2)
PATCH 9/11 qla2xxx: Convert to host_lock less w/ interrupts disabled externally
From: Nicholas Bellinger <[email protected]>
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 <[email protected]>
--- drivers/scsi/qla2xxx/qla_os.c | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +3 -8
@@ -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)/*
Signature · 1 line
1.7.2.3