diff options
36 files changed, 47 insertions, 644 deletions
diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c index fe3a5a9f6f0..a700c5e1f9c 100644 --- a/sys/arch/alpha/alpha/conf.c +++ b/sys/arch/alpha/alpha/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.77 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.78 2014/12/11 19:44:16 tedu Exp $ */ /* $NetBSD: conf.c,v 1.16 1996/10/18 21:26:57 cgd Exp $ */ /*- @@ -113,7 +113,6 @@ cdev_decl(cy); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "pf.h" #ifdef USER_PCICONF @@ -198,7 +197,7 @@ struct cdevsw cdevsw[] = cdev_notdef(), cdev_disk_init(1,diskmap), /* 63: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 64: pppx */ - cdev_urio_init(NURIO,urio), /* 65: USB Diamond Rio 500 */ + cdev_notdef(), /* 65: was urio */ cdev_notdef(), /* 66: was USB scanners */ cdev_fuse_init(NFUSE,fuse), /* 67: fuse */ }; diff --git a/sys/arch/alpha/conf/GENERIC b/sys/arch/alpha/conf/GENERIC index f283a678475..4b059eff2d4 100644 --- a/sys/arch/alpha/conf/GENERIC +++ b/sys/arch/alpha/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.249 2014/11/24 02:03:36 brad Exp $ +# $OpenBSD: GENERIC,v 1.250 2014/12/11 19:44:16 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -114,7 +114,6 @@ upl* at uhub? # Prolific PL2301/PL2302 host-to-host `network' ugl* at uhub? # Genesys Logic GL620USB-A host-to-host `network' url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/arch/amd64/amd64/conf.c b/sys/arch/amd64/amd64/conf.c index 4544f4d2e6e..451cf19a8c9 100644 --- a/sys/arch/amd64/amd64/conf.c +++ b/sys/arch/amd64/amd64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.48 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.49 2014/12/11 19:44:16 tedu Exp $ */ /* * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved. @@ -147,7 +147,6 @@ cdev_decl(cy); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "cz.h" cdev_decl(cztty); @@ -248,7 +247,7 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUHID,uhid), /* 62: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 63: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 64: USB printers */ - cdev_urio_init(NURIO,urio), /* 65: USB Diamond Rio 500 */ + cdev_notdef(), /* 65: urio */ cdev_tty_init(NUCOM,ucom), /* 66: USB tty */ cdev_mouse_init(NWSKBD, wskbd), /* 67: keyboards */ cdev_mouse_init(NWSMOUSE, /* 68: mice */ diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC index 7dfabe30702..d47d0fcc7d2 100644 --- a/sys/arch/amd64/conf/GENERIC +++ b/sys/arch/amd64/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.381 2014/12/10 05:50:58 jsg Exp $ +# $OpenBSD: GENERIC,v 1.382 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -240,7 +240,6 @@ udav* at uhub? # Davicom DM9601 based Ethernet mos* at uhub? # MOSCHIP MCS7730/7830 10/100 Ethernet url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio uberry* at uhub? # Research In Motion Blackberry diff --git a/sys/arch/arm/arm/conf.c b/sys/arch/arm/arm/conf.c index ae6e6a25192..a6917e5d2f8 100644 --- a/sys/arch/arm/arm/conf.c +++ b/sys/arch/arm/arm/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.40 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.41 2014/12/11 19:44:17 tedu Exp $ */ /* $NetBSD: conf.c,v 1.10 2002/04/19 01:04:38 wiz Exp $ */ /* @@ -124,7 +124,6 @@ cdev_decl(pci); #include "ugen.h" #include "uhid.h" #include "ulpt.h" -#include "urio.h" /* * WSCONS devices @@ -341,7 +340,7 @@ struct cdevsw cdevsw[] = { cdev_usb_init(NUSB,usb), /* 64: USB controller */ cdev_usbdev_init(NUHID,uhid), /* 65: USB generic HID */ cdev_ulpt_init(NULPT,ulpt), /* 66: USB printer */ - cdev_urio_init(NURIO,urio), /* 67: Diamond Rio 500 */ + cdev_notdef(), /* 67: was urio */ cdev_tty_init(NUCOM,ucom), /* 68: USB tty */ cdev_notdef(), /* 69: was USB scanners */ cdev_usbdev_init(NUGEN,ugen), /* 70: USB generic driver */ diff --git a/sys/arch/armish/conf/GENERIC b/sys/arch/armish/conf/GENERIC index 4277f0f743c..69d563ad13b 100644 --- a/sys/arch/armish/conf/GENERIC +++ b/sys/arch/armish/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.56 2014/11/24 02:03:37 brad Exp $ +# $OpenBSD: GENERIC,v 1.57 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -145,7 +145,6 @@ ugl* at uhub? # Genesys Logic GL620USB-A host-to-host `network' udav* at uhub? # Davicom DM9601 based Ethernet url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/arch/armv7/conf/GENERIC-IMX b/sys/arch/armv7/conf/GENERIC-IMX index 3799370e78e..0db547b6ba8 100644 --- a/sys/arch/armv7/conf/GENERIC-IMX +++ b/sys/arch/armv7/conf/GENERIC-IMX @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC-IMX,v 1.9 2014/11/09 05:12:15 jsg Exp $ +# $OpenBSD: GENERIC-IMX,v 1.10 2014/12/11 19:44:17 tedu Exp $ # # GENERIC machine description file # @@ -122,7 +122,6 @@ ugl* at uhub? # Genesys Logic GL620USB-A host-to-host `network' udav* at uhub? # Davicom DM9601 based Ethernet url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/arch/armv7/conf/GENERIC-OMAP b/sys/arch/armv7/conf/GENERIC-OMAP index 1e8a84cc65f..5ce5d7fef44 100644 --- a/sys/arch/armv7/conf/GENERIC-OMAP +++ b/sys/arch/armv7/conf/GENERIC-OMAP @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC-OMAP,v 1.12 2014/11/09 05:12:15 jsg Exp $ +# $OpenBSD: GENERIC-OMAP,v 1.13 2014/12/11 19:44:17 tedu Exp $ # # GENERIC machine description file # @@ -136,7 +136,6 @@ ugl* at uhub? # Genesys Logic GL620USB-A host-to-host `network' udav* at uhub? # Davicom DM9601 based Ethernet url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/arch/armv7/conf/GENERIC-SUNXI b/sys/arch/armv7/conf/GENERIC-SUNXI index fac0172c30e..e6aa38e5913 100644 --- a/sys/arch/armv7/conf/GENERIC-SUNXI +++ b/sys/arch/armv7/conf/GENERIC-SUNXI @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC-SUNXI,v 1.10 2014/11/24 02:03:37 brad Exp $ +# $OpenBSD: GENERIC-SUNXI,v 1.11 2014/12/11 19:44:17 tedu Exp $ # # GENERIC machine description file # @@ -124,7 +124,6 @@ ugl* at uhub? # Genesys Logic GL620USB-A host-to-host `network' udav* at uhub? # Davicom DM9601 based Ethernet url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/arch/armv7/conf/RAMDISK-IMX b/sys/arch/armv7/conf/RAMDISK-IMX index 6a4e0f8b196..6907d45e9c3 100644 --- a/sys/arch/armv7/conf/RAMDISK-IMX +++ b/sys/arch/armv7/conf/RAMDISK-IMX @@ -1,4 +1,4 @@ -# $OpenBSD: RAMDISK-IMX,v 1.12 2014/10/10 05:43:35 deraadt Exp $ +# $OpenBSD: RAMDISK-IMX,v 1.13 2014/12/11 19:44:17 tedu Exp $ machine armv7 arm maxusers 4 @@ -94,7 +94,6 @@ ugl* at uhub? # Genesys Logic GL620USB-A host-to-host udav* at uhub? # Davicom DM9601 based Ethernet url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/arch/hppa/conf/GENERIC b/sys/arch/hppa/conf/GENERIC index 0970b6152bd..13f35818b54 100644 --- a/sys/arch/hppa/conf/GENERIC +++ b/sys/arch/hppa/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.166 2014/09/14 18:59:18 brad Exp $ +# $OpenBSD: GENERIC,v 1.167 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -156,7 +156,6 @@ udav* at uhub? # Davicom DM9601 based Ethernet upl* at uhub? # Prolific PL2301/PL2302 host-to-host `network' ugl* at uhub? # Genesys Logic GL620USB-A host-to-host `network' wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/arch/hppa/hppa/conf.c b/sys/arch/hppa/hppa/conf.c index 646702d09e0..1d4b748fb20 100644 --- a/sys/arch/hppa/hppa/conf.c +++ b/sys/arch/hppa/hppa/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.61 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.62 2014/12/11 19:44:17 tedu Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -114,7 +114,6 @@ cdev_decl(pci); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "fuse.h" @@ -170,7 +169,7 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUHID,uhid), /* 41: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 42: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 43: USB printers */ - cdev_urio_init(NURIO,urio), /* 44: USB Diamond Rio 500 */ + cdev_notdef(), /* 44: was urio */ cdev_tty_init(NUCOM,ucom), /* 45: USB tty */ cdev_notdef(), /* 46: was USB scanners */ cdev_hotplug_init(NHOTPLUG,hotplug), /* 47: devices hot plugging */ diff --git a/sys/arch/hppa64/conf/GENERIC b/sys/arch/hppa64/conf/GENERIC index 73560552c1d..ca701439dce 100644 --- a/sys/arch/hppa64/conf/GENERIC +++ b/sys/arch/hppa64/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.34 2014/11/24 02:03:37 brad Exp $ +# $OpenBSD: GENERIC,v 1.35 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -106,7 +106,6 @@ com1 at ssio? irq 3 #ugl* at uhub? # Genesys Logic GL620USB-A host-to-host `network' #url* at uhub? # Realtek RTL8150L based adapters #wi* at uhub? # WaveLAN IEEE 802.11DS -#urio* at uhub? # Diamond Multimedia Rio 500 #udsbr* at uhub? # D-Link DSB-R100 radio #radio* at udsbr? # USB radio #ugen* at uhub? # USB Generic driver diff --git a/sys/arch/hppa64/hppa64/conf.c b/sys/arch/hppa64/hppa64/conf.c index 620ec1b21d4..d2fca333230 100644 --- a/sys/arch/hppa64/hppa64/conf.c +++ b/sys/arch/hppa64/hppa64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.28 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.29 2014/12/11 19:44:17 tedu Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -114,7 +114,6 @@ cdev_decl(pci); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "fuse.h" @@ -170,7 +169,7 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUHID,uhid), /* 41: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 42: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 43: USB printers */ - cdev_urio_init(NURIO,urio), /* 44: USB Diamond Rio 500 */ + cdev_notdef(), /* 44: was urio */ cdev_tty_init(NUCOM,ucom), /* 45: USB tty */ cdev_notdef(), /* 46: was USB scanners */ cdev_hotplug_init(NHOTPLUG,hotplug), /* 47: devices hot plugging */ diff --git a/sys/arch/i386/conf/GENERIC b/sys/arch/i386/conf/GENERIC index f8c35403909..2b33037e605 100644 --- a/sys/arch/i386/conf/GENERIC +++ b/sys/arch/i386/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.791 2014/12/10 05:50:58 jsg Exp $ +# $OpenBSD: GENERIC,v 1.792 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -293,7 +293,6 @@ udav* at uhub? # Davicom DM9601 based Ethernet mos* at uhub? # MOSCHIP MCS7730/7830 10/100 Ethernet url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio uberry* at uhub? # Research In Motion Blackberry diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c index ad472d7d879..92531250c75 100644 --- a/sys/arch/i386/i386/conf.c +++ b/sys/arch/i386/i386/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.149 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.150 2014/12/11 19:44:17 tedu Exp $ */ /* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */ /* @@ -149,7 +149,6 @@ cdev_decl(cy); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "cz.h" cdev_decl(cztty); @@ -252,7 +251,7 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUHID,uhid), /* 62: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 63: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 64: USB printers */ - cdev_urio_init(NURIO,urio), /* 65: USB Diamond Rio 500 */ + cdev_notdef(), /* 65: was urio */ cdev_tty_init(NUCOM,ucom), /* 66: USB tty */ cdev_mouse_init(NWSKBD, wskbd), /* 67: keyboards */ cdev_mouse_init(NWSMOUSE, /* 68: mice */ diff --git a/sys/arch/landisk/conf/GENERIC b/sys/arch/landisk/conf/GENERIC index f894d0df97f..9c51c24db48 100644 --- a/sys/arch/landisk/conf/GENERIC +++ b/sys/arch/landisk/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.46 2014/12/04 11:19:17 mpi Exp $ +# $OpenBSD: GENERIC,v 1.47 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -143,7 +143,6 @@ ugl* at uhub? # Genesys Logic GL620USB-A host-to-host `network' udav* at uhub? # Davicom DM9601 based Ethernet url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/arch/landisk/landisk/conf.c b/sys/arch/landisk/landisk/conf.c index 9520acec3ed..b00493e23eb 100644 --- a/sys/arch/landisk/landisk/conf.c +++ b/sys/arch/landisk/landisk/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.30 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.31 2014/12/11 19:44:17 tedu Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -114,7 +114,6 @@ cdev_decl(pci); #include "ugen.h" #include "uhid.h" #include "ulpt.h" -#include "urio.h" /* * WSCONS devices @@ -317,7 +316,7 @@ struct cdevsw cdevsw[] = { cdev_usb_init(NUSB,usb), /* 64: USB controller */ cdev_usbdev_init(NUHID,uhid), /* 65: USB generic HID */ cdev_ulpt_init(NULPT,ulpt), /* 66: USB printer */ - cdev_urio_init(NURIO,urio), /* 67: Diamond Rio 500 */ + cdev_notdef(), /* 67: was urio */ cdev_tty_init(NUCOM,ucom), /* 68: USB tty */ cdev_notdef(), /* 69: was USB scanners */ cdev_usbdev_init(NUGEN,ugen), /* 70: USB generic driver */ diff --git a/sys/arch/loongson/conf/GENERIC b/sys/arch/loongson/conf/GENERIC index cfc4de48f6b..a1bec675250 100644 --- a/sys/arch/loongson/conf/GENERIC +++ b/sys/arch/loongson/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.46 2014/12/04 11:19:17 mpi Exp $ +# $OpenBSD: GENERIC,v 1.47 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -125,7 +125,6 @@ uchcom* at uhub? # WinChipHead CH341/340 serial ucom* at uchcom? ulpt* at uhub? # USB Printers umass* at uhub? # USB Mass Storage devices -urio* at uhub? # Diamond Multimedia Rio 500 uhidev* at uhub? # Human Interface Devices ums* at uhidev? # USB mouse wsmouse* at ums? mux 0 diff --git a/sys/arch/loongson/loongson/conf.c b/sys/arch/loongson/loongson/conf.c index 0316535c9a5..2a6188425c5 100644 --- a/sys/arch/loongson/loongson/conf.c +++ b/sys/arch/loongson/loongson/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.18 2014/08/20 06:14:42 mikeb Exp $ */ +/* $OpenBSD: conf.c,v 1.19 2014/12/11 19:44:17 tedu Exp $ */ /* * Copyright (c) 1992, 1993 @@ -121,7 +121,6 @@ cdev_decl(pci); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "vscsi.h" @@ -199,7 +198,7 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUHID,uhid), /* 62: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 63: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 64: USB printers */ - cdev_urio_init(NURIO,urio), /* 65: USB Diamond Rio 500 */ + cdev_notdef(), /* 65: */ cdev_tty_init(NUCOM,ucom), /* 66: USB tty */ cdev_hotplug_init(NHOTPLUG,hotplug), /* 67: devices hotplugging */ cdev_notdef(), diff --git a/sys/arch/macppc/conf/GENERIC b/sys/arch/macppc/conf/GENERIC index 3c23378d398..ae5fe88a30c 100644 --- a/sys/arch/macppc/conf/GENERIC +++ b/sys/arch/macppc/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.244 2014/12/04 11:19:17 mpi Exp $g +# $OpenBSD: GENERIC,v 1.245 2014/12/11 19:44:17 tedu Exp $g # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -268,7 +268,6 @@ udav* at uhub? # Davicom DM9601 based Ethernet mos* at uhub? # MOSCHIP MCS7730/7830 10/100 Ethernet url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio uberry* at uhub? # Research In Motion Blackberry diff --git a/sys/arch/macppc/macppc/conf.c b/sys/arch/macppc/macppc/conf.c index 9a6ef4964d7..c64e43c98d0 100644 --- a/sys/arch/macppc/macppc/conf.c +++ b/sys/arch/macppc/macppc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.61 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.62 2014/12/11 19:44:17 tedu Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -98,7 +98,6 @@ cdev_decl(com); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "apm.h" @@ -197,7 +196,7 @@ struct cdevsw cdevsw[] = { cdev_usbdev_init(NUHID,uhid), /* 62: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 63: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 64: USB printers */ - cdev_urio_init(NURIO,urio), /* 65: USB Diamond Rio 500 */ + cdev_notdef(), /* 65: was urio */ cdev_tty_init(NUCOM,ucom), /* 66: USB tty */ cdev_wsdisplay_init(NWSDISPLAY, /* 67: frame buffers, etc. */ wsdisplay), diff --git a/sys/arch/octeon/octeon/conf.c b/sys/arch/octeon/octeon/conf.c index d7adbdca215..650099cb06e 100644 --- a/sys/arch/octeon/octeon/conf.c +++ b/sys/arch/octeon/octeon/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.12 2014/08/20 06:14:42 mikeb Exp $ */ +/* $OpenBSD: conf.c,v 1.13 2014/12/11 19:44:17 tedu Exp $ */ /* * Copyright (c) 1992, 1993 @@ -128,7 +128,6 @@ cdev_decl(pci); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "vscsi.h" @@ -210,7 +209,7 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUHID,uhid), /* 62: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 63: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 64: USB printers */ - cdev_urio_init(NURIO,urio), /* 65: USB Diamond Rio 500 */ + cdev_notdef(), /* 65: */ cdev_tty_init(NUCOM,ucom), /* 66: USB tty */ cdev_hotplug_init(NHOTPLUG,hotplug), /* 67: devices hotplugging */ cdev_notdef(), diff --git a/sys/arch/sgi/conf/GENERIC-IP27 b/sys/arch/sgi/conf/GENERIC-IP27 index 03e0825ddab..705dd671a8b 100644 --- a/sys/arch/sgi/conf/GENERIC-IP27 +++ b/sys/arch/sgi/conf/GENERIC-IP27 @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC-IP27,v 1.57 2014/11/24 02:03:37 brad Exp $ +# $OpenBSD: GENERIC-IP27,v 1.58 2014/12/11 19:44:17 tedu Exp $ # # THIS KERNEL IS FOR Origin, Onyx, Fuel, Tezro (IP27, IP35) SYSTEMS ONLY. # @@ -116,7 +116,6 @@ uaudio* at uhub? # USB Audio audio* at uaudio? ulpt* at uhub? # USB Printers umass* at uhub? # USB Mass Storage devices -urio* at uhub? # Diamond Multimedia Rio 500 uhidev* at uhub? # Human Interface Devices ums* at uhidev? # USB mouse wsmouse* at ums? mux 0 diff --git a/sys/arch/sgi/conf/GENERIC-IP30 b/sys/arch/sgi/conf/GENERIC-IP30 index d1d97b70b0f..13982a01011 100644 --- a/sys/arch/sgi/conf/GENERIC-IP30 +++ b/sys/arch/sgi/conf/GENERIC-IP30 @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC-IP30,v 1.50 2014/11/24 02:03:37 brad Exp $ +# $OpenBSD: GENERIC-IP30,v 1.51 2014/12/11 19:44:17 tedu Exp $ # # THIS KERNEL IS FOR Octane and Octane 2 (IP30) SYSTEMS ONLY. # @@ -107,7 +107,6 @@ uaudio* at uhub? # USB Audio audio* at uaudio? ulpt* at uhub? # USB Printers umass* at uhub? # USB Mass Storage devices -urio* at uhub? # Diamond Multimedia Rio 500 uhidev* at uhub? # Human Interface Devices ums* at uhidev? # USB mouse wsmouse* at ums? mux 0 diff --git a/sys/arch/sgi/conf/GENERIC-IP32 b/sys/arch/sgi/conf/GENERIC-IP32 index 6bc87190de0..d5a51bd3a4f 100644 --- a/sys/arch/sgi/conf/GENERIC-IP32 +++ b/sys/arch/sgi/conf/GENERIC-IP32 @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC-IP32,v 1.41 2014/11/24 02:03:37 brad Exp $ +# $OpenBSD: GENERIC-IP32,v 1.42 2014/12/11 19:44:17 tedu Exp $ # # THIS KERNEL IS FOR O2 (IP32) SYSTEMS ONLY. # @@ -99,7 +99,6 @@ uaudio* at uhub? # USB Audio audio* at uaudio? ulpt* at uhub? # USB Printers umass* at uhub? # USB Mass Storage devices -urio* at uhub? # Diamond Multimedia Rio 500 uhidev* at uhub? # Human Interface Devices ums* at uhidev? # USB mouse wsmouse* at ums? mux 0 diff --git a/sys/arch/sgi/sgi/conf.c b/sys/arch/sgi/sgi/conf.c index 007c067e322..d18accf77e4 100644 --- a/sys/arch/sgi/sgi/conf.c +++ b/sys/arch/sgi/sgi/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.34 2014/08/20 06:14:42 mikeb Exp $ */ +/* $OpenBSD: conf.c,v 1.35 2014/12/11 19:44:17 tedu Exp $ */ /* * Copyright (c) 1992, 1993 @@ -122,7 +122,6 @@ cdev_decl(pci); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "vscsi.h" @@ -200,7 +199,7 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUHID,uhid), /* 62: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 63: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 64: USB printers */ - cdev_urio_init(NURIO,urio), /* 65: USB Diamond Rio 500 */ + cdev_notdef(), /* 65: was urio */ cdev_tty_init(NUCOM,ucom), /* 66: USB tty */ cdev_hotplug_init(NHOTPLUG,hotplug), /* 67: devices hotplugging */ cdev_vscsi_init(NVSCSI,vscsi), /* 68: vscsi */ diff --git a/sys/arch/socppc/conf/GENERIC b/sys/arch/socppc/conf/GENERIC index 0bd878d100d..e95b04a0340 100644 --- a/sys/arch/socppc/conf/GENERIC +++ b/sys/arch/socppc/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.29 2014/11/24 02:03:37 brad Exp $ +# $OpenBSD: GENERIC,v 1.30 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -82,7 +82,6 @@ run* at uhub? # Ralink RT2700U/RT2800U/RT3000U rsu* at uhub? # Realtek RTL8188SU/RTL8191SU/RTL8192SU urtwn* at uhub? # Realtek RTL8188CU/RTL8192CU zyd* at uhub? # Zydas ZD1211 -urio* at uhub? # Diamond Multimedia Rio 500 ugen* at uhub? # USB Generic driver uthum* at uhidev? # TEMPerHUM sensor ugold* at uhidev? # gold TEMPer sensor diff --git a/sys/arch/socppc/socppc/conf.c b/sys/arch/socppc/socppc/conf.c index a7f778da5f2..dcff37a9c2a 100644 --- a/sys/arch/socppc/socppc/conf.c +++ b/sys/arch/socppc/socppc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.22 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.23 2014/12/11 19:44:17 tedu Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -103,7 +103,6 @@ cdev_decl(pci); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "vscsi.h" @@ -177,7 +176,7 @@ struct cdevsw cdevsw[] = { cdev_usbdev_init(NUHID,uhid), /* 62: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 63: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 64: USB printers */ - cdev_urio_init(NURIO,urio), /* 65: USB Diamond Rio 500 */ + cdev_notdef(), /* 65 */ cdev_tty_init(NUCOM,ucom), /* 66: USB tty */ cdev_wsdisplay_init(NWSDISPLAY, /* 67: frame buffers, etc. */ wsdisplay), diff --git a/sys/arch/sparc64/conf/GENERIC b/sys/arch/sparc64/conf/GENERIC index 52179b0e21f..974c64b5a76 100644 --- a/sys/arch/sparc64/conf/GENERIC +++ b/sys/arch/sparc64/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.293 2014/12/05 16:48:09 kettenis Exp $ +# $OpenBSD: GENERIC,v 1.294 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -232,7 +232,6 @@ athn* at uhub? # Atheros AR9002U zyd* at uhub? # Zydas ZD1211 url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/arch/sparc64/sparc64/conf.c b/sys/arch/sparc64/sparc64/conf.c index 1505e5a3f51..9143dd55601 100644 --- a/sys/arch/sparc64/sparc64/conf.c +++ b/sys/arch/sparc64/sparc64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.73 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.74 2014/12/11 19:44:17 tedu Exp $ */ /* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */ /* @@ -105,7 +105,6 @@ cdev_decl(pci); #include "uhid.h" #include "ugen.h" #include "ulpt.h" -#include "urio.h" #include "ucom.h" #include "pf.h" @@ -250,7 +249,7 @@ struct cdevsw cdevsw[] = cdev_usbdev_init(NUHID,uhid), /* 91: USB generic HID */ cdev_usbdev_init(NUGEN,ugen), /* 92: USB generic driver */ cdev_ulpt_init(NULPT,ulpt), /* 93: USB printers */ - cdev_urio_init(NURIO,urio), /* 94: USB Diamond Rio 500 */ + cdev_notdef(), /* 94 */ cdev_tty_init(NUCOM,ucom), /* 95: USB tty */ cdev_notdef(), /* 96: was USB scanners */ cdev_notdef(), /* 97 */ diff --git a/sys/arch/zaurus/conf/GENERIC b/sys/arch/zaurus/conf/GENERIC index 4899b913e92..b03876442c4 100644 --- a/sys/arch/zaurus/conf/GENERIC +++ b/sys/arch/zaurus/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.96 2014/11/24 02:03:37 brad Exp $ +# $OpenBSD: GENERIC,v 1.97 2014/12/11 19:44:17 tedu Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -125,7 +125,6 @@ run* at uhub? # Ralink RT2700U/RT2800U/RT3000U zyd* at uhub? # Zydas ZD1211 url* at uhub? # Realtek RTL8150L based adapters wi* at uhub? # WaveLAN IEEE 802.11DS -urio* at uhub? # Diamond Multimedia Rio 500 udsbr* at uhub? # D-Link DSB-R100 radio radio* at udsbr? # USB radio ugen* at uhub? # USB Generic driver diff --git a/sys/dev/usb/files.usb b/sys/dev/usb/files.usb index d30784bdacd..abe78d1e0fd 100644 --- a/sys/dev/usb/files.usb +++ b/sys/dev/usb/files.usb @@ -1,4 +1,4 @@ -# $OpenBSD: files.usb,v 1.119 2014/12/04 11:05:26 mpi Exp $ +# $OpenBSD: files.usb,v 1.120 2014/12/11 19:44:17 tedu Exp $ # $NetBSD: files.usb,v 1.16 2000/02/14 20:29:54 augustss Exp $ # # Config file and device description for machine-independent USB code. @@ -175,11 +175,6 @@ device umbg attach umbg at uhub file dev/usb/umbg.c umbg -# Diamond Multimedia Rio 500 -device urio -attach urio at uhub -file dev/usb/urio.c urio needs-flag - # Handspring Visor device uvisor: ucombus attach uvisor at uhub diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c deleted file mode 100644 index 6dc1d4917fd..00000000000 --- a/sys/dev/usb/urio.c +++ /dev/null @@ -1,497 +0,0 @@ -/* $OpenBSD: urio.c,v 1.46 2014/07/12 21:24:33 mpi Exp $ */ -/* $NetBSD: urio.c,v 1.15 2002/10/23 09:14:02 jdolecek Exp $ */ - -/* - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Lennart Augustsson (lennart@augustsson.net) at - * Carlstedt Research & Technology. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * The inspiration and information for this driver comes from the - * FreeBSD driver written by Iwasa Kazmi. - */ - -#include <sys/param.h> -#include <sys/systm.h> -#include <sys/kernel.h> -#include <sys/malloc.h> -#include <sys/device.h> -#include <sys/ioctl.h> -#include <sys/conf.h> -#include <sys/file.h> -#include <sys/selinfo.h> -#include <sys/vnode.h> -#include <sys/poll.h> - -#include <dev/usb/usb.h> -#include <dev/usb/usbdi.h> -#include <dev/usb/usbdi_util.h> - -#include <dev/usb/usbdevs.h> -#include <dev/usb/urio.h> - -#ifdef URIO_DEBUG -#define DPRINTF(x) do { if (uriodebug) printf x; } while (0) -#define DPRINTFN(n,x) do { if (uriodebug>(n)) printf x; } while (0) -int uriodebug = 0; -#else -#define DPRINTF(x) -#define DPRINTFN(n,x) -#endif - -#define URIO_CONFIG_NO 1 -#define URIO_IFACE_IDX 0 - -#define URIO_BSIZE 4096 - -struct urio_softc { - struct device sc_dev; - struct usbd_device *sc_udev; - struct usbd_interface *sc_iface; - - int sc_in_addr; - struct usbd_pipe *sc_in_pipe; - int sc_out_addr; - struct usbd_pipe *sc_out_pipe; - - int sc_refcnt; -}; - -#define URIOUNIT(n) (minor(n)) - -#define URIO_RW_TIMEOUT 4000 /* ms */ - -static const struct usb_devno urio_devs[] = { - { USB_VENDOR_DIAMOND, USB_PRODUCT_DIAMOND_RIO500USB}, - { USB_VENDOR_DIAMOND2, USB_PRODUCT_DIAMOND2_RIO600USB}, - { USB_VENDOR_DIAMOND2, USB_PRODUCT_DIAMOND2_RIO800USB}, - { USB_VENDOR_DIAMOND2, USB_PRODUCT_DIAMOND2_PSAPLAY120}, -}; - -int urio_match(struct device *, void *, void *); -void urio_attach(struct device *, struct device *, void *); -int urio_detach(struct device *, int); - -struct cfdriver urio_cd = { - NULL, "urio", DV_DULL -}; - -const struct cfattach urio_ca = { - sizeof(struct urio_softc), urio_match, urio_attach, urio_detach -}; - -int -urio_match(struct device *parent, void *match, void *aux) -{ - struct usb_attach_arg *uaa = aux; - - DPRINTFN(50,("urio_match\n")); - - if (uaa->iface != NULL) - return (UMATCH_NONE); - - return (usb_lookup(urio_devs, uaa->vendor, uaa->product) != NULL ? - UMATCH_VENDOR_PRODUCT : UMATCH_NONE); -} - -void -urio_attach(struct device *parent, struct device *self, void *aux) -{ - struct urio_softc *sc = (struct urio_softc *)self; - struct usb_attach_arg *uaa = aux; - struct usbd_device *dev = uaa->device; - struct usbd_interface *iface; - usbd_status err; - usb_endpoint_descriptor_t *ed; - u_int8_t epcount; - int i; - - DPRINTFN(10,("urio_attach: sc=%p\n", sc)); - - err = usbd_set_config_no(dev, URIO_CONFIG_NO, 1); - if (err) { - printf("%s: setting config no failed\n", - sc->sc_dev.dv_xname); - return; - } - - err = usbd_device2interface_handle(dev, URIO_IFACE_IDX, &iface); - if (err) { - printf("%s: getting interface handle failed\n", - sc->sc_dev.dv_xname); - return; - } - - sc->sc_udev = dev; - sc->sc_iface = iface; - - epcount = 0; - (void)usbd_endpoint_count(iface, &epcount); - - sc->sc_in_addr = -1; - sc->sc_out_addr = -1; - for (i = 0; i < epcount; i++) { - ed = usbd_interface2endpoint_descriptor(iface, i); - if (ed == NULL) { - printf("%s: couldn't get ep %d\n", - sc->sc_dev.dv_xname, i); - return; - } - if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - sc->sc_in_addr = ed->bEndpointAddress; - } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && - UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) { - sc->sc_out_addr = ed->bEndpointAddress; - } - } - if (sc->sc_in_addr == -1 || sc->sc_out_addr == -1) { - printf("%s: missing endpoint\n", sc->sc_dev.dv_xname); - return; - } - - DPRINTFN(10, ("urio_attach: %p\n", sc->sc_udev)); -} - -int -urio_detach(struct device *self, int flags) -{ - struct urio_softc *sc = (struct urio_softc *)self; - int s; - int maj, mn; - - DPRINTF(("urio_detach: sc=%p flags=%d\n", sc, flags)); - - /* Abort all pipes. Causes processes waiting for transfer to wake. */ - if (sc->sc_in_pipe != NULL) { - usbd_abort_pipe(sc->sc_in_pipe); - usbd_close_pipe(sc->sc_in_pipe); - sc->sc_in_pipe = NULL; - } - if (sc->sc_out_pipe != NULL) { - usbd_abort_pipe(sc->sc_out_pipe); - usbd_close_pipe(sc->sc_out_pipe); - sc->sc_out_pipe = NULL; - } - - s = splusb(); - if (--sc->sc_refcnt >= 0) { - /* Wait for processes to go away. */ - usb_detach_wait(&sc->sc_dev); - } - splx(s); - - /* locate the major number */ - for (maj = 0; maj < nchrdev; maj++) - if (cdevsw[maj].d_open == urioopen) - break; - - /* Nuke the vnodes for any open instances (calls close). */ - mn = self->dv_unit; - vdevgone(maj, mn, mn, VCHR); - - return (0); -} - -int -urioopen(dev_t dev, int flag, int mode, struct proc *p) -{ - struct urio_softc *sc; - usbd_status err; - - if (URIOUNIT(dev) >= urio_cd.cd_ndevs) - return (ENXIO); - sc = urio_cd.cd_devs[URIOUNIT(dev)]; - if (sc == NULL) - return (ENXIO); - - DPRINTFN(5, ("urioopen: flag=%d, mode=%d, unit=%d\n", - flag, mode, URIOUNIT(dev))); - - if (usbd_is_dying(sc->sc_udev)) - return (EIO); - - if (sc->sc_in_pipe != NULL) - return (EBUSY); - - if ((flag & (FWRITE|FREAD)) != (FWRITE|FREAD)) - return (EACCES); - - err = usbd_open_pipe(sc->sc_iface, sc->sc_in_addr, 0, &sc->sc_in_pipe); - if (err) - return (EIO); - err = usbd_open_pipe(sc->sc_iface, sc->sc_out_addr,0,&sc->sc_out_pipe); - if (err) { - usbd_close_pipe(sc->sc_in_pipe); - sc->sc_in_pipe = NULL; - return (EIO); - } - - return (0); -} - -int -urioclose(dev_t dev, int flag, int mode, struct proc *p) -{ - struct urio_softc *sc; - sc = urio_cd.cd_devs[URIOUNIT(dev)]; - - DPRINTFN(5, ("urioclose: flag=%d, mode=%d, unit=%d\n", - flag, mode, URIOUNIT(dev))); - - if (sc->sc_in_pipe != NULL) { - usbd_abort_pipe(sc->sc_in_pipe); - usbd_close_pipe(sc->sc_in_pipe); - sc->sc_in_pipe = NULL; - } - if (sc->sc_out_pipe != NULL) { - usbd_abort_pipe(sc->sc_out_pipe); - usbd_close_pipe(sc->sc_out_pipe); - sc->sc_out_pipe = NULL; - } - - return (0); -} - -int -urioread(dev_t dev, struct uio *uio, int flag) -{ - struct urio_softc *sc; - struct usbd_xfer *xfer; - usbd_status err; - void *bufp; - u_int32_t n; - int error = 0; - - sc = urio_cd.cd_devs[URIOUNIT(dev)]; - - DPRINTFN(5, ("urioread: %d\n", URIOUNIT(dev))); - - if (usbd_is_dying(sc->sc_udev)) - return (EIO); - - xfer = usbd_alloc_xfer(sc->sc_udev); - if (xfer == NULL) - return (ENOMEM); - bufp = usbd_alloc_buffer(xfer, URIO_BSIZE); - if (bufp == NULL) { - usbd_free_xfer(xfer); - return (ENOMEM); - } - - sc->sc_refcnt++; - - while ((n = min(URIO_BSIZE, uio->uio_resid)) != 0) { - DPRINTFN(1, ("urioread: start transfer %d bytes\n", n)); - usbd_setup_xfer(xfer, sc->sc_in_pipe, 0, bufp, n, - USBD_NO_COPY | USBD_SYNCHRONOUS, URIO_RW_TIMEOUT, NULL); - err = usbd_transfer(xfer); - if (err) { - usbd_clear_endpoint_stall(sc->sc_in_pipe); - if (err == USBD_TIMEOUT) - error = ETIMEDOUT; - else - error = EIO; - break; - } - - DPRINTFN(1, ("urioread: got %d bytes\n", n)); - - error = uiomove(bufp, n, uio); - if (error) - break; - } - usbd_free_xfer(xfer); - - if (--sc->sc_refcnt < 0) - usb_detach_wakeup(&sc->sc_dev); - - return (error); -} - -int -uriowrite(dev_t dev, struct uio *uio, int flag) -{ - struct urio_softc *sc; - struct usbd_xfer *xfer; - usbd_status err; - void *bufp; - u_int32_t n; - int error = 0; - - sc = urio_cd.cd_devs[URIOUNIT(dev)]; - - DPRINTFN(5, ("uriowrite: unit=%d, len=%ld\n", URIOUNIT(dev), - (long)uio->uio_resid)); - - if (usbd_is_dying(sc->sc_udev)) - return (EIO); - - xfer = usbd_alloc_xfer(sc->sc_udev); - if (xfer == NULL) - return (ENOMEM); - bufp = usbd_alloc_buffer(xfer, URIO_BSIZE); - if (bufp == NULL) { - usbd_free_xfer(xfer); - return (ENOMEM); - } - - sc->sc_refcnt++; - - while ((n = min(URIO_BSIZE, uio->uio_resid)) != 0) { - error = uiomove(bufp, n, uio); - if (error) - break; - - DPRINTFN(1, ("uriowrite: transfer %d bytes\n", n)); - - usbd_setup_xfer(xfer, sc->sc_out_pipe, 0, bufp, n, - USBD_NO_COPY | USBD_SYNCHRONOUS, URIO_RW_TIMEOUT, NULL); - err = usbd_transfer(xfer); - DPRINTFN(2, ("uriowrite: err=%d\n", err)); - if (err) { - usbd_clear_endpoint_stall(sc->sc_out_pipe); - if (err == USBD_TIMEOUT) - error = ETIMEDOUT; - else - error = EIO; - break; - } - } - - usbd_free_xfer(xfer); - - if (--sc->sc_refcnt < 0) - usb_detach_wakeup(&sc->sc_dev); - - DPRINTFN(5, ("uriowrite: done unit=%d, error=%d\n", URIOUNIT(dev), - error)); - - return (error); -} - - -int -urioioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) -{ - struct urio_softc * sc; - int unit = URIOUNIT(dev); - struct urio_command *rcmd; - int requesttype, len; - struct iovec iov; - struct uio uio; - usb_device_request_t req; - usbd_status err; - u_int32_t req_actlen = 0; - void *ptr = NULL; - int error = 0; - - sc = urio_cd.cd_devs[unit]; - - if (usbd_is_dying(sc->sc_udev)) - return (EIO); - - rcmd = (struct urio_command *)addr; - - switch (cmd) { - case URIO_RECV_COMMAND: - requesttype = rcmd->requesttype | UT_READ_VENDOR_DEVICE; - break; - - case URIO_SEND_COMMAND: - requesttype = rcmd->requesttype | UT_WRITE_VENDOR_DEVICE; - break; - - default: - return (EINVAL); - break; - } - - if (!(flag & FWRITE)) - return (EPERM); - len = rcmd->length; - - DPRINTFN(1,("urio_ioctl: cmd=0x%08lx reqtype=0x%0x req=0x%0x " - "value=0x%0x index=0x%0x len=0x%0x\n", - cmd, requesttype, rcmd->request, rcmd->value, - rcmd->index, len)); - - /* Send rio control message */ - req.bmRequestType = requesttype; - req.bRequest = rcmd->request; - USETW(req.wValue, rcmd->value); - USETW(req.wIndex, rcmd->index); - USETW(req.wLength, len); - - if (len < 0 || len > 32767) - return (EINVAL); - if (len != 0) { - iov.iov_base = (caddr_t)rcmd->buffer; - iov.iov_len = len; - uio.uio_iov = &iov; - uio.uio_iovcnt = 1; - uio.uio_resid = len; - uio.uio_offset = 0; - uio.uio_segflg = UIO_USERSPACE; - uio.uio_rw = req.bmRequestType & UT_READ ? - UIO_READ : UIO_WRITE; - uio.uio_procp = p; - ptr = malloc(len, M_TEMP, M_WAITOK); - if (uio.uio_rw == UIO_WRITE) { - error = uiomove(ptr, len, &uio); - if (error) - goto ret; - } - } - - sc->sc_refcnt++; - - err = usbd_do_request_flags(sc->sc_udev, &req, ptr, 0, - &req_actlen, USBD_DEFAULT_TIMEOUT); - - if (--sc->sc_refcnt < 0) - usb_detach_wakeup(&sc->sc_dev); - - if (err) { - error = EIO; - } else { - if (req_actlen != 0 && uio.uio_rw == UIO_READ) - error = uiomove(ptr, req_actlen, &uio); - } - -ret: - if (ptr != NULL) - free(ptr, M_TEMP, 0); - return (error); -} - -int -uriopoll(dev_t dev, int events, struct proc *p) -{ - return (0); -} diff --git a/sys/dev/usb/urio.h b/sys/dev/usb/urio.h deleted file mode 100644 index 9100414822d..00000000000 --- a/sys/dev/usb/urio.h +++ /dev/null @@ -1,57 +0,0 @@ -/* $OpenBSD: urio.h,v 1.4 2008/06/26 05:42:19 ray Exp $ */ -/* $NetBSD: urio.h,v 1.2 2000/04/27 15:26:49 augustss Exp $ */ - -/* - * Copyright (c) 2000 The NetBSD Foundation, Inc. - * All rights reserved. - * - * This code is derived from software contributed to The NetBSD Foundation - * by Lennart Augustsson (lennart@augustsson.net) at - * Carlstedt Research & Technology. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS - * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -struct urio_command -{ - unsigned short length; - int request; - int requesttype; - int value; - int index; - void *buffer; - int timeout; -}; - -#define URIO_SEND_COMMAND _IOWR('U', 200, struct urio_command) -#define URIO_RECV_COMMAND _IOWR('U', 201, struct urio_command) - -#define URIO_DIR_OUT 0x0 -#define URIO_DIR_IN 0x1 - -#ifndef __KERNEL__ -#define RIO_DIR_OUT URIO_DIR_OUT -#define RIO_DIR_IN URIO_DIR_IN -#define RIO_SEND_COMMAND URIO_SEND_COMMAND -#define RIO_RECV_COMMAND URIO_RECV_COMMAND -#define RioCommand urio_command -#endif diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 22ae1e4fac7..5e2df610fc4 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.130 2014/10/09 04:10:36 tedu Exp $ */ +/* $OpenBSD: conf.h,v 1.131 2014/12/11 19:44:16 tedu Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -374,12 +374,6 @@ extern struct cdevsw cdevsw[]; (dev_type_stop((*))) enodev, 0, selfalse, \ (dev_type_mmap((*))) enodev } -/* open, close, read, write, ioctl, poll, nokqfilter */ -#define cdev_urio_init(c,n) { \ - dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ - dev_init(c,n,write), dev_init(c,n,ioctl), (dev_type_stop((*))) enodev, \ - 0, dev_init(c,n,poll), (dev_type_mmap((*))) enodev } - /* open, close, read, write, ioctl, poll, kqfilter */ #define cdev_usbdev_init(c,n) { \ dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ |