aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ata/ata-disk.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2009-02-21 16:39:26 +0000
committerAlexander Motin <mav@FreeBSD.org>2009-02-21 16:39:26 +0000
commit7c84b0bd945e07aed5a4ba62b8c5944150b75dd8 (patch)
tree96e03f929f54c478e1d8e53e2125aa63cd79453c /sys/dev/ata/ata-disk.c
parentff0991c4e911eefe42ce715657c8fc2ea708c6f1 (diff)
downloadsrc-7c84b0bd945e07aed5a4ba62b8c5944150b75dd8.tar.gz
src-7c84b0bd945e07aed5a4ba62b8c5944150b75dd8.zip
Teach device drivers' ata_reinit() methods, that there can be more then two
devices per channel.
Notes
Notes: svn path=/head/; revision=188897
Diffstat (limited to 'sys/dev/ata/ata-disk.c')
-rw-r--r--sys/dev/ata/ata-disk.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 27d42104589b..e11f3f90fb2e 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -199,10 +199,9 @@ ad_reinit(device_t dev)
struct ata_device *atadev = device_get_softc(dev);
/* if detach pending, return error */
- if (((atadev->unit == ATA_MASTER) && !(ch->devices & ATA_ATA_MASTER)) ||
- ((atadev->unit == ATA_SLAVE) && !(ch->devices & ATA_ATA_SLAVE))) {
+ if (!(ch->devices & (ATA_ATA_MASTER << atadev->unit)))
return 1;
- }
+
ad_init(dev);
return 0;
}