diff options
author | Alexander Motin <mav@FreeBSD.org> | 2009-02-21 16:39:26 +0000 |
---|---|---|
committer | Alexander Motin <mav@FreeBSD.org> | 2009-02-21 16:39:26 +0000 |
commit | 7c84b0bd945e07aed5a4ba62b8c5944150b75dd8 (patch) | |
tree | 96e03f929f54c478e1d8e53e2125aa63cd79453c /sys/dev/ata/ata-disk.c | |
parent | ff0991c4e911eefe42ce715657c8fc2ea708c6f1 (diff) | |
download | src-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.c | 5 |
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; } |