Fixes failure of enabling target mode, if do it too fast. Based on work by sdrb ...
[mirror/scst/.git] / qla2x00t / qla_attr.c
index 0d98794..456868b 100644 (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",