usb/170606: r239222 kernel panic at boot - usb locking issue
Number: 170606 Category: usb Synopsis: r239222 kernel panic at boot - usb locking issue Confidential: no Severity: non-critical Priority: low Responsible:freebsd-usb State: open Quarter: Keywords: Date-Required: Class: sw-bug Submitter-Id: current-users Arrival-Date: Mon Aug 13 14:30:12 UTC 2012 Closed-Date: Last-Modified: Originator: Kim Culhan Release:10.0-current Organization: Environment: FreeBSD 10.0-CURRENT #8 r239222M: Mon Aug 13 06:11:45 EDT 2012 Description: kernel panic at boot: panic: Lock (sx) USB config SX lock not locked @ /usr/src/sys/dev/usb/usb/usb_device.c:2781 serial console not available atm, screen pics: http://img827.imageshack.us/img827/3622/img0084vc.jpg http://img705.imageshack.us/img705/9816/img0086dms.jpg thanks -kim How-To-Repeat: Boot r239222 with usb enabled Fix: Release-Note: Audit-Trail: Unformatted: ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: usb/170606: commit references a PR
The following reply was made to PR usb/170606; it has been noted by GNATS. From: dfil...@freebsd.org (dfilter service) To: bug-follo...@freebsd.org Cc: Subject: Re: usb/170606: commit references a PR Date: Mon, 13 Aug 2012 18:34:16 + (UTC) Author: hselasky Date: Mon Aug 13 18:34:04 2012 New Revision: 239240 URL: http://svn.freebsd.org/changeset/base/239240 Log: Fix for missing locks due to recent change. PR: usb/170606 MFC after: 2 weeks Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c == --- head/sys/dev/usb/usb_device.c Mon Aug 13 18:10:52 2012 (r239239) +++ head/sys/dev/usb/usb_device.c Mon Aug 13 18:34:04 2012 (r239240) @@ -2777,8 +2777,15 @@ usbd_set_endpoint_mode(struct usb_device uint8_t ep_mode) { usb_error_t error; + uint8_t do_unlock; - sx_assert(udev-enum_sx, SA_LOCKED); + /* automatic locking */ + if (usbd_enum_is_locked(udev)) { + do_unlock = 0; + } else { + do_unlock = 1; + usbd_enum_lock(udev); + } if (udev-bus-methods-set_endpoint_mode != NULL) { error = (udev-bus-methods-set_endpoint_mode) ( @@ -2792,6 +2799,9 @@ usbd_set_endpoint_mode(struct usb_device /* only set new mode regardless of error */ ep-ep_mode = ep_mode; + if (do_unlock) + usbd_enum_unlock(udev); + return (error); } ___ svn-src-...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: usb/170358: [ums] Wrong (duplicate) button numbers
The following reply was made to PR usb/170358; it has been noted by GNATS. From: Tomasz Olejniczak tomek.apost...@gmail.com To: bug-follo...@freebsd.org, tomek.apost...@gmail.com Cc: Subject: Re: usb/170358: [ums] Wrong (duplicate) button numbers Date: Mon, 13 Aug 2012 22:22:48 +0200 Hi, It seams that I found the problem and partial solution: I checked what is really coming out of the hid device and found that tilt wheel is properly reported as horizontal scroll (on 8th byte). But in ums.c: 289 if (dt 0) 290 buttons |= 1UL 3; 291 else if (dt 0) 292 buttons |= 1UL 4; 293 294 sc-sc_status.button = buttons; 295 sc-sc_status.dx += dx; 296 sc-sc_status.dy += dy; 297 sc-sc_status.dz += dz; 298 /* 299 * sc-sc_status.dt += dt; 300 * no way to export this yet 301 */ As You see the sc_status is mousestatus_t which does not have dt... so driver assigns fixed numbers to buttons - the problem is that these buttons do exists - so we have 2 sets of buttons with the same numbers. For me the fix is simple - just assign different, free numbers: 290 buttons |= 1UL 5; 291 else if (dt 0) 292 buttons |= 1UL 6; I know that this is not a real fix - other devices can also have these numbers taken - real fix should implement horizontal scroll in sys/sys/mouse.h, but for now it works for me. -- Tomek ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org