Skip to content

Commit

Permalink
[PATCH] libata: make user scan wait for scan to complete
Browse files Browse the repository at this point in the history
Make user scan wait for scan to complete.  This way user can wait for
warm plug request to complete and is prevented from causing EH event
storm by repetitively issuing scan request while EH is in progress.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Fajun Chen <fajunchen@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Dec 2, 2006
1 parent 722420f commit 309afcb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -3182,10 +3182,12 @@ static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
rc = -EINVAL;
}

if (rc == 0)
if (rc == 0) {
ata_port_schedule_eh(ap);

spin_unlock_irqrestore(ap->lock, flags);
spin_unlock_irqrestore(ap->lock, flags);
ata_port_wait_eh(ap);
} else
spin_unlock_irqrestore(ap->lock, flags);

return rc;
}
Expand Down

0 comments on commit 309afcb

Please sign in to comment.