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:
Vladislav Bolkhovitin
2009-04-02 19:27:39 +00:00
parent 34958faa23
commit f2061b9eab
2 changed files with 6 additions and 6 deletions

View File

@@ -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",

View File

@@ -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);
}
/*