summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>2000-07-18 20:16:16 +0000
committern_hibma <n_hibma@FreeBSD.org>2000-07-18 20:16:16 +0000
commit551e68c1c995b0ab4bdd3d2c9353dae836956119 (patch)
treefebda56ec27d7eb37ed995b5efd14fc3de0710cd /sys/dev/ppbus
parent3c297571e4ab2eaa48b8a668018bf98fa7c09bb1 (diff)
downloadFreeBSD-src-551e68c1c995b0ab4bdd3d2c9353dae836956119.zip
FreeBSD-src-551e68c1c995b0ab4bdd3d2c9353dae836956119.tar.gz
Fix the detection of parallel port Zip drives.
Submitted by: j mckitrick <jcm@freebsd-uk.eu.org> Reviewed by: nsouchu
Diffstat (limited to 'sys/dev/ppbus')
-rw-r--r--sys/dev/ppbus/ppb_base.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ppbus/ppb_base.c b/sys/dev/ppbus/ppb_base.c
index c2f1d9b..060cb43 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);
}
OpenPOWER on IntegriCloud