First pass at removing __OtherBSD__. We can't blindly remove all of
them in bulk because there is at least one feature that's unimplemented on FreeBSD that needs to be done and these are good placeholders.
This commit is contained in:
parent
ac79d73e56
commit
bed92e37b9
@ -42,9 +42,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#if defined(__NetBSD__)
|
||||
#include <sys/kernel.h>
|
||||
#endif
|
||||
#include <sys/malloc.h>
|
||||
|
||||
#include <dev/usb/usb.h>
|
||||
|
@ -42,17 +42,12 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/device.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
#include "usb_if.h"
|
||||
#if defined(DIAGNOSTIC) && defined(__i386__)
|
||||
#include <machine/cpu.h>
|
||||
#endif
|
||||
#endif
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/proc.h>
|
||||
|
||||
@ -65,10 +60,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/usb/usb_mem.h>
|
||||
#include <dev/usb/usb_quirks.h>
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include "usb_if.h"
|
||||
#define delay(d) DELAY(d)
|
||||
#endif
|
||||
|
||||
#ifdef USB_DEBUG
|
||||
#define DPRINTF(x) if (usbdebug) logprintf x
|
||||
@ -532,6 +525,7 @@ usbd_free_xfer(usbd_xfer_handle xfer)
|
||||
DPRINTFN(5,("usbd_free_xfer: %p\n", xfer));
|
||||
if (xfer->rqflags & URQ_DEV_DMABUF)
|
||||
usbd_free_buffer(xfer);
|
||||
/* XXX Does FreeBSD need to do something similar? */
|
||||
#if defined(__NetBSD__) && defined(DIAGNOSTIC)
|
||||
if (callout_pending(&xfer->timeout_handle)) {
|
||||
callout_stop(&xfer->timeout_handle);
|
||||
@ -1084,7 +1078,8 @@ usbd_do_request_flags_pipe(usbd_device_handle dev, usbd_pipe_handle pipe,
|
||||
usbd_status err;
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
#if defined(__i386__) && defined(__FreeBSD__)
|
||||
/* XXX amd64 too? */
|
||||
#if defined(__i386__)
|
||||
KASSERT(curthread->td_intr_nesting_level == 0,
|
||||
("usbd_do_request: in interrupt context"));
|
||||
#endif
|
||||
@ -1361,7 +1356,6 @@ usbd_get_string(usbd_device_handle dev, int si, char *buf)
|
||||
return (USBD_NORMAL_COMPLETION);
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
int
|
||||
usbd_driver_load(module_t mod, int what, void *arg)
|
||||
{
|
||||
@ -1369,5 +1363,3 @@ usbd_driver_load(module_t mod, int what, void *arg)
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -232,29 +232,6 @@ struct usb_attach_arg {
|
||||
int nifaces; /* number of interfaces */
|
||||
};
|
||||
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
/* Match codes. */
|
||||
/* First five codes is for a whole device. */
|
||||
#define UMATCH_VENDOR_PRODUCT_REV 14
|
||||
#define UMATCH_VENDOR_PRODUCT 13
|
||||
#define UMATCH_VENDOR_DEVCLASS_DEVPROTO 12
|
||||
#define UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO 11
|
||||
#define UMATCH_DEVCLASS_DEVSUBCLASS 10
|
||||
/* Next six codes are for interfaces. */
|
||||
#define UMATCH_VENDOR_PRODUCT_REV_CONF_IFACE 9
|
||||
#define UMATCH_VENDOR_PRODUCT_CONF_IFACE 8
|
||||
#define UMATCH_VENDOR_IFACESUBCLASS_IFACEPROTO 7
|
||||
#define UMATCH_VENDOR_IFACESUBCLASS 6
|
||||
#define UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO 5
|
||||
#define UMATCH_IFACECLASS_IFACESUBCLASS 4
|
||||
#define UMATCH_IFACECLASS 3
|
||||
#define UMATCH_IFACECLASS_GENERIC 2
|
||||
/* Generic driver */
|
||||
#define UMATCH_GENERIC 1
|
||||
/* No match */
|
||||
#define UMATCH_NONE 0
|
||||
|
||||
#elif defined(__FreeBSD__)
|
||||
/* FreeBSD needs values less than zero */
|
||||
#define UMATCH_VENDOR_PRODUCT_REV (-10)
|
||||
#define UMATCH_VENDOR_PRODUCT (-20)
|
||||
@ -272,12 +249,9 @@ struct usb_attach_arg {
|
||||
#define UMATCH_GENERIC (-140)
|
||||
#define UMATCH_NONE (ENXIO)
|
||||
|
||||
#endif
|
||||
|
||||
#define USBD_SHOW_DEVICE_CLASS 0x1
|
||||
#define USBD_SHOW_INTERFACE_CLASS 0x2
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
int usbd_driver_load(module_t mod, int what, void *arg);
|
||||
|
||||
static inline int
|
||||
@ -294,8 +268,6 @@ usb_get_iface(device_t dev)
|
||||
return (uap->iface);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* XXX Perhaps USB should have its own levels? */
|
||||
#ifdef USB_USE_SOFTINTR
|
||||
#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
|
||||
|
@ -45,12 +45,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/module.h>
|
||||
#include <sys/malloc.h>
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#include <sys/proc.h>
|
||||
#include <sys/device.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <sys/bus.h>
|
||||
#endif
|
||||
|
||||
#include <dev/usb/usb.h>
|
||||
#include <dev/usb/usbhid.h>
|
||||
|
@ -38,10 +38,6 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
#include <sys/callout.h>
|
||||
#endif
|
||||
|
||||
/* From usb_mem.h */
|
||||
struct usb_dma_block;
|
||||
typedef struct {
|
||||
@ -297,9 +293,6 @@ void usb_schedsoftintr(struct usbd_bus *);
|
||||
|
||||
/* Locator stuff. */
|
||||
|
||||
#if defined(__NetBSD__)
|
||||
#include "locators.h"
|
||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
|
||||
/* XXX these values are used to statically bind some elements in the USB tree
|
||||
* to specific driver instances. This should be somehow emulated in FreeBSD
|
||||
* but can be done later on.
|
||||
@ -311,16 +304,6 @@ void usb_schedsoftintr(struct usbd_bus *);
|
||||
#define UHUBCF_VENDOR_DEFAULT -1
|
||||
#define UHUBCF_PRODUCT_DEFAULT -1
|
||||
#define UHUBCF_RELEASE_DEFAULT -1
|
||||
#endif
|
||||
|
||||
#if defined (__OpenBSD__)
|
||||
#define UHUBCF_PORT 0
|
||||
#define UHUBCF_CONFIGURATION 1
|
||||
#define UHUBCF_INTERFACE 2
|
||||
#define UHUBCF_VENDOR 3
|
||||
#define UHUBCF_PRODUCT 4
|
||||
#define UHUBCF_RELEASE 5
|
||||
#endif
|
||||
|
||||
#define uhubcf_port cf_loc[UHUBCF_PORT]
|
||||
#define uhubcf_configuration cf_loc[UHUBCF_CONFIGURATION]
|
||||
|
@ -58,12 +58,8 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#include <sys/device.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <sys/module.h>
|
||||
#include <sys/bus.h>
|
||||
#endif
|
||||
#include <sys/conf.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
@ -48,14 +48,9 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/serial.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/file.h>
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/bus.h>
|
||||
#include <sys/ioccom.h>
|
||||
#include <sys/selinfo.h>
|
||||
#else
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/device.h>
|
||||
#endif
|
||||
#include <sys/proc.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
Loading…
Reference in New Issue
Block a user