Re: usb/164090: commit references a PR
The following reply was made to PR usb/164090; it has been noted by GNATS. From: dfil...@freebsd.org (dfilter service) To: bug-follo...@freebsd.org Cc: Subject: Re: usb/164090: commit references a PR Date: Mon, 16 Jan 2012 08:13:39 + (UTC) Author: hselasky Date: Mon Jan 16 08:13:25 2012 New Revision: 230204 URL: http://svn.freebsd.org/changeset/base/230204 Log: Export information about USB serial port unit and port numbers directly via the sysctl interface. Submitted by:Mykhaylo Yehorov PR: usb/164090 MFC after: 1 week Modified: head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/usb_serial.h Modified: head/sys/dev/usb/serial/usb_serial.c == --- head/sys/dev/usb/serial/usb_serial.c Mon Jan 16 07:02:59 2012 (r230203) +++ head/sys/dev/usb/serial/usb_serial.c Mon Jan 16 08:13:25 2012 (r230204) @@ -292,6 +292,16 @@ ucom_detach(struct ucom_super_softc *ssc if (ssc-sc_subunits == 0) return; /* not initialized */ + if (ssc-sc_sysctl_ttyunit != NULL) { + sysctl_remove_oid(ssc-sc_sysctl_ttyunit, 1, 0); + ssc-sc_sysctl_ttyunit = NULL; + } + + if (ssc-sc_sysctl_ttyports != NULL) { + sysctl_remove_oid(ssc-sc_sysctl_ttyports, 1, 0); + ssc-sc_sysctl_ttyports = NULL; + } + usb_proc_drain(ssc-sc_tq); for (subunit = 0; subunit ssc-sc_subunits; subunit++) { @@ -420,19 +430,36 @@ ucom_detach_tty(struct ucom_softc *sc) void ucom_set_pnpinfo_usb(struct ucom_super_softc *ssc, device_t dev) { -char buf[64]; -uint8_t iface_index; -struct usb_attach_arg *uaa; - -snprintf(buf, sizeof(buf), ttyname=%s%d ttyports=%d, - UCOM_TTY_PREFIX, ssc-sc_unit, ssc-sc_subunits); - -/* Store the PNP info in the first interface for the dev */ -uaa = device_get_ivars(dev); -iface_index = uaa-info.bIfaceIndex; + char buf[64]; + uint8_t iface_index; + struct usb_attach_arg *uaa; + + snprintf(buf, sizeof(buf), ttyname=%s%d ttyports=%d, + UCOM_TTY_PREFIX, ssc-sc_unit, ssc-sc_subunits); + + /* Store the PNP info in the first interface for the device */ + uaa = device_get_ivars(dev); + iface_index = uaa-info.bIfaceIndex; -if (usbd_set_pnpinfo(uaa-device, iface_index, buf) != 0) - device_printf(dev, Could not set PNP info\n); + if (usbd_set_pnpinfo(uaa-device, iface_index, buf) != 0) + device_printf(dev, Could not set PNP info\n); + + /* + * The following information is also replicated in the pnp-info + * string which is registered above: + */ + if (ssc-sc_sysctl_ttyunit == NULL) { + ssc-sc_sysctl_ttyunit = SYSCTL_ADD_INT(NULL, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, ttyunit, CTLFLAG_RD, + NULL, ssc-sc_unit, TTY unit number); + } + if (ssc-sc_sysctl_ttyports == NULL) { + ssc-sc_sysctl_ttyports = SYSCTL_ADD_INT(NULL, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, ttyports, CTLFLAG_RD, + NULL, ssc-sc_subunits, Number of ports); + } } static void Modified: head/sys/dev/usb/serial/usb_serial.h == --- head/sys/dev/usb/serial/usb_serial.h Mon Jan 16 07:02:59 2012 (r230203) +++ head/sys/dev/usb/serial/usb_serial.h Mon Jan 16 08:13:25 2012 (r230204) @@ -70,6 +70,7 @@ #include sys/tty.h #include sys/serial.h #include sys/fcntl.h +#include sys/sysctl.h /* Module interface related macros */ #define UCOM_MODVER 1 @@ -132,8 +133,10 @@ struct ucom_param_task { struct ucom_super_softc { struct usb_process sc_tq; - uint32_t sc_unit; - uint32_t sc_subunits; + int sc_unit; + int sc_subunits; + struct sysctl_oid *sc_sysctl_ttyunit; + struct sysctl_oid *sc_sysctl_ttyports; }; struct ucom_softc { ___ svn-src-...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Re: usb/164090: commit references a PR
The following reply was made to PR usb/164090; it has been noted by GNATS. From: dfil...@freebsd.org (dfilter service) To: bug-follo...@freebsd.org Cc: Subject: Re: usb/164090: commit references a PR Date: Mon, 16 Jan 2012 10:43:00 + (UTC) Author: hselasky Date: Mon Jan 16 10:42:43 2012 New Revision: 230209 URL: http://svn.freebsd.org/changeset/base/230209 Log: Export ttyname instead of ttyunit via the sysctl interface. Submitted by:Mykhaylo Yehorov PR: usb/164090 MFC after: 1 week Modified: head/sys/dev/usb/serial/usb_serial.c head/sys/dev/usb/serial/usb_serial.h Modified: head/sys/dev/usb/serial/usb_serial.c == --- head/sys/dev/usb/serial/usb_serial.c Mon Jan 16 10:25:22 2012 (r230208) +++ head/sys/dev/usb/serial/usb_serial.c Mon Jan 16 10:42:43 2012 (r230209) @@ -248,10 +248,16 @@ ucom_attach(struct ucom_super_softc *ssc return (EINVAL); } + /* allocate a uniq unit number */ ssc-sc_unit = ucom_unit_alloc(); if (ssc-sc_unit == -1) return (ENOMEM); + /* generate TTY name string */ + snprintf(ssc-sc_ttyname, sizeof(ssc-sc_ttyname), + UCOM_TTY_PREFIX %d, ssc-sc_unit); + + /* create USB request handling process */ error = usb_proc_create(ssc-sc_tq, mtx, ucom, USB_PRI_MED); if (error) { ucom_unit_free(ssc-sc_unit); @@ -292,9 +298,9 @@ ucom_detach(struct ucom_super_softc *ssc if (ssc-sc_subunits == 0) return; /* not initialized */ - if (ssc-sc_sysctl_ttyunit != NULL) { - sysctl_remove_oid(ssc-sc_sysctl_ttyunit, 1, 0); - ssc-sc_sysctl_ttyunit = NULL; + if (ssc-sc_sysctl_ttyname != NULL) { + sysctl_remove_oid(ssc-sc_sysctl_ttyname, 1, 0); + ssc-sc_sysctl_ttyname = NULL; } if (ssc-sc_sysctl_ttyports != NULL) { @@ -434,8 +440,8 @@ ucom_set_pnpinfo_usb(struct ucom_super_s uint8_t iface_index; struct usb_attach_arg *uaa; - snprintf(buf, sizeof(buf), ttyname=%s%d ttyports=%d, - UCOM_TTY_PREFIX, ssc-sc_unit, ssc-sc_subunits); + snprintf(buf, sizeof(buf), ttyname= UCOM_TTY_PREFIX + %d ttyports=%d, ssc-sc_unit, ssc-sc_subunits); /* Store the PNP info in the first interface for the device */ uaa = device_get_ivars(dev); @@ -445,14 +451,14 @@ ucom_set_pnpinfo_usb(struct ucom_super_s device_printf(dev, Could not set PNP info\n); /* - * The following information is also replicated in the pnp-info + * The following information is also replicated in the PNP-info * string which is registered above: */ - if (ssc-sc_sysctl_ttyunit == NULL) { - ssc-sc_sysctl_ttyunit = SYSCTL_ADD_INT(NULL, + if (ssc-sc_sysctl_ttyname == NULL) { + ssc-sc_sysctl_ttyname = SYSCTL_ADD_STRING(NULL, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, ttyunit, CTLFLAG_RD, - NULL, ssc-sc_unit, TTY unit number); + OID_AUTO, ttyname, CTLFLAG_RD, ssc-sc_ttyname, 0, + TTY device basename); } if (ssc-sc_sysctl_ttyports == NULL) { ssc-sc_sysctl_ttyports = SYSCTL_ADD_INT(NULL, Modified: head/sys/dev/usb/serial/usb_serial.h == --- head/sys/dev/usb/serial/usb_serial.h Mon Jan 16 10:25:22 2012 (r230208) +++ head/sys/dev/usb/serial/usb_serial.h Mon Jan 16 10:42:43 2012 (r230209) @@ -135,8 +135,9 @@ struct ucom_super_softc { struct usb_process sc_tq; int sc_unit; int sc_subunits; - struct sysctl_oid *sc_sysctl_ttyunit; + struct sysctl_oid *sc_sysctl_ttyname; struct sysctl_oid *sc_sysctl_ttyports; + char sc_ttyname[16]; }; struct ucom_softc { ___ svn-src-...@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org ___ freebsd-usb@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-usb To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org
Current problem reports assigned to freebsd-usb@FreeBSD.org
Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description o usb/164090 usb[umodem] [patch] Add sysctl with ucom unit number o usb/164058 usbLexar 8GB USB flash drive doesn't work by default o usb/163732 usbPatch for BUFFALO WLI-UC-GNM (USB WLAN) o usb/163328 usbHardware o kern/163091 usb[panic] Fatal trap 12: page fault while in kernel mode o usb/162712 usbadded device on if_run. o usb/162306 usbusb devices cant get address asignation, no memories, o usb/162054 usbusbdump just hangs on 9.0-RC1 o usb/161793 usbpoor EHCI usb2 i/o performance o usb/160911 usbThe usb flash drive JetFlash Transcend 16GB 1100 doesn o usb/160436 usbucom wedges machine on parity error ? o usb/160299 usbMicroSDHC-to-USB adapters do not work in FreeBSD 8.x o usb/160192 usb[install] Installation from USB-Stick doesn't find the o usb/159274 usbUSB 3.0 Etron EJ168A does not work. f usb/159191 usb[fusefs-ntfs] write on fusefs-ntfs mounted partition r o usb/157376 usbLaCie USB disk not recognized o usb/157074 usb[boot] [usb8] vfs_mountroot_ask is called when no usb o usb/156898 usb[keyboard] usb keyboard does not work while boot (ps2 o usb/156735 usbNeed Quirk for Goflex USB Disk Drives o usb/156725 usbUSB stack stall cause complete system input loss o usb/156596 usb[ehci] Extremely high interrupt rate on ehci/uhci IRQ1 o usb/156000 usbrum(4) Fatal trap 18: integer divide fault while in ke o usb/155996 usbNanoBSD not booted as Disk o usb/155784 usbProblem with Transcend StoreJet 25M3 (2AJ1) on Asus M2 o usb/154710 usb[ugen] Conexant USB Modem is not working in 8.x. In 7. o usb/154506 usb[umass] Copying dir with large files makes FreeBSD loa o usb/154192 usb[umass] In Garmin Oregon GPS, only the first umass dev o i386/153851 usb[keyboard] keyboard issues on new Intel Mother boards. o usb/153703 usb[keyboard] My USB keyboard can not be used in 8-STABLE o usb/153609 usb[zyd] [panic] kernel: Fatal trap 12: page fault while o usb/153149 usb[umass] USB stick quirk regression [regression] o usb/152075 usb[usb8] [ehci] [request] Add quirk for CS5536 USB o usb/150892 usb[zyd] Whenever network contacted in any shape, way or o usb/150189 usb[run] [usb8] [patch] if_run appears to corrupt IP traf p usb/149934 usb[patch] [usb8] Transcend JetFlash V85 poor performance p usb/149900 usb[uftdi] [patch] FreeBSD 8.1 uftdi patch to support usb p usb/149764 usb[u3g] [patch] usbdevs update: Huawei K3765 3G modem o usb/149283 usb[uftdi] avrdude unable to talk to Arduino board (via u o usb/149162 usb[ural] ASUS WL-167g doesn't work in 8.1 (continue of 1 s usb/148702 usb[usb8] [request] IO DATA USB-RSAQ5 support on FreeBSD- o usb/148080 usbusbconfig(8) sometimes does not turn off the device o usb/147516 usb[umass] [usb67] kernel unable to deal with Olympus USB o i386/147475 usb[install] FreeBSD 8.x does not install on ASUS K8N4-E p usb/146871 usb[usbdevs] [usb8] [patch] provide descriprive string fo o usb/146840 usb[hang] FreeBSD 7.2 / 7.3 / 8.0 hang at startup after e o usb/146153 usb[axe] [usb8] Hosts in network doesn't receive any pack f usb/146054 usb[urtw] [usb8] urtw driver potentially out of date f usb/145513 usb[usb8] New USB stack: no new devices after forced usb p usb/145455 usb[usb8] [patch] USB debug support cannot be disabled o usb/145415 usb[umass] [usb8] USB card reader does not create slices a usb/145184 usbGENERIC can't mount root from USB on Asus EEE o usb/145165 usb[keyboard] [usb8] ukbd_set_leds_callback: error=USB_ER f kern/144938 usb[keyboard] [boot] Boot Failure with Apple (MB869LL/A) o usb/144387 usb[run] [panic] if_run panic o usb/144043 usb[umass] [usb8] USB DLT tape drive throws random errors a usb/143790 usb[boot] [cam] can not boot from usb hdd f usb/143620 usb[cdce] [usb8] the module if_cdce doesn't support my Op f usb/143294 usb[usb8] copying process stops at some time (10 - 50 sec o usb/143286 usb[ukbd] [usb8] [boot] boot failures on RELENG_8 system p usb/143186 usb[usbdevs] [usb8] [patch] add USB device IDs for Google a usb/143139 usb[umass] [usb8] [patch] Quirk for Century