diff options
author | Hannes Reinecke <hare@suse.de> | 2006-04-03 02:19:34 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-13 13:56:15 -0400 |
commit | f41b5cec9bd6fec1b11b74500f5fb9c3e6e808b2 (patch) | |
tree | 0098b82ba59ae525d2ed7528435e5d4e46ce76dc /drivers/scsi/aic7xxx/aic79xx_osm.c | |
parent | 4d7db04a7a69099accd84984a78c64d2178252f1 (diff) |
[SCSI] aic79xx bus reset update
As James B. correctly noted, ahd_reset_channel() in
ahd_linux_bus_reset() should be protected by ahd_lock(). However, the
main reason for not doing so was a deadlock with the interesting
polling mechanism to detect the end a bus reset.
This patch replaces the polling mechanism with a saner signalling via
flags; it also gives us the benefit of detecting any multiple calls to
ahd_reset_channel().
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aic79xx_osm.c')
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index bcced0a417e6..66e4a47bb9ee 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -782,6 +782,7 @@ ahd_linux_bus_reset(struct scsi_cmnd *cmd) | |||
782 | { | 782 | { |
783 | struct ahd_softc *ahd; | 783 | struct ahd_softc *ahd; |
784 | int found; | 784 | int found; |
785 | unsigned long flags; | ||
785 | 786 | ||
786 | ahd = *(struct ahd_softc **)cmd->device->host->hostdata; | 787 | ahd = *(struct ahd_softc **)cmd->device->host->hostdata; |
787 | #ifdef AHD_DEBUG | 788 | #ifdef AHD_DEBUG |
@@ -789,8 +790,11 @@ ahd_linux_bus_reset(struct scsi_cmnd *cmd) | |||
789 | printf("%s: Bus reset called for cmd %p\n", | 790 | printf("%s: Bus reset called for cmd %p\n", |
790 | ahd_name(ahd), cmd); | 791 | ahd_name(ahd), cmd); |
791 | #endif | 792 | #endif |
793 | ahd_lock(ahd, &flags); | ||
794 | |||
792 | found = ahd_reset_channel(ahd, scmd_channel(cmd) + 'A', | 795 | found = ahd_reset_channel(ahd, scmd_channel(cmd) + 'A', |
793 | /*initiate reset*/TRUE); | 796 | /*initiate reset*/TRUE); |
797 | ahd_unlock(ahd, &flags); | ||
794 | 798 | ||
795 | if (bootverbose) | 799 | if (bootverbose) |
796 | printf("%s: SCSI bus reset delivered. " | 800 | printf("%s: SCSI bus reset delivered. " |