mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
Fixes failure of enabling target mode, if do it too fast. Based on work by sdrb <sdrb@onet.eu>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@739 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -59,16 +59,12 @@ qla2x00_store_tgt_enabled(struct device *dev, struct device_attribute *attr,
|
||||
|
||||
switch (buf[0]) {
|
||||
case '0' :
|
||||
if ((ha->flags.enable_target_mode) || force) {
|
||||
if ((ha->flags.enable_target_mode) || force)
|
||||
qla_target.tgt_host_action(ha, DISABLE_TARGET_MODE);
|
||||
msleep_interruptible(10*1000);
|
||||
}
|
||||
break;
|
||||
case '1' :
|
||||
if ((ha->flags.enable_target_mode == 0) || force) {
|
||||
if ((ha->flags.enable_target_mode == 0) || force)
|
||||
qla_target.tgt_host_action(ha, ENABLE_TARGET_MODE);
|
||||
msleep_interruptible(10*1000);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
printk(KERN_INFO "%s: Requested action not understood: %s\n",
|
||||
|
||||
@@ -4150,6 +4150,8 @@ __qla2x00_enable_lun(scsi_qla_host_t *ha)
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
|
||||
qla2xxx_wake_dpc(ha);
|
||||
qla2x00_wait_for_hba_online(ha);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -4167,6 +4169,8 @@ __qla2x00_disable_lun(scsi_qla_host_t *ha)
|
||||
spin_unlock_irqrestore(&ha->hardware_lock, flags);
|
||||
|
||||
set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags);
|
||||
qla2xxx_wake_dpc(ha);
|
||||
qla2x00_wait_for_hba_online(ha);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user