]> git.baikalelectronics.ru Git - kernel.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)
commita4f96be349462d8c139013a7f921bbf70257306a
tree6a2336435ea1a2bf1ae6b445d6b1109e0599a2a3
parent8686a67f9da04ba0396c1d978934bb435ec2d714
[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