]> nv-tegra.nvidia Code Review - linux-3.10.git/commit
[SCSI] aic7xxx: make correct use of slave_alloc/destroy and remove the per device...
authorJames Bottomley <James.Bottomley@steeleye.com>
Tue, 17 May 2005 23:07:34 +0000 (18:07 -0500)
committerJames Bottomley <jejb@titanic.(none)>
Fri, 20 May 2005 20:54:42 +0000 (15:54 -0500)
commitc7525233d2df39b95552f6f49c6b390a9c4d2e80
tree6a2336435ea1a2bf1ae6b445d6b1109e0599a2a3
parent8e45ebcc661069bfb002c56dd942aedf43ba9239
[SCSI] aic7xxx: make correct use of slave_alloc/destroy and remove the per device timer

The allocation of all of our components should be done in slave alloc.
Currently it's rather fancifully refcounted in the queuecommand
callback.  This patch moves allocation and destroy to their correct
places in slave_alloc/slave_destory.  Now we can guarantee that
everywhere a device is requested, it's actually been allocated, so don't
check for this anymore.

Additionally, the per device busy timer was the only source of potential
use after free.  It's been deleted because Linux does the correct thing
with busy returns, so there's no need to implement a separate timer in
the driver.

Finally, implement code that forces all the device parameters to zero
(i.e. async and narrow) in the slave alloc, inform the spi class of the
bios recorded maximums and wait until slave configure before trying
anything more adventurous.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.h