diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-05-05 19:23:06 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-05-05 19:23:06 +0000 |
commit | 81a36e54e25959336ad8d3ae4a0bea26d7a0b6d2 (patch) | |
tree | d0b8315162f226d74f0a51ecc475a5a093af9fe8 /sys | |
parent | 32503b13d206ec26e16ef34fc47207f337d5a6db (diff) |
Go back to only attempting one IDENTIFY command against directly
attached devices as in the pre-port-multiplier code. (Devices
attached via port multipliers still get multiple attempts though.)
Also don't bother sleeping after the last iteration if all attempts
failed.
Discussed with dlg@ and Jonathan Matthew; ok dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ata/atascsi.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index e9877dedbaa..5f142a83892 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.103 2011/04/27 23:51:09 matthew Exp $ */ +/* $OpenBSD: atascsi.c,v 1.104 2011/05/05 19:23:05 matthew Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -331,8 +331,8 @@ atascsi_probe(struct scsi_link *link) * identification from working, so we retry a few times * with a fairly long delay. */ - int count = 5; - do { + int count = (link->lun > 0) ? 6 : 1; + while (count--) { xa = scsi_io_get(&ahp->ahp_iopool, SCSI_NOSLEEP); if (xa == NULL) panic("no free xfers on a new port"); @@ -358,8 +358,9 @@ atascsi_probe(struct scsi_link *link) break; } dma_free(identify, sizeof(*identify)); - delay(5000000); - } while (count--); + if (count > 0) + delay(5000000); + } if (rv != 0) { goto error; |