diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-12-30 13:02:54 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-12-30 13:02:54 +0000 |
commit | 0a4470a2401d68041b1b223ce085b7c0ba161c3a (patch) | |
tree | 130a47418ef72bc96b95ba2e3171f5fb822af221 /sys/dev | |
parent | 4fb0633ba79efe6c32ccfaec107e75420c33c879 (diff) |
dont freeze lock or set caching modes on ata devices that arent disks, its
not a good idea.
found by simon@ who plugged a sata dvd drive into ahci.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ata/atascsi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index fcb10353e2c..4c6fe70446a 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.59 2007/12/29 00:45:26 dlg Exp $ */ +/* $OpenBSD: atascsi.c,v 1.60 2007/12/30 13:02:53 dlg Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -215,6 +215,9 @@ atascsi_probe(struct scsi_link *link) as->as_ports[port] = ap; + if (type != ATA_PORT_T_DISK) + return (0); + /* Enable write cache if supported */ if (ap->ap_identify.cmdset82 & ATA_IDENTIFY_WRITECACHE) { xa = ata_get_xfer(ap); |