Re: usb/141777: [usb8] [rum] [patch] Support usbdevs / rum(4) for Buffalo WLI-UC-G
Old Synopsis: [rum] [patch] Support usbdevs / rum(4) for Buffalo WLI-UC-G New Synopsis: [usb8] [rum] [patch] Support usbdevs / rum(4) for Buffalo WLI-UC-G Responsible-Changed-From-To: freebsd-net->freebsd-usb Responsible-Changed-By: arundel Responsible-Changed-When: Sun Nov 14 01:29:21 UTC 2010 Responsible-Changed-Why: Over to maintainer(s). This looks more usb related than anything else. http://www.freebsd.org/cgi/query-pr.cgi?pr=141777 ___ 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/138570: [usb67] [panic] USB mass device panics current 7.2-STABLE
On Sat Nov 13 10, Jens Rehsack wrote: > 2010/11/13 : > > Old Synopsis: [usb] [panic] USB mass device panics current 7.2-STABLE > > New Synopsis: [usb67] [panic] USB mass device panics current 7.2-STABLE > > > > State-Changed-From-To: open->feedback > > State-Changed-By: arundel > > State-Changed-When: Sat Nov 13 14:33:29 UTC 2010 > > State-Changed-Why: > > Does this panic also occur with a more recent stable snapshot? > > I'm on the road for jobs and can't test again (to busy and no time to > restore the machine in case of a panic destroys something). > I moved most tasks away from the FSBD machine meanwhile, > from my point of view this PR can be closed (no feedback from > reporter), because I can confirm that I don't have time to take > care the next 6 month. thanks for your help. i've suspended the PR. i'll close it once 7.x goes EoL, since i don't think this issue occurs under the new USb stack (FreeBSD 8.x). cheers. alex > > > Have you tried the device under FreBSD 8.x? > > No - but on NetBSD 5-CURRENT and Ubuntu 10.04, and it works > fine there. > > Best regards, > Jens > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=138570 > > -- a13x ___ 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/138570: [usb67] [panic] USB mass device panics current 7.2-STABLE
Synopsis: [usb67] [panic] USB mass device panics current 7.2-STABLE State-Changed-From-To: feedback->suspended State-Changed-By: arundel State-Changed-When: Sun Nov 14 00:00:40 UTC 2010 State-Changed-Why: Originator cannot help with this PR. Changes are very good this issue was fixed with the introduction of the new USB stack (FreeBSD 8.x), but whether the panic still occurs under 7.x is unclear. http://www.freebsd.org/cgi/query-pr.cgi?pr=138570 ___ 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/138570: [usb67] [panic] USB mass device panics current 7.2-STABLE
2010/11/13 : > Old Synopsis: [usb] [panic] USB mass device panics current 7.2-STABLE > New Synopsis: [usb67] [panic] USB mass device panics current 7.2-STABLE > > State-Changed-From-To: open->feedback > State-Changed-By: arundel > State-Changed-When: Sat Nov 13 14:33:29 UTC 2010 > State-Changed-Why: > Does this panic also occur with a more recent stable snapshot? I'm on the road for jobs and can't test again (to busy and no time to restore the machine in case of a panic destroys something). I moved most tasks away from the FSBD machine meanwhile, from my point of view this PR can be closed (no feedback from reporter), because I can confirm that I don't have time to take care the next 6 month. > Have you tried the device under FreBSD 8.x? No - but on NetBSD 5-CURRENT and Ubuntu 10.04, and it works fine there. Best regards, Jens > http://www.freebsd.org/cgi/query-pr.cgi?pr=138570 > ___ 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: uplcom(4) does not work on cuaU0 ?
On Saturday 13 November 2010 21:28:27 Patrick Lamaiziere wrote: > Well I feel stupid Ok, no problem. We all make some mistakes ;-) --HPS ___ 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: uplcom(4) does not work on cuaU0 ?
Le Sat, 13 Nov 2010 12:41:24 +0100, Hans Petter Selasky a écrit : > Please try the attached patch. Others having UPLCOM devices should > try this patch aswell and see if their device is still working. Well I feel stupid because the problem was a ucom console enabled in my loader.conf : hw.usb.ucom.cons_unit="0" hw.usb.ucom.cons_baud="9600" Without this uplcom works perfectly (not sure why this was not a problem with my u3g key). May be we should check that cuaUx is used by a ucom console and return EBUSY in this case? My apologies and thanks a lot for your support. Regards. (forget to cc freebsd-usb@) ___ 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: uplcom(4) does not work on cuaU0 ?
Le Sat, 13 Nov 2010 12:41:24 +0100, Hans Petter Selasky a écrit : > Please try the attached patch. Others having UPLCOM devices should > try this patch aswell and see if their device is still working. Well I feel stupid because the problem was a ucom console enabled in my loader.conf : hw.usb.ucom.cons_unit="0" hw.usb.ucom.cons_baud="9600" Without this uplcom works perfectly (not sure why this was not a problem with my u3g key). May be we should check that cuaUx is used by a ucom console and return EBUSY in this case? My apologies and thanks a lot for your support. Regards. ___ 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/145455: [usb8] [patch] USB debug support cannot be disabled
Synopsis: [usb8] [patch] USB debug support cannot be disabled State-Changed-From-To: open->patched State-Changed-By: arundel State-Changed-When: Sat Nov 13 15:18:43 UTC 2010 State-Changed-Why: This was fixed in HEAD(r207077) by a simple 3 line change in usb_freebsd.h. http://www.freebsd.org/cgi/query-pr.cgi?pr=145455 ___ 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/142276: [umass] [usb8] Cache Synchronization Error with Olympus FE210 Camera
The following reply was made to PR usb/142276; it has been noted by GNATS. From: Alexander Best To: bug-follo...@freebsd.org Cc: Subject: Re: usb/142276: [umass] [usb8] Cache Synchronization Error with Olympus FE210 Camera Date: Sat, 13 Nov 2010 15:02:30 + could you try the following quirk with usbconfig: UQ_MSC_NO_SYNC_CACHE cheers. alex -- a13x ___ 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 camera not detected by 8.1, was working in 7
On Saturday 13 November 2010 16:02:05 Alexander Churanov wrote: > Folks, > > I've found that Linux kernel has specific settings right for my device: > > /drivers/usb/storage/unusual_devs.h, v. 2.6.36 > > 557 UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x0450, > 558 "Sony", > 559 "DSC-S30/S70/S75/505V/F505/F707/F717/P8", > 560 US_SC_SCSI, US_PR_DEVICE, NULL, > 561 US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | > US_FL_NO_WP_DETECT ), > 562 > 563 /* Submitted by Lars Jacob > 564 * This entry is needed because the device reports Sub=ff */ > 565 UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0610, > 566 "Sony", > 567 "DSC-T1/T5/H5", > 568 US_SC_8070, US_PR_DEVICE, NULL, > 569 US_FL_SINGLE_LUN ), > > Is it possible to tune my FreeBSD like that? > Yes, Have a look at /sys/dev/usb/quirk/usb_quirk.c --HPS ___ 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 camera not detected by 8.1, was working in 7
Folks, I've found that Linux kernel has specific settings right for my device: /drivers/usb/storage/unusual_devs.h, v. 2.6.36 557 UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x0450, 558 "Sony", 559 "DSC-S30/S70/S75/505V/F505/F707/F717/P8", 560 US_SC_SCSI, US_PR_DEVICE, NULL, 561 US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | US_FL_NO_WP_DETECT ), 562 563 /* Submitted by Lars Jacob 564 * This entry is needed because the device reports Sub=ff */ 565 UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0610, 566 "Sony", 567 "DSC-T1/T5/H5", 568 US_SC_8070, US_PR_DEVICE, NULL, 569 US_FL_SINGLE_LUN ), Is it possible to tune my FreeBSD like that? Alexander Churanov ___ 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/143186: [usbdevs] [usb8] [patch] add USB device IDs for Google Nexus One and for RealTek Card Reader
Synopsis: [usbdevs] [usb8] [patch] add USB device IDs for Google Nexus One and for RealTek Card Reader State-Changed-From-To: feedback->patched State-Changed-By: arundel State-Changed-When: Sat Nov 13 14:50:53 UTC 2010 State-Changed-Why: Changes are in HEAD. Couldn't find the commit however. http://www.freebsd.org/cgi/query-pr.cgi?pr=143186 ___ 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/138570: [usb67] [panic] USB mass device panics current 7.2-STABLE
Old Synopsis: [usb] [panic] USB mass device panics current 7.2-STABLE New Synopsis: [usb67] [panic] USB mass device panics current 7.2-STABLE State-Changed-From-To: open->feedback State-Changed-By: arundel State-Changed-When: Sat Nov 13 14:33:29 UTC 2010 State-Changed-Why: Does this panic also occur with a more recent stable snapshot? Have you tried the device under FreBSD 8.x? http://www.freebsd.org/cgi/query-pr.cgi?pr=138570 ___ 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 camera not detected by 8.1, was working in 7
> did you try to setup quirks for your usb device with usbconfig? Andrey, No, I did not. I've found an instruction here: http://wiki.freebsd.org/USB Is that what I am supposed to do? Alexander Churanov ___ 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/121232: [usb67] [panic] USB CardBus card removal causes reboot sometimes
Old Synopsis: [usb] [panic] USB CardBus card removal causes reboot sometimes New Synopsis: [usb67] [panic] USB CardBus card removal causes reboot sometimes State-Changed-From-To: open->feedback State-Changed-By: arundel State-Changed-When: Sat Nov 13 14:28:40 UTC 2010 State-Changed-Why: Does this issue still occur under a recent FreeBSD 7.x release? This seems to be limited to the old USB stack. http://www.freebsd.org/cgi/query-pr.cgi?pr=121232 ___ 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/129766: [usb] [panic] plugging in usb modem HUAWEI E226 panics system
Synopsis: [usb] [panic] plugging in usb modem HUAWEI E226 panics system State-Changed-From-To: open->feedback State-Changed-By: arundel State-Changed-When: Sat Nov 13 14:22:33 UTC 2010 State-Changed-Why: Does this problem still occur? Please be sure dumpdev is set properly and if the problem still occurs send in a backtrace from the kernel core dump. http://www.freebsd.org/cgi/query-pr.cgi?pr=129766 ___ 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/130230: [patch] [quirk] [usb67] [usb] [cam] [umass] Samsung Electronics YP-U3 does not attach in 7.1-RELEASE
Synopsis: [patch] [quirk] [usb67] [usb] [cam] [umass] Samsung Electronics YP-U3 does not attach in 7.1-RELEASE State-Changed-From-To: suspended->open State-Changed-By: arundel State-Changed-When: Sat Nov 13 14:21:36 UTC 2010 State-Changed-Why: There's active work going on regarding this PR. http://www.freebsd.org/cgi/query-pr.cgi?pr=130230 ___ 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/120786: [usb] [panic] Kernel panic when forced umount of a dettached USB Harddisk
Synopsis: [usb] [panic] Kernel panic when forced umount of a dettached USB Harddisk State-Changed-From-To: open->feedback State-Changed-By: arundel State-Changed-When: Sat Nov 13 14:21:02 UTC 2010 State-Changed-Why: Can you reproduce this issue under 8.X or HEAD? http://www.freebsd.org/cgi/query-pr.cgi?pr=120786 ___ 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/122819: [usb] [patch] Patch to provide dynamic additions to the usb quirks table
Synopsis: [usb] [patch] Patch to provide dynamic additions to the usb quirks table State-Changed-From-To: open->feedback State-Changed-By: arundel State-Changed-When: Sat Nov 13 14:10:50 UTC 2010 State-Changed-Why: What's the status of this PR? To my knowledge the new USB stack supports dynamic quirk tables. http://www.freebsd.org/cgi/query-pr.cgi?pr=122819 ___ 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"
usb/130230: [patch] [quirk] [usb67] [usb] [cam] [umass] Samsung Electronics YP-U3 does not attach in 7.1-RELEASE
The following reply was made to PR usb/130230; it has been noted by GNATS. From: Alexander Best To: bug-follo...@freebsd.org Cc: Subject: usb/130230: [patch] [quirk] [usb67] [usb] [cam] [umass] Samsung Electronics YP-U3 does not attach in 7.1-RELEASE Date: Sat, 13 Nov 2010 14:03:15 + --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline could you please try the first patch and see if that lets you use your device without any manual quirks? if that works it would be nice if you could also try the second patch. maybe the existing scsi quirks aren't necessary anymore. this is just a guess however. if your device stops working after you've applied the second patch, please revert it and only use the first patch. cheers. alex -- a13x --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="yp-u3.diff1" diff --git a/sys/dev/usb/quirk/usb_quirk.c b/sys/dev/usb/quirk/usb_quirk.c index 6691538..15611c3 100644 --- a/sys/dev/usb/quirk/usb_quirk.c +++ b/sys/dev/usb/quirk/usb_quirk.c @@ -332,6 +332,8 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRKS_MAX] = { USB_QUIRK_VP(USB_VENDOR_SAMSUNG_TECHWIN, USB_PRODUCT_SAMSUNG_TECHWIN_DIGIMAX_410, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_INQUIRY), + USB_QUIRK(SAMSUNG, YP_U3, 0x, 0x, UQ_MSC_NO_INQUIRY, + UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(SAMSUNG, YP_U4, 0x, 0x, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(SANDISK, SDDR05A, 0x, 0x, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_READ_CAP_OFFBY1, diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 404ec18..dc92093 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2773,6 +2773,7 @@ product SAGEM XG76NA 0x0062 XG-76NA /* Samsung products */ product SAMSUNG ML60600x3008 ML-6060 laser printer product SAMSUNG YP_U2 0x5050 YP-U2 MP3 Player +product SAMSUNG YP_U3 0x507c YP-U3 MP3 Player product SAMSUNG YP_U4 0x5092 YP-U4 MP3 Player product SAMSUNG I500 0x6601 I500 Palm USB Phone product SAMSUNG I330 0x8001 I330 phone cradle --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="yp-u3.diff2" diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index b3b968c..29e1641 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -545,14 +545,6 @@ static struct da_quirk_entry da_quirk_table[] = "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, { - /* - * Samsung YP-U3 mp3-player - * PR: 125398 - */ - {T_DIRECT, SIP_MEDIA_REMOVABLE, "Samsung", "YP-U3", - "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE - }, - { {T_DIRECT, SIP_MEDIA_REMOVABLE, "Netac", "OnlyDisk*", "2000"}, /*quirks*/ DA_Q_NO_SYNC_CACHE }, --Nq2Wo0NMKNjxTN9z-- ___ 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/146871: [usbdevs] [usb8] [patch] provide descriprive string for D-Link DUB-7H USB hub
Synopsis: [usbdevs] [usb8] [patch] provide descriprive string for D-Link DUB-7H USB hub State-Changed-From-To: open->patched State-Changed-By: arundel State-Changed-When: Sat Nov 13 13:29:15 UTC 2010 State-Changed-Why: Patched in HEAD (r213856). http://www.freebsd.org/cgi/query-pr.cgi?pr=146871 ___ 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/116699: [usbhid] USB HID devices do not initialize at system boot
Synopsis: [usbhid] USB HID devices do not initialize at system boot State-Changed-From-To: open->patched State-Changed-By: arundel State-Changed-When: Sat Nov 13 13:24:48 UTC 2010 State-Changed-Why: I have the same motherboard and was also experiencing the same issues under 6.x and 7.x. Under 8.x however the problems vanished. http://www.freebsd.org/cgi/query-pr.cgi?pr=116699 ___ 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/149934: [patch] [usb8] Transcend JetFlash V85 poor performance
Synopsis: [patch] [usb8] Transcend JetFlash V85 poor performance State-Changed-From-To: open->patched State-Changed-By: arundel State-Changed-When: Sat Nov 13 13:16:37 UTC 2010 State-Changed-Why: Patched in HEAD (r213856). http://www.freebsd.org/cgi/query-pr.cgi?pr=149934 ___ 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/149764: [u3g] [patch] usbdevs update: Huawei K3765 3G modem
Synopsis: [u3g] [patch] usbdevs update: Huawei K3765 3G modem State-Changed-From-To: open->patched State-Changed-By: arundel State-Changed-When: Sat Nov 13 13:12:22 UTC 2010 State-Changed-Why: Patch in HEAD (r213856, r213879). http://www.freebsd.org/cgi/query-pr.cgi?pr=149764 ___ 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: uplcom(4) does not work on cuaU0 ?
Please try the attached patch. Others having UPLCOM devices should try this patch aswell and see if their device is still working. --HPS === uplcom.c == --- uplcom.c(revision 215173) +++ uplcom.c(local) @@ -176,7 +176,7 @@ static usb_error_t uplcom_reset(struct uplcom_softc *, struct usb_device *); static usb_error_t uplcom_pl2303_do(struct usb_device *, int8_t, uint8_t, uint16_t, uint16_t, uint16_t); -static int uplcom_pl2303_init(struct usb_device *, uint8_t); +static int uplcom_pl2303_init(struct uplcom_softc *sc, struct usb_device *); static voiduplcom_cfg_set_dtr(struct ucom_softc *, uint8_t); static voiduplcom_cfg_set_rts(struct ucom_softc *, uint8_t); static voiduplcom_cfg_set_break(struct ucom_softc *, uint8_t); @@ -355,7 +355,6 @@ struct uplcom_softc *sc = device_get_softc(dev); struct usb_interface *iface; struct usb_interface_descriptor *id; - struct usb_device_descriptor *dd; int error; DPRINTFN(11, "\n"); @@ -367,19 +366,6 @@ sc->sc_udev = uaa->device; - /* Determine the chip type. This algorithm is taken from Linux. */ - dd = usbd_get_device_descriptor(sc->sc_udev); - if (dd->bDeviceClass == 0x02) - sc->sc_chiptype = TYPE_PL2303; - else if (dd->bMaxPacketSize == 0x40) - sc->sc_chiptype = TYPE_PL2303HX; - else - sc->sc_chiptype = TYPE_PL2303; - - DPRINTF("chiptype: %s\n", - (sc->sc_chiptype == TYPE_PL2303HX) ? - "2303X" : "2303"); - /* * USB-RSAQ1 has two interface * @@ -432,19 +418,20 @@ usbd_xfer_set_stall(sc->sc_xfer[UPLCOM_BULK_DT_RD]); mtx_unlock(&sc->sc_mtx); - error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, - &uplcom_callback, &sc->sc_mtx); - if (error) { - goto detach; - } /* -* do the initialization during attach so that the system does not -* sleep during open: +* do the initialization during attach so that the system does +* not sleep during open: */ - if (uplcom_pl2303_init(uaa->device, sc->sc_chiptype)) { + if (uplcom_pl2303_init(sc, uaa->device)) { device_printf(dev, "init failed\n"); goto detach; } + + error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, + &uplcom_callback, &sc->sc_mtx); + if (error) { + goto detach; + } ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); return (0); @@ -506,7 +493,7 @@ } static int -uplcom_pl2303_init(struct usb_device *udev, uint8_t chiptype) +uplcom_pl2303_init(struct uplcom_softc *sc, struct usb_device *udev) { int err; @@ -522,12 +509,22 @@ || uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 1, 0, 0)) return (EIO); - if (chiptype == TYPE_PL2303HX) - err = uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 2, 0x44, 0); - else + /* Determine chiptype by trial and error. */ + + err = uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 2, 0x44, 0); + if (err == 0) + sc->sc_chiptype = TYPE_PL2303HX; + else { err = uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 2, 0x24, 0); + if (err == 0) + sc->sc_chiptype = TYPE_PL2303; + } + if (err) return (EIO); + + DPRINTF("chiptype: %s\n", (sc->sc_chiptype == TYPE_PL2303HX) ? + "2303X" : "2303"); if (uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 8, 0, 0) || uplcom_pl2303_do(udev, UT_WRITE_VENDOR_DEVICE, UPLCOM_SET_REQUEST, 9, 0, 0)) ___ 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"