From b7a6c274ca4a3363b54685c8dd35edfd4dc21920 Mon Sep 17 00:00:00 2001 From: iedowse Date: Thu, 4 Aug 2005 02:21:37 +0000 Subject: Fix two bugs that interacted to cause page faults in softclock() when using mice containing a tilt movement: there was a missing usb_callout_init() for the UMS_SPUR_BUT_UP quirk code, and UMS_T was defined to the same flag value as UMS_SPUR_BUT_UP. Reported by: flz MFC after: 3 days --- sys/dev/usb/ums.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index 3e4c47b..1955aeb 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -114,8 +114,8 @@ struct ums_softc { int flags; /* device configuration */ #define UMS_Z 0x01 /* z direction available */ -#define UMS_T 0x02 /* aa direction available (tilt) */ #define UMS_SPUR_BUT_UP 0x02 /* spurious button up events */ +#define UMS_T 0x04 /* aa direction available (tilt) */ int nbuttons; #define MAX_BUTTONS 7 /* chosen because sc_buttons is u_char */ @@ -370,6 +370,7 @@ USB_ATTACH(ums) UID_ROOT, GID_OPERATOR, 0644, "ums%d", device_get_unit(self)); + usb_callout_init(sc->callout_handle); if (usbd_get_quirks(uaa->device)->uq_flags & UQ_SPUR_BUT_UP) { DPRINTF(("%s: Spurious button up events\n", USBDEVNAME(sc->sc_dev))); -- cgit v1.1