Commit c5cadfc5 authored by Patrick Mansfield's avatar Patrick Mansfield Committed by James Bottomley

[PATCH] fix ppa locking and oops

We no longer hold the host_lock while calling the detect function, so
re-acquiring the lock while (without even unlocking it) in ppa_detect is
very wrong. References to the possibly NULL value hreg can also cause
oopses.
parent 006631a8
......@@ -219,15 +219,12 @@ int ppa_detect(Scsi_Host_Template * host)
printk(" supported by the imm (ZIP Plus) driver. If the\n");
printk(" cable is marked with \"AutoDetect\", this is what has\n");
printk(" happened.\n");
spin_lock_irq(hreg->host_lock);
return 0;
}
try_again = 1;
goto retry_entry;
} else {
spin_lock_irq(hreg->host_lock);
} else
return 1; /* return number of hosts detected */
}
}
/* This is to give the ppa driver a way to modify the timings (and other
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment