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/atapi-tape.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/atapi-tape.c')
-rw-r--r-- | sys/dev/ata/atapi-tape.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index 734f012520c2..aa44afee2011 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -191,10 +191,10 @@ ast_reinit(device_t dev) struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_device *atadev = device_get_softc(dev); - if (((atadev->unit == ATA_MASTER) && !(ch->devices & ATA_ATAPI_MASTER)) || - ((atadev->unit == ATA_SLAVE) && !(ch->devices & ATA_ATAPI_SLAVE))) { + /* if detach pending, return error */ + if (!(ch->devices & (ATA_ATAPI_MASTER << atadev->unit))) return 1; - } + ATA_SETMODE(device_get_parent(dev), dev); return 0; } |