From: Andrew Morton ahd_linux_queue() already takes that lock! This gets me further, but it's still deadlocking... Cc: James Bottomley Signed-off-by: Andrew Morton --- drivers/scsi/aic7xxx/aic79xx_osm.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff -puN drivers/scsi/aic7xxx/aic79xx_osm.c~aic79xx-deadlock-fix-2 drivers/scsi/aic7xxx/aic79xx_osm.c --- 25/drivers/scsi/aic7xxx/aic79xx_osm.c~aic79xx-deadlock-fix-2 2005-06-18 23:33:47.000000000 -0700 +++ 25-akpm/drivers/scsi/aic7xxx/aic79xx_osm.c 2005-06-18 23:33:47.000000000 -0700 @@ -2743,15 +2743,13 @@ ahd_linux_dv_target(struct ahd_softc *ah * ahd host lock held. For other kernels, the * io_request_lock must be held. */ -#if AHD_SCSI_HAS_HOST_LOCK != 0 - ahd_lock(ahd, &s); -#else +#if AHD_SCSI_HAS_HOST_LOCK == 0 spin_lock_irqsave(&io_request_lock, s); #endif + ahd_linux_queue(cmd, ahd_linux_dv_complete); -#if AHD_SCSI_HAS_HOST_LOCK != 0 - ahd_unlock(ahd, &s); -#else + +#if AHD_SCSI_HAS_HOST_LOCK == 0 spin_unlock_irqrestore(&io_request_lock, s); #endif down_interruptible(&ahd->platform_data->dv_cmd_sem); _