From owner-freebsd-usb@FreeBSD.ORG Sun Jul 13 04:13:07 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC6761065678; Sun, 13 Jul 2008 04:13:07 +0000 (UTC) (envelope-from vvd@quakeworld.ru) Received: from unislabs.com (unislabs.com [91.192.83.166]) by mx1.freebsd.org (Postfix) with ESMTP id 2BC8A8FC1D; Sun, 13 Jul 2008 04:13:05 +0000 (UTC) (envelope-from vvd@quakeworld.ru) Received: from [10.0.0.27] (HELO phobos) by unislabs.com (UNIS Labs SMTP SMTP 9.9.9) with ESMTP id 4222821; Sun, 13 Jul 2008 08:13:03 +0400 From: "VVD" To: Date: Sun, 13 Jul 2008 08:12:59 +0400 Message-ID: <002d01c8e49e$bc4c1e90$1b00000a@unislabs.local> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 In-Reply-To: <3a142e750807051019w3d3568c0g32605625d27fb470@mail.gmail.com> Thread-Index: Acjew2XrngLS7tZrQsW6CE+l8UtSogF2LrKA Cc: freebsd-usb@freebsd.org Subject: RE: usb/125264: [patch] sysctl for set usb mouse rate (very useful for gamers - FPS games) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2008 04:13:08 -0000 I find speed - always LOW (tested on 6 Logitech mice: G5, MX300, RX250 and 3 different 5$-cost mice). But I wrote another patch: --- ums.c.orig 2008-06-16 19:51:35.000000000 +0400 +++ ums.c 2008-07-13 07:48:58.000000000 +0400 @@ -673,6 +673,7 @@ void *v; { struct ums_softc *sc = v; + int usb_interval; usbd_status err; @@ -696,11 +697,21 @@ */ usbd_set_protocol(sc->sc_iface, 1); + /* + * Calculate USB interval in ms from rate in Hz (moused command line option -F). + * Possible values are from 1 to 1000, else use USBD_DEFAULT_INTERVAL. + * Modern gaming mice have 500Hz by default, other 100Hz or 125Hz. + */ + usb_interval = (sc->mode.rate > 0 && sc->mode.rate <= 1000) ? + 1000 / sc->mode.rate : USBD_DEFAULT_INTERVAL; + DPRINTF(("ums_enable: mouse rate is %d, usb interval is %d\n", + sc->mode.rate, usb_interval)); + /* Set up interrupt pipe. */ err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_ep_addr, USBD_SHORT_XFER_OK, &sc->sc_intrpipe, sc, sc->sc_ibuf, sc->sc_isize, ums_intr, - USBD_DEFAULT_INTERVAL); + usb_interval); if (err) { DPRINTF(("ums_enable: usbd_open_pipe_intr failed, error=%d\n", err)); @@ -900,6 +911,29 @@ sc->mode.syncmask[1] = MOUSE_SYS_SYNC; } + /* + * Most modern gaming mice support customized resolution, but I don't know + * how to set it. For support this feature in ums_ioctl(MOUSE_SETMODE) + * need to uncomment next line: + * sc->mode.resolution = mode.resolution > 0 ? + * mode.resolution : MOUSE_RES_UNKNOWN; + * and may be call ums_disable() and ums_enable() if resolution was changed. + */ + + /* + * Call ums_disable() and ums_enable() because of what rate was set in + * ums_enable() and can't to change it on the fly (if can - how?). + * For example: during moused startup (with options "-F rate -r resolution") + * 1st call ums_enable() and then ums_ioctl(MOUSE_SETMODE) and, as result, + * mouse initialized with default values of the rate and resolution, + * but not with custom from command line. + */ + if (sc->mode.rate != mode.rate) { + sc->mode.rate = mode.rate; + ums_disable(sc); + ums_enable(sc); + } + bzero(sc->qbuf, sizeof(sc->qbuf)); sc->qhead = sc->qtail = sc->qcount = 0; splx(s); I want to ask about to make another PR with patch: --- usbdi.c.orig 2008-07-12 20:43:42.000000000 +0400 +++ usbdi.c 2008-07-12 20:43:47.000000000 +0400 @@ -231,23 +231,19 @@ xfer = usbd_alloc_xfer(iface->device); if (xfer == NULL) { err = USBD_NOMEM; - goto bad1; - } + } else { usbd_setup_xfer(xfer, ipipe, priv, buffer, len, flags, USBD_NO_TIMEOUT, cb); ipipe->intrxfer = xfer; ipipe->repeat = 1; err = usbd_transfer(xfer); *pipe = ipipe; - if (err != USBD_IN_PROGRESS && err) - goto bad2; + if (err == USBD_IN_PROGRESS || !err) return (USBD_NORMAL_COMPLETION); - - bad2: ipipe->intrxfer = NULL; ipipe->repeat = 0; usbd_free_xfer(xfer); - bad1: + } usbd_close_pipe(ipipe); return (err); } IMHO/AFAIK, using of "goto" is not a good practice. But who know... :-) P.S. Sorry for my English. -----Original Message----- From: Paul B. Mahol [mailto:onemda@gmail.com] Sent: Saturday, July 05, 2008 9:19 PM To: VVD Cc: freebsd-usb@freebsd.org Subject: Re: usb/125264: [patch] sysctl for set usb mouse rate (very useful for gamers - FPS games) On 7/5/08, VVD wrote: > The following reply was made to PR usb/125264; it has been noted by GNATS. > > From: "VVD" > To: , > > Cc: > Subject: Re: usb/125264: [patch] sysctl for set usb mouse rate (very > useful for gamers - FPS games) > Date: Sat, 5 Jul 2008 06:10:01 +0400 > > Hi, > > AFAIK, all mice are LOW speed usb devices. Didn't understand how to > use > usbd_get_speed() for ums - have no field like speed. High rate need > only for more smooth mouse moving. > Linux have custom mouse rate patch from ~2.6.1x. Logitech have > Setpoint drivers for Win with possibility to set mouse rate from 125 > to 1000. Time for FreeBSD to have this feature. :-] > But what about moused -F option? Is it supported at all by ums driver? > With best regards. > > > _______________________________________________ > freebsd-usb@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" > From owner-freebsd-usb@FreeBSD.ORG Sun Jul 13 04:20:04 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B63641065682 for ; Sun, 13 Jul 2008 04:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A4BA58FC0C for ; Sun, 13 Jul 2008 04:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6D4K3XB079595 for ; Sun, 13 Jul 2008 04:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6D4K3aA079594; Sun, 13 Jul 2008 04:20:03 GMT (envelope-from gnats) Date: Sun, 13 Jul 2008 04:20:03 GMT Message-Id: <200807130420.m6D4K3aA079594@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: "VVD" Cc: Subject: RE: usb/125264: [patch] sysctl for set usb mouse rate (very useful for gamers - FPS games) X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: VVD List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Jul 2008 04:20:04 -0000 The following reply was made to PR usb/125264; it has been noted by GNATS. From: "VVD" To: Cc: , "'Paul B. Mahol'" Subject: RE: usb/125264: [patch] sysctl for set usb mouse rate (very useful for gamers - FPS games) Date: Sun, 13 Jul 2008 08:12:59 +0400 I find speed - always LOW (tested on 6 Logitech mice: G5, MX300, RX250 and 3 different 5$-cost mice). But I wrote another patch: --- ums.c.orig 2008-06-16 19:51:35.000000000 +0400 +++ ums.c 2008-07-13 07:48:58.000000000 +0400 @@ -673,6 +673,7 @@ void *v; { struct ums_softc *sc = v; + int usb_interval; usbd_status err; @@ -696,11 +697,21 @@ */ usbd_set_protocol(sc->sc_iface, 1); + /* + * Calculate USB interval in ms from rate in Hz (moused command line option -F). + * Possible values are from 1 to 1000, else use USBD_DEFAULT_INTERVAL. + * Modern gaming mice have 500Hz by default, other 100Hz or 125Hz. + */ + usb_interval = (sc->mode.rate > 0 && sc->mode.rate <= 1000) ? + 1000 / sc->mode.rate : USBD_DEFAULT_INTERVAL; + DPRINTF(("ums_enable: mouse rate is %d, usb interval is %d\n", + sc->mode.rate, usb_interval)); + /* Set up interrupt pipe. */ err = usbd_open_pipe_intr(sc->sc_iface, sc->sc_ep_addr, USBD_SHORT_XFER_OK, &sc->sc_intrpipe, sc, sc->sc_ibuf, sc->sc_isize, ums_intr, - USBD_DEFAULT_INTERVAL); + usb_interval); if (err) { DPRINTF(("ums_enable: usbd_open_pipe_intr failed, error=%d\n", err)); @@ -900,6 +911,29 @@ sc->mode.syncmask[1] = MOUSE_SYS_SYNC; } + /* + * Most modern gaming mice support customized resolution, but I don't know + * how to set it. For support this feature in ums_ioctl(MOUSE_SETMODE) + * need to uncomment next line: + * sc->mode.resolution = mode.resolution > 0 ? + * mode.resolution : MOUSE_RES_UNKNOWN; + * and may be call ums_disable() and ums_enable() if resolution was changed. + */ + + /* + * Call ums_disable() and ums_enable() because of what rate was set in + * ums_enable() and can't to change it on the fly (if can - how?). + * For example: during moused startup (with options "-F rate -r resolution") + * 1st call ums_enable() and then ums_ioctl(MOUSE_SETMODE) and, as result, + * mouse initialized with default values of the rate and resolution, + * but not with custom from command line. + */ + if (sc->mode.rate != mode.rate) { + sc->mode.rate = mode.rate; + ums_disable(sc); + ums_enable(sc); + } + bzero(sc->qbuf, sizeof(sc->qbuf)); sc->qhead = sc->qtail = sc->qcount = 0; splx(s); I want to ask about to make another PR with patch: --- usbdi.c.orig 2008-07-12 20:43:42.000000000 +0400 +++ usbdi.c 2008-07-12 20:43:47.000000000 +0400 @@ -231,23 +231,19 @@ xfer = usbd_alloc_xfer(iface->device); if (xfer == NULL) { err = USBD_NOMEM; - goto bad1; - } + } else { usbd_setup_xfer(xfer, ipipe, priv, buffer, len, flags, USBD_NO_TIMEOUT, cb); ipipe->intrxfer = xfer; ipipe->repeat = 1; err = usbd_transfer(xfer); *pipe = ipipe; - if (err != USBD_IN_PROGRESS && err) - goto bad2; + if (err == USBD_IN_PROGRESS || !err) return (USBD_NORMAL_COMPLETION); - - bad2: ipipe->intrxfer = NULL; ipipe->repeat = 0; usbd_free_xfer(xfer); - bad1: + } usbd_close_pipe(ipipe); return (err); } IMHO/AFAIK, using of "goto" is not a good practice. But who know... :-) P.S. Sorry for my English. -----Original Message----- From: Paul B. Mahol [mailto:onemda@gmail.com] Sent: Saturday, July 05, 2008 9:19 PM To: VVD Cc: freebsd-usb@freebsd.org Subject: Re: usb/125264: [patch] sysctl for set usb mouse rate (very useful for gamers - FPS games) On 7/5/08, VVD wrote: > The following reply was made to PR usb/125264; it has been noted by GNATS. > > From: "VVD" > To: , > > Cc: > Subject: Re: usb/125264: [patch] sysctl for set usb mouse rate (very > useful for gamers - FPS games) > Date: Sat, 5 Jul 2008 06:10:01 +0400 > > Hi, > > AFAIK, all mice are LOW speed usb devices. Didn't understand how to > use > usbd_get_speed() for ums - have no field like speed. High rate need > only for more smooth mouse moving. > Linux have custom mouse rate patch from ~2.6.1x. Logitech have > Setpoint drivers for Win with possibility to set mouse rate from 125 > to 1000. Time for FreeBSD to have this feature. :-] > But what about moused -F option? Is it supported at all by ums driver? > With best regards. > > > _______________________________________________ > freebsd-usb@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-usb > To unsubscribe, send any mail to "freebsd-usb-unsubscribe@freebsd.org" > From owner-freebsd-usb@FreeBSD.ORG Mon Jul 14 11:07:07 2008 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C48091065672 for ; Mon, 14 Jul 2008 11:07:07 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B84638FC19 for ; Mon, 14 Jul 2008 11:07:07 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6EB77WF014593 for ; Mon, 14 Jul 2008 11:07:07 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6EB77TX014589 for freebsd-usb@FreeBSD.org; Mon, 14 Jul 2008 11:07:07 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 14 Jul 2008 11:07:07 GMT Message-Id: <200807141107.m6EB77TX014589@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-usb@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-usb@FreeBSD.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 11:07:07 -0000 Current FreeBSD problem reports Critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- f usb/84750 usb [hang] 6-BETA2 reboot/shutdown with root_fs on externa o usb/91629 usb usbd_abort_pipe() may result in infinite loop 2 problems total. Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o i386/46371 usb USB controller cannot be initialized on IBM Netfinity o bin/57255 usb usbd(8) and multi-function devices o usb/63621 usb [umass] [panic] USB MemoryStick Reader stalls/crashes o usb/67301 usb [uftdi] [panic] RTS and system panic o usb/69006 usb [usbdevs] [patch] Apple Cinema Display hangs USB ports o usb/71155 usb [ulpt] misbehaving usb-printer hangs processes, causes o usb/73307 usb [panic] Kernel panics on USB disconnect o usb/74771 usb [umass] [hang] mounting write-protected umass device a o usb/75705 usb [umass] [panic] da0 attach / Optio S4 (with backtrace) o usb/75797 usb [sound] 5.3-STABLE(2005 1/4) detect USB headset, But c o usb/76395 usb [uhci] USB printer does not work, usbdevs says "addr 0 o usb/77184 usb [umass] [panic] kernel panic on USB device disconnect, o usb/77294 usb [ucom] [panic] ucom + ulpcom panic o usb/79269 usb [ohci] USB ohci da0 plug/unplug causes crashes and loc o usb/79287 usb [uhci] [hang] UHCI hang after interrupt transfer o usb/79524 usb [ulpt] printing to Minolta PagePro 1[23]xxW via USB fa a usb/79656 usb [ehci] RHSC interrupts lost o usb/79722 usb [ehci] wrong alignments in ehci.h o usb/80040 usb [hang] Use of sound mixer causes system freeze with ua o usb/80361 usb [umass] [patch] mounting of Dell usb-stick fails o usb/80829 usb [modules] [panic] possible panic when loading USB-modu o usb/80862 usb [patch] USB locking issues: missing some Giant calls o usb/82350 usb [ucom] [panic] null pointer dereference in USB stack o usb/82520 usb [udbp] [reboot] Reboot when USL101 connected s usb/82569 usb [umass] [panic] USB mass storage plug/unplug causes sy o usb/82660 usb [ehci] [panic] EHCI: I/O stuck in state 'physrd'/panic o usb/83504 usb [kernel] [patch] SpeedTouch USB stop working on recent o usb/83563 usb [umass] [panic] Page Fault while detaching Mpman Usb d f usb/83677 usb [usb] [request] usb controller often not detected (Sun o usb/83756 usb [ums] [patch] Microsoft Intellimouse Explorer 4.0A doe o usb/83977 usb [ucom] [panic] ucom1: open bulk out error (addr 2): IN o usb/84326 usb [umass] Panic trying to connect SCSI tape drive via US s usb/84336 usb [usb] [reboot] instant system reboot when unmounting a o usb/86767 usb [umass] [patch] bogus "slice starts beyond end of the o usb/88743 usb [hang] [regression] USB makes kernel hang at boot (reg s usb/89003 usb [request] LaCie Firewire drive not properly supported o usb/89954 usb [umass] [panic] USB Disk driver race condition? o usb/90700 usb [umass] [panic] Kernel panic on connect/mount/use umas o usb/91238 usb [umass] USB tape unit fails to write a second tape fil o usb/91283 usb [boot] [regression] booting very slow with usb devices o usb/91538 usb [ulpt] [patch] Unable to print to EPSON CX3500 o usb/91906 usb [ehci] [hang] FreeBSD hangs while booting with USB leg o usb/92052 usb [ulpt] usbd causes defunct process with busy file-hand o usb/92083 usb [ural] [panic] panic using WPA on ural NIC in 6.0-RELE o usb/92142 usb [uhub] SET_ADDR_FAILED and SHORT_XFER errors from usb o usb/92171 usb [panic] panic unplugging Vodafone Mobile Connect (UMTS o usb/93155 usb [ulpt] /dev/ulpt0: device busy, USB printer does not w o usb/93408 usb [mouse] hw.acpi.cpu.cx_lowest=C3 on AMD Turion causes o usb/93828 usb [ohci] [panic] ohci causes panic on boot (HP Pavillion o usb/94384 usb [panic] kernel panic with usb2 hardware o usb/94717 usb [ulpt] Reading from /dev/ulpt can break work of a UHCI o usb/94897 usb [panic] Kernel Panic when cleanly unmounting USB disk s usb/95348 usb [keyboard] USB keyboard unplug causes noise on screen o usb/95562 usb [umass] Write Stress in USB Mass drive causes "vinvalb s usb/95636 usb [umass] [boot] 5 minute delay at boot when using VT620 s usb/96120 usb [ums] [request] USB mouse not always detected o usb/96224 usb [usb] [msdosfs] mount_msdosfs cause page fault in sync o usb/96457 usb [umass] [panic] fatback on umass = reboot s usb/97286 usb [mouse] [request] MS Wireless Intellimouse Explorer 2. o usb/99431 usb [keyboard] FreeBSD on MSI 6566E (Intel 845E motherboar o usb/101096 usb [ural] [panic] USB WLAN occasionally causes kernel-pan o usb/101448 usb [ohci] FBSD 6.1-STABLE/AMD64 crashes under heavy USB/O o usb/101752 usb [umass] [panic] 6.1-RELEASE kernel panic on usb device o usb/102066 usb [ukbd] usb keyboard and multimedia keys don't work f usb/102096 usb [patch] usbd(8) does not handle multiple devices in on o usb/103025 usb [uhub] [panic] wrong detection of USB device for FreeB o usb/104292 usb [umass] [hang] system lockup on forced umount of usb-s o usb/104830 usb [umass] system crashes when copying data to umass devi o usb/105186 usb [ehci] [panic] USB 2.0/ehci on FreeBSD 6.2-PRE/AMD64 c o usb/106615 usb [uftdi] uftdi module does not automatically load with o usb/106648 usb [umass] [hang] USB Floppy on D1950 10 min Hang on Inse s usb/106832 usb USB HP printer is not detected by kernel when ACPI ena o usb/107248 usb [umass] [patch] scsi_da.c quirk for Cowon iAUDIO X5 MP o usb/107446 usb [umass] umass problems (usb and fw disks) o usb/107827 usb [ohci] [panic] ohci_add_done addr not found o usb/107848 usb [umass] [request] cannot access Samsung flash disk o usb/107924 usb [patch] usbd(8) does not call detach o usb/108513 usb [umass] Creative MuVo TX FM fails in 6.2-RELEASE [regr o usb/109274 usb [usb] MCP55 USB Controller fails to attach in AMD64 Cu o usb/109397 usb [panic] on boot from USB flash o usb/110856 usb [ugen] [patch] interrupt in msgs are truncated when bu o usb/110988 usb [umass] [patch] Handling of quirk IGNORE_RESIDUE is um o usb/111753 usb [uhid] [panic] Replicable system panic involving UHID s usb/112568 usb [umass] [request] USB mode may wrong when mounting Pla o usb/112631 usb [panic] Problem with SONY DSC-S80 camera on umount o usb/112640 usb [usb] [hang] Kernel freezes when writing a file to an s usb/113629 usb [ukbd] Dropped USB keyboard events on Dell Latitude D6 o usb/113672 usb [ehci] [panic] Kernel panic with AEWIN CB6971 s usb/113977 usb [request] Need a way to set mode of USB disk's write c o usb/114310 usb [libusb] [patch] [panic] USB hub attachment panics ker o usb/114682 usb [umass] generic USB media-card reader unusable o kern/114780 usb [uplcom] [panic] Panics while stress testing the uplco o usb/115298 usb [ulpt] [panic] Turning off USB printer panics kernel o usb/116561 usb [umodem] [panic] RELENG_6 umodem panic "trying to slee o usb/116699 usb [usbhid] USB HID devices do not initialize at system b o usb/116947 usb [ukbd] [patch] [regression] enable boot protocol on th o usb/117200 usb [ugen] ugen0 prints strange string on attach if detach o usb/117313 usb [umass] [panic] panic on usb camera insertion o usb/117613 usb [uhci] [irq] uhci interrupt storm & USB leaked memory o usb/117946 usb [panic] D-Link DUB-E100 rev. B1 crashes FreeBSD 7.0-BE o usb/117955 usb [umass] [panic] inserting minolta dimage a2 crashes OS o usb/118140 usb [ucom] [patch] quick hack for ucom to get it behave wi o usb/118141 usb [ucom] usb serial and nokia phones ucomreadcb ucomread o usb/118353 usb [panic] [ppp] repeatable kernel panic during ppp(4) se o usb/118480 usb [umass] Timeout in USB mass storage freezes vfs layer o usb/119201 usb [cam] [patch] Quirks for Olympus FE-210 camera, LG and o usb/119481 usb [hang] FreeBSD not responding after connecting USB-Mas o usb/119509 usb USB flaky on Dell Optiplex 755 o usb/119513 usb [irq] inserting dlink dwl-g630 wireless card results i o usb/119977 usb [ums] Mouse does not work in a Cherry-USB keyboard/mou o usb/120017 usb [ehci] [patch] CS5536 (AMD Geode) USB 2.0 quirk o usb/120034 usb [hang] 6.2 & 6.3 hangs on boot at usb0: OHCI with 1.5 o usb/120283 usb [panic] Automation reboot with wireless keyboard & mou o usb/120321 usb [hang] System hangs when transferring data to WD MyBoo o usb/120729 usb [panic] fault while in kernel mode with connecting USB o usb/120786 usb Kernel panic when forced umount of a dettached USB Har o usb/121232 usb remove PCCARD rebooted system o usb/121275 usb [boot] FreeBSD fails to boot with usb legacy support e o usb/121474 usb [cam] [patch] QUIRK: SAMSUNG HM250JI in LaCie usb hard o usb/121708 usb [keyboard] nforce 650i mobo w/ usb keyboard infinite k o usb/121734 usb [ugen] ugen HP1022 printer device not working since up o usb/121755 usb [ohci] [patch] Fix panic after ohci/uhub cardbus devic o usb/122483 usb [panic] [ulpt] Repeatable panic in 7.0-STABLE o usb/122539 usb [ohci] [panic] AnyDATA ADU-E1000D - kernel panic: ohci o usb/122905 usb [ubsa] [patch] add Huawei E220 to ubsa o kern/123510 usb [ums] Mouse Wheel Fails to Work [regression] o usb/123690 usb Panic on USB device insertion when usb loaded as a mod o usb/123714 usb Panic when hald-storage-probe runs with umass device i o usb/124708 usb [panic] Kernel panic on USB KVM reattach o usb/124758 usb rum panics SMP kernel o kern/124777 usb [ucom] USB cua devices don't revert to tty devices whe o usb/124980 usb [panic] kernel panic on detaching unmounted umass devi o usb/125088 usb Touchpad not detected on Adesso AKB-430UG USB kbd/pad o usb/125450 usb [panic] Removing USB flash card while being accessed c 134 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o conf/30929 usb [usb] [patch] use usbd to initialize USB ADSL modem o usb/40948 usb [umass] [request] USB HP CDW8200 does not work s usb/51958 usb [urio] [patch] update for urio driver s usb/52026 usb [usb] [request] umass driver support for InSystem ISD2 o usb/59698 usb [keyboard] [patch] Rework of ukbd HID to AT code trans s usb/62257 usb [umass] [request] card reader UCR-61S2B is only half-s o usb/66547 usb [ucom] Palm Tungsten T USB does not initialize correct o usb/68232 usb [ugen] [patch] ugen(4) isochronous handling correction o usb/70523 usb [umct] [patch] umct sending/receiving wrong characters o usb/71280 usb [aue] aue0 device (linksys usb100tx) doesn't work in 1 o usb/71416 usb [ugen] Cryptoflex e-gate USB token (ugen0) detach is n o usb/71417 usb [ugen] Cryptoflex e-gate USB token (ugen0) communicati o usb/71455 usb [umass] Slow USB umass performance of 5.3 s usb/72733 usb [ucom] [request] Kyocera 7135 Palm OS connection probl o usb/74211 usb [umass] USB flash drive causes CAM status 0x4 on 4.10R a usb/74453 usb [umass] [patch] Q-lity CD-RW USB ECW-043 (ScanLogic SL o usb/75764 usb [umass] [patch] "umass0: Phase Error" - no device for o usb/75800 usb [ucom] ucom1: init failed STALLED error in time of syn s usb/75928 usb [umass] [request] Cytronix SmartMedia card (SMC) reade o usb/76461 usb [umass] disklabel of umass(4)-CAM(4)-da(4) not used by o usb/76653 usb [umass] [patch] Problem with Asahi Optical usb device o usb/76732 usb Mouse problems with USB KVM Switch o usb/78984 usb [umass] [patch] Creative MUVO umass failure o usb/79723 usb [usb] [request] prepare for high speed isochronous tra o usb/80774 usb [patch] have "usbd_find_desc" in line with the other " s usb/80776 usb [udav] [request] UDAV device driver shouldn't use usb_ s usb/80777 usb [request] usb_rem_task() should wait for callback to c o usb/80854 usb [patch] [request] suggestion for new iface-no-probe me o usb/80935 usb [uvisor] [patch] uvisor.c is not work with CLIE TH55. o usb/81621 usb [ehci] [hang] external hd hangs under load on ehci o usb/83863 usb [ugen] Communication problem between opensc/openct via s usb/85067 usb [uscanner] Cannot attach ScanJet 4300C to usb device o usb/86298 usb [mouse] Known good USB mouse won't work with correct s o usb/87224 usb Cannot mount USB Zip750 o usb/87648 usb [mouse] Logitech USB-optical mouse problem. o usb/88408 usb [axe] axe0 read PHY failed o usb/91546 usb [umodem] [patch] Nokia 6630 mobile phone does not work o usb/91811 usb [umass] Compact Flash in HP Photosmart 2610 return " o usb/91896 usb camcontrol(8): Serial Number of USB Memory Sticks is n o usb/92852 usb [ums] [patch] Vertical scroll not working properly on o usb/93389 usb [umass] [patch] Digital Camera Pentax S60 don't work o usb/93872 usb [cam] [patch] SCSI quirk required for ELTA 8061 OL USB o usb/95037 usb [umass] USB disk not recognized on hot-plug. o usb/96381 usb [cam] [patch] add a quirk table entry for a flash ram o usb/97175 usb [umass] [hang] USB cardreader hangs system o usb/97472 usb [cam] [patch] add support for Olympus C150,D390 o usb/98343 usb [boot] BBB reset failed errors with Creative Muvo MP3 o usb/99538 usb [keyboard] while using USB keyboard default params of o usb/100746 usb [keyboard] system does not boot due to USB keyboard pr o usb/101761 usb [usb] [patch] [request] usb.h: increase maximal size o o usb/101775 usb [libusbhid] [patch] possible error in report descripto o usb/102678 usb [keyboard] Dell PowerEdge DRAC5 USB Keyboard does not o usb/102976 usb [panic] Casio Exilim Digital Camera causes panic on in o usb/103046 usb [ulpt] [patch] ulpt event driven I/O with select(2) an o usb/103289 usb [request] USB 2.0 problems on AMD LX-800 CPU and CS-55 o usb/103418 usb [usbhidctl] [patch] [request] usbhidctl: add ability t o usb/103917 usb [uhub] USB driver reports "Addr 0 should never happen" o usb/104290 usb [umass] [patch] quirk: TOSHIBA DVD-RAM drive (libretto o usb/104352 usb [ural] [patch] ural driver doesnt work o usb/104645 usb [umass] [request] Rave C-201 MP3 player does not commu o usb/105065 usb [ata] SATA - USB Bridge o usb/105361 usb [panic] Kernel panic during unmounting mass storage (C o usb/106041 usb [usb] [request] FreeBSD does not recognise Mustek Bear o usb/106621 usb [axe] [patch] DLINK DUB-E100 support broken o usb/106861 usb [usbdevs] [patch]: usbdevs update: Add product ACER Ze o usb/107243 usb [cam] [patch] Apacer USB Flash Drive quirk o usb/107388 usb [patch] [request] new driver: add utoppy device from N o usb/107496 usb [uhub] USB device problem on RELENG_6_2 (SHORT_XFER) [ o usb/107935 usb [uplcom] [panic] panic while accessing /dev/cuaU0 o usb/108056 usb [ohci] Mouse gets powered off during device probe when s usb/108344 usb [panic] kernel with atausb panics when unplugging USB o usb/110197 usb [umass] Sony PSP umass device does not detach from EHC s usb/110991 usb [usbdevs] [patch] QUIRK: Super Top IDE DEVICE (depends o usb/112461 usb [ehci] [request] ehci USB 2.0 doesn't work on nforce4 o usb/112463 usb [umass] problem with Samsung USB DVD writer, libscg an o usb/112944 usb [ulpt] [patch] Bi-directional access to HP LaserJet 10 o usb/113060 usb [usbdevs] [patch] Samsung printer not working in bidir o usb/113432 usb [ucom] WARNING: attempt to net_add_domain(netgraph) af o conf/114013 usb [patch] WITHOUT_USB allow to compil a lot of USB stuff o usb/114068 usb [umass] [patch] Problems with connection of the umass o usb/114916 usb [umass] [patch] USB Maxtor drive (L300RO) requires qui o usb/115400 usb [ehci] Problem with EHCI on ASUS M2N4-SLI o usb/115933 usb [uftdi] [patch] RATOC REX-USB60F (usb serial converter o usb/115935 usb [usbdevs] [patch] kernel counterproductively attaches o usb/116282 usb [ulpt] Cannot print on USB HP LJ1018 or LJ1300 o usb/117075 usb [scsi_da] [patch] quirk: USB Samsung YP-U3 MP3 o usb/117183 usb [panic] USB/fusefs -- panic while transferring large a o usb/117185 usb [umodem] [patch] Add support for UNION interface descr o usb/117205 usb [uscanner] [patch] uscanner support for HP ScanJet 447 o usb/117546 usb [uftdi] [patch] Add MaxStream ZigBee product ID to uft o usb/117598 usb [uaudio] [patch] Not possible to record with Plantroni o usb/117893 usb [umass] Lacie USB DVD writing failing o usb/117911 usb [ums] [request] Mouse Gembird MUSWC not work o usb/117938 usb [ums] [patch] Adding support for MS WL Natural and MS o usb/118098 usb [umass] 6th gen iPod causes problems when disconnectin o usb/118485 usb [usbdevs] [patch] Logitech Headset Workaround o usb/118686 usb [usbdevs] [patch] teach usbdevs / ubsa(4) about Huawei o usb/119150 usb [usbdevs] [patch] new usbdevs for CDMA 1xEVDO devices o usb/119227 usb [ubsa] [patch] ubsa buffer is too small; should be tun o usb/119389 usb [umass] Sony DSC-W1 CBI reset failed, STALLED [regress o usb/119633 usb [umass] umass0: BBB reset failed, IOERROR [regression] o usb/119653 usb [cam] [patch] iriver s7 player sync cache error patch o usb/119981 usb [axe] [patch] add support for LOGITEC LAN-GTJ/U2 gigab o usb/120572 usb [umass] [patch] quirk to support ASUS P535 as umass (a o usb/121045 usb [uftdi] [patch] Add support for PC-OP-RS1 and KURO-RS o usb/121169 usb [umass] Issues with usb mp3 player o usb/121184 usb [uipaq] [patch] add ids from linux ipaq driver (plus a o usb/121426 usb [patch] [uscanner] add HP ScanJet 3570C o usb/122025 usb [patch] uscanner does not attach to Epson RX620 printe o usb/122119 usb [umass] umass device causes creation of daX but not da o usb/122547 usb [ehci] USB Printer not being recognized after reboot p usb/122610 usb Add Verizon v740 support to ubsa(4) o usb/122621 usb [patch] [request] New driver for Sierra Wireless 3G US o usb/122712 usb [usbdevs] [patch] Sony Vaio RF keyboard/mouse receiver o usb/122813 usb [udbp] [request] udbp driver should be removed in favo o usb/122819 usb Patch to provide dynamic additions to the usb quirks t o usb/122936 usb [ucom][ubsa] Device does not receive interrupt o usb/122956 usb Support for Novatel Wireless XU870 3G Card o usb/122992 usb MotoROKR Z6 Phone not recognised by umass as USB disk. p usb/123148 usb [uscanner] [patch] Epson DX8400/50 needs uscanner to s p usb/123211 usb [udav] if_udav driver doesn't support Davicom 9601 USB o kern/123224 usb [ums] Scroll wheel breakage w/ USB MS Wireless Intelli o usb/123351 usb Add Reiner SCT cyberJack, Omnikey [26]020, Fujitsu Sie o usb/123352 usb Add Option GTMAX3.6/7.2 and Quallcomm MMC module devic o usb/123509 usb [umass] continuous reset Samsung SGH-G600 phone o usb/123611 usb [usb] BBB reset failed, STALLED from Imation/Mitsumi U o usb/123691 usb usbd(8): usbd hangs o usb/123959 usb [ums] add support for Razer Lachesis 4000dpi usb mouse o usb/123969 usb Supermicro H8SMi-2 usb problem o usb/124604 usb Wireless Mouse doesn't work o usb/125072 usb [uplcom] [patch] add Mobile Action MA-620 Infrared Ada o usb/125238 usb Habu Mouse turns off in X o usb/125264 usb [patch] sysctl for set usb mouse rate (very useful for o usb/125510 usb repeated plug and unplug of USB mass storage devices l 134 problems total. From owner-freebsd-usb@FreeBSD.ORG Mon Jul 14 16:00:15 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D94F5106568C for ; Mon, 14 Jul 2008 16:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DB6C48FC08 for ; Mon, 14 Jul 2008 16:00:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6EG0Fnd044108 for ; Mon, 14 Jul 2008 16:00:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6EG0FvI044107; Mon, 14 Jul 2008 16:00:15 GMT (envelope-from gnats) Date: Mon, 14 Jul 2008 16:00:15 GMT Message-Id: <200807141600.m6EG0FvI044107@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: ddk ddk Cc: Subject: Re: usb/117911: [ums] [request] Mouse Gembird MUSWC not work X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ddk ddk List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 16:00:15 -0000 The following reply was made to PR usb/117911; it has been noted by GNATS. From: ddk ddk To: bug-followup@FreeBSD.org, admin@lissyara.su Cc: Subject: Re: usb/117911: [ums] [request] Mouse Gembird MUSWC not work Date: Mon, 14 Jul 2008 05:52:03 -0700 (PDT) --0-923209554-1216039923=:43904 Content-Type: text/plain; charset=us-ascii hi! this problem an HID parser on FreeBSD and other *BSD system i'am use a krepdump http://people.freebsd.org/~kaiw/tools/krepdump.tgz to show full HID protocol dump from this USB Mouse ----------------------------------------------- [report desc size=79] USAGE PAGE Consumer(0xc) USAGE Consumer Control(0x1)[Consumer(0xc)] COLLECTION Application(1) REPORT ID 1 USAGE MINIMUM Unassigned(0) USAGE MAXIMUM AC Underline(576) LOGICAL MINIMUM 0 LOGICAL MAXIMUM 576 REPORT SIZE 16 REPORT COUNT 1 INPUT ( Data Array Absolute ) (0) END COLLECTION USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Application(1) REPORT ID 2 USAGE Pointer(0x1)[Generic Desktop(0x1)] COLLECTION Physical(0) USAGE PAGE Button(0x9) USAGE MINIMUM Button1(1) USAGE MAXIMUM Button3(3) LOGICAL MINIMUM 0 LOGICAL MAXIMUM 1 REPORT SIZE 1 REPORT COUNT 3 INPUT ( Data Variable Absolute ) (2) REPORT SIZE 5 REPORT COUNT 1 INPUT ( Const Array Absolute ) (1) USAGE PAGE Generic Desktop(0x1) USAGE X(0x30)[Generic Desktop(0x1)] USAGE Y(0x31)[Generic Desktop(0x1)] USAGE Wheel(0x38)[Generic Desktop(0x1)] LOGICAL MINIMUM -127 LOGICAL MAXIMUM 127 REPORT SIZE 8 REPORT COUNT 3 INPUT ( Data Variable Relative ) (6) END COLLECTION END COLLECTION [hexdump] 0000 05 0C 09 01 A1 01 85 01 19 00 2A 40 02 15 00 26 0010 40 02 75 10 95 01 81 00 C0 05 01 09 02 A1 01 85 0020 02 09 01 A1 00 05 09 19 01 29 03 15 00 25 01 75 0030 01 95 03 81 02 75 05 95 01 81 01 05 01 09 30 09 0040 31 09 38 15 81 25 7F 75 08 95 03 81 06 C0 C0 -------------------------------------------------- as you can see this Mouse generate 2 HID protocol collection the first collection is USAGE PAGE Consumer(0xc) USAGE Consumer Control(0x1)[Consumer(0xc)] COLLECTION Application(1) REPORT ID 1 ... the second collection is USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Application(1) REPORT ID 2 ... two collection describe a two protocol first protocol - AC line (Wireless Mouse from AC battarey) second protocol - Mouse movement an exists FreeBSD HID parser don't work with such collection to parse it used first collection, allways is't correct!! as example with this Mouse #kldload ums.ko #dmesg -a | grep ums ---------------------- ums_attach: 3 buttons ums_attach: X 24/8 ums_attach: Y 32/8 ums_attach: Z 40/8 ums_attach: B1 16/1 ums_attach: B2 17/1 ums_attach: B3 18/1 ums_attach: size=3, id=1 ---------------------- the HID parser use first HID collection to parse Mouse movenent Mouse not work!! i'am fixx the HID parser to correct use HID collection after patch http://paradox.org.ua/work/fixx.tar.bz2 ---------------------- ums_attach: 3 buttons ums_attach: X 8/8 ums_attach: Y 16/8 ums_attach: Z 24/8 ums_attach: B1 0/1 ums_attach: B2 1/1 ums_attach: B3 2/1 ums_attach: size=5, id=2 ---------------------- and Mouse works fine! i think this patch fixx fixed all USB Mouse problem an *BSD system --0-923209554-1216039923=:43904 Content-Type: text/plain; name="usb.fixx" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="usb.fixx" ZGlmZiAtdXJOIHVzYi5vcmlnL2hpZC5jIHVzYi5uZXcvaGlkLmMKLS0tIHVz Yi5vcmlnL2hpZC5jCTIwMDgtMDMtMDMgMDM6MTQ6NDcuMDAwMDAwMDAwICsw MjAwCisrKyB1c2IubmV3L2hpZC5jCTIwMDgtMDctMTQgMDI6MDM6MTMuMDAw MDAwMDAwICswMzAwCkBAIC03Miw2ICs3Miw3IEBACiAJaW50IG11bHRpOwog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T5mbGFncyA9 IFVNU19aOwo= From owner-freebsd-usb@FreeBSD.ORG Mon Jul 14 16:20:07 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B3B11065676 for ; Mon, 14 Jul 2008 16:20:07 +0000 (UTC) (envelope-from simsong@acm.org) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by mx1.freebsd.org (Postfix) with ESMTP id 3811A8FC18 for ; Mon, 14 Jul 2008 16:20:07 +0000 (UTC) (envelope-from simsong@acm.org) Received: from m.ern.nps.edu (t.eecs.harvard.edu [140.247.62.34]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.eecs.harvard.edu (Postfix) with ESMTP id 7D5381A49C9; Mon, 14 Jul 2008 12:20:03 -0400 (EDT) Message-Id: <06B613DC-AC88-4DCC-B94D-A2D3BDA06F96@acm.org> From: Simson Garfinkel To: Hans Petter Selasky In-Reply-To: <200807102203.35245.hselasky@c2i.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Mon, 14 Jul 2008 09:18:51 -0700 References: <200807101940.m6AJe9b0028179@freefall.freebsd.org> <200807102203.35245.hselasky@c2i.net> X-Mailer: Apple Mail (2.926) Cc: freebsd-usb@freebsd.org Subject: Re: usb/125450: Removing USB flash card while being accessed causes kernel panic X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 16:20:07 -0000 > options USB_DEBUG > > and > > sysctl hw.usb.umass.debug=-1 > sysctl hw.usb.debug=15 Strangely, it was considerably harder to make the machine panic once USB_DEBUG was enabled and the usb debug messages were printing to the kernel. It took me 6 tries of running the "dd" command on the raw USB device and pulling the device before the machine actually panicked. The panic is happened after the "dd" command finishes printing it's statistics. but before the return to the command line. page fault while in kernel mode. Fault virtual addr = 0 Is that a dereference through a null pointer? The IP is 0x20:0xc0460c3b Is there an easy way to get a link map of the kernel? Unfortunately, I can't get the stack trace because the system is not performing the crash dump. I've never done a FreeBSD crash dump. I tried following the directions, but no luck. I have also tried configuring a dumpdev in the /etc/rc.conf file: 03:27 PM copy:/home/simsong# cat /etc/rc.conf hostname="copy" ifconfig_em0="DHCP" keymap="us.pc-ctrl" keyrate="fast" linux_enable="YES" moused_enable="YES" sshd_enable="YES" dumpdev=/dev/ad0s1a 03:28 PM copy:/home/simsong# cat /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/ad0s1b none swap sw 0 0 /dev/ad0s1a / ufs rw 1 1 /dev/ad0s1e /tmp ufs rw 2 2 /dev/ad0s1f /usr ufs rw 2 2 /dev/ad0s1d /var ufs rw 2 2 /dev/acd0 /cdrom cd9660 ro,noauto 0 0 /dev/acd1 /cdrom1 cd9660 ro,noauto 0 0 /dev/ad8s1d /big ufs rw 3 3 03:29 PM copy:/home/simsong# I can't figure out why it won't dump. > > > --HPS > From owner-freebsd-usb@FreeBSD.ORG Mon Jul 14 16:35:33 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85679106564A for ; Mon, 14 Jul 2008 16:35:33 +0000 (UTC) (envelope-from toomas.aas@raad.tartu.ee) Received: from mail.televork.ee (mail.televork.ee [IPv6:2a01:1b8:0:5::2]) by mx1.freebsd.org (Postfix) with ESMTP id 19C0B8FC17 for ; Mon, 14 Jul 2008 16:35:33 +0000 (UTC) (envelope-from toomas.aas@raad.tartu.ee) Received: from localhost (localhost [127.0.0.1]) by mail.televork.ee (Postfix) with ESMTP id E062042C92; Mon, 14 Jul 2008 19:35:30 +0300 (EEST) Received: from mail.televork.ee ([81.21.240.100]) by localhost (mail.televork.ee [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16837-02; Mon, 14 Jul 2008 19:35:28 +0300 (EEST) Received: from bsd.kodu.lan (78-28-81-243.cdma.dyn.kou.ee [78.28.81.243]) by mail.televork.ee (Postfix) with ESMTP id DC6D142CAD; Mon, 14 Jul 2008 19:35:26 +0300 (EEST) From: Toomas Aas Organization: Tartu Linnavalitsus To: freebsd-usb@freebsd.org Date: Mon, 14 Jul 2008 19:35:25 +0300 User-Agent: KMail/1.9.7 References: <200807101940.m6AJe9b0028179@freefall.freebsd.org> <200807102203.35245.hselasky@c2i.net> <06B613DC-AC88-4DCC-B94D-A2D3BDA06F96@acm.org> In-Reply-To: <06B613DC-AC88-4DCC-B94D-A2D3BDA06F96@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807141935.25292.toomas.aas@raad.tartu.ee> X-Virus-Scanned: at mail.televork.ee Cc: simsong@acm.org Subject: Re: usb/125450: Removing USB flash card while being accessed causes kernel panic X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 16:35:33 -0000 Monday 14 July 2008 19:18:51 kirjutas Simson Garfinkel: > Unfortunately, I can't get the stack trace because the system is not > performing the crash dump. I've never done a FreeBSD crash dump. I > tried following the directions, but no luck. > > I have also tried configuring a dumpdev in the /etc/rc.conf file: > > 03:27 PM copy:/home/simsong# cat /etc/rc.conf > hostname="copy" > ifconfig_em0="DHCP" > keymap="us.pc-ctrl" > keyrate="fast" > linux_enable="YES" > moused_enable="YES" > sshd_enable="YES" > dumpdev=/dev/ad0s1a dumpdev should be set to swap device - "/dev/ad0s1b" in your case. But actually you *should* be able to leave it undefined, in which case "AUTO" is used. I am also trying to create a pr regarding panic when connecting and disconnecting an umass device, and I also can't get a crash dump. Don't know why... > 03:28 PM copy:/home/simsong# cat /etc/fstab > # Device Mountpoint FStype Options Dump Pass# > /dev/ad0s1b none swap sw 0 0 > /dev/ad0s1a / ufs rw 1 1 > /dev/ad0s1e /tmp ufs rw 2 2 > /dev/ad0s1f /usr ufs rw 2 2 > /dev/ad0s1d /var ufs rw 2 2 > /dev/acd0 /cdrom cd9660 ro,noauto 0 0 > /dev/acd1 /cdrom1 cd9660 ro,noauto 0 0 > /dev/ad8s1d /big ufs rw 3 3 > 03:29 PM copy:/home/simsong# -- Toomas Aas From owner-freebsd-usb@FreeBSD.ORG Mon Jul 14 16:48:11 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39C151065686 for ; Mon, 14 Jul 2008 16:48:11 +0000 (UTC) (envelope-from simsong@acm.org) Received: from mail.eecs.harvard.edu (bowser.eecs.harvard.edu [140.247.60.24]) by mx1.freebsd.org (Postfix) with ESMTP id 25B378FC08 for ; Mon, 14 Jul 2008 16:48:11 +0000 (UTC) (envelope-from simsong@acm.org) Received: from m.ern.nps.edu (t.eecs.harvard.edu [140.247.62.34]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.eecs.harvard.edu (Postfix) with ESMTP id 521101A450A; Mon, 14 Jul 2008 12:48:08 -0400 (EDT) Message-Id: From: Simson Garfinkel To: Toomas Aas In-Reply-To: <200807141935.25292.toomas.aas@raad.tartu.ee> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v928.1) Date: Mon, 14 Jul 2008 09:48:07 -0700 References: <200807101940.m6AJe9b0028179@freefall.freebsd.org> <200807102203.35245.hselasky@c2i.net> <06B613DC-AC88-4DCC-B94D-A2D3BDA06F96@acm.org> <200807141935.25292.toomas.aas@raad.tartu.ee> X-Mailer: Apple Mail (2.928.1) Cc: freebsd-usb@freebsd.org Subject: Re: usb/125450: Removing USB flash card while being accessed causes kernel panic X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 16:48:11 -0000 On Jul 14, 2008, at 9:35 AM, Toomas Aas wrote: > Monday 14 July 2008 19:18:51 kirjutas Simson Garfinkel: > >> Unfortunately, I can't get the stack trace because the system is not >> performing the crash dump. I've never done a FreeBSD crash dump. I >> tried following the directions, but no luck. >> >> I have also tried configuring a dumpdev in the /etc/rc.conf file: >> >> 03:27 PM copy:/home/simsong# cat /etc/rc.conf >> hostname="copy" >> ifconfig_em0="DHCP" >> keymap="us.pc-ctrl" >> keyrate="fast" >> linux_enable="YES" >> moused_enable="YES" >> sshd_enable="YES" >> dumpdev=/dev/ad0s1a > > dumpdev should be set to swap device - "/dev/ad0s1b" in your case. But > actually you *should* be able to leave it undefined, in which case > "AUTO" is > used. Huh. How about that. Dyslexia strikes again. Let me leave it undefined and see what happens. > > > I am also trying to create a pr regarding panic when connecting and > disconnecting an umass device, and I also can't get a crash dump. > Don't know > why... Hm... I guess I'm lucky that it didn't wipe out /. From owner-freebsd-usb@FreeBSD.ORG Mon Jul 14 16:50:04 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E731F1065679 for ; Mon, 14 Jul 2008 16:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EA1EC8FC0C for ; Mon, 14 Jul 2008 16:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6EGo4k5048651 for ; Mon, 14 Jul 2008 16:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6EGo4cM048650; Mon, 14 Jul 2008 16:50:04 GMT (envelope-from gnats) Date: Mon, 14 Jul 2008 16:50:04 GMT Message-Id: <200807141650.m6EGo4cM048650@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Alex Keda Cc: Subject: Re: usb/117911: [ums] [request] Mouse Gembird MUSWC not work X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alex Keda List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 16:50:05 -0000 The following reply was made to PR usb/117911; it has been noted by GNATS. From: Alex Keda To: bug-followup@FreeBSD.org, admin@lissyara.su Cc: Subject: Re: usb/117911: [ums] [request] Mouse Gembird MUSWC not work Date: Mon, 14 Jul 2008 20:42:08 +0400 This is a multi-part message in MIME format. --------------050502020101000706000208 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit resend mail. ============ hi! this problem an HID parser on FreeBSD and other *BSD system i'am use a krepdump http://people.freebsd.org/~kaiw/tools/krepdump.tgz to show full HID protocol dump from this USB Mouse ----------------------------------------------- [report desc size=79] USAGE PAGE Consumer(0xc) USAGE Consumer Control(0x1)[Consumer(0xc)] COLLECTION Application(1) REPORT ID 1 USAGE MINIMUM Unassigned(0) USAGE MAXIMUM AC Underline(576) LOGICAL MINIMUM 0 LOGICAL MAXIMUM 576 REPORT SIZE 16 REPORT COUNT 1 INPUT ( Data Array Absolute ) (0) END COLLECTION USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Application(1) REPORT ID 2 USAGE Pointer(0x1)[Generic Desktop(0x1)] COLLECTION Physical(0) USAGE PAGE Button(0x9) USAGE MINIMUM Button1(1) USAGE MAXIMUM Button3(3) LOGICAL MINIMUM 0 LOGICAL MAXIMUM 1 REPORT SIZE 1 REPORT COUNT 3 INPUT ( Data Variable Absolute ) (2) REPORT SIZE 5 REPORT COUNT 1 INPUT ( Const Array Absolute ) (1) USAGE PAGE Generic Desktop(0x1) USAGE X(0x30)[Generic Desktop(0x1)] USAGE Y(0x31)[Generic Desktop(0x1)] USAGE Wheel(0x38)[Generic Desktop(0x1)] LOGICAL MINIMUM -127 LOGICAL MAXIMUM 127 REPORT SIZE 8 REPORT COUNT 3 INPUT ( Data Variable Relative ) (6) END COLLECTION END COLLECTION [hexdump] 0000 05 0C 09 01 A1 01 85 01 19 00 2A 40 02 15 00 26 0010 40 02 75 10 95 01 81 00 C0 05 01 09 02 A1 01 85 0020 02 09 01 A1 00 05 09 19 01 29 03 15 00 25 01 75 0030 01 95 03 81 02 75 05 95 01 81 01 05 01 09 30 09 0040 31 09 38 15 81 25 7F 75 08 95 03 81 06 C0 C0 -------------------------------------------------- as you can see this Mouse generate 2 HID protocol collection the first collection is USAGE PAGE Consumer(0xc) USAGE Consumer Control(0x1)[Consumer(0xc)] COLLECTION Application(1) REPORT ID 1 ... the second collection is USAGE PAGE Generic Desktop(0x1) USAGE Mouse(0x2)[Generic Desktop(0x1)] COLLECTION Application(1) REPORT ID 2 ... two collection describe a two protocol first protocol - AC line (Wireless Mouse from AC battarey) second protocol - Mouse movement an exists FreeBSD HID parser don't work with such collection to parse it used first collection, allways is't correct!! as example with this Mouse #kldload ums.ko #dmesg -a | grep ums ---------------------- ums_attach: 3 buttons ums_attach: X 24/8 ums_attach: Y 32/8 ums_attach: Z 40/8 ums_attach: B1 16/1 ums_attach: B2 17/1 ums_attach: B3 18/1 ums_attach: size=3, id=1 ---------------------- the HID parser use first HID collection to parse Mouse movenent Mouse not work!! i'am fixx the HID parser to correct use HID collection after patch http://paradox.org.ua/work/fixx.tar.bz2 ---------------------- ums_attach: 3 buttons ums_attach: X 8/8 ums_attach: Y 16/8 ums_attach: Z 24/8 ums_attach: B1 0/1 ums_attach: B2 1/1 ums_attach: B3 2/1 ums_attach: size=5, id=2 ---------------------- and Mouse works fine! i think this patch fixx fixed all USB Mouse problem an *BSD system --------------050502020101000706000208 Content-Type: text/plain; name="usb.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="usb.diff" ZGlmZiAtTnJ1IHN5cy9kZXYvdXNiLm9yaWcvaGlkLmMgc3lzL2Rldi91c2IvaGlkLmMKLS0t IHN5cy9kZXYvdXNiLm9yaWcvaGlkLmMJMjAwNy0wNi0yMCAwOToxMDo1Mi4wMDAwMDAwMDAg KzA0MDAKKysrIHN5cy9kZXYvdXNiL2hpZC5jCTIwMDgtMDctMTQgMTY6MDE6MzkuMDAwMDAw MDAwICswNDAwCkBAIC03Miw2ICs3Miw3IEBACiAJaW50IG11bHRpOwogCWludCBtdWx0aW1h eDsKIAlpbnQga2luZHNldDsKKwlpbnQgdXNhZ2U7CiB9OwogCiBzdGF0aWMgdm9pZApAQCAt MTE1LDcgKzExNiw3IEBACiB9CiAKIGludAotaGlkX2dldF9pdGVtKHN0cnVjdCBoaWRfZGF0 YSAqcywgc3RydWN0IGhpZF9pdGVtICpoKQoraGlkX2dldF9pdGVtKHN0cnVjdCBoaWRfZGF0 YSAqcywgdV9pbnQzMl90IHUsIHN0cnVjdCBoaWRfaXRlbSAqaCkKIHsKIAlzdHJ1Y3QgaGlk X2l0ZW0gKmMgPSAmcy0+Y3VyOwogCXVuc2lnbmVkIGludCBiVGFnLCBiVHlwZSwgYlNpemU7 CkBAIC0xOTMsNiArMTk0LDkgQEAKIAkJY2FzZSAwOgkJCS8qIE1haW4gKi8KIAkJCXN3aXRj aCAoYlRhZykgewogCQkJY2FzZSA4OgkJLyogSW5wdXQgKi8KKwkJCQlpZiAocy0+dXNhZ2Ug IT0gdSA+PjE2ICYmIHUgIT0gMCkKKwkJCQkJYnJlYWs7CisK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19pc2l6ZSwgTV9VU0IsIE1fTk9XQUlUKTsKIAlpZiAoIXNj LT5zY19pYnVmKSB7CiAJCXByaW50ZigiJXM6IG5vIG1lbW9yeVxuIiwgZGV2aWNlX2dldF9u YW1ldW5pdChzYy0+c2NfZGV2KSk7CkBAIC0zOTMsNiArMzk0LDcgQEAKIAkgKiBkZXNjcmlw dG9yKSwgaXQgc2VlbXMgdGhhdCByZXBvcnQgaWQgMTcgY29udGFpbnMgdGhlIG5lY2Vzc2Fy eQogCSAqIG1vdXNlIGluZm9ybWF0aW9uKDMtYnV0dG9ucyxYLFksd2hlZWwpIHNvIHdlIHNw ZWNpZnkgaXQgbWFudWFsbHkuCiAJICovCisJLyogSVMgSVQgTkVTU0VTQVJZID8/PyBORUVE IFRPIEJFIFJFQ0hFQ0sgISEhISEhISBBTkQgRVhDTFVERSAqLwogCWlmICh1YWEtPnZlbmRv ciA9PSBVU0JfVkVORE9SX01JQ1JPU09GVCAmJgogCSAgICB1YWEtPnByb2R1Y3QgPT0gVVNC X1BST0RVQ1RfTUlDUk9TT0ZUX1dMTk9URUJPT0szKSB7CiAJCXNjLT5mbGFncyA9IFVNU19a Owo= --------------050502020101000706000208-- From owner-freebsd-usb@FreeBSD.ORG Mon Jul 14 17:05:13 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53E9D1065675 for ; Mon, 14 Jul 2008 17:05:13 +0000 (UTC) (envelope-from prvs=pschmehl_lists=0746e7376@tx.rr.com) Received: from ip-relay-002.utdallas.edu (ip-relay-002.utdallas.edu [129.110.20.112]) by mx1.freebsd.org (Postfix) with ESMTP id 3AA158FC0A for ; Mon, 14 Jul 2008 17:05:13 +0000 (UTC) (envelope-from prvs=pschmehl_lists=0746e7376@tx.rr.com) X-Group: RELAYLIST X-IronPort-AV: E=Sophos;i="4.30,360,1212382800"; d="scan'208";a="3692344" Received: from smtp3.utdallas.edu ([129.110.20.110]) by ip-relay-002.utdallas.edu with ESMTP; 14 Jul 2008 11:36:39 -0500 Received: from utd65257.utdallas.edu (utd65257.utdallas.edu [129.110.3.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.utdallas.edu (Postfix) with ESMTPSA id 22ADE23DE3 for ; Mon, 14 Jul 2008 11:36:40 -0500 (CDT) Date: Mon, 14 Jul 2008 11:36:38 -0500 From: Paul Schmehl To: freebsd-usb@freebsd.org Message-ID: <3632806C83D31F1A23DE0F0A@utd65257.utdallas.edu> X-Mailer: Mulberry/4.0.6 (Linux/x86) X-Munged-Reply-To: Figure it out MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Crash when booting with umass device connected X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 17:05:13 -0000 I'd like to work with someone to provide useful information about this problem. Ever since upgrading my workstation to 7.0 STABLE, I cannot boot with my umass device connected. Once the system is up and running, I can mount the device with no problems. During the boot process, the device is detected, but then it causes a kernel panic. I'm logging the console to console.log, but there is no useful information there. I've enabled USB_DEBUG and rebuilt the kernel, but I have no idea how to capture the information printed to the console when this failure occurs. (I'm seriously considering taking a photograph of the screen since I can't do a screenshot and I can't find the information in any logs.) I'd post a bug, but without some trace information, it's kind of worthless. If I can get help from someone knowledgeable, I'll provide whatever information is needed to track this problem down. -- Paul Schmehl As if it wasn't already obvious, my opinions are my own and not those of my employer. From owner-freebsd-usb@FreeBSD.ORG Mon Jul 14 17:50:04 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BB861065671 for ; Mon, 14 Jul 2008 17:50:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E6FD18FC0C for ; Mon, 14 Jul 2008 17:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6EHo3Fa053968 for ; Mon, 14 Jul 2008 17:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6EHo33e053967; Mon, 14 Jul 2008 17:50:03 GMT (envelope-from gnats) Date: Mon, 14 Jul 2008 17:50:03 GMT Message-Id: <200807141750.m6EHo33e053967@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Alex Keda Cc: Subject: Re: usb/117911: [ums] [request] Mouse Gembird MUSWC not work X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alex Keda List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2008 17:50:04 -0000 The following reply was made to PR usb/117911; it has been noted by GNATS. From: Alex Keda To: bug-followup@FreeBSD.org, admin@lissyara.su Cc: Subject: Re: usb/117911: [ums] [request] Mouse Gembird MUSWC not work Date: Mon, 14 Jul 2008 21:43:01 +0400 this patch work correct for my mouse (CURRENT, i386) From owner-freebsd-usb@FreeBSD.ORG Tue Jul 15 09:23:15 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 269241065675 for ; Tue, 15 Jul 2008 09:23:15 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.28]) by mx1.freebsd.org (Postfix) with ESMTP id CC3E28FC2B for ; Tue, 15 Jul 2008 09:23:14 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so2222775ywe.13 for ; Tue, 15 Jul 2008 02:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=WgzjusyfUPK/F3Dh2oyXaYDeMc1nGplf2XzjJmbdD0w=; b=Zlk5iYS7zWZJ9qyswYHOL0Iy3xv0EhtE8rnfYYuwAU6/oC0VWiHimb0xonT1OifRYr rP8KwuMP96geXU/wx5t1aAxRaKq8jb2MVgp6pHePbjktxxKCk4N00ljtIhOCWuEGr3mC TkiVIIDOAJXY0dKIiMpQffqIWSo+pa2k0jdBQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=UNrBPeVq//5gxCkRwNc76EYGEV2fMx6xWC4ZFelDEk4dusGYX6HR6B9SrXu9CfmHeG R68Y12ivItICEZRhjyZbuctfQcst2KngIVIIx5pL7Qyn3RbhIytNdt8CpL5ZliydGje7 QidiAi2t/gea5r5NVlS8vM3gWbYtvrj/GGVw0= Received: by 10.142.89.13 with SMTP id m13mr4571285wfb.338.1216113789106; Tue, 15 Jul 2008 02:23:09 -0700 (PDT) Received: by 10.142.231.8 with HTTP; Tue, 15 Jul 2008 02:23:09 -0700 (PDT) Message-ID: <3a142e750807150223w6f264048wd9e13ae8846b593c@mail.gmail.com> Date: Tue, 15 Jul 2008 11:23:09 +0200 From: "Paul B. Mahol" To: freebsd-usb@freebsd.org In-Reply-To: <3a142e750807150219j5a619135x19edba16e6590c21@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3632806C83D31F1A23DE0F0A@utd65257.utdallas.edu> <3a142e750807150219j5a619135x19edba16e6590c21@mail.gmail.com> Subject: Re: Crash when booting with umass device connected X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2008 09:23:15 -0000 On 7/14/08, Paul Schmehl wrote: > I'd like to work with someone to provide useful information about this > problem. > Ever since upgrading my workstation to 7.0 STABLE, I cannot boot with my > umass > device connected. Once the system is up and running, I can mount the > device > with no problems. > > During the boot process, the device is detected, but then it causes a > kernel > panic. I'm logging the console to console.log, but there is no useful > information there. I've enabled USB_DEBUG and rebuilt the kernel, but I > have > no idea how to capture the information printed to the console when this > failure > occurs. (I'm seriously considering taking a photograph of the screen > since > I > can't do a screenshot and I can't find the information in any logs.) > > I'd post a bug, but without some trace information, it's kind of > worthless. > If > I can get help from someone knowledgeable, I'll provide whatever > information > is > needed to track this problem down. Look in Developers handbook for more info /usr/share/doc/en/books/developers-handbook/index.html I think that textdumps are MFCed to STABLE. Textdumps provide easy way for gathering backtraces. From owner-freebsd-usb@FreeBSD.ORG Tue Jul 15 09:31:16 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7914F1065674 for ; Tue, 15 Jul 2008 09:31:16 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.swip.net [212.247.154.193]) by mx1.freebsd.org (Postfix) with ESMTP id CD7EA8FC15 for ; Tue, 15 Jul 2008 09:31:15 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=8kjA1I9P6a1jR4eVc-8A:9 a=v56VxE407QCbIbCNiSIA:7 a=QvqDf7CFhVlkLJ1FlQesktqmnGkA:4 a=LY0hPdMaydYA:10 Received: from [193.217.167.134] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.4b) with ESMTPA id 1007181206; Tue, 15 Jul 2008 11:31:14 +0200 From: Hans Petter Selasky To: Tino Engel Date: Tue, 15 Jul 2008 11:32:52 +0200 User-Agent: KMail/1.9.7 References: <20080709223926.142cbe5b@gmx.net> <200807101809.59532.hselasky@c2i.net> <20080711004223.76d17a7e@gmx.net> In-Reply-To: <20080711004223.76d17a7e@gmx.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807151132.53525.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Quirks X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2008 09:31:16 -0000 On Friday 11 July 2008, Tino Engel wrote: > Hi --HPS, > > > Hi Tino, > > > > Let's focus on getting the USB mass storage problems fixed first. > > There are plenty of USB Mass Storage IR's in the database. > > > > What kind of quirk strategy would you like to apply? > > > > If the device fails the Mass Storage test, then switch on all > > possible quirks ? Which means that the user might have to replug the > > USB device ? > > > > --HPS > > Here is a map of what I think would be reasonable: > > > At first there is a file (let's say /etc/ums.conf) which holds the > configuration of how to approach new devices. The file is delivered > with reasonable defaults. > > > GLOBAL OPTIONS: > =============== > If the option ALL_QUIRKS="YES" is set, a new UMS is approached with > all quirks. If something fails here, there is pretty much nothing left > to do. > > Also all other quirks can be set on by default: > Example: Q_NO_SYNC_CACHE="YES" would disable cache syncing for all msc > devices. > > So, now there more sophisticated part: > In case the all quirks option is not set, 2 cases remain in this model: > > CASE 1: > ======= > > Case 1 describes the case of a MSC device that hangs up > after receiving a command it could not be able to handle. It ends in a > unfixable state, even a bus reset cannot help. > > That leads us to the conclusion, the device has to be unplugged in > order to proceed. The only question is, how to proceed then. Also in > this case, the was is determined by configuration. > > The easiest case would be given by using the option: > STALLED_ALL_QUIRKS="YES" > > Then dmesg would tell to replug the device (and other events would be > triggered, for whatsoever), and all quirks would be applied for this > device from there on. The information would be held in /var/db/ums or > whatever appropriate place. > > Additionally one could think about enabling a chained quirk set: > For example I could set STALLED_Q_NO_SYNC_CACHE="1" and > STALLED_ALL_QUIRKS="2" which would have the effect, that for this > specific device, cache syncing would be disabled (quirked) on first > reconnect, and, if failed, all quirks would be activated on next > connect. dmesg would properly inform me to replug. > > Nice would also be an option STALLED_INTELLIGENCE="YES" which would try > same order as in case 2. > > The successful quirk combination is also stored in /var/db/ums. > > In addition, it would be nice to have a vendor/device specific config > format. (e.g. STALLED_Q_NO_SYNC_CACHE="SAMSUNG,1") > > This way would have the advantage that my device runs anyhow without > kernel recompilation (although i might have to replug a couple of times > in worst case :-( ) > > CASE 2: > ======= > In case 2, the device can recover by a usb reset. There it is a runtime > issue, if just all quirk permutations can be tested or if a > configuration similar to case 1 is appropriate. (I assume, we can live > with the runtime there, since plugging an usb device is not a > real-time-thing ^^) > Than we can have a nice logic (from most common to less common quirk > permutations order) > > Here we should definitely have a config file, containing device > specific quirk information, which can be updated. > > > Anyhow, feedback events (e.g. for graphical connection tools) > interaction with things like HAL and whatever comes up should be > considered, so it can be implemented sooner or later... > > > What do you think? Hi Tino, I think this should be all automatic. Most users will have no clue what to put in those configuration files. Any others have any opinion about this on the list? --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jul 15 10:30:01 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5809F1065673 for ; Tue, 15 Jul 2008 10:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9878FC19 for ; Tue, 15 Jul 2008 10:30:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6FAU1Ic074686 for ; Tue, 15 Jul 2008 10:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6FAU1nR074685; Tue, 15 Jul 2008 10:30:01 GMT (envelope-from gnats) Resent-Date: Tue, 15 Jul 2008 10:30:01 GMT Resent-Message-Id: <200807151030.m6FAU1nR074685@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-usb@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Boris S." Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 950001065672 for ; Tue, 15 Jul 2008 10:22:34 +0000 (UTC) (envelope-from bs@staeblow.de) Received: from dva.homeunix.org (dva.homeunix.org [89.247.128.204]) by mx1.freebsd.org (Postfix) with ESMTP id B2CD68FC25 for ; Tue, 15 Jul 2008 10:22:33 +0000 (UTC) (envelope-from bs@staeblow.de) Received: by dva.homeunix.org (Postfix, from userid 0) id 462A7823F3; Tue, 15 Jul 2008 12:05:47 +0200 (CEST) Message-Id: <20080715100547.462A7823F3@dva.homeunix.org> Date: Tue, 15 Jul 2008 12:05:47 +0200 (CEST) From: "Boris S." To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: usb/125631: [usb][ums] kernel panic during bootup while 'Logitech USB receiver' (Logitech RX650 wireless mouse) is connected X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Boris S." List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2008 10:30:01 -0000 >Number: 125631 >Category: usb >Synopsis: [usb][ums] kernel panic during bootup while 'Logitech USB receiver' (Logitech RX650 wireless mouse) is connected >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-usb >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jul 15 10:30:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Boris S. >Release: FreeBSD 7.0-STABLE amd64 >Organization: private >Environment: System: FreeBSD xxx.intranet.local 7.0-STABLE FreeBSD 7.0-STABLE #0: Sun Jun 22 13:58:13 CEST 2008 root@xxx.intranet.local:/usr/obj/usr/src/sys/XXX amd64 Mainboard: Gigabyte GA-MA78G-DS3H Chipset: AMD760G Southbridge: AMD SB700 CPU: AMD X2 4850e >Description: The system will panic during bootup while a 'Logitech USB receiver' is connected. It happens right after the vga probe: vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 1.000 msec panic: ohci_add_done: addr 0xcfef1cd0 not found cpuid = 0 Uptime: 1s If the USB receiver is connected AFTER the boot up, it will be detected correctly and works very reliable. It is detected as: ums0: on uhub4 ums0: 8 buttons and Z dir. uhid0: on uhub4 >How-To-Repeat: plug in the USB receiver and start the system. >Fix: Workaround: plug in the USB receiver after the boot up. Then it will be detected without panic. --- dmesg.boot begins here --- Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.0-STABLE #0: Sun Jun 22 13:58:13 CEST 2008 root@xxx.intranet.local:/usr/obj/usr/src/sys/XXX Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Athlon(tm) Dual Core Processor 4850e (2505.35-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x60fb2 Stepping = 2 Features=0x178bfbff Features2=0x2001 AMD Features=0xea500800 AMD Features2=0x11f Cores per package: 2 usable memory = 4149764096 (3957 MB) avail memory = 3990966272 (3806 MB) ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 ioapic0: Changing APIC ID to 2 ioapic0 irqs 0-23 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, cfde0000 (3) failed Timecounter "ACPI-safe" frequency 3579545 Hz quality 850 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 acpi_hpet0: iomem 0xfed00000-0xfed003ff on acpi0 Timecounter "HPET" frequency 14318180 Hz quality 900 cpu0: on acpi0 powernow0: on cpu0 cpu1: on acpi0 powernow1: on cpu1 acpi_button0: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 vgapci0: port 0xee00-0xeeff mem 0xd8000000-0xdfffffff,0xfdee0000-0xfdeeffff,0xfdd00000-0xfddfffff irq 18 at device 5.0 on pci1 pci1: at device 5.1 (no driver attached) pcib2: irq 18 at device 6.0 on pci0 pci2: on pcib2 em0: port 0xdf00-0xdf1f mem 0xfdce0000-0xfdcfffff,0xfdcc0000-0xfdcdffff irq 18 at device 0.0 on pci2 em0: Using MSI interrupt em0: [FILTER] em0: Ethernet address: 00:1b:21:1c:0d:18 pcib3: irq 18 at device 10.0 on pci0 pci3: on pcib3 pci3: at device 0.0 (no driver attached) atapci0: port 0xff00-0xff07,0xfe00-0xfe03,0xfd00-0xfd07,0xfc00-0xfc03,0xfb00-0xfb0f mem 0xfe02f000-0xfe02f3ff irq 22 at device 17.0 on pci0 atapci0: [ITHREAD] atapci0: AHCI Version 01.10 controller with 4 ports detected ata2: on atapci0 ata2: [ITHREAD] ata3: on atapci0 ata3: [ITHREAD] ata4: on atapci0 ata4: [ITHREAD] ata5: on atapci0 ata5: [ITHREAD] ohci0: mem 0xfe02e000-0xfe02efff irq 16 at device 18.0 on pci0 ohci0: [GIANT-LOCKED] ohci0: [ITHREAD] usb0: OHCI version 1.0, legacy support usb0: SMM does not respond, resetting usb0: on ohci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 3 ports with 3 removable, self powered ohci1: mem 0xfe02d000-0xfe02dfff irq 16 at device 18.1 on pci0 ohci1: [GIANT-LOCKED] ohci1: [ITHREAD] usb1: OHCI version 1.0, legacy support usb1: SMM does not respond, resetting usb1: on ohci1 usb1: USB revision 1.0 uhub1: on usb1 uhub1: 3 ports with 3 removable, self powered ehci0: mem 0xfe02c000-0xfe02c0ff irq 17 at device 18.2 on pci0 ehci0: [GIANT-LOCKED] ehci0: [ITHREAD] usb2: EHCI version 1.0 usb2: companion controllers, 3 ports each: usb0 usb1 usb2: on ehci0 usb2: USB revision 2.0 uhub2: on usb2 uhub2: 6 ports with 6 removable, self powered ohci2: mem 0xfe02b000-0xfe02bfff irq 18 at device 19.0 on pci0 ohci2: [GIANT-LOCKED] ohci2: [ITHREAD] usb3: OHCI version 1.0, legacy support usb3: SMM does not respond, resetting usb3: on ohci2 usb3: USB revision 1.0 uhub3: on usb3 uhub3: 3 ports with 3 removable, self powered ohci3: mem 0xfe02a000-0xfe02afff irq 18 at device 19.1 on pci0 ohci3: [GIANT-LOCKED] ohci3: [ITHREAD] usb4: OHCI version 1.0, legacy support usb4: SMM does not respond, resetting usb4: on ohci3 usb4: USB revision 1.0 uhub4: on usb4 uhub4: 3 ports with 3 removable, self powered ehci1: mem 0xfe029000-0xfe0290ff irq 19 at device 19.2 on pci0 ehci1: [GIANT-LOCKED] ehci1: [ITHREAD] usb5: EHCI version 1.0 usb5: companion controllers, 3 ports each: usb3 usb4 usb5: on ehci1 usb5: USB revision 2.0 uhub5: on usb5 uhub5: 6 ports with 6 removable, self powered pci0: at device 20.0 (no driver attached) atapci1: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfa00-0xfa0f at device 20.1 on pci0 ata0: on atapci1 ata0: [ITHREAD] pci0: at device 20.2 (no driver attached) isab0: at device 20.3 on pci0 isa0: on isab0 pcib4: at device 20.4 on pci0 pci4: on pcib4 em1: port 0xbf00-0xbf3f mem 0xfdac0000-0xfdadffff,0xfdaa0000-0xfdabffff irq 21 at device 7.0 on pci4 em1: [FILTER] em1: Ethernet address: 00:0e:0c:34:17:46 pci4: at device 14.0 (no driver attached) ohci4: mem 0xfe028000-0xfe028fff irq 18 at device 20.5 on pci0 ohci4: [GIANT-LOCKED] ohci4: [ITHREAD] usb6: OHCI version 1.0, legacy support usb6: SMM does not respond, resetting usb6: on ohci4 usb6: USB revision 1.0 uhub6: on usb6 uhub6: 2 ports with 2 removable, self powered fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FILTER] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio0: [FILTER] ppc0: port 0x378-0x37f,0x778-0x77b irq 7 drq 3 on acpi0 ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold ppbus0: on ppc0 ppbus0: [ITHREAD] lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 ppc0: [GIANT-LOCKED] ppc0: [ITHREAD] atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] orm0: at iomem 0xd0000-0xd0fff,0xd1000-0xd1fff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 1.000 msec ad0: 190781MB at ata0-master UDMA133 ad4: 305245MB at ata2-master SATA300 ad8: 305245MB at ata4-master SATA300 acd0: DVDROM at ata5-master SATA150 SMP: AP CPU #1 Launched! GEOM_MIRROR: Device mirror/gmir0s1 launched (2/2). WARNING: Expected rawoffset 0, found 63 Trying to mount root from ufs:/dev/mirror/gmir0s1a WARNING: ZFS is considered to be an experimental feature in FreeBSD. ZFS filesystem version 6 ZFS storage pool version 6 --- dmesg.boot ends here --- --- kernel config --- cpu HAMMER ident XXX # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. #makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!] options COMPAT_IA32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options STACK # stack(9) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options STOP_NMI # Stop CPUS using NMI instead of IPI options AUDIT # Security event auditing options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) ## Debugging for use in -current #options KDB # Enable kernel debugger support. #options DDB # Support DDB. #options GDB # Support remote GDB. #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS # Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options DEVICE_POLLING options NETGRAPH options NETGRAPH_ETHER options NETGRAPH_SOCKET options NETGRAPH_PPP options NETGRAPH_PPPOE options NETGRAPH_IFACE options NETGRAPH_BPF options NETGRAPH_TCPMSS options NETGRAPH_VJC device pf device pflog device pfsync options ALTQ options ALTQ_CBQ options ALTQ_RED options ALTQ_RIO options ALTQ_HFSC options ALTQ_CDNR options ALTQ_PRIQ #options ALTQ_NOPCC ##options ALTQ_DEBUG # #device drm options MSGBUF_SIZE=40960 options SC_HISTORY_SIZE=1000 # number of history buffer lines options PANIC_REBOOT_WAIT_TIME=10000 options GEOM_MIRROR # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel # CPU frequency control device cpufreq # Bus support. device acpi device pci # Floppy drives device fdc # ATA and ATAPI devices device ata device atadisk # ATA disk drives device ataraid # ATA RAID drives device atapicd # ATAPI CDROM drives device atapifd # ATAPI floppy drives device atapist # ATAPI tape drives options ATA_STATIC_ID # Static device numbering # SCSI peripherals device scbus # SCSI bus (required for SCSI) device ch # SCSI media changers device da # Direct Access (disks) device sa # Sequential Access (tape etc) device cd # CD device pass # Passthrough device (direct SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc device agp # support several AGP chipsets # Serial (COM) ports device sio # 8250, 16[45]50 based serial ports revice uart # Generic UART driver # Parallel port device ppc device ppbus # Parallel port bus (required) device lpt # Printer #device plip # TCP/IP over parallel device ppi # Parallel port interface device #device vpo # Requires scbus and da # If you've got a "dumb" serial or parallel PCI card that is # supported by the puc(4) glue driver, uncomment the following # line to enable it (connects to sio, uart and/or ppc drivers): #device puc # PCI Ethernet NICs. device em # Intel PRO/1000 adapter Gigabit Ethernet Card # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 # Pseudo devices. device loop # Network loopback device random # Entropy device device ether # Ethernet support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) device firmware # firmware assist module # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device ehci # EHCI PCI->USB interface (USB 2.0) device usb # USB Bus (required) #device udbp # USB Double Bulk Pipe devices device ugen # Generic device uhid # "Human Interface Devices" device ukbd # Keyboard device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse #device uscanner # Scanners --- kernel config ends here --- >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-usb@FreeBSD.ORG Tue Jul 15 16:27:03 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C6AD1065671 for ; Tue, 15 Jul 2008 16:27:03 +0000 (UTC) (envelope-from prvs=pschmehl_lists=075a84bca@tx.rr.com) Received: from ip-relay-001.utdallas.edu (ip-relay-001.utdallas.edu [129.110.20.111]) by mx1.freebsd.org (Postfix) with ESMTP id 3A8368FC0A for ; Tue, 15 Jul 2008 16:27:02 +0000 (UTC) (envelope-from prvs=pschmehl_lists=075a84bca@tx.rr.com) X-Group: RELAYLIST X-IronPort-AV: E=Sophos;i="4.30,367,1212382800"; d="scan'208";a="4267070" Received: from smtp3.utdallas.edu ([129.110.20.110]) by ip-relay-001.utdallas.edu with ESMTP; 15 Jul 2008 10:57:27 -0500 Received: from utd65257.utdallas.edu (utd65257.utdallas.edu [129.110.3.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.utdallas.edu (Postfix) with ESMTPSA id C1D9723DF2 for ; Tue, 15 Jul 2008 10:57:27 -0500 (CDT) Date: Tue, 15 Jul 2008 10:57:26 -0500 From: Paul Schmehl To: freebsd-usb@freebsd.org Message-ID: <91DD32EA4C3672A46D423E44@utd65257.utdallas.edu> In-Reply-To: <3a142e750807150223w6f264048wd9e13ae8846b593c@mail.gmail.com> References: <3632806C83D31F1A23DE0F0A@utd65257.utdallas.edu> <3a142e750807150219j5a619135x19edba16e6590c21@mail.gmail.com> <3a142e750807150223w6f264048wd9e13ae8846b593c@mail.gmail.com> X-Mailer: Mulberry/4.0.6 (Linux/x86) X-Munged-Reply-To: Figure it out MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: Crash when booting with umass device connected X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2008 16:27:03 -0000 --On Tuesday, July 15, 2008 11:23:09 +0200 "Paul B. Mahol" wrote: > > Look in Developers handbook for more info > /usr/share/doc/en/books/developers-handbook/index.html > > I think that textdumps are MFCed to STABLE. > Textdumps provide easy way for gathering backtraces. The problem is, I'm not getting dump files. (And dumpdev is set to AUTO - the default.) Savecore runs, but there's nothing to put in /var/crash. -- Paul Schmehl As if it wasn't already obvious, my opinions are my own and not those of my employer. From owner-freebsd-usb@FreeBSD.ORG Wed Jul 16 08:58:54 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B490106567A for ; Wed, 16 Jul 2008 08:58:54 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by mx1.freebsd.org (Postfix) with ESMTP id D56ED8FC0A for ; Wed, 16 Jul 2008 08:58:53 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so4501484wfg.7 for ; Wed, 16 Jul 2008 01:58:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=J0YChXMY1LmHNxX/hiUTeqOtSqg6gZyR/hMrE+R6gqw=; b=UEwpPadrV8zrPfFl4queOThtUkhUom15xe2To3C4B8IMnBI8DN72vNnpPkqbqAc+rc +N7hcpLzZK76vFx+FY+VDSmLvU5LLym/9l8ntw8joli5/xPJJMux7RS/ZbyoAiXtoyB8 wK60YGOpZzx0bfeIOlB7JMU9fBB1xqFXisgwg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=kZ8yCxUIIMS01F8yzet81V87CONq9ZRd84kOIbN2q68JEjLm2GQR4eOVo6thku9BfF QOBNlrqkzUZfdKo+Pp+LuCtfZgiwZsRfrr3DUkoEXSOgNca6vkLU1eJZAmWutfLAZPWZ A/BDeuA2JugFfuzDkkhakh3GNef9krf13aINQ= Received: by 10.142.251.9 with SMTP id y9mr5037433wfh.46.1216198733481; Wed, 16 Jul 2008 01:58:53 -0700 (PDT) Received: by 10.142.231.8 with HTTP; Wed, 16 Jul 2008 01:58:53 -0700 (PDT) Message-ID: <3a142e750807160158x150f521fv696845d77d6e3c58@mail.gmail.com> Date: Wed, 16 Jul 2008 10:58:53 +0200 From: "Paul B. Mahol" To: freebsd-usb@freebsd.org In-Reply-To: <91DD32EA4C3672A46D423E44@utd65257.utdallas.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3632806C83D31F1A23DE0F0A@utd65257.utdallas.edu> <3a142e750807150219j5a619135x19edba16e6590c21@mail.gmail.com> <3a142e750807150223w6f264048wd9e13ae8846b593c@mail.gmail.com> <91DD32EA4C3672A46D423E44@utd65257.utdallas.edu> Subject: Re: Crash when booting with umass device connected X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2008 08:58:54 -0000 On 7/15/08, Paul Schmehl wrote: > --On Tuesday, July 15, 2008 11:23:09 +0200 "Paul B. Mahol" > > wrote: >> >> Look in Developers handbook for more info >> /usr/share/doc/en/books/developers-handbook/index.html >> >> I think that textdumps are MFCed to STABLE. >> Textdumps provide easy way for gathering backtraces. > > The problem is, I'm not getting dump files. (And dumpdev is set to AUTO - > the > default.) Savecore runs, but there's nothing to put in /var/crash. > First, do you see kdb prompt when system panics? If not then you will need to recompile kernel with various debug stuff: KDB, DDB, GDB, DEBUG=-g ... Second do you have line with sw in /etc/fstab. If not, it is possible to set dump device manually. You should have following lines in /etc/rc.conf: ddb_enable="YES" ddb_config="/etc/ddb.conf" But this one is required only if you want that textdumps are taken automaticaly after system crash. Exploring ddb(4) is also usefull. From owner-freebsd-usb@FreeBSD.ORG Wed Jul 16 13:00:12 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AFBA106564A for ; Wed, 16 Jul 2008 13:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 00C628FC0A for ; Wed, 16 Jul 2008 13:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6GD0A0Y042063 for ; Wed, 16 Jul 2008 13:00:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6GD0A8a042062; Wed, 16 Jul 2008 13:00:10 GMT (envelope-from gnats) Date: Wed, 16 Jul 2008 13:00:10 GMT Message-Id: <200807161300.m6GD0A8a042062@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Alexey Dokuchaev Cc: Subject: Re: usb/117185: [umodem] [patch] Add support for UNION interface descriptor X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexey Dokuchaev List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2008 13:00:12 -0000 The following reply was made to PR usb/117185; it has been noted by GNATS. From: Alexey Dokuchaev To: bug-followup@FreeBSD.org, eugen@grosbein.pp.ru Cc: imp@bsdimp.com Subject: Re: usb/117185: [umodem] [patch] Add support for UNION interface descriptor Date: Wed, 16 Jul 2008 19:00:17 +0700 --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Just confirmed to fix my Nokia E60 on 6-STABLE (had to change the patch slightly to fit 6.x codebase). P.S. Warner, you mentioned that you were going to take a look at NetBSD (which this patch originates from) changes and merge the fix (usb/91546, obsolete now). Could you possibly take a look now? People say this code had been pretty stable for them for several months by now. Provided 6.x is also covered, I look forward for a merge. Thanks. --YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="umodem-nokia-releng6.patch" --- umodem.c.orig 2008-07-16 12:01:22.000000000 +0700 +++ umodem.c 2008-07-16 12:43:32.000000000 +0700 @@ -172,13 +172,14 @@ struct task sc_task; }; -Static void *umodem_get_desc(usbd_device_handle dev, int type, int subtype); +Static void *umodem_get_desc(usbd_device_handle dev, usb_descriptor_t *, int type, int subtype); +Static usbd_interface_handle umodem_get_interface(struct usb_attach_arg *uaa, int ifcno); Static usbd_status umodem_set_comm_feature(struct umodem_softc *sc, int feature, int state); Static usbd_status umodem_set_line_coding(struct umodem_softc *sc, usb_cdc_line_state_t *state); -Static void umodem_get_caps(usbd_device_handle, int *, int *); +Static int umodem_get_caps(struct usb_attach_arg *, int, int *, int *); Static void umodem_get_status(void *, int portno, u_char *lsr, u_char *msr); Static void umodem_set(void *, int, int, int); @@ -261,10 +262,7 @@ if (ret == UMATCH_NONE) return (ret); - umodem_get_caps(uaa->device, &cm, &acm); - if (!(cm & USB_CDC_CM_DOES_CM) || - !(cm & USB_CDC_CM_OVER_DATA) || - !(acm & USB_CDC_ACM_HAS_LINE)) + if (umodem_get_caps(uaa, -1, &cm, &acm) == -1) return (UMATCH_NONE); return ret; @@ -276,7 +274,6 @@ usbd_device_handle dev = uaa->device; usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; - usb_cdc_cm_descriptor_t *cmd; char *devinfo = NULL; const char *devname; usbd_status err; @@ -304,15 +301,14 @@ id->bInterfaceClass, id->bInterfaceSubClass); sc->sc_ctl_iface_no = id->bInterfaceNumber; - umodem_get_caps(dev, &sc->sc_cm_cap, &sc->sc_acm_cap); - /* Get the data interface no. */ - cmd = umodem_get_desc(dev, UDESC_CS_INTERFACE, UDESCSUB_CDC_CM); - if (cmd == NULL) { - printf("%s: no CM descriptor\n", devname); + sc->sc_data_iface_no = data_ifcno = + umodem_get_caps(uaa, sc->sc_ctl_iface_no, &sc->sc_cm_cap, &sc->sc_acm_cap); + + if (data_ifcno == -1) { + printf("%s: no pointer to data interface\n", devname); goto bad; } - sc->sc_data_iface_no = data_ifcno = cmd->bDataInterface; printf("%s: data interface %d, has %sCM over data, has %sbreak\n", devname, data_ifcno, @@ -550,27 +546,50 @@ ucom_status_change(&sc->sc_ucom); } -void -umodem_get_caps(usbd_device_handle dev, int *cm, int *acm) +Static int +umodem_get_caps(struct usb_attach_arg *uaa, int ctl_iface_no, int *cm, int *acm) { usb_cdc_cm_descriptor_t *cmd; usb_cdc_acm_descriptor_t *cad; + usb_cdc_union_descriptor_t *cud; + usbd_device_handle dev = uaa->device; + usbd_interface_handle iface; + int iface_no = 0; *cm = *acm = 0; - cmd = umodem_get_desc(dev, UDESC_CS_INTERFACE, UDESCSUB_CDC_CM); + cmd = umodem_get_desc(dev, NULL, UDESC_CS_INTERFACE, UDESCSUB_CDC_CM); if (cmd == NULL) { DPRINTF(("umodem_get_desc: no CM desc\n")); - return; + } else { + *cm = cmd->bmCapabilities; } - *cm = cmd->bmCapabilities; - cad = umodem_get_desc(dev, UDESC_CS_INTERFACE, UDESCSUB_CDC_ACM); + cad = umodem_get_desc(dev, NULL, UDESC_CS_INTERFACE, UDESCSUB_CDC_ACM); if (cad == NULL) { DPRINTF(("umodem_get_desc: no ACM desc\n")); - return; + } else { + *acm = cad->bmCapabilities; + } + + cud = NULL; + while ((cud = umodem_get_desc(dev, (usb_descriptor_t *)cud, + UDESC_CS_INTERFACE, UDESCSUB_CDC_UNION))) + { + iface_no = cud->bSlaveInterface[0]; + if (ctl_iface_no == -1) + break; + + iface = umodem_get_interface(uaa,iface_no); + if (ctl_iface_no == cud->bMasterInterface && + usbd_get_interface_descriptor(iface)->bNumEndpoints >= 2) + break; } - *acm = cad->bmCapabilities; + if (cud == NULL) { + DPRINTF(("umodem_get_caps: no UNION desc\n")); + } + + return cmd ? cmd->bDataInterface : cud ? iface_no : -1; } void @@ -586,6 +605,23 @@ *msr = sc->sc_msr; } +Static usbd_interface_handle +umodem_get_interface(struct usb_attach_arg *uaa, int ifcno) +{ + int i; + usb_interface_descriptor_t *id; + + for (i = 0; i < uaa->nifaces; i++) { + if (uaa->ifaces[i] != NULL) { + id = usbd_get_interface_descriptor(uaa->ifaces[i]); + if (id != NULL && id->bInterfaceNumber == ifcno) { + return uaa->ifaces[i]; + } + } + } + return NULL; +} + int umodem_param(void *addr, int portno, struct termios *t) { @@ -776,14 +812,17 @@ return (USBD_NORMAL_COMPLETION); } -void * -umodem_get_desc(usbd_device_handle dev, int type, int subtype) +static void * +umodem_get_desc(usbd_device_handle dev, usb_descriptor_t *restart, int type, int subtype) { usb_descriptor_t *desc; usb_config_descriptor_t *cd = usbd_get_config_descriptor(dev); uByte *p = (uByte *)cd; uByte *end = p + UGETW(cd->wTotalLength); + if (restart) + p = (uByte *)(restart) + restart->bLength; + while (p < end) { desc = (usb_descriptor_t *)p; if (desc->bDescriptorType == type && --YiEDa0DAkWCtVeE4-- From owner-freebsd-usb@FreeBSD.ORG Wed Jul 16 14:12:50 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3252B106571C for ; Wed, 16 Jul 2008 14:12:50 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id C4FF98FC34 for ; Wed, 16 Jul 2008 14:12:49 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=qnTVtq2nec8A:10 a=WCYNWLrA0c8A:10 a=OD3o7pw0wSodp4EcQAYA:9 a=IdBI2fe2wbF4Zekz18spyBokfqcA:4 a=LY0hPdMaydYA:10 Received: from [193.217.167.134] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.4b) with ESMTPA id 1009868322; Wed, 16 Jul 2008 16:12:48 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org, Alexey Dokuchaev Date: Wed, 16 Jul 2008 16:14:25 +0200 User-Agent: KMail/1.9.7 References: <200807161300.m6GD0A8a042062@freefall.freebsd.org> In-Reply-To: <200807161300.m6GD0A8a042062@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200807161614.26974.hselasky@c2i.net> Cc: Subject: Re: usb/117185: [umodem] [patch] Add support for UNION interface descriptor X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2008 14:12:50 -0000 On Wednesday 16 July 2008, Alexey Dokuchaev wrote: > =A0+=A0=A0=A0=A0=A0=A0if (restart) > =A0+=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0p =3D (uByte *)(restart) + = restart->bLength; Maybe you can add some extra range checks here. Remember the descriptors co= me=20 from the device itself, and might be corrupt. =2D-HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jul 16 20:49:47 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C10641065673 for ; Wed, 16 Jul 2008 20:49:47 +0000 (UTC) (envelope-from prvs=pschmehl_lists=0763be217@tx.rr.com) Received: from ip-relay-002.utdallas.edu (ip-relay-002.utdallas.edu [129.110.20.112]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB4B8FC12 for ; Wed, 16 Jul 2008 20:49:47 +0000 (UTC) (envelope-from prvs=pschmehl_lists=0763be217@tx.rr.com) X-Group: RELAYLIST X-IronPort-AV: E=Sophos;i="4.31,199,1215406800"; d="scan'208";a="3839085" Received: from smtp3.utdallas.edu ([129.110.20.110]) by ip-relay-002.utdallas.edu with ESMTP; 16 Jul 2008 15:20:15 -0500 Received: from utd65257.utdallas.edu (utd65257.utdallas.edu [129.110.3.28]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp3.utdallas.edu (Postfix) with ESMTPSA id 7323923DE3 for ; Wed, 16 Jul 2008 15:20:16 -0500 (CDT) Date: Wed, 16 Jul 2008 15:20:15 -0500 From: Paul Schmehl To: freebsd-usb@freebsd.org Message-ID: <32370E1FFF045EDCAB01F90D@utd65257.utdallas.edu> In-Reply-To: <3a142e750807160158x150f521fv696845d77d6e3c58@mail.gmail.com> References: <3632806C83D31F1A23DE0F0A@utd65257.utdallas.edu> <3a142e750807150219j5a619135x19edba16e6590c21@mail.gmail.com> <3a142e750807150223w6f264048wd9e13ae8846b593c@mail.gmail.com> <91DD32EA4C3672A46D423E44@utd65257.utdallas.edu> <3a142e750807160158x150f521fv696845d77d6e3c58@mail.gmail.com> X-Mailer: Mulberry/4.0.6 (Linux/x86) X-Munged-Reply-To: Figure it out MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: Crash when booting with umass device connected X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Paul Schmehl List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2008 20:49:47 -0000 --On Wednesday, July 16, 2008 10:58:53 +0200 "Paul B. Mahol" wrote: > On 7/15/08, Paul Schmehl wrote: >> --On Tuesday, July 15, 2008 11:23:09 +0200 "Paul B. Mahol" >> >> wrote: >>> >>> Look in Developers handbook for more info >>> /usr/share/doc/en/books/developers-handbook/index.html >>> >>> I think that textdumps are MFCed to STABLE. >>> Textdumps provide easy way for gathering backtraces. >> >> The problem is, I'm not getting dump files. (And dumpdev is set to AUTO - >> the >> default.) Savecore runs, but there's nothing to put in /var/crash. >> > > First, do you see kdb prompt when system panics? I'm sorry. I don't know what that means. > If not then you will need to recompile kernel with various debug stuff: > KDB, DDB, GDB, DEBUG=-g ... Well, there's a problem with that. I added option USB_DEBUG and recompiled the kernel, and now it doesn't crash. ??? I left the umass device plugged in and rebooted, so that I could show a peer the crash, and it zipped right on through without a hiccup. > Second do you have line with sw in /etc/fstab. Yes. pauls@utd65257# grep sw /etc/fstab /dev/ad8s1b none swap sw 0 0 > If not, > it is possible to set dump device manually. > You should have following lines in /etc/rc.conf: > > ddb_enable="YES" > ddb_config="/etc/ddb.conf" > > But this one is required only if you want that textdumps are > taken automaticaly after system crash. > Exploring ddb(4) is also usefull. Thanks for the tips. I'll read up on those. -- Paul Schmehl As if it wasn't already obvious, my opinions are my own and not those of my employer. From owner-freebsd-usb@FreeBSD.ORG Thu Jul 17 06:10:05 2008 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DD13106567F for ; Thu, 17 Jul 2008 06:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EB8338FC21 for ; Thu, 17 Jul 2008 06:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m6H6A3xY035952 for ; Thu, 17 Jul 2008 06:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m6H6A3s5035951; Thu, 17 Jul 2008 06:10:03 GMT (envelope-from gnats) Date: Thu, 17 Jul 2008 06:10:03 GMT Message-Id: <200807170610.m6H6A3s5035951@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: Alexey Dokuchaev Cc: Subject: Re: usb/117185: [umodem] [patch] Add support for UNION interface descriptor X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexey Dokuchaev List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 06:10:05 -0000 The following reply was made to PR usb/117185; it has been noted by GNATS. From: Alexey Dokuchaev To: bug-followup@FreeBSD.org, eugen@grosbein.pp.ru Cc: imp@bsdimp.com Subject: Re: usb/117185: [umodem] [patch] Add support for UNION interface descriptor Date: Thu, 17 Jul 2008 13:04:27 +0700 Apparently, GNATS does not handle attached files correctly (or maybe I have to name them differently), anyways. Here're direct links for both latest patch by Jeremie and RELENG_6 backport: http://freebsd.nsu.ru/patches/umodem-nokia.diff http://freebsd.nsu.ru/patches/umodem-nokia-releng6.diff Hans Petter Selasky raised a point about this part of the patch: > + if (restart) > + p = (uByte *)(restart) + restart->bLength; that maybe we "can add some extra range checks here. Remember the descriptors come from the device itself, and might be corrupt." From owner-freebsd-usb@FreeBSD.ORG Thu Jul 17 10:51:49 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 557FE106566B for ; Thu, 17 Jul 2008 10:51:49 +0000 (UTC) (envelope-from Luoqi.Chen@brion.com) Received: from mail2.briontech.com (mail3.brion.com [207.47.13.179]) by mx1.freebsd.org (Postfix) with ESMTP id 388618FC17 for ; Thu, 17 Jul 2008 10:51:48 +0000 (UTC) (envelope-from Luoqi.Chen@brion.com) Received: by mail2.briontech.com (Postfix, from userid 130) id DBF371FB91; Thu, 17 Jul 2008 03:21:04 -0700 (PDT) Received: from exmail.briontech.com (ex01.briontech.com [192.168.1.10]) by mail2.briontech.com (Postfix) with ESMTP id 64F481FB8A for ; Thu, 17 Jul 2008 03:21:04 -0700 (PDT) Received: from ex02.briontech.com ([10.101.100.10]) by exmail.briontech.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Jul 2008 03:21:04 -0700 Received: from ex02.briontech.com ([10.101.100.10]) by ex02.briontech.com ([10.101.100.10]) with mapi; Thu, 17 Jul 2008 03:21:04 -0700 From: Luoqi Chen To: "freebsd-usb@freebsd.org" Date: Thu, 17 Jul 2008 03:21:02 -0700 Thread-Topic: Maintainer of usb code Thread-Index: Acjn9tBkyQxrYGFEQYmDmACtT4LQDg== Message-ID: <0707E37B6D2E244C85660487B602C92217ABC04434@ex02.briontech.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 17 Jul 2008 10:21:04.0291 (UTC) FILETIME=[D180CF30:01C8E7F6] X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on extns1.briontech.com X-Spam-Level: X-Spam-Status: No, score=-105.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, TO_ADDRESS_EQ_REAL,USER_IN_WHITELIST autolearn=ham version=3.0.1 Subject: Maintainer of usb code X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 10:51:49 -0000 Hello, Do we have an official maintainer of the usb code? I came across some quite= trivial errors while debugging another problem (which turned out not to be usb rela= ted), please see the diff below. I'm not terribly familiar with the usb code, so = I'd like to seek someone to review this change, Index: ohci.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/dev/usb/ohci.c,v retrieving revision 1.170 diff -u -r1.170 ohci.c --- ohci.c 20 Jun 2007 05:10:52 -0000 1.170 +++ ohci.c 17 Jul 2008 10:07:07 -0000 @@ -815,20 +815,19 @@ ohci_controller_init(ohci_softc_t *sc) { int i; - u_int32_t s, ctl, ival, hcr, fm, per, desca; + u_int32_t ctl, ival, hcr, fm, per, desca; /* Determine in what context we are running. */ ctl =3D OREAD4(sc, OHCI_CONTROL); if (ctl & OHCI_IR) { /* SMM active, request change */ DPRINTF(("ohci_init: SMM active, request owner change\n")); - s =3D OREAD4(sc, OHCI_COMMAND_STATUS); - OWRITE4(sc, OHCI_COMMAND_STATUS, s | OHCI_OCR); + OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_OCR); for (i =3D 0; i < 100 && (ctl & OHCI_IR); i++) { usb_delay_ms(&sc->sc_bus, 1); ctl =3D OREAD4(sc, OHCI_CONTROL); } - if ((ctl & OHCI_IR) =3D=3D 0) { + if (ctl & OHCI_IR) { printf("%s: SMM does not respond, resetting\n", device_get_nameunit(sc->sc_bus.bdev)); OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); Thanks -lq From owner-freebsd-usb@FreeBSD.ORG Thu Jul 17 12:19:17 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 544F11065683 for ; Thu, 17 Jul 2008 12:19:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id B60688FC16 for ; Thu, 17 Jul 2008 12:19:16 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=ThTHBw9avVQrSAajcP8A:9 a=Vn91_RZ6VKR9sza_sTaxyroGWaoA:4 a=50e4U0PicR4A:10 Received: from [193.217.167.134] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.4b) with ESMTPA id 909259528; Thu, 17 Jul 2008 14:19:14 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Thu, 17 Jul 2008 14:20:51 +0200 User-Agent: KMail/1.9.7 References: <0707E37B6D2E244C85660487B602C92217ABC04434@ex02.briontech.com> In-Reply-To: <0707E37B6D2E244C85660487B602C92217ABC04434@ex02.briontech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200807171420.52900.hselasky@c2i.net> Cc: Luoqi Chen Subject: Re: Maintainer of usb code X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 12:19:17 -0000 Hi Luoqi, =46rom what version of FreeBSD did you fetch your ohci.c ? =2D-HPS On Thursday 17 July 2008, Luoqi Chen wrote: > Hello, > > Do we have an official maintainer of the usb code? I came across some qui= te > trivial errors while debugging another problem (which turned out not to be > usb related), please see the diff below. I'm not terribly familiar with t= he > usb code, so I'd like to seek someone to review this change, > > Index: ohci.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/sys/dev/usb/ohci.c,v > retrieving revision 1.170 > diff -u -r1.170 ohci.c > --- ohci.c 20 Jun 2007 05:10:52 -0000 1.170 > +++ ohci.c 17 Jul 2008 10:07:07 -0000 > @@ -815,20 +815,19 @@ > ohci_controller_init(ohci_softc_t *sc) > { > int i; > - u_int32_t s, ctl, ival, hcr, fm, per, desca; > + u_int32_t ctl, ival, hcr, fm, per, desca; > > /* Determine in what context we are running. */ > ctl =3D OREAD4(sc, OHCI_CONTROL); > if (ctl & OHCI_IR) { > /* SMM active, request change */ > DPRINTF(("ohci_init: SMM active, request owner change\n")= ); > - s =3D OREAD4(sc, OHCI_COMMAND_STATUS); > - OWRITE4(sc, OHCI_COMMAND_STATUS, s | OHCI_OCR); > + OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_OCR); > for (i =3D 0; i < 100 && (ctl & OHCI_IR); i++) { > usb_delay_ms(&sc->sc_bus, 1); > ctl =3D OREAD4(sc, OHCI_CONTROL); > } > - if ((ctl & OHCI_IR) =3D=3D 0) { > + if (ctl & OHCI_IR) { > printf("%s: SMM does not respond, resetting\n", > device_get_nameunit(sc->sc_bus.bdev)); > OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); > > Thanks > -lq From owner-freebsd-usb@FreeBSD.ORG Thu Jul 17 17:13:55 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 804F21065678 for ; Thu, 17 Jul 2008 17:13:55 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id DF0A38FC1A for ; Thu, 17 Jul 2008 17:13:54 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=fmz6DLpbJQzOEhVCPt8A:9 a=PS8LhMUJt6fGw2_VtasA:7 a=fCIabgIf31BJJcT4B65siuDlf4gA:4 a=9aOQ2cSd83gA:10 a=SV7veod9ZcQA:10 a=gi0PWCVxevcA:10 Received: from [193.217.167.134] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.4b) with ESMTPA id 909573116; Thu, 17 Jul 2008 19:13:52 +0200 From: Hans Petter Selasky To: Luoqi Chen Date: Thu, 17 Jul 2008 19:15:29 +0200 User-Agent: KMail/1.9.7 References: <0707E37B6D2E244C85660487B602C92217ABC04434@ex02.briontech.com> <200807171420.52900.hselasky@c2i.net> <0707E37B6D2E244C85660487B602C92217ABC04449@ex02.briontech.com> In-Reply-To: <0707E37B6D2E244C85660487B602C92217ABC04449@ex02.briontech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200807171915.31598.hselasky@c2i.net> Cc: "freebsd-usb@freebsd.org" Subject: Re: Maintainer of usb code X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 17:13:55 -0000 I think your patch is Ok. It should look similar to this: /* Determine in what context we are running. */ ctl = OREAD4(sc, OHCI_CONTROL); if (ctl & OHCI_IR) { /* SMM active, request change */ DPRINTF(0, "SMM active, request owner change\n"); s = OREAD4(sc, OHCI_COMMAND_STATUS); OWRITE4(sc, OHCI_COMMAND_STATUS, s | OHCI_OCR); for (i = 0; (i < 100) && (ctl & OHCI_IR); i++) { DELAY(1000 * 1); ctl = OREAD4(sc, OHCI_CONTROL); } if ((ctl & OHCI_IR) == 0) { device_printf(sc->sc_bus.bdev, "SMM does not respond, resetting\n"); OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); goto reset; } --HPS On Thursday 17 July 2008, Luoqi Chen wrote: > Hans, > > It probably doesn't matter, this part of code hasn't been touched > for years. I did a quick check on the latest svn version, it looked > the same. > > -lq > > > -----Original Message----- > > From: Hans Petter Selasky [mailto:hselasky@c2i.net] > > Sent: Thursday, July 17, 2008 5:21 AM > > To: freebsd-usb@freebsd.org > > Cc: Luoqi Chen > > Subject: Re: Maintainer of usb code > > > > Hi Luoqi, > > > > From what version of FreeBSD did you fetch your ohci.c ? > > > > --HPS > > > > On Thursday 17 July 2008, Luoqi Chen wrote: > > > Hello, > > > > > > Do we have an official maintainer of the usb code? I came > > > > across some quite > > > > > trivial errors while debugging another problem (which > > > > turned out not to be > > > > > usb related), please see the diff below. I'm not terribly > > > > familiar with the > > > > > usb code, so I'd like to seek someone to review this change, > > > > > > Index: ohci.c > > > =================================================================== > > > RCS file: /home/ncvs/src/sys/dev/usb/ohci.c,v > > > retrieving revision 1.170 > > > diff -u -r1.170 ohci.c > > > --- ohci.c 20 Jun 2007 05:10:52 -0000 1.170 > > > +++ ohci.c 17 Jul 2008 10:07:07 -0000 > > > @@ -815,20 +815,19 @@ > > > ohci_controller_init(ohci_softc_t *sc) > > > { > > > int i; > > > - u_int32_t s, ctl, ival, hcr, fm, per, desca; > > > + u_int32_t ctl, ival, hcr, fm, per, desca; > > > > > > /* Determine in what context we are running. */ > > > ctl = OREAD4(sc, OHCI_CONTROL); > > > if (ctl & OHCI_IR) { > > > /* SMM active, request change */ > > > DPRINTF(("ohci_init: SMM active, request > > > > owner change\n")); > > > > > - s = OREAD4(sc, OHCI_COMMAND_STATUS); > > > - OWRITE4(sc, OHCI_COMMAND_STATUS, s | OHCI_OCR); > > > + OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_OCR); > > > for (i = 0; i < 100 && (ctl & OHCI_IR); i++) { > > > usb_delay_ms(&sc->sc_bus, 1); > > > ctl = OREAD4(sc, OHCI_CONTROL); > > > } > > > - if ((ctl & OHCI_IR) == 0) { > > > + if (ctl & OHCI_IR) { > > > printf("%s: SMM does not respond, > > > > resetting\n", > > > > device_get_nameunit(sc->sc_bus.bdev)); > > > > > OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); > > > > > > Thanks > > > -lq From owner-freebsd-usb@FreeBSD.ORG Thu Jul 17 17:31:49 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F853106566C for ; Thu, 17 Jul 2008 17:31:49 +0000 (UTC) (envelope-from Luoqi.Chen@brion.com) Received: from mail2.briontech.com (mail3.brion.com [207.47.13.179]) by mx1.freebsd.org (Postfix) with ESMTP id 102608FC23 for ; Thu, 17 Jul 2008 17:31:49 +0000 (UTC) (envelope-from Luoqi.Chen@brion.com) Received: by mail2.briontech.com (Postfix, from userid 130) id B1B2D1FB90; Thu, 17 Jul 2008 10:10:16 -0700 (PDT) Received: from exmail.briontech.com (ex01.briontech.com [192.168.1.10]) by mail2.briontech.com (Postfix) with ESMTP id 235C91FB8A; Thu, 17 Jul 2008 10:10:16 -0700 (PDT) Received: from ex02.briontech.com ([10.101.100.10]) by exmail.briontech.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 17 Jul 2008 10:10:16 -0700 Received: from ex02.briontech.com ([10.101.100.10]) by ex02.briontech.com ([10.101.100.10]) with mapi; Thu, 17 Jul 2008 10:10:16 -0700 From: Luoqi Chen To: Hans Petter Selasky , "freebsd-usb@freebsd.org" Date: Thu, 17 Jul 2008 10:10:14 -0700 Thread-Topic: Maintainer of usb code Thread-Index: AcjoB1am4kKluXrAQNGl/KE5Wq7stgAKC7GA Message-ID: <0707E37B6D2E244C85660487B602C92217ABC04449@ex02.briontech.com> References: <0707E37B6D2E244C85660487B602C92217ABC04434@ex02.briontech.com> <200807171420.52900.hselasky@c2i.net> In-Reply-To: <200807171420.52900.hselasky@c2i.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 17 Jul 2008 17:10:16.0045 (UTC) FILETIME=[FB7D29D0:01C8E82F] X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on extns1.briontech.com X-Spam-Level: X-Spam-Status: No, score=-105.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, USER_IN_WHITELIST autolearn=ham version=3.0.1 Cc: Subject: RE: Maintainer of usb code X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jul 2008 17:31:49 -0000 Hans, It probably doesn't matter, this part of code hasn't been touched for years. I did a quick check on the latest svn version, it looked the same. -lq > -----Original Message----- > From: Hans Petter Selasky [mailto:hselasky@c2i.net] > Sent: Thursday, July 17, 2008 5:21 AM > To: freebsd-usb@freebsd.org > Cc: Luoqi Chen > Subject: Re: Maintainer of usb code > > Hi Luoqi, > > From what version of FreeBSD did you fetch your ohci.c ? > > --HPS > > On Thursday 17 July 2008, Luoqi Chen wrote: > > Hello, > > > > Do we have an official maintainer of the usb code? I came > across some quite > > trivial errors while debugging another problem (which > turned out not to be > > usb related), please see the diff below. I'm not terribly > familiar with the > > usb code, so I'd like to seek someone to review this change, > > > > Index: ohci.c > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > RCS file: /home/ncvs/src/sys/dev/usb/ohci.c,v > > retrieving revision 1.170 > > diff -u -r1.170 ohci.c > > --- ohci.c 20 Jun 2007 05:10:52 -0000 1.170 > > +++ ohci.c 17 Jul 2008 10:07:07 -0000 > > @@ -815,20 +815,19 @@ > > ohci_controller_init(ohci_softc_t *sc) > > { > > int i; > > - u_int32_t s, ctl, ival, hcr, fm, per, desca; > > + u_int32_t ctl, ival, hcr, fm, per, desca; > > > > /* Determine in what context we are running. */ > > ctl =3D OREAD4(sc, OHCI_CONTROL); > > if (ctl & OHCI_IR) { > > /* SMM active, request change */ > > DPRINTF(("ohci_init: SMM active, request > owner change\n")); > > - s =3D OREAD4(sc, OHCI_COMMAND_STATUS); > > - OWRITE4(sc, OHCI_COMMAND_STATUS, s | OHCI_OCR); > > + OWRITE4(sc, OHCI_COMMAND_STATUS, OHCI_OCR); > > for (i =3D 0; i < 100 && (ctl & OHCI_IR); i++) { > > usb_delay_ms(&sc->sc_bus, 1); > > ctl =3D OREAD4(sc, OHCI_CONTROL); > > } > > - if ((ctl & OHCI_IR) =3D=3D 0) { > > + if (ctl & OHCI_IR) { > > printf("%s: SMM does not respond, > resetting\n", > > > device_get_nameunit(sc->sc_bus.bdev)); > > OWRITE4(sc, OHCI_CONTROL, OHCI_HCFS_RESET); > > > > Thanks > > -lq > From owner-freebsd-usb@FreeBSD.ORG Fri Jul 18 05:44:42 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DB601065670 for ; Fri, 18 Jul 2008 05:44:42 +0000 (UTC) (envelope-from markir@paradise.net.nz) Received: from smtp4.clear.net.nz (smtp4.clear.net.nz [203.97.37.64]) by mx1.freebsd.org (Postfix) with ESMTP id 530B98FC08 for ; Fri, 18 Jul 2008 05:44:42 +0000 (UTC) (envelope-from markir@paradise.net.nz) Received: from zmori.markir.net (121-73-160-30.dsl.telstraclear.net [121.73.160.30]) by smtp4.clear.net.nz (CLEAR Net Mail) with ESMTP id <0K46001X7SJ0IA30@smtp4.clear.net.nz> for freebsd-usb@freebsd.org; Fri, 18 Jul 2008 17:28:13 +1200 (NZST) Date: Fri, 18 Jul 2008 17:28:10 +1200 From: Mark Kirkwood In-reply-to: <20080421.060554.1621851987.imp@bsdimp.com> To: "M. Warner Losh" Message-id: <488029EA.1010106@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: <200804211030.m3LAU3Uo091913@freefall.freebsd.org> <20080421.060554.1621851987.imp@bsdimp.com> User-Agent: Thunderbird 2.0.0.14 (X11/20080601) Cc: freebsd-usb@freebsd.org Subject: Re: usb/78984: [umass] [patch] Creative MUVO umass failure X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2008 05:44:42 -0000 M. Warner Losh wrote: > In message: <200804211030.m3LAU3Uo091913@freefall.freebsd.org> > Mark Kirkwood writes: > : The following reply was made to PR usb/78984; it has been noted by GNATS. > : > : From: Mark Kirkwood > : To: bug-followup@FreeBSD.org, bofh@m-wesemeyer.de > : Cc: > : Subject: Re: usb/78984: [umass] [patch] Creative MUVO umass failure > : Date: Mon, 21 Apr 2008 22:11:17 +1200 > : > : I ran into this with 7-STABLE and a 128MB creatiev muvo. This slightly > : updated patch seems to fix. > : ================================================================================ > : *** sys/dev/usb/umass.c.orig Mon Apr 21 18:17:08 2008 > : --- sys/dev/usb/umass.c Mon Apr 21 18:20:31 2008 > : *************** > : *** 374,379 **** > : --- 374,383 ---- > : UMASS_PROTO_SCSI | UMASS_PROTO_BBB, > : FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE > : }, > : + { USB_VENDOR_CREATIVE, USB_PRODUCT_CREATIVE_NOMAD, RID_WILDCARD, > : + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, > : + READ_CAPACITY_OFFBY1 > : + }, > : { USB_VENDOR_DESKNOTE, USB_PRODUCT_DESKNOTE_UCR_61S2B, RID_WILDCARD, > : UMASS_PROTO_SCSI | UMASS_PROTO_BBB, > : NO_QUIRKS > : ================================================================================ > > Are all Creative nomad's off by one? In linux, this quirk is used > extremely rarely, and i don't think I see the nomad on the lists... > > > Good point, the wildcard for all creative nomads is wrong (I've corrected the patch in the pr) - Interestingly I had the opportunity to try this device out in Linux the other day (Ubuntu 8.0.4) I got the error stack below...seems Linux needs the quirk for this guy as well! -------------------------------------Ubuntu dmesg------------------------------------------- [ 11.975774] usb 2-1: new full speed USB device using uhci_hcd and address 2 [ 11.996611] usb 2-1: configuration #1 chosen from 1 choice [ 12.199422] usbcore: registered new interface driver libusual [ 12.235825] Initializing USB Mass Storage driver... [ 12.237512] scsi2 : SCSI emulation for USB Mass Storage devices [ 12.239161] usbcore: registered new interface driver usb-storage [ 12.239171] USB Mass Storage support registered. [ 12.239333] usb-storage: device found at 2 [ 12.239339] usb-storage: waiting for device to settle before scanning [ 14.930721] usb-storage: device scan complete [ 14.933726] scsi 2:0:0:0: Direct-Access CREATIVE NOMAD_MUVO 0001 PQ: 0 ANSI: 4 [ 14.957715] sd 2:0:0:0: [sdb] 256001 512-byte hardware sectors (131 MB) [ 14.960641] sd 2:0:0:0: [sdb] Write Protect is off [ 14.960650] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 04 [ 14.960656] sd 2:0:0:0: [sdb] Assuming drive cache: write through [ 14.978623] sd 2:0:0:0: [sdb] 256001 512-byte hardware sectors (131 MB) [ 14.981610] sd 2:0:0:0: [sdb] Write Protect is off [ 14.981619] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 04 [ 14.981625] sd 2:0:0:0: [sdb] Assuming drive cache: write through [ 14.981635] sdb: sdb1 [ 14.988768] sd 2:0:0:0: [sdb] Attached SCSI removable disk [ 14.988857] sd 2:0:0:0: Attached scsi generic sg2 type 0 [ 15.401063] end_request: I/O error, dev sdb, sector 256000 [ 15.401076] Buffer I/O error on device sdb, logical block 256000