From 677cec5b045fd620aae147d40d2ec6840bda8f2c Mon Sep 17 00:00:00 2001 From: Nick Hibma Date: Tue, 18 Jul 2000 20:16:16 +0000 Subject: [PATCH] Fix the detection of parallel port Zip drives. Submitted by: j mckitrick Reviewed by: nsouchu --- sys/dev/ppbus/ppb_base.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/ppbus/ppb_base.c b/sys/dev/ppbus/ppb_base.c index c2f1d9b1fd2e..060cb439c528 100644 --- a/sys/dev/ppbus/ppb_base.c +++ b/sys/dev/ppbus/ppb_base.c @@ -131,10 +131,11 @@ ppb_set_mode(device_t bus, int mode) struct ppb_data *ppb = DEVTOSOFTC(bus); int old_mode = ppb_get_mode(bus); - if (!PPBUS_SETMODE(device_get_parent(bus), mode)) { - /* XXX yet device mode = ppbus mode = chipset mode */ - ppb->mode = (mode & PPB_MASK); - } + if (PPBUS_SETMODE(device_get_parent(bus), mode)) + return -1; + + /* XXX yet device mode = ppbus mode = chipset mode */ + ppb->mode = (mode & PPB_MASK); return (old_mode); }