From owner-freebsd-usb@FreeBSD.ORG Sun Jan 11 02:52:42 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCF3ECEE; Sun, 11 Jan 2015 02:52:42 +0000 (UTC) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 762F97B1; Sun, 11 Jan 2015 02:52:42 +0000 (UTC) Received: from gjp by mail.in-addr.com with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YA8dq-0006sy-Mx; Sun, 11 Jan 2015 02:52:38 +0000 Date: Sun, 11 Jan 2015 02:52:38 +0000 From: Gary Palmer To: Philip Guyton Subject: Re: ZTE MF730M 3G dongle help please Message-ID: <20150111025238.GB47211@in-addr.com> References: <20150110171901.GA47211@in-addr.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 02:52:42 -0000 --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Philip, Try the attached patch. It's relative to releng/9.3 so it may not apply cleanly to 10.x. It does mean rebuilding the kernel. If you rebuild the kernel you can boot with the device inserted. If you apply the quirks you listed in addition to UQ_CFG_INDEX_0 and UQ_MSC_EJECT_SCSIEJECT then you can insert the device after boot. No idea what Linux does, but this is as far as my limited knowledge of the USB subsystem in FreeBSD has got me. Regards, Gary On Sat, Jan 10, 2015 at 07:31:07PM +0000, Philip Guyton wrote: > @Garry Palmer > Don't know if it helps or not but I've previously posted some info on this > list re a long battle I had with this same ZTE-MF730M > My post (unanswered as far as I know) is at:- > Quirks required to remove 6 minute CAM status: CCB error with ZTE-MF730M > > I was switching the device to the cdc ether mode (preferred by me) for use > with if_cdce.ko. > Also posted a devd hack for pfsense that might help:- > zte-mf730m 42Mbps 3G howto and request for further assistance > > again no reply. > I appreciate this is not an answer but hope this helps, I received no help > myself with this dongle and FreeBSD so suspect it's uninteresting to these > 2 mailing lists. > Switches almost instantly and perfectly reliable with modern linux kernels > (no usb-modeswitch required) so using it there. But also a guide / source > to how it can be done. Didn't track down exactly how it's done in the > linux kernel though unfortunately. Would be a nice addition to FreeBSD > though. > > On Sat, Jan 10, 2015 at 5:19 PM, Gary Palmer wrote: > > > > > Hi, > > > > I have a ZTE MF730M. When first connected to my 9.3-RELEASE-p7 box > > it takes a few seconds (approximately 7) and then shows up as: > > > > % usbconfig -d ugen2.7 dump_device_desc > > ugen2.7: at usbus2, cfg=1 > > md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) > > > > bLength = 0x0012 > > bDescriptorType = 0x0001 > > bcdUSB = 0x0200 > > bDeviceClass = 0x0000 > > bDeviceSubClass = 0x0000 > > bDeviceProtocol = 0x0000 > > bMaxPacketSize0 = 0x0040 > > idVendor = 0x19d2 > > idProduct = 0x1420 > > bcdDevice = 0xf0f7 > > iManufacturer = 0x0001 > > iProduct = 0x0002 > > iSerialNumber = 0x0004 <1234567890ABCDEF> > > bNumConfigurations = 0x0003 > > > > with the following config: > > > > % usbconfig -d ugen2.7 dump_all_config_desc > > ugen2.7: at usbus2, cfg=1 > > md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) > > > > > > Configuration index 0 > > > > bLength = 0x0009 > > bDescriptorType = 0x0002 > > wTotalLength = 0x0020 > > bNumInterfaces = 0x0001 > > bConfigurationValue = 0x0001 > > iConfiguration = 0x0003 > > bmAttributes = 0x00c0 > > bMaxPower = 0x00fa > > > > Interface 0 > > bLength = 0x0009 > > bDescriptorType = 0x0004 > > bInterfaceNumber = 0x0000 > > bAlternateSetting = 0x0000 > > bNumEndpoints = 0x0002 > > bInterfaceClass = 0x0008 > > bInterfaceSubClass = 0x0006 > > bInterfaceProtocol = 0x0050 > > iInterface = 0x0005 > > > > Endpoint 0 > > bLength = 0x0007 > > bDescriptorType = 0x0005 > > bEndpointAddress = 0x0081 > > bmAttributes = 0x0002 > > wMaxPacketSize = 0x0200 > > bInterval = 0x0000 > > bRefresh = 0x0000 > > bSynchAddress = 0x0000 > > > > Endpoint 1 > > bLength = 0x0007 > > bDescriptorType = 0x0005 > > bEndpointAddress = 0x0001 > > bmAttributes = 0x0002 > > wMaxPacketSize = 0x0200 > > bInterval = 0x0001 > > bRefresh = 0x0000 > > bSynchAddress = 0x0000 > > > > > > > > Configuration index 1 > > > > bLength = 0x0009 > > bDescriptorType = 0x0002 > > wTotalLength = 0x0020 > > bNumInterfaces = 0x0001 > > bConfigurationValue = 0x0002 > > iConfiguration = 0x0003 > > bmAttributes = 0x00c0 > > bMaxPower = 0x00fa > > > > Interface 0 > > bLength = 0x0009 > > bDescriptorType = 0x0004 > > bInterfaceNumber = 0x0000 > > bAlternateSetting = 0x0000 > > bNumEndpoints = 0x0002 > > bInterfaceClass = 0x0008 > > bInterfaceSubClass = 0x0006 > > bInterfaceProtocol = 0x0050 > > iInterface = 0x0005 > > > > Endpoint 0 > > bLength = 0x0007 > > bDescriptorType = 0x0005 > > bEndpointAddress = 0x0081 > > bmAttributes = 0x0002 > > wMaxPacketSize = 0x0200 > > bInterval = 0x0000 > > bRefresh = 0x0000 > > bSynchAddress = 0x0000 > > > > Endpoint 1 > > bLength = 0x0007 > > bDescriptorType = 0x0005 > > bEndpointAddress = 0x0001 > > bmAttributes = 0x0002 > > wMaxPacketSize = 0x0200 > > bInterval = 0x0001 > > bRefresh = 0x0000 > > bSynchAddress = 0x0000 > > > > > > > > the kernel reports: > > > > Jan 10 16:38:10 noop kernel: usb_alloc_device: Found possible auto-install > > disk (trying next config) > > Jan 10 16:38:10 noop kernel: ugen2.7: at usbus2 > > Jan 10 16:38:10 noop kernel: umass0: on usbus2 > > Jan 10 16:38:10 noop kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000 > > Jan 10 16:38:10 noop kernel: umass0: Get Max Lun not supported > > (USB_ERR_STALLED) > > Jan 10 16:38:10 noop kernel: umass0:8:0:-1: Attached to scbus8 > > Jan 10 16:39:24 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 > > 00 00 00 24 00 > > Jan 10 16:39:24 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:39:24 noop kernel: (probe0:umass-sim0:0:0:0): Retrying command > > Jan 10 16:40:38 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 > > 00 00 00 24 00 > > Jan 10 16:40:38 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:40:38 noop kernel: (probe0:umass-sim0:0:0:0): Retrying command > > Jan 10 16:41:51 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 > > 00 00 00 24 00 > > Jan 10 16:41:51 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:41:51 noop kernel: (probe0:umass-sim0:0:0:0): Retrying command > > n 10 16:43:05 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 > > 00 00 24 00 > > Jan 10 16:43:05 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:43:05 noop kernel: (probe0:umass-sim0:0:0:0): Retrying command > > Jan 10 16:44:19 noop kernel: (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 > > 00 00 00 24 00 > > Jan 10 16:44:19 noop kernel: (probe0:umass-sim0:0:0:0): CAM status: CCB > > request completed with an error > > Jan 10 16:44:19 noop kernel: (probe0:umass-sim0:0:0:0): Error 5, Retries > > exhausted > > > > > > nothing shows up in "camcontrol devlist". > > > > If I do > > > > usbconfig -d ugen2.7 power_off > > usbconfig -d ugen2.7 power_on > > > > I now get: > > > > Jan 10 16:45:17 noop kernel: umass0: at uhub6, port 1, addr 7 > > (disconnected) > > Jan 10 16:45:21 noop kernel: umass0: on usbus2 > > Jan 10 16:45:21 noop kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000 > > Jan 10 16:45:21 noop kernel: umass0:8:0:-1: Attached to scbus8 > > Jan 10 16:45:21 noop kernel: cd1 at umass-sim0 bus 0 scbus8 target 0 lun 0 > > Jan 10 16:45:21 noop kernel: cd1: Removable > > CD-ROM SCSI-2 device > > Jan 10 16:45:21 noop kernel: cd1: Serial Number 1234567890ABCDEF > > Jan 10 16:45:21 noop kernel: cd1: 40.000MB/s transfers > > Jan 10 16:45:21 noop kernel: cd1: cd present [2177 x 2048 byte records] > > Jan 10 16:45:21 noop kernel: cd1: quirks=0x10<10_BYTE_ONLY> > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): READ TOC/PMA/ATIP. > > CDB: 43 02 00 00 00 00 aa 00 0c 00 > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): CAM status: SCSI > > Status Error > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): SCSI status: Check > > Condition > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): SCSI sense: ILLEGAL > > REQUEST asc:24,0 (Invalid field in CDB) > > Jan 10 16:45:22 noop kernel: (cd1:umass-sim0:0:0:0): Error 22, Unretryable > > error > > > > and this shows up in camcontrol devlist: > > > > at scbus8 target 0 lun 0 (cd1,pass7) > > > > now if I do > > > > % camcontrol eject cd1 > > Unit stopped successfully, Media ejected > > > > I get the following kernel logs: > > > > Jan 10 16:45:52 noop kernel: ugen2.7: at usbus2 > > (disconnected) > > Jan 10 16:45:52 noop kernel: umass0: at uhub6, port 1, addr 7 > > (disconnected) > > Jan 10 16:45:52 noop kernel: cd1 at umass-sim0 bus 0 scbus8 target 0 lun 0 > > Jan 10 16:45:52 noop kernel: cd1: s/n > > 1234567890ABCDEF detached > > Jan 10 16:45:52 noop kernel: (cd1:umass-sim0:0:0:0): Periph destroyed > > Jan 10 16:45:53 noop kernel: ugen2.7: at usbus2 > > Jan 10 16:45:53 noop kernel: urndis0: on > > usbus2 > > Jan 10 16:45:53 noop kernel: ue0: on urndis0 > > Jan 10 16:45:53 noop kernel: ue0: Ethernet address: > > Jan 10 16:45:53 noop kernel: umass0: on usbus2 > > Jan 10 16:45:53 noop kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000 > > Jan 10 16:45:53 noop kernel: umass0:8:0:-1: Attached to scbus8 > > Jan 10 16:45:53 noop kernel: cd1 at umass-sim0 bus 0 scbus8 target 0 lun 0 > > Jan 10 16:45:53 noop kernel: cd1: Removable > > CD-ROM SCSI-2 device > > Jan 10 16:45:53 noop kernel: cd1: Serial Number 1234567890ABCDEF > > Jan 10 16:45:53 noop kernel: cd1: 40.000MB/s transfers > > Jan 10 16:45:53 noop kernel: cd1: cd present [2177 x 2048 byte records] > > Jan 10 16:45:53 noop kernel: cd1: quirks=0x10<10_BYTE_ONLY> > > Jan 10 16:45:53 noop kernel: da0 at umass-sim0 bus 0 scbus8 target 0 lun 1 > > Jan 10 16:45:53 noop kernel: da0: Removable Direct > > Access SCSI-2 device > > Jan 10 16:45:53 noop kernel: da0: Serial Number 1234567890ABCDEF > > Jan 10 16:45:53 noop kernel: da0: 40.000MB/s transfers > > Jan 10 16:45:53 noop kernel: da0: Attempt to query device size failed: NOT > > READY, Medium not present > > Jan 10 16:45:53 noop kernel: da0: quirks=0x2 > > Jan 10 16:45:53 noop root: Unknown USB device: vendor 0x19d2 product > > 0x1403 bus uhub6 > > > > and > > > > ue0: flags=8802 metric 0 mtu 1500 > > ether > > nd6 options=29 > > > > shows up > > > > Any way of getting a more automated switch to the RNDIS protocol? > > > > I've got a hack going right now via devd but I'd have thought there would > > be a way of doing this via the quirks mechanism. The devd stuff isn't > > ideal as I found out that there is no real way to associate the umass > > creation event with a particular cam device, so I end up with a script > > that waits and uses camcontrol to try to figure out the cd device that > > is created via umass. > > > > Thanks, > > > > Gary > > _______________________________________________ > > 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" > > --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ZTE_MF730M.diff.txt" Index: usb/quirk/usb_quirk.c =================================================================== --- usb/quirk/usb_quirk.c (revision 276888) +++ usb/quirk/usb_quirk.c (working copy) @@ -485,6 +485,8 @@ USB_QUIRK(TEXTECH, U2M_2, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), USB_QUIRK(WCH2, U2M, 0x0000, 0xffff, UQ_SINGLE_CMD_MIDI), + USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), + /* Non-standard USB AUDIO devices */ USB_QUIRK(MAUDIO, FASTTRACKULTRA, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(MAUDIO, FASTTRACKULTRA8R, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), Index: usb/serial/u3g.c =================================================================== --- usb/serial/u3g.c (revision 276888) +++ usb/serial/u3g.c (working copy) @@ -561,6 +561,7 @@ U3G_DEV(TOSHIBA, HSDPA, 0), U3G_DEV(YISO, C893, 0), U3G_DEV(WETELECOM, WM_D200, 0), + U3G_DEV(QUALCOMMINC, ZTE_MF730M, U3GINIT_SCSIEJECT), /* Autoinstallers */ U3G_DEV(NOVATEL, ZEROCD, U3GINIT_SCSIEJECT), U3G_DEV(OPTION, GTICON322, U3GINIT_REZERO), Index: usb/usbdevs =================================================================== --- usb/usbdevs (revision 276888) +++ usb/usbdevs (working copy) @@ -3618,6 +3618,7 @@ product QUALCOMMINC E0086 0x0086 3G modem product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick product QUALCOMMINC K3772_Z 0x1179 3G modem +product QUALCOMMINC ZTE_MF730M 0x1420 3G modem product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage product QUALCOMMINC E2002 0x2002 3G modem product QUALCOMMINC E2003 0x2003 3G modem --RnlQjJ0d97Da+TV1-- From owner-freebsd-usb@FreeBSD.ORG Sun Jan 11 10:29:07 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2ABFC6A; Sun, 11 Jan 2015 10:29:07 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0FD9FC8; Sun, 11 Jan 2015 10:29:06 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 21DE51FE022; Sun, 11 Jan 2015 11:29:04 +0100 (CET) Message-ID: <54B2509F.70009@selasky.org> Date: Sun, 11 Jan 2015 11:29:51 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Gary Palmer , Philip Guyton Subject: Re: ZTE MF730M 3G dongle help please References: <20150110171901.GA47211@in-addr.com> <20150111025238.GB47211@in-addr.com> In-Reply-To: <20150111025238.GB47211@in-addr.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 10:29:07 -0000 Hi, Config index 0 is the default, so you might want to try without the ", UQ_CFG_INDEX_0" in the end. USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN, UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Jan 11 14:26:18 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C25809E0; Sun, 11 Jan 2015 14:26:18 +0000 (UTC) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81E64902; Sun, 11 Jan 2015 14:26:18 +0000 (UTC) Received: from gjp by mail.in-addr.com with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YAJT5-0008dA-UM; Sun, 11 Jan 2015 14:26:15 +0000 Date: Sun, 11 Jan 2015 14:26:15 +0000 From: Gary Palmer To: Hans Petter Selasky Subject: Re: ZTE MF730M 3G dongle help please Message-ID: <20150111142615.GA33101@in-addr.com> References: <20150110171901.GA47211@in-addr.com> <20150111025238.GB47211@in-addr.com> <54B2509F.70009@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B2509F.70009@selasky.org> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 14:26:18 -0000 On Sun, Jan 11, 2015 at 11:29:51AM +0100, Hans Petter Selasky wrote: > Hi, > > Config index 0 is the default, so you might want to try without the ", > UQ_CFG_INDEX_0" in the end. > > USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN, > UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), Doesn't work Inserting after boot with bootverbose enabled I get Jan 11 14:11:17 micro2 kernel: usb_alloc_device: Found possible auto-install disk (trying next config) Jan 11 14:11:17 micro2 kernel: ugen1.2: at usbus1 Jan 11 14:11:17 micro2 kernel: Ejecting ZTE,Incorporated ZTE Mobile Broadband Station using method 3 Nothing shows up in "camcontrol devlist" and nothing in ifconfig While config index 0 may be the default, setting that quirk has the added advantage of disabling the "Found possible auto-install disk (trying next config)" code, so that it is the first device (the CD) that is ejected. That seems to trigger the switch into RNDIS mode. Messages from insertion after boot with bootverbose enabled: Jan 11 14:21:49 micro2 kernel: ugen1.2: at usbus1 Jan 11 14:21:49 micro2 kernel: Ejecting ZTE,Incorporated ZTE Mobile Broadband Station using method 3 Jan 11 14:21:49 micro2 kernel: ugen1.2: at usbus1 (disconnected) Jan 11 14:21:50 micro2 kernel: ugen1.2: at usbus1 Jan 11 14:21:50 micro2 kernel: umass0: on usbus1 Jan 11 14:21:50 micro2 kernel: umass0: SCSI over Bulk-Only; quirks = 0x0000 Jan 11 14:21:50 micro2 kernel: umass0:6:0:-1: Attached to scbus6 Jan 11 14:21:51 micro2 kernel: pass4 at umass-sim0 bus 0 scbus6 target 0 lun 0 Jan 11 14:21:51 micro2 kernel: pass4: Removable CD-ROM SCSI-2 device Jan 11 14:21:51 micro2 kernel: pass4: Serial Number 1234567890ABCDEF Jan 11 14:21:51 micro2 kernel: pass4: 40.000MB/s transfers Jan 11 14:21:51 micro2 kernel: GEOM: new disk cd0 Jan 11 14:21:51 micro2 kernel: cd0 at umass-sim0 bus 0 scbus6 target 0 lun 0 Jan 11 14:21:51 micro2 kernel: cd0: Removable CD-ROM SCSI-2 device Jan 11 14:21:51 micro2 kernel: cd0: Serial Number 1234567890ABCDEF Jan 11 14:21:51 micro2 kernel: cd0: 40.000MB/s transfers Jan 11 14:21:51 micro2 kernel: cd0: cd present [2177 x 2048 byte records] Jan 11 14:21:51 micro2 kernel: cd0: quirks=0x10<10_BYTE_ONLY> Jan 11 14:21:51 micro2 kernel: pass5 at umass-sim0 bus 0 scbus6 target 0 lun 1 Jan 11 14:21:51 micro2 kernel: pass5: Removable Direct Access SCSI-2 device Jan 11 14:21:51 micro2 kernel: pass5: Serial Number 1234567890ABCDEF Jan 11 14:21:51 micro2 kernel: pass5: 40.000MB/s transfers Jan 11 14:21:51 micro2 kernel: da0 at umass-sim0 bus 0 scbus6 target 0 lun 1 Jan 11 14:21:51 micro2 kernel: da0: Removable Direct Access SCSI-2 device Jan 11 14:21:51 micro2 kernel: da0: Serial Number 1234567890ABCDEF Jan 11 14:21:51 micro2 kernel: da0: 40.000MB/s transfers Jan 11 14:21:51 micro2 kernel: da0: Attempt to query device size failed: NOT READY, Medium not present Jan 11 14:21:51 micro2 kernel: da0: quirks=0x2 Jan 11 14:21:51 micro2 kernel: da0: Delete methods: Jan 11 14:21:51 micro2 kernel: GEOM: new disk da0 Jan 11 14:21:51 micro2 kernel: (da0:umass-sim0:0:0:1): PREVENT ALLOW MEDIUM REMOVAL not supported. Jan 11 14:21:51 micro2 kernel: urndis0: on usbus1 Jan 11 14:21:51 micro2 kernel: ue0: on urndis0 Jan 11 14:21:51 micro2 kernel: ue0: bpf attached Jan 11 14:21:51 micro2 kernel: ue0: Ethernet address: Jan 11 14:21:51 micro2 root: Unknown USB device: vendor 0x19d2 product 0x1403 bus uhub1 Or maybe there is another way of doing it but I haven't played with the huge number of combinations of the quirks to see if some other combo work. I think config index 1 is a micro-SD card reader, which would explain why eject on it does nothing useful. I don't have any other 3g USB sticks so I don't know how other devices are set up and why the skipping of the config index works for them, but for this device it appears to be the wrong thing to do. Gary From owner-freebsd-usb@FreeBSD.ORG Sun Jan 11 14:34:53 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89931D5A; Sun, 11 Jan 2015 14:34:53 +0000 (UTC) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ACF19C9; Sun, 11 Jan 2015 14:34:53 +0000 (UTC) Received: from gjp by mail.in-addr.com with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YAJbP-0008eW-Gf; Sun, 11 Jan 2015 14:34:51 +0000 Date: Sun, 11 Jan 2015 14:34:51 +0000 From: Gary Palmer To: Hans Petter Selasky Subject: Re: ZTE MF730M 3G dongle help please Message-ID: <20150111143451.GB33101@in-addr.com> References: <20150110171901.GA47211@in-addr.com> <20150111025238.GB47211@in-addr.com> <54B2509F.70009@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B2509F.70009@selasky.org> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 14:34:53 -0000 On Sun, Jan 11, 2015 at 11:29:51AM +0100, Hans Petter Selasky wrote: > Hi, > > Config index 0 is the default, so you might want to try without the ", > UQ_CFG_INDEX_0" in the end. > > USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN, > UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), Hi Hans Petter, I was meaning to ask - is putting U3GINIT_SCSIEJECT in u3g.c the right thing to do for a device that isn't a serial 3G modem? Would UQ_MSC_EJECT_SCSIEJECT in usb_quirk.c be better? There doesn't appear to be an equivalent section in the RNDIS driver. Thanks, Gary From owner-freebsd-usb@FreeBSD.ORG Sun Jan 11 14:41:57 2015 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C7D9F0E for ; Sun, 11 Jan 2015 14:41:57 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C44AA8F for ; Sun, 11 Jan 2015 14:41:57 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 1C73D1FE022; Sun, 11 Jan 2015 15:41:55 +0100 (CET) Message-ID: <54B28BE3.9010501@selasky.org> Date: Sun, 11 Jan 2015 15:42:43 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: joshruehlig@gmail.com, freebsd-usb@FreeBSD.org Subject: Re: [Bug 185747] [cam] [patch] fix support for USB key "Kingston DT 101 G2" References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 14:41:57 -0000 Hi, Could you show the umass printouts in dmesg for your two kingston devices and especially the line about quirk= Thank you! --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Jan 11 14:44:08 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B60E2F4C; Sun, 11 Jan 2015 14:44:08 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77F75A97; Sun, 11 Jan 2015 14:44:08 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B57421FE022; Sun, 11 Jan 2015 15:44:06 +0100 (CET) Message-ID: <54B28C66.6040200@selasky.org> Date: Sun, 11 Jan 2015 15:44:54 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Gary Palmer Subject: Re: ZTE MF730M 3G dongle help please References: <20150110171901.GA47211@in-addr.com> <20150111025238.GB47211@in-addr.com> <54B2509F.70009@selasky.org> <20150111143451.GB33101@in-addr.com> In-Reply-To: <20150111143451.GB33101@in-addr.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 14:44:08 -0000 On 01/11/15 15:34, Gary Palmer wrote: > On Sun, Jan 11, 2015 at 11:29:51AM +0100, Hans Petter Selasky wrote: >> Hi, >> >> Config index 0 is the default, so you might want to try without the ", >> UQ_CFG_INDEX_0" in the end. >> >> USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0xf0f7, 0xf0f7, UQ_MSC_NO_GETMAXLUN, >> UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), > > Hi Hans Petter, > > I was meaning to ask - is putting U3GINIT_SCSIEJECT in u3g.c the right > thing to do for a device that isn't a serial 3G modem? Would > UQ_MSC_EJECT_SCSIEJECT in usb_quirk.c be better? There doesn't > appear to be an equivalent section in the RNDIS driver. > Hi, Currently only the U3G driver calls the "usb_msc_eject()" functions, so until further just put the quirk there with a comment about no modem features. --HPS From owner-freebsd-usb@FreeBSD.ORG Sun Jan 11 16:59:25 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 319A6716 for ; Sun, 11 Jan 2015 16:59:25 +0000 (UTC) Received: from mail-pd0-x232.google.com (mail-pd0-x232.google.com [IPv6:2607:f8b0:400e:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F2B307F9 for ; Sun, 11 Jan 2015 16:59:24 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id r10so26396976pdi.9 for ; Sun, 11 Jan 2015 08:59:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=idw/XWC8SZ1qI2NUIbk+ILup7pc0/NEzHKWoLbwJzN8=; b=TRu1+3LMRXTPC2/fmK8kYQFCi0zpsuovaw9tL4X7Fc+ddjWxXqgEKg9V7Fa/vlOzwm YngCppxc2pJvezD3Ofcd63x/RCUNUdBzdtGRebbmVpbETRjR+4YLok2z7QzDWCJvD2cl H+611y5mFJoJ/4fBXVBmze5veNiL8g9vICZh3TTEgVGztl3YS/X4XG4p9s3B6vIWSxGk hoSjCMuHCjdOtmzHZSFvE94EoagW8G1GIe+N0R4b+nXjNS3QGFXPKx957TUgpHg81rmi RxwLgONyecL/xVRqPjfk0BHunSNBIfnHYeLVdnIKxuzgW40uODSnaiDclATa4R2aBs2d XfLg== MIME-Version: 1.0 X-Received: by 10.68.236.163 with SMTP id uv3mr37941779pbc.5.1420995564483; Sun, 11 Jan 2015 08:59:24 -0800 (PST) Received: by 10.70.119.70 with HTTP; Sun, 11 Jan 2015 08:59:24 -0800 (PST) In-Reply-To: <54B28BE3.9010501@selasky.org> References: <54B28BE3.9010501@selasky.org> Date: Sun, 11 Jan 2015 08:59:24 -0800 Message-ID: Subject: Re: [Bug 185747] [cam] [patch] fix support for USB key "Kingston DT 101 G2" From: Joshua Ruehlig To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 16:59:25 -0000 Tell meif you need anything else, thanks - Josh *Working* ugen0.3: at usbus0 umass0: on usbus0 umass0: SCSI over Bulk-Only; quirks = 0x4000 umass0:8:0:-1: Attached to scbus8 da7 at umass-sim1 bus 1 scbus9 target 0 lun 0 da7: Removable Direct Access SCSI-0 device da7: Serial Number 001CC0C60D96CB9074222373 da7: 40.000MB/s transfers da7: 7639MB (15644912 512 byte sectors: 255H 63S/T 973C) da7: quirks=0x2 *Non-Working* ugen1.4: at usbus1 umass1: on usbus1 umass1: SCSI over Bulk-Only; quirks = 0x4100 umass1:9:1:-1: Attached to scbus9 da7 at umass-sim1 bus 1 scbus9 target 0 lun 0 da7: Removable Direct Access SCSI-0 device da7: Serial Number 001CC0C60D96CB9074222373 da7: 40.000MB/s transfers da7: 7639MB (15644912 512 byte sectors: 255H 63S/T 973C) da7: quirks=0x2 (da7:umass-sim1:1:0:0): got CAM status 0x50 (da7:umass-sim1:1:0:0): fatal error, failed to attach to device da7 at umass-sim1 bus 1 scbus9 target 0 lun 0 da7: s/n 001CC0C60D96CB9074222373 detached (da7:umass-sim1:1:0:0): Periph destroyed On Sun, Jan 11, 2015 at 6:42 AM, Hans Petter Selasky wrote: > Hi, > > Could you show the umass printouts in dmesg for your two kingston devices > and especially the line about quirk= > > Thank you! > > --HPS > From owner-freebsd-usb@FreeBSD.ORG Sun Jan 11 17:16:46 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22651C84 for ; Sun, 11 Jan 2015 17:16:46 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F3C79AC for ; Sun, 11 Jan 2015 17:16:45 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 729AD1FE022; Sun, 11 Jan 2015 18:16:42 +0100 (CET) Message-ID: <54B2B02A.1030808@selasky.org> Date: Sun, 11 Jan 2015 18:17:30 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Joshua Ruehlig Subject: Re: [Bug 185747] [cam] [patch] fix support for USB key "Kingston DT 101 G2" References: <54B28BE3.9010501@selasky.org> In-Reply-To: Content-Type: multipart/mixed; boundary="------------050306040005090502090003" Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 17:16:46 -0000 This is a multi-part message in MIME format. --------------050306040005090502090003 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 01/11/15 17:59, Joshua Ruehlig wrote: > Tell meif you need anything else, thanks > - Josh Hi, Can you try the attached patch? --HPS --------------050306040005090502090003 Content-Type: text/x-patch; name="kingston_fix.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kingston_fix.diff" Index: sys/dev/usb/usb_freebsd.h =================================================================== --- sys/dev/usb/usb_freebsd.h (revision 276981) +++ sys/dev/usb/usb_freebsd.h (working copy) @@ -88,7 +88,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Index: sys/dev/usb/usb_freebsd_loader.h =================================================================== --- sys/dev/usb/usb_freebsd_loader.h (revision 276981) +++ sys/dev/usb/usb_freebsd_loader.h (working copy) @@ -83,7 +83,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Index: sys/dev/usb/usb_msctest.c =================================================================== --- sys/dev/usb/usb_msctest.c (revision 276981) +++ sys/dev/usb/usb_msctest.c (working copy) @@ -718,10 +718,11 @@ if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache\n"); + DPRINTF("Device doesn't handle synchronize cache " + "and prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -748,10 +749,13 @@ goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache\n"); + "handle synchronize cache nor" + "prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, + UQ_MSC_NO_PREVENT_ALLOW); } else { if (err != ERR_CSW_FAILED) goto error; @@ -796,6 +800,7 @@ usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_TEST_UNIT_READY); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); /* Need to re-enumerate the device */ usbd_req_re_enumerate(udev, NULL); --------------050306040005090502090003-- From owner-freebsd-usb@FreeBSD.ORG Sun Jan 11 19:12:08 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CE8F35F for ; Sun, 11 Jan 2015 19:12:08 +0000 (UTC) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCF5665E for ; Sun, 11 Jan 2015 19:12:07 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id fp1so26706659pdb.10 for ; Sun, 11 Jan 2015 11:12:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=yjAr8MrbdR25cnjAOiEw3+PL8x6Bmsg3ib48CHbmPYg=; b=BggGHeMguZFdi4FRP3IJx59STueWPNKa0kSOkpjSI3Rki7aiJ7jQlLelSDgETen1lw xh8AOilA1uL2lM1v3hmZlkYN9CtyprIw9mrtb9LFHBXrEkz+8NXm3ak7b0X/0Ob4RKm4 kAxNs08QyODhbNoTN3ddIsn9Ind+UyV4mKAKAV4eM21AMYs1MRgn87VTDOWEl0dw+Zzo 2jJfGExAfn4r3gjoJIT8iD0MVt6Mg8QQq9fL71LSVV8Io69IvaO+qF7+tUpaHQHC6sCV +otaMluYq2ovf52cIhzS/5VBNlBhE1w5rrx28C/YuW+L4+XZJV5ol2Fqy83O7wZIVUwH zfJg== MIME-Version: 1.0 X-Received: by 10.66.66.68 with SMTP id d4mr39073520pat.44.1421003527509; Sun, 11 Jan 2015 11:12:07 -0800 (PST) Received: by 10.70.119.70 with HTTP; Sun, 11 Jan 2015 11:12:07 -0800 (PST) Received: by 10.70.119.70 with HTTP; Sun, 11 Jan 2015 11:12:07 -0800 (PST) In-Reply-To: <54B2B02A.1030808@selasky.org> References: <54B28BE3.9010501@selasky.org> <54B2B02A.1030808@selasky.org> Date: Sun, 11 Jan 2015 11:12:07 -0800 Message-ID: Subject: Re: [Bug 185747] [cam] [patch] fix support for USB key "Kingston DT 101 G2" From: Joshua Ruehlig To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:12:08 -0000 Ok, I never compiled my own kernel but I should be able to figure it out. On Jan 11, 2015 9:16 AM, "Hans Petter Selasky" wrote: > On 01/11/15 17:59, Joshua Ruehlig wrote: > >> Tell meif you need anything else, thanks >> - Josh >> > > Hi, > > Can you try the attached patch? > > --HPS > > From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 00:54:12 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B528A3BA for ; Mon, 12 Jan 2015 00:54:12 +0000 (UTC) Received: from mail-pd0-x232.google.com (mail-pd0-x232.google.com [IPv6:2607:f8b0:400e:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7F68590F for ; Mon, 12 Jan 2015 00:54:12 +0000 (UTC) Received: by mail-pd0-f178.google.com with SMTP id r10so27552525pdi.9 for ; Sun, 11 Jan 2015 16:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=947Y7nJuo7qvvaR1GzZNaXk/uhwI6vQ2Kp7TjwIT9PU=; b=EbVo6+cDEY6wih2VIgCFs4brCjEZFQHvqSyiyhH6bq4W0YB9DzgLFbHQtf6K9DxTQX WoW8iQxPDVmc9MhP9dPM6ADZg8/GWaIoSaeHY4IP+6m4MorYPr+5fOlTx9jcuWFv9cXQ rQuDdnH84K8GXz0HM38LWCKCuL2jgwtHe2n/ChaD7Mc6+5e9kUa2IWlMmdDQai8mnU4e 9GLBSA9mNCfDGAJAEncR22PhsQTHpb6ESiQCBz1qewHouOJzJkba/+SPVq/QLRBEwGxG oqjLrCz9LnBhvYrOagJ06D7fDSPt2oUeIp7ELsc4TZQIqdZHczEO98ZL6V1LCJEfxXBH PW1Q== MIME-Version: 1.0 X-Received: by 10.68.136.34 with SMTP id px2mr40518461pbb.90.1421024051946; Sun, 11 Jan 2015 16:54:11 -0800 (PST) Received: by 10.70.119.70 with HTTP; Sun, 11 Jan 2015 16:54:11 -0800 (PST) In-Reply-To: References: <54B28BE3.9010501@selasky.org> <54B2B02A.1030808@selasky.org> Date: Sun, 11 Jan 2015 16:54:11 -0800 Message-ID: Subject: Re: [Bug 185747] [cam] [patch] fix support for USB key "Kingston DT 101 G2" From: Joshua Ruehlig To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 00:54:12 -0000 The machine I am trying to patch is FreeBSD9.3 and doesn't have a sys/dev/usb/usb_freebsd_loader.h Can I skip patching this file, or should I direct the changes somewhere else? On Sun, Jan 11, 2015 at 11:12 AM, Joshua Ruehlig wrote: > Ok, I never compiled my own kernel but I should be able to figure it out. > On Jan 11, 2015 9:16 AM, "Hans Petter Selasky" wrote: > >> On 01/11/15 17:59, Joshua Ruehlig wrote: >> >>> Tell meif you need anything else, thanks >>> - Josh >>> >> >> Hi, >> >> Can you try the attached patch? >> >> --HPS >> >> From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 01:23:25 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2124D92E for ; Mon, 12 Jan 2015 01:23:25 +0000 (UTC) Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DE377B91 for ; Mon, 12 Jan 2015 01:23:24 +0000 (UTC) Received: by mail-pa0-f42.google.com with SMTP id et14so29217638pad.1 for ; Sun, 11 Jan 2015 17:23:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zqxFNrPV5xbQEgjFRyP/5zBbkaGG6YWbzu4TPDBGLHY=; b=nhs3+a+5QH7kTUaWFQZMpHdJ0BB7ley/T9YqQfKZRwtMUH/9NBA7YlflFJ4wvbYcKJ qqdXRkNR6ycgJ9d0kRWj6CbVZhUBeop6v/jRxnSGkkq/W5cvvDaQvB+npBRQb2V4x/i8 FRy5ghlZHgg1HsKEeoav9O3bg6bWdSfuzudB0Qm727tffAF4lpxNOn28PsT90kdw2qoY 1xViJ/Lwd1RcSRzv5GNs+gtacUMsKZbwOVZBSK/FQ4Pb5TkvbOYaJUNHKsSOZ3BELPbs 5EiEiDjerl7E0C29KDiD80tzqjlV/8sWgS0mOViWlwL4X0Shi7gaT6jy13oqozqCZZmp jBag== MIME-Version: 1.0 X-Received: by 10.70.61.130 with SMTP id p2mr32192504pdr.0.1421025804576; Sun, 11 Jan 2015 17:23:24 -0800 (PST) Received: by 10.70.119.70 with HTTP; Sun, 11 Jan 2015 17:23:24 -0800 (PST) In-Reply-To: References: <54B28BE3.9010501@selasky.org> <54B2B02A.1030808@selasky.org> Date: Sun, 11 Jan 2015 17:23:24 -0800 Message-ID: Subject: Re: [Bug 185747] [cam] [patch] fix support for USB key "Kingston DT 101 G2" From: Joshua Ruehlig To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 01:23:25 -0000 I skipped patching sys/dev/usb/usb_freebsd_loader.h on my FreeBSD 9.3 VM (which I'm passing the USB device too). I can confirm that the USB stick didn't work with a fresh FreeBSD 9.3 install, but does work after applying your patch, building, and installing a new kernel. Will this be backported to FreeBSD 9.3, I actually need this on my FreeNAS 9.3 machine. See here https://bugs.freenas.org/issues/7420#change-33198 On Sun, Jan 11, 2015 at 4:54 PM, Joshua Ruehlig wrote: > The machine I am trying to patch is FreeBSD9.3 and doesn't have a > sys/dev/usb/usb_freebsd_loader.h > Can I skip patching this file, or should I direct the changes somewhere > else? > > On Sun, Jan 11, 2015 at 11:12 AM, Joshua Ruehlig > wrote: > >> Ok, I never compiled my own kernel but I should be able to figure it out. >> On Jan 11, 2015 9:16 AM, "Hans Petter Selasky" wrote: >> >>> On 01/11/15 17:59, Joshua Ruehlig wrote: >>> >>>> Tell meif you need anything else, thanks >>>> - Josh >>>> >>> >>> Hi, >>> >>> Can you try the attached patch? >>> >>> --HPS >>> >>> > From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 06:21:23 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 353FFACF for ; Mon, 12 Jan 2015 06:21:23 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E50A1AF3 for ; Mon, 12 Jan 2015 06:21:22 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 70FF41FE022; Mon, 12 Jan 2015 07:21:18 +0100 (CET) Message-ID: <54B3680E.1050306@selasky.org> Date: Mon, 12 Jan 2015 07:22:06 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Joshua Ruehlig Subject: Re: [Bug 185747] [cam] [patch] fix support for USB key "Kingston DT 101 G2" References: <54B28BE3.9010501@selasky.org> <54B2B02A.1030808@selasky.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 06:21:23 -0000 On 01/12/15 01:54, Joshua Ruehlig wrote: > The machine I am trying to patch is FreeBSD9.3 and doesn't have a > sys/dev/usb/usb_freebsd_loader.h > Can I skip patching this file, or should I direct the changes somewhere > else? Yes, you can skip this patch. --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 06:35:32 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BA03D58 for ; Mon, 12 Jan 2015 06:35:32 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05FD1C5A for ; Mon, 12 Jan 2015 06:35:31 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B31FD1FE022; Mon, 12 Jan 2015 07:35:29 +0100 (CET) Message-ID: <54B36B62.2010308@selasky.org> Date: Mon, 12 Jan 2015 07:36:18 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Joshua Ruehlig Subject: Re: [Bug 185747] [cam] [patch] fix support for USB key "Kingston DT 101 G2" References: <54B28BE3.9010501@selasky.org> <54B2B02A.1030808@selasky.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 06:35:32 -0000 Hi, See: https://svnweb.freebsd.org/changeset/base/277044 Will be backported to 9-stable. --HPS From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 06:37:32 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AEBAD9F for ; Mon, 12 Jan 2015 06:37:32 +0000 (UTC) Received: from mail-pd0-x22c.google.com (mail-pd0-x22c.google.com [IPv6:2607:f8b0:400e:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 346EFC6E for ; Mon, 12 Jan 2015 06:37:32 +0000 (UTC) Received: by mail-pd0-f172.google.com with SMTP id y13so28862224pdi.3 for ; Sun, 11 Jan 2015 22:37:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=E04TSRanxGmwsdp/lp4H8gIhGNlj3ZHkHYA2NoqLyz4=; b=KY+PBqhrfuIk4Z3ltW5nyyxRpBnf7W/VfpPycRJ943l4cMJPI2ZHoLknyjJg3q6txW wZ163IWQpPIU+PrenWZEX75JxmcGXUzCvdTmoUw9WGcggW646DoYngBhVteOjq5+6nlU DsLtkNzrXUOEiiRd3yeeWp+DQ5wRTHRtrb/tvfeeqnOsWhNcJgVUL4jOO55m3RY5rXyv viALSsFV+DBh+S3dyDubMeyVKCyCOs0v9JbjkDPPlGaih2sfTscCVLAwy/p0F9i/CbK3 EXbfDiUF6Jm/CVDdBsfRxn05vpbxHWabKJ2IuQxHKpk+h6krtcOwx5as1tJP1FTg85RE 9dLQ== MIME-Version: 1.0 X-Received: by 10.68.132.198 with SMTP id ow6mr42174382pbb.61.1421044651118; Sun, 11 Jan 2015 22:37:31 -0800 (PST) Received: by 10.70.119.70 with HTTP; Sun, 11 Jan 2015 22:37:31 -0800 (PST) In-Reply-To: <54B36B62.2010308@selasky.org> References: <54B28BE3.9010501@selasky.org> <54B2B02A.1030808@selasky.org> <54B36B62.2010308@selasky.org> Date: Sun, 11 Jan 2015 22:37:31 -0800 Message-ID: Subject: Re: [Bug 185747] [cam] [patch] fix support for USB key "Kingston DT 101 G2" From: Joshua Ruehlig To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 06:37:32 -0000 Great, thanks =] On Sun, Jan 11, 2015 at 10:36 PM, Hans Petter Selasky wrote: > Hi, > > See: > https://svnweb.freebsd.org/changeset/base/277044 > > Will be backported to 9-stable. > > --HPS > From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 16:12:12 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6E15AF7 for ; Mon, 12 Jan 2015 16:12:12 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87553105 for ; Mon, 12 Jan 2015 16:12:12 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 9A120192A3B for ; Mon, 12 Jan 2015 16:12:11 +0000 (UTC) Message-ID: <54B3F25A.306@ignoranthack.me> Date: Mon, 12 Jan 2015 08:12:10 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: freebsd-usb@freebsd.org Subject: Lenovo x240 webcam not working with cheese/pwcview Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:12:12 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Unsure how to debug what's up here. webcamd seems to attach correctly and doesn't output any errors, but cheese is unable to access the webcam in /dev/video0 % ls -l /dev/video0 crw-rw---- 1 webcamd webcamd 0x6c Jan 12 07:54 /dev/video0 % groups sbruno sbruno wheel operator webcamd vboxusers pwcview seems to abort when attaching to my X11 session: % pwcview Webcam set to: 320x240 (sif) at 5 fps XDM authorization key matches an existing client!Failed to init sdl: Couldn't open X11 display -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUs/JYXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k35cH/Rj1zWroEIdZPj1tURl4HgfM 5tdnep/Njdc32C3ucw63tpzXPRJn3R/YR0rI38RL9JIQPjQU32lf9RhRqMWcVnvd ekjqGSepWqrTtStalcD6sG/pd8Fykz1lhgIw2rG5RIK9k/L5keiFZh8NjVZi85kX XJv5r9FssVZvmCmz6Kf+Hk2d9lC6v/lqwZAT6NnSpMxyLqnc4cTIMFhqioja/02E l3TKqIz/1DIOZ6gRVMhlsZ7MVpNZMWkfSQsHI+srnwplAdPqcVDqttaoqpK3Hjxj UgXJ7l7y0clpN03n3BmpfCun0G+pIyfAlEP0ZezfC3fonY/+U6n4uE8m/Wwu5f4= =0BDV -----END PGP SIGNATURE----- From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 16:18:09 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65E42215 for ; Mon, 12 Jan 2015 16:18:09 +0000 (UTC) Received: from mail-qc0-f181.google.com (exprod5og119.obsmtp.com [64.18.0.189]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 127F5168 for ; Mon, 12 Jan 2015 16:18:08 +0000 (UTC) Received: from mail-qc0-f181.google.com ([209.85.216.181]) (using TLSv1) by exprod5ob119.postini.com ([64.18.4.12]) with SMTP ID DSNKVLPzuTpZWN9CaNcLQpSWKEpcrk5SmGlK@postini.com; Mon, 12 Jan 2015 08:18:09 PST Received: by mail-qc0-f181.google.com with SMTP id m20so18717104qcx.12 for ; Mon, 12 Jan 2015 08:18:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type; bh=jSHWf2a6HRup3YaSFhDzNNJav6Hrbk4upYr4/8KnbXQ=; b=XWfaErhDnatP0W4IaxmmVeWBqCV579awjVFFNVYwuYbbj9PUOvsGgKl0srco9muOYL nJknsrds9r7AfIxdcm+p/W//Yu9ENL90F12iDd9MR9oVPx5LhWDC+SOMUTfQJi2OjDGV Kv7nwHiXhrk64n49h1Nz/b20X/k9Tz1OjK196sdKYauynt3rgO7ARl82ZHCWQ9fbtstB 9t2iv9sKBu0S8MOoO697gYgH/KXxqNYJpSdpO//uhFoP6TgH3ZO7BFlZVawPr2s5wSEA 5huwjBijBPuoqvOs/tZblxLmGaNMfbk74l/ZF9uZAwCP8E8ZWHfHftqK/JAGeZFgIKmL N1ew== X-Received: by 10.140.108.74 with SMTP id i68mr48247757qgf.35.1421079109061; Mon, 12 Jan 2015 08:11:49 -0800 (PST) X-Gm-Message-State: ALoCoQnojp+8ppeo0IATakX8ii+hX1rEa7JWjlf+/Ah+XoLqn8KdJt2M9CLgtBr1Be2dQVoKPhadK9ZIbUbBNTMuEUD91cI5dmUQXIVdhVAmk2RcYzNoWAKlvt/szqvcB/1D344xyTZz8K5XzV066W/IzjEWaWf7ww== X-Received: by 10.140.108.74 with SMTP id i68mr48247743qgf.35.1421079108945; Mon, 12 Jan 2015 08:11:48 -0800 (PST) Received: from [192.168.200.212] ([50.136.155.142]) by mx.google.com with ESMTPSA id z5sm15134616qal.11.2015.01.12.08.11.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jan 2015 08:11:48 -0800 (PST) Message-ID: <54B3F243.30200@llnw.com> Date: Mon, 12 Jan 2015 08:11:47 -0800 From: Sean Bruno User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: freebsd-usb@freebsd.org Subject: Lenovo x240 webcam not working with cheese/pwcview Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:18:09 -0000 Unsure how to debug what's up here. webcamd seems to attach correctly and doesn't output any errors, but cheese is unable to access the webcam in /dev/video0 % ls -l /dev/video0 crw-rw---- 1 webcamd webcamd 0x6c Jan 12 07:54 /dev/video0 % groups sbruno sbruno wheel operator webcamd vboxusers pwcview seems to abort when attaching to my X11 session: % pwcview Webcam set to: 320x240 (sif) at 5 fps XDM authorization key matches an existing client!Failed to init sdl: Couldn't open X11 display -- The information in this message may be confidential. It is intended solely for the addressee(s). If you are not the intended recipient, any disclosure, copying or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 17:52:14 2015 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6732EB3B for ; Mon, 12 Jan 2015 17:52:14 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E6DBEF8 for ; Mon, 12 Jan 2015 17:52:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CHqE8u034370 for ; Mon, 12 Jan 2015 17:52:14 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 196624] [patch] wsp.c toggle for one finger tap when integrated button is detected. Date: Mon, 12 Jan 2015 17:52:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dor.bsd@fastmail.fm X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 17:52:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196624 Bug ID: 196624 Summary: [patch] wsp.c toggle for one finger tap when integrated button is detected. Product: Base System Version: 10.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: usb Assignee: freebsd-usb@FreeBSD.org Reporter: dor.bsd@fastmail.fm This patch adds hw.usb.wsp.one_finger_tap which allows toggling left clicking by tapping on the trackpad with a single finger. Setting it to 0 disables, setting it to >= 1 enables. I have not updated the wsp(4) man page yet, but will be doing so shortly. Environment: FreeBSD 10.1-RELEASE -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 18:48:59 2015 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1091FB0 for ; Mon, 12 Jan 2015 18:48:59 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 988CD96E for ; Mon, 12 Jan 2015 18:48:59 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CImxkP016174 for ; Mon, 12 Jan 2015 18:48:59 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 196624] [patch] wsp.c toggle for one finger tap when integrated button is detected. Date: Mon, 12 Jan 2015 18:48:59 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: gavin@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:48:59 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196624 --- Comment #1 from Gavin Atkinson --- Hi, Due to an issue with the backend FreeBSD Bugzilla database, your original PR and any updates to it since have been lost. I've recreated the original PR as best as I can, however any attachments and updates you submitted to the PR have been lost. Please could you resubmit them? Thanks, and apologies. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 21:53:44 2015 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1FB8910 for ; Mon, 12 Jan 2015 21:53:44 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8DE32FA for ; Mon, 12 Jan 2015 21:53:44 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CLriKx068967 for ; Mon, 12 Jan 2015 21:53:44 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 196624] [patch] wsp.c toggle for one finger tap when integrated button is detected. Date: Mon, 12 Jan 2015 21:53:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dor.bsd@fastmail.fm X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 21:53:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196624 --- Comment #2 from David O'Rourke --- Created attachment 151509 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=151509&action=edit wsp.c one finger tap. One finger tap left-click for wsp.c. Resubmitting after Bugzilla maintenance issues. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Mon Jan 12 21:54:36 2015 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03186997 for ; Mon, 12 Jan 2015 21:54:36 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE4E4307 for ; Mon, 12 Jan 2015 21:54:35 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t0CLsZmp069839 for ; Mon, 12 Jan 2015 21:54:35 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 196624] [patch] wsp.c toggle for one finger tap when integrated button is detected. Date: Mon, 12 Jan 2015 21:54:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 10.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dor.bsd@fastmail.fm X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 21:54:36 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196624 --- Comment #3 from David O'Rourke --- Created attachment 151510 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=151510&action=edit wsp(4) updated to include details of one finger tap. wsp(4) man page with one finger tap details. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 07:15:02 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F413BEA8 for ; Tue, 13 Jan 2015 07:15:01 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1.freebsd.org (Postfix) with ESMTP id DA666141 for ; Tue, 13 Jan 2015 07:15:01 +0000 (UTC) Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id AD165105725A for ; Mon, 12 Jan 2015 23:14:56 -0800 (PST) Date: Tue, 13 Jan 2015 00:14:55 -0700 (MST) From: kott To: freebsd-usb@freebsd.org Message-ID: <1421133295061-5980199.post@n5.nabble.com> In-Reply-To: <1419877515606-5976832.post@n5.nabble.com> References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> Subject: Re: usb_pc_cpu_flush MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 13 Jan 2015 13:16:37 +0000 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 07:15:02 -0000 Yes with cache disabled, this problem is not seen. Seems to be with a issue with l2 cache. Thanks kott -- View this message in context: http://freebsd.1045724.n5.nabble.com/usb-pc-cpu-flush-tp5975583p5980199.html Sent from the freebsd-usb mailing list archive at Nabble.com. From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 14:49:44 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C31E7311 for ; Tue, 13 Jan 2015 14:49:44 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 944939D0 for ; Tue, 13 Jan 2015 14:49:44 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1YB2mn-00099B-7r; Tue, 13 Jan 2015 14:49:37 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0DEnaKT063772; Tue, 13 Jan 2015 07:49:36 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/WPJfhMnAnOma5zlLzZ/tX Message-ID: <1421160576.14601.175.camel@freebsd.org> Subject: Re: usb_pc_cpu_flush From: Ian Lepore To: kott Date: Tue, 13 Jan 2015 07:49:36 -0700 In-Reply-To: <1421133295061-5980199.post@n5.nabble.com> References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 14:49:44 -0000 On Tue, 2015-01-13 at 00:14 -0700, kott wrote: > Yes with cache disabled, this problem is not seen. Seems to be with a issue > with l2 cache. > Thanks kott Except that there are no known problems with l2 cache on armv7 right now. There are known problems with the USB driver using the busdma routines incorrectly, which accidentally works okay on x86 platforms but likely not so well on others. -- Ian From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 15:26:32 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D8BA244; Tue, 13 Jan 2015 15:26:32 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4702CDD1; Tue, 13 Jan 2015 15:26:31 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id AFD0F1FE022; Tue, 13 Jan 2015 16:26:29 +0100 (CET) Message-ID: <54B53956.4090708@selasky.org> Date: Tue, 13 Jan 2015 16:27:18 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ian Lepore , kott Subject: Re: usb_pc_cpu_flush References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> In-Reply-To: <1421160576.14601.175.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:26:32 -0000 On 01/13/15 15:49, Ian Lepore wrote: > On Tue, 2015-01-13 at 00:14 -0700, kott wrote: >> Yes with cache disabled, this problem is not seen. Seems to be with a issue >> with l2 cache. >> Thanks kott > > Except that there are no known problems with l2 cache on armv7 right > now. There are known problems with the USB driver using the busdma > routines incorrectly, which accidentally works okay on x86 platforms but > likely not so well on others. > Hi, If there is a problem it is in "usb_pc_cpu_flush()" or "usb_pc_cpu_invalidate()": void usb_pc_cpu_flush(struct usb_page_cache *pc) { if (pc->page_offset_end == pc->page_offset_buf) { /* nothing has been loaded into this page cache! */ return; } bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREWRITE); } USB has a very simple DMA sync language, either flush or invalidate. These are used correctly from what I can see with regard to the FreeBSD USB specification. If the "usb_pc_cpu_flush()" function does not cause the CPU cache to be written to RAM before the function returns, please let me know. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 15:41:05 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35C95F9 for ; Tue, 13 Jan 2015 15:41:05 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 05631F2D for ; Tue, 13 Jan 2015 15:41:04 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1YB3aT-000PSY-GH; Tue, 13 Jan 2015 15:40:57 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0DFeuEF064184; Tue, 13 Jan 2015 08:40:56 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18EsxjwU4ScQXL0oZBnfgIg Message-ID: <1421163656.14601.184.camel@freebsd.org> Subject: Re: usb_pc_cpu_flush From: Ian Lepore To: Hans Petter Selasky Date: Tue, 13 Jan 2015 08:40:56 -0700 In-Reply-To: <54B53956.4090708@selasky.org> References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:41:05 -0000 On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: > On 01/13/15 15:49, Ian Lepore wrote: > > On Tue, 2015-01-13 at 00:14 -0700, kott wrote: > >> Yes with cache disabled, this problem is not seen. Seems to be with a issue > >> with l2 cache. > >> Thanks kott > > > > Except that there are no known problems with l2 cache on armv7 right > > now. There are known problems with the USB driver using the busdma > > routines incorrectly, which accidentally works okay on x86 platforms but > > likely not so well on others. > > > > Hi, > > If there is a problem it is in "usb_pc_cpu_flush()" or > "usb_pc_cpu_invalidate()": > > void > usb_pc_cpu_flush(struct usb_page_cache *pc) > { > if (pc->page_offset_end == pc->page_offset_buf) { > /* nothing has been loaded into this page cache! */ > return; > } > bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREWRITE); > } > > USB has a very simple DMA sync language, either flush or invalidate. > These are used correctly from what I can see with regard to the FreeBSD > USB specification. > > If the "usb_pc_cpu_flush()" function does not cause the CPU cache to be > written to RAM before the function returns, please let me know. > > --HPS You have an incomplete concept of how busdma sync operations work. It isn't a simple "cpu cache written to ram" operation, there are bounce buffers and other complexities involved that require that the sync operations be done at the correct time in the correct order, and the current usb driver doesn't do that. Instead it does things like bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_POSTREAD); bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREREAD); And that's just nonsense that will lead to problems like delivering random buffer garbage to/from a device. To the degree that USB works at all on non-x86 platforms it works by accident. Usually. Except when it doesn't. -- Ian From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 15:56:53 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A8B7653; Tue, 13 Jan 2015 15:56:53 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 025781A1; Tue, 13 Jan 2015 15:56:52 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id A37A51FE022; Tue, 13 Jan 2015 16:56:50 +0100 (CET) Message-ID: <54B54073.6000409@selasky.org> Date: Tue, 13 Jan 2015 16:57:39 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: usb_pc_cpu_flush References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> In-Reply-To: <1421163656.14601.184.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:56:53 -0000 On 01/13/15 16:40, Ian Lepore wrote: > On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: >> On 01/13/15 15:49, Ian Lepore wrote: >>> On Tue, 2015-01-13 at 00:14 -0700, kott wrote: >>>> Yes with cache disabled, this problem is not seen. Seems to be with a issue >>>> with l2 cache. >>>> Thanks kott >>> >>> Except that there are no known problems with l2 cache on armv7 right >>> now. There are known problems with the USB driver using the busdma >>> routines incorrectly, which accidentally works okay on x86 platforms but >>> likely not so well on others. >>> >> >> Hi, >> >> If there is a problem it is in "usb_pc_cpu_flush()" or >> "usb_pc_cpu_invalidate()": >> >> void >> usb_pc_cpu_flush(struct usb_page_cache *pc) >> { >> if (pc->page_offset_end == pc->page_offset_buf) { >> /* nothing has been loaded into this page cache! */ >> return; >> } >> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREWRITE); >> } >> >> USB has a very simple DMA sync language, either flush or invalidate. >> These are used correctly from what I can see with regard to the FreeBSD >> USB specification. >> >> If the "usb_pc_cpu_flush()" function does not cause the CPU cache to be >> written to RAM before the function returns, please let me know. >> >> --HPS > > You have an incomplete concept of how busdma sync operations work. It > isn't a simple "cpu cache written to ram" operation, there are bounce > buffers and other complexities involved that require that the sync > operations be done at the correct time in the correct order, and the > current usb driver doesn't do that. Instead it does things like > > bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_POSTREAD); > bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREREAD); > > And that's just nonsense that will lead to problems like delivering > random buffer garbage to/from a device. > > To the degree that USB works at all on non-x86 platforms it works by > accident. Usually. Except when it doesn't. > > -- Ian > Hi, Bounce buffers are perfectly fine with USB as long as the busdma does what it is told. If there is no easy way to do a simple "cache flush" or "cache invalide" or bounce buffer "flush" or bounce buffer "invalidate" multiple times in a row, then busdma cannot co-exist with USB. It is not because I'm stubborn, but because of the way USB DMA controllers are designed. With USB chipsets we sometimes need to read the RAM area for a single buffer multiple times to poll for updates. From what I've been told in the past BUSDMA does. --HPS --HPS --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 15:58:27 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07A9A6CC; Tue, 13 Jan 2015 15:58:27 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B65461B3; Tue, 13 Jan 2015 15:58:26 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D3FFC1FE022; Tue, 13 Jan 2015 16:58:23 +0100 (CET) Message-ID: <54B540D0.60104@selasky.org> Date: Tue, 13 Jan 2015 16:59:12 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: usb_pc_cpu_flush References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> In-Reply-To: <54B54073.6000409@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:58:27 -0000 On 01/13/15 16:57, Hans Petter Selasky wrote: > BUSDMA does. > > --HPS ... allow this. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 16:29:55 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3FE0A686 for ; Tue, 13 Jan 2015 16:29:55 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F08877B7 for ; Tue, 13 Jan 2015 16:29:54 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1YB4Lp-0005tW-KS; Tue, 13 Jan 2015 16:29:53 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0DGTpIL064627; Tue, 13 Jan 2015 09:29:52 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18iFvzCJmsvylbI//cQd6pN Message-ID: <1421166591.14601.195.camel@freebsd.org> Subject: Re: usb_pc_cpu_flush From: Ian Lepore To: Hans Petter Selasky Date: Tue, 13 Jan 2015 09:29:51 -0700 In-Reply-To: <54B54073.6000409@selasky.org> References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:29:55 -0000 On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: > On 01/13/15 16:40, Ian Lepore wrote: > > On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: > >> On 01/13/15 15:49, Ian Lepore wrote: > >>> On Tue, 2015-01-13 at 00:14 -0700, kott wrote: > >>>> Yes with cache disabled, this problem is not seen. Seems to be with a issue > >>>> with l2 cache. > >>>> Thanks kott > >>> > >>> Except that there are no known problems with l2 cache on armv7 right > >>> now. There are known problems with the USB driver using the busdma > >>> routines incorrectly, which accidentally works okay on x86 platforms but > >>> likely not so well on others. > >>> > >> > >> Hi, > >> > >> If there is a problem it is in "usb_pc_cpu_flush()" or > >> "usb_pc_cpu_invalidate()": > >> > >> void > >> usb_pc_cpu_flush(struct usb_page_cache *pc) > >> { > >> if (pc->page_offset_end == pc->page_offset_buf) { > >> /* nothing has been loaded into this page cache! */ > >> return; > >> } > >> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREWRITE); > >> } > >> > >> USB has a very simple DMA sync language, either flush or invalidate. > >> These are used correctly from what I can see with regard to the FreeBSD > >> USB specification. > >> > >> If the "usb_pc_cpu_flush()" function does not cause the CPU cache to be > >> written to RAM before the function returns, please let me know. > >> > >> --HPS > > > > You have an incomplete concept of how busdma sync operations work. It > > isn't a simple "cpu cache written to ram" operation, there are bounce > > buffers and other complexities involved that require that the sync > > operations be done at the correct time in the correct order, and the > > current usb driver doesn't do that. Instead it does things like > > > > bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_POSTREAD); > > bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREREAD); > > > > And that's just nonsense that will lead to problems like delivering > > random buffer garbage to/from a device. > > > > To the degree that USB works at all on non-x86 platforms it works by > > accident. Usually. Except when it doesn't. > > > > -- Ian > > > > Hi, > > Bounce buffers are perfectly fine with USB as long as the busdma does > what it is told. If there is no easy way to do a simple "cache flush" or > "cache invalide" or bounce buffer "flush" or bounce buffer "invalidate" > multiple times in a row, then busdma cannot co-exist with USB. It is not > because I'm stubborn, but because of the way USB DMA controllers are > designed. > > With USB chipsets we sometimes need to read the RAM area for a single > buffer multiple times to poll for updates. From what I've been told in > the past BUSDMA does. > > --HPS > > --HPS > > --HPS > And so we reach the same old impasse, where you declare that USB is special and doesn't have to behave like other drivers, even though it is in no way unique in terms of having things like concurrent shared access to descriptor memory, something that virtually every modern NIC has. -- Ian From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 16:51:46 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32B7F2CA; Tue, 13 Jan 2015 16:51:46 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE5A5A8E; Tue, 13 Jan 2015 16:51:44 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 4B8B01FE022; Tue, 13 Jan 2015 17:51:42 +0100 (CET) Message-ID: <54B54D4D.3010805@selasky.org> Date: Tue, 13 Jan 2015 17:52:29 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: usb_pc_cpu_flush References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> <1421166591.14601.195.camel@freebsd.org> In-Reply-To: <1421166591.14601.195.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:51:46 -0000 On 01/13/15 17:29, Ian Lepore wrote: > On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: >> On 01/13/15 16:40, Ian Lepore wrote: >>> On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: >>>> On 01/13/15 15:49, Ian Lepore wrote: >>>>> On Tue, 2015-01-13 at 00:14 -0700, kott wrote: >>>>>> Yes with cache disabled, this problem is not seen. Seems to be with a issue >>>>>> with l2 cache. >>>>>> Thanks kott >>>>> >>>>> Except that there are no known problems with l2 cache on armv7 right >>>>> now. There are known problems with the USB driver using the busdma >>>>> routines incorrectly, which accidentally works okay on x86 platforms but >>>>> likely not so well on others. >>>>> >>>> >>>> Hi, >>>> >>>> If there is a problem it is in "usb_pc_cpu_flush()" or >>>> "usb_pc_cpu_invalidate()": >>>> >>>> void >>>> usb_pc_cpu_flush(struct usb_page_cache *pc) >>>> { >>>> if (pc->page_offset_end == pc->page_offset_buf) { >>>> /* nothing has been loaded into this page cache! */ >>>> return; >>>> } >>>> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREWRITE); >>>> } >>>> >>>> USB has a very simple DMA sync language, either flush or invalidate. >>>> These are used correctly from what I can see with regard to the FreeBSD >>>> USB specification. >>>> >>>> If the "usb_pc_cpu_flush()" function does not cause the CPU cache to be >>>> written to RAM before the function returns, please let me know. >>>> >>>> --HPS >>> >>> You have an incomplete concept of how busdma sync operations work. It >>> isn't a simple "cpu cache written to ram" operation, there are bounce >>> buffers and other complexities involved that require that the sync >>> operations be done at the correct time in the correct order, and the >>> current usb driver doesn't do that. Instead it does things like >>> >>> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_POSTREAD); >>> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREREAD); >>> >>> And that's just nonsense that will lead to problems like delivering >>> random buffer garbage to/from a device. >>> >>> To the degree that USB works at all on non-x86 platforms it works by >>> accident. Usually. Except when it doesn't. >>> >>> -- Ian >>> >> >> Hi, >> >> Bounce buffers are perfectly fine with USB as long as the busdma does >> what it is told. If there is no easy way to do a simple "cache flush" or >> "cache invalide" or bounce buffer "flush" or bounce buffer "invalidate" >> multiple times in a row, then busdma cannot co-exist with USB. It is not >> because I'm stubborn, but because of the way USB DMA controllers are >> designed. >> >> With USB chipsets we sometimes need to read the RAM area for a single >> buffer multiple times to poll for updates. From what I've been told in >> the past BUSDMA does. >> >> --HPS >> >> --HPS >> >> --HPS >> > > And so we reach the same old impasse, where you declare that USB is > special and doesn't have to behave like other drivers, even though it is > in no way unique in terms of having things like concurrent shared access > to descriptor memory, something that virtually every modern NIC has. > Hi, Can you give an example of a NIC driver which you consider a good example which use DMA both for data (not only mbufs) and the control path and use busdma as you consider to be correct? --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 16:53:13 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB3C7320; Tue, 13 Jan 2015 16:53:13 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 770D7AAA; Tue, 13 Jan 2015 16:53:13 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id AFD301FE022; Tue, 13 Jan 2015 17:53:11 +0100 (CET) Message-ID: <54B54DA7.5000301@selasky.org> Date: Tue, 13 Jan 2015 17:53:59 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: usb_pc_cpu_flush References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> <1421166591.14601.195.camel@freebsd.org> <54B54D4D.3010805@selasky.org> In-Reply-To: <54B54D4D.3010805@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:53:13 -0000 On 01/13/15 17:52, Hans Petter Selasky wrote: > > Hi, > > Can you give an example of a NIC driver which you consider a good > example which use DMA both for data (not only mbufs) and the control > path and use busdma as you consider to be correct? > > --HPS So that I can compare this agains what USB is doing. --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 18:12:30 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E383E46; Tue, 13 Jan 2015 18:12:30 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D97DB619; Tue, 13 Jan 2015 18:12:29 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 7962A1FE022; Tue, 13 Jan 2015 19:12:27 +0100 (CET) Message-ID: <54B5603B.6010504@selasky.org> Date: Tue, 13 Jan 2015 19:13:15 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: usb_pc_cpu_flush References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> <1421166591.14601.195.camel@freebsd.org> <54B54D4D.3010805@selasky.org> <54B54DA7.5000301@selasky.org> In-Reply-To: <54B54DA7.5000301@selasky.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 18:12:30 -0000 Hi Kott, Can you tell us which ARM kernel configuration file you are using for FreeBSD? Reading through this thread I cannot see this piece of information yet. Have you tested other ARM platforms? Thank you, --HPS From owner-freebsd-usb@FreeBSD.ORG Tue Jan 13 20:25:05 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE84378F for ; Tue, 13 Jan 2015 20:25:04 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA4B181C for ; Tue, 13 Jan 2015 20:25:04 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1YB81O-000ALu-6l; Tue, 13 Jan 2015 20:25:02 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0DKP0c1066514; Tue, 13 Jan 2015 13:25:00 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/j88sO821jTKSGZB1ysbRR Message-ID: <1421180700.14601.209.camel@freebsd.org> Subject: Re: usb_pc_cpu_flush From: Ian Lepore To: Hans Petter Selasky Date: Tue, 13 Jan 2015 13:25:00 -0700 In-Reply-To: <54B54D4D.3010805@selasky.org> References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> <1421166591.14601.195.camel@freebsd.org> <54B54D4D.3010805@selasky.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 20:25:05 -0000 On Tue, 2015-01-13 at 17:52 +0100, Hans Petter Selasky wrote: > On 01/13/15 17:29, Ian Lepore wrote: > > On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: > >> On 01/13/15 16:40, Ian Lepore wrote: > >>> On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: > >>>> On 01/13/15 15:49, Ian Lepore wrote: > >>>>> On Tue, 2015-01-13 at 00:14 -0700, kott wrote: > >>>>>> Yes with cache disabled, this problem is not seen. Seems to be with a issue > >>>>>> with l2 cache. > >>>>>> Thanks kott > >>>>> > >>>>> Except that there are no known problems with l2 cache on armv7 right > >>>>> now. There are known problems with the USB driver using the busdma > >>>>> routines incorrectly, which accidentally works okay on x86 platforms but > >>>>> likely not so well on others. > >>>>> > >>>> > >>>> Hi, > >>>> > >>>> If there is a problem it is in "usb_pc_cpu_flush()" or > >>>> "usb_pc_cpu_invalidate()": > >>>> > >>>> void > >>>> usb_pc_cpu_flush(struct usb_page_cache *pc) > >>>> { > >>>> if (pc->page_offset_end == pc->page_offset_buf) { > >>>> /* nothing has been loaded into this page cache! */ > >>>> return; > >>>> } > >>>> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREWRITE); > >>>> } > >>>> > >>>> USB has a very simple DMA sync language, either flush or invalidate. > >>>> These are used correctly from what I can see with regard to the FreeBSD > >>>> USB specification. > >>>> (unless a simple restart somehow fixes the problem) > >>>> If the "usb_pc_cpu_flush()" function does not cause the CPU cache to be > >>>> written to RAM before the function returns, please let me know. > >>>> > >>>> --HPS > >>> > >>> You have an incomplete concept of how busdma sync operations work. It > >>> isn't a simple "cpu cache written to ram" operation, there are bounce > >>> buffers and other complexities involved that require that the sync > >>> operations be done at the correct time in the correct order, and the > >>> current usb driver doesn't do that. Instead it does things like > >>> > >>> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_POSTREAD); > >>> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREREAD); > >>> > >>> And that's just nonsense that will lead to problems like delivering > >>> random buffer garbage to/from a device. > >>> > >>> To the degree that USB works at all on non-x86 platforms it works by > >>> accident. Usually. Except when it doesn't. > >>> > >>> -- Ian > >>> > >> > >> Hi, > >> > >> Bounce buffers are perfectly fine with USB as long as the busdma does > >> what it is told. If there is no easy way to do a simple "cache flush" or > >> "cache invalide" or bounce buffer "flush" or bounce buffer "invalidate" > >> multiple times in a row, then busdma cannot co-exist with USB. It is not > >> because I'm stubborn, but because of the way USB DMA controllers are > >> designed. > >> > >> With USB chipsets we sometimes need to read the RAM area for a single > >> buffer multiple times to poll for updates. From what I've been told in > >> the past BUSDMA does. > >> > >> --HPS > >> > >> --HPS > >> > >> --HPS > >> > > > > And so we reach the same old impasse, where you declare that USB is > > special and doesn't have to behave like other drivers, even though it is > > in no way unique in terms of having things like concurrent shared access > > to descriptor memory, something that virtually every modern NIC has. > > > > Hi, > > Can you give an example of a NIC driver which you consider a good > example which use DMA both for data (not only mbufs) and the control > path and use busdma as you consider to be correct? > > --HPS dev/ffec/if_ffec.c. I'm not happy with the fact that it takes two calls (a PRE and a POST) to accomplish a single action, but that's the right way to do things in the current busdma world, PRE and POST operations need to be paired. I think we need new busdma support for shared concurrent access descriptors, because it's a type of dma that just isn't supported well by the existing API. There should be a new flag for bus_dmamem_alloc() that indicates the memory is going to be used for such shared access (because some platforms may be able to provide memory that's mapped optimally for such situations), and there should be new sync ops that don't require a pair of calls to accomplish a single action. All of this is in the context of shared descriptor memory. Regular IO buffers should just use the proper sequence of PRE and POST syncs (and most especially should *never* do POSTREAD before PREREAD like the current usb_pc_cpu_invalidate() does, because with bounce buffers that will just not work right). -- Ian From owner-freebsd-usb@FreeBSD.ORG Wed Jan 14 05:12:28 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F525C35; Wed, 14 Jan 2015 05:12:28 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 115CB63B; Wed, 14 Jan 2015 05:12:27 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 52C701FE022; Wed, 14 Jan 2015 06:12:24 +0100 (CET) Message-ID: <54B5FAE8.7020705@selasky.org> Date: Wed, 14 Jan 2015 06:13:12 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: usb_pc_cpu_flush References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> <1421166591.14601.195.camel@freebsd.org> <54B54D4D.3010805@selasky.org> <1421180700.14601.209.camel@freebsd.org> In-Reply-To: <1421180700.14601.209.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:12:28 -0000 On 01/13/15 21:25, Ian Lepore wrote: > On Tue, 2015-01-13 at 17:52 +0100, Hans Petter Selasky wrote: >> On 01/13/15 17:29, Ian Lepore wrote: >>> On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: >>>> On 01/13/15 16:40, Ian Lepore wrote: >>>>> On Tue, 2015-01-13 at 16:27 +0100, Hans Petter Selasky wrote: >>>>>> On 01/13/15 15:49, Ian Lepore wrote: >>>>>>> On Tue, 2015-01-13 at 00:14 -0700, kott wrote: >>>>>>>> Yes with cache disabled, this problem is not seen. Seems to be with a issue >>>>>>>> with l2 cache. >>>>>>>> Thanks kott >>>>>>> >>>>>>> Except that there are no known problems with l2 cache on armv7 right >>>>>>> now. There are known problems with the USB driver using the busdma >>>>>>> routines incorrectly, which accidentally works okay on x86 platforms but >>>>>>> likely not so well on others. >>>>>>> >>>>>> >>>>>> Hi, >>>>>> >>>>>> If there is a problem it is in "usb_pc_cpu_flush()" or >>>>>> "usb_pc_cpu_invalidate()": >>>>>> >>>>>> void >>>>>> usb_pc_cpu_flush(struct usb_page_cache *pc) >>>>>> { >>>>>> if (pc->page_offset_end == pc->page_offset_buf) { >>>>>> /* nothing has been loaded into this page cache! */ >>>>>> return; >>>>>> } >>>>>> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREWRITE); >>>>>> } >>>>>> >>>>>> USB has a very simple DMA sync language, either flush or invalidate. >>>>>> These are used correctly from what I can see with regard to the FreeBSD >>>>>> USB specification. >>>>>> (unless a simple restart somehow fixes the problem) >>>>>> If the "usb_pc_cpu_flush()" function does not cause the CPU cache to be >>>>>> written to RAM before the function returns, please let me know. >>>>>> >>>>>> --HPS >>>>> >>>>> You have an incomplete concept of how busdma sync operations work. It >>>>> isn't a simple "cpu cache written to ram" operation, there are bounce >>>>> buffers and other complexities involved that require that the sync >>>>> operations be done at the correct time in the correct order, and the >>>>> current usb driver doesn't do that. Instead it does things like >>>>> >>>>> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_POSTREAD); >>>>> bus_dmamap_sync(pc->tag, pc->map, BUS_DMASYNC_PREREAD); >>>>> >>>>> And that's just nonsense that will lead to problems like delivering >>>>> random buffer garbage to/from a device. >>>>> >>>>> To the degree that USB works at all on non-x86 platforms it works by >>>>> accident. Usually. Except when it doesn't. >>>>> >>>>> -- Ian >>>>> >>>> >>>> Hi, >>>> >>>> Bounce buffers are perfectly fine with USB as long as the busdma does >>>> what it is told. If there is no easy way to do a simple "cache flush" or >>>> "cache invalide" or bounce buffer "flush" or bounce buffer "invalidate" >>>> multiple times in a row, then busdma cannot co-exist with USB. It is not >>>> because I'm stubborn, but because of the way USB DMA controllers are >>>> designed. >>>> >>>> With USB chipsets we sometimes need to read the RAM area for a single >>>> buffer multiple times to poll for updates. From what I've been told in >>>> the past BUSDMA does. >>>> >>>> --HPS >>>> >>>> --HPS >>>> >>>> --HPS >>>> >>> >>> And so we reach the same old impasse, where you declare that USB is >>> special and doesn't have to behave like other drivers, even though it is >>> in no way unique in terms of having things like concurrent shared access >>> to descriptor memory, something that virtually every modern NIC has. >>> >> >> Hi, >> >> Can you give an example of a NIC driver which you consider a good >> example which use DMA both for data (not only mbufs) and the control >> path and use busdma as you consider to be correct? >> >> --HPS > > dev/ffec/if_ffec.c. I'm not happy with the fact that it takes two calls > (a PRE and a POST) to accomplish a single action, but that's the right > way to do things in the current busdma world, PRE and POST operations > need to be paired. > > I think we need new busdma support for shared concurrent access > descriptors, because it's a type of dma that just isn't supported well > by the existing API. There should be a new flag for bus_dmamem_alloc() > that indicates the memory is going to be used for such shared access > (because some platforms may be able to provide memory that's mapped > optimally for such situations), and there should be new sync ops that > don't require a pair of calls to accomplish a single action. > > All of this is in the context of shared descriptor memory. Regular IO > buffers should just use the proper sequence of PRE and POST syncs (and > most especially should *never* do POSTREAD before PREREAD like the > current usb_pc_cpu_invalidate() does, because with bounce buffers that > will just not work right). > Hi, I understand and that can be done for IO-buffers like in the FFEC driver. For other buffers it is a bigger task, however: I see that some memory is allocated using "BUS_DMA_COHERENT" in if_ffec.c and in those cases no busdma sync operations are performed! Is that correct? For example "rxdesc_ring" is allocated coherently and no cache sync ops are done before and after access. The buffer that Mr. Kott hit a crash on should also be allocated coherently. Looking at the ARM busdma code in -current I see a possible bug: > int > _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, > bus_size_t buflen, struct pmap *pmap, int flags, bus_dma_segment_t *segs, > int *segp) > { > bus_size_t sgsize; > bus_addr_t curaddr; > struct sync_list *sl; > vm_offset_t vaddr = (vm_offset_t)buf; > int error = 0; > > if (segs == NULL) > segs = dmat->segments; > if ((flags & BUS_DMA_LOAD_MBUF) != 0) > map->flags |= DMAMAP_CACHE_ALIGNED; > > if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { > _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, flags); > if (map->pagesneeded != 0) { > error = _bus_dmamap_reserve_pages(dmat, map, flags); > if (error) > return (error); > } > } > CTR3(KTR_BUSDMA, "lowaddr= %d boundary= %d, " > "alignment= %d", dmat->lowaddr, dmat->boundary, dmat->alignment); > > while (buflen > 0) { > /* > * Get the physical address for this segment. > */ > if (__predict_true(pmap == kernel_pmap)) { > curaddr = pmap_kextract(vaddr); > } else { > curaddr = pmap_extract(pmap, vaddr); > map->flags &= ~DMAMAP_COHERENT; > } If the memory was allocated coherently and we clear the DMAMAP_COHERENT flag when we are loading the memory, the memory will get freed to the wrong bucket when we later free it - right? > if (map->flags & DMAMAP_COHERENT) > ba = coherent_allocator; > else > ba = standard_allocator; > Kott: Can you try to comment out: map->flags &= ~DMAMAP_COHERENT; In "sys/arm/arm/busdma_machdep.c" and see if it makes any difference? Ian: Can you explain what the check "pmap == kernel_pmap" means when it is true? Does it mean that the memory is mapped into virtual kernel space? And if false? To optimise BUSDMA allocations the USB stack will allocate a PAGE_SIZE object and then load smaller parts of the PAGE_SIZE allocation using BUSDMA. Is this supported by BUSDMA? --HPS From owner-freebsd-usb@FreeBSD.ORG Wed Jan 14 15:04:01 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74163533 for ; Wed, 14 Jan 2015 15:04:01 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E4E0D4F for ; Wed, 14 Jan 2015 15:04:00 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1YBPUA-0009ob-AH; Wed, 14 Jan 2015 15:03:54 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0EF3qng076032; Wed, 14 Jan 2015 08:03:52 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1//YPXF7llVr79hoD7W5t8e Message-ID: <1421247832.14601.258.camel@freebsd.org> Subject: Re: usb_pc_cpu_flush From: Ian Lepore To: Hans Petter Selasky Date: Wed, 14 Jan 2015 08:03:52 -0700 In-Reply-To: <54B5FAE8.7020705@selasky.org> References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> <1421166591.14601.195.camel@freebsd.org> <54B54D4D.3010805@selasky.org> <1421180700.14601.209.camel@freebsd.org> <54B5FAE8.7020705@selasky.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 15:04:01 -0000 On Wed, 2015-01-14 at 06:13 +0100, Hans Petter Selasky wrote: > On 01/13/15 21:25, Ian Lepore wrote: > > On Tue, 2015-01-13 at 17:52 +0100, Hans Petter Selasky wrote: > >> On 01/13/15 17:29, Ian Lepore wrote: > >>> On Tue, 2015-01-13 at 16:57 +0100, Hans Petter Selasky wrote: [...] > >> > >> Hi, > >> > >> Can you give an example of a NIC driver which you consider a good > >> example which use DMA both for data (not only mbufs) and the control > >> path and use busdma as you consider to be correct? > >> > >> --HPS > > > > dev/ffec/if_ffec.c. I'm not happy with the fact that it takes two calls > > (a PRE and a POST) to accomplish a single action, but that's the right > > way to do things in the current busdma world, PRE and POST operations > > need to be paired. > > > > I think we need new busdma support for shared concurrent access > > descriptors, because it's a type of dma that just isn't supported well > > by the existing API. There should be a new flag for bus_dmamem_alloc() > > that indicates the memory is going to be used for such shared access > > (because some platforms may be able to provide memory that's mapped > > optimally for such situations), and there should be new sync ops that > > don't require a pair of calls to accomplish a single action. > > > > All of this is in the context of shared descriptor memory. Regular IO > > buffers should just use the proper sequence of PRE and POST syncs (and > > most especially should *never* do POSTREAD before PREREAD like the > > current usb_pc_cpu_invalidate() does, because with bounce buffers that > > will just not work right). > > > > Hi, > > I understand and that can be done for IO-buffers like in the FFEC > driver. For other buffers it is a bigger task, however: > > I see that some memory is allocated using "BUS_DMA_COHERENT" in > if_ffec.c and in those cases no busdma sync operations are performed! Is > that correct? For example "rxdesc_ring" is allocated coherently and no > cache sync ops are done before and after access. > No, it does do sync operations on the descriptors rings, because one of the documented rules of coherent memory is that you still have to do all the normal sync ops. Traditionally coherent has meant "completely disable caching" on arm and you could get away with not doing the sync ops, but that's not true anymore. Arm memory subsystems are more complex these days and sync ops are needed in some cases even for uncached memory. In the current ffec code, sync ops on descriptor memory are done on line 655/657 (these could really be back to back without the TDAR write between them). At this point new descriptors have been written to the tx ring and the PREWRITE makes the changes visible to the hardware, the write into the TDAR register informs the hardware that descriptors were changed and it should rescan the list. The POSTWRITE is a no-op but included for technical correctness. Another desc-ring related set of sync ops is on lines 683-684. In this case the hardware has updated some of the descriptors and the PREREAD/POSTREAD sync ops ensure that the cpu will see the changes. The same is true on lines 850-851. This is the place where having two calls is really a performance hit, because both PRE and POSTREAD sync will do an invalidate, and it really only needs to be done once, but the busdma conventions are that PRE and POST ops need to come in properly-sequenced pairs. And finally on 899-900 is the rx code similar to the tx code on 655/657, where the driver has updated descriptors in the ring and done a PREWRITE to make the changes visible to the hardware. > The buffer that Mr. Kott hit a crash on should also be allocated > coherently. Looking at the ARM busdma code in -current I see a possible bug: > > > int > > _bus_dmamap_load_buffer(bus_dma_tag_t dmat, bus_dmamap_t map, void *buf, > > bus_size_t buflen, struct pmap *pmap, int flags, bus_dma_segment_t *segs, > > int *segp) > > { > > bus_size_t sgsize; > > bus_addr_t curaddr; > > struct sync_list *sl; > > vm_offset_t vaddr = (vm_offset_t)buf; > > int error = 0; > > > > if (segs == NULL) > > segs = dmat->segments; > > if ((flags & BUS_DMA_LOAD_MBUF) != 0) > > map->flags |= DMAMAP_CACHE_ALIGNED; > > > > if ((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) { > > _bus_dmamap_count_pages(dmat, map, pmap, buf, buflen, flags); > > if (map->pagesneeded != 0) { > > error = _bus_dmamap_reserve_pages(dmat, map, flags); > > if (error) > > return (error); > > } > > } > > CTR3(KTR_BUSDMA, "lowaddr= %d boundary= %d, " > > "alignment= %d", dmat->lowaddr, dmat->boundary, dmat->alignment); > > > > while (buflen > 0) { > > /* > > * Get the physical address for this segment. > > */ > > if (__predict_true(pmap == kernel_pmap)) { > > curaddr = pmap_kextract(vaddr); > > } else { > > curaddr = pmap_extract(pmap, vaddr); > > map->flags &= ~DMAMAP_COHERENT; > > } > > If the memory was allocated coherently and we clear the DMAMAP_COHERENT > flag when we are loading the memory, the memory will get freed to the > wrong bucket when we later free it - right? > > > if (map->flags & DMAMAP_COHERENT) > > ba = coherent_allocator; > > else > > ba = standard_allocator; > > > > Kott: Can you try to comment out: > > map->flags &= ~DMAMAP_COHERENT; > > In "sys/arm/arm/busdma_machdep.c" and see if it makes any difference? > > Ian: Can you explain what the check "pmap == kernel_pmap" means when it > is true? Does it mean that the memory is mapped into virtual kernel > space? And if false? > Firstly, that's armv4 code that isn't in play on an armv6/7 platform. Secondly, remember how I said recently that handling IO directly in/out of userland buffers wasn't likely to work correctly on arm? (I haven't forgotten that you asked a followup question, I just haven't found time to reply in detail yet.) What you've spotted above is a little bit of the old attempts to try to support that on armv4. It never worked right. The bottom line is that pmap will always equal kernel_pmap. The else of that code really should be changed into a panic(). > To optimise BUSDMA allocations the USB stack will allocate a PAGE_SIZE > object and then load smaller parts of the PAGE_SIZE allocation using > BUSDMA. Is this supported by BUSDMA? If you are allocating the memory using bus_dmamem_alloc() then no, absolutely not. It's working for you by accident because of the USB_HOST_ALIGN hacks which I think date back to freebsd 8 or so. When I talked to you a couple years ago about doing it the right way, you were outraged (perhaps rightly so) about the inefficiency involved, because of things like allocating a 16 byte buffer causing the allocation of a full page just so that the caching attributes could be changed. So I fixed that with the busdma zone allocator stuff that makes it very efficient to allocate many tiny dma buffers (coherent or not), and when you use buffers allocated that way, the sync operations code can make some safe assumptions and avoid doing bounces due to cacheline alignments. If buffers were allocated right-sized now that it's efficient to do so, the USB_HOST_ALIGN hack could go away. Hmm, actually it might be necessary to start using the busdma zone allocator in mips as well before undoing the hack. -- Ian From owner-freebsd-usb@FreeBSD.ORG Wed Jan 14 15:22:27 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9B41759; Wed, 14 Jan 2015 15:22:27 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FEECF25; Wed, 14 Jan 2015 15:22:26 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id F37481FE022; Wed, 14 Jan 2015 16:22:24 +0100 (CET) Message-ID: <54B689E0.7040005@selasky.org> Date: Wed, 14 Jan 2015 16:23:12 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: usb_pc_cpu_flush References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> <1421166591.14601.195.camel@freebsd.org> <54B54D4D.3010805@selasky.org> <1421180700.14601.209.camel@freebsd.org> <54B5FAE8.7020705@selasky.org> <1421247832.14601.258.camel@freebsd.org> In-Reply-To: <1421247832.14601.258.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 15:22:27 -0000 On 01/14/15 16:03, Ian Lepore wrote: > If you are allocating the memory using bus_dmamem_alloc() then no, > absolutely not. It's working for you by accident because of the > USB_HOST_ALIGN hacks which I think date back to freebsd 8 or so. > > When I talked to you a couple years ago about doing it the right way, > you were outraged (perhaps rightly so) about the inefficiency involved, > because of things like allocating a 16 byte buffer causing the > allocation of a full page just so that the caching attributes could be > changed. So I fixed that with the busdma zone allocator stuff that > makes it very efficient to allocate many tiny dma buffers (coherent or > not), and when you use buffers allocated that way, the sync operations > code can make some safe assumptions and avoid doing bounces due to > cacheline alignments. > > If buffers were allocated right-sized now that it's efficient to do so, > the USB_HOST_ALIGN hack could go away. Hmm, actually it might be > necessary to start using the busdma zone allocator in mips as well > before undoing the hack. Hi Ian, This sounds good. I'll make a quick patch you can try this week which splits the USB busdma allocations again. It is a quite trivial thing to do. Can you or Kott then test this patch? --HPS From owner-freebsd-usb@FreeBSD.ORG Thu Jan 15 08:03:14 2015 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B4F41D7 for ; Thu, 15 Jan 2015 08:03:14 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 132EDA1B for ; Thu, 15 Jan 2015 08:03:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t0F83Dq4003059 for ; Thu, 15 Jan 2015 08:03:13 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 196362] [u3g] [patch] add dlink dwm-157 support to u3g Date: Thu, 15 Jan 2015 08:03:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: max.n.boyarov@gmail.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-usb@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 08:03:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196362 --- Comment #1 from max.n.boyarov@gmail.com --- who could commit this? :) -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Fri Jan 16 10:25:43 2015 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C00D84D for ; Fri, 16 Jan 2015 10:25:43 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54135B8A for ; Fri, 16 Jan 2015 10:25:43 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id t0GAPhNC082758 for ; Fri, 16 Jan 2015 10:25:43 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-usb@FreeBSD.org Subject: [Bug 196362] [u3g] [patch] add dlink dwm-157 support to u3g Date: Fri, 16 Jan 2015 10:25:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: usb X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: hselasky@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: hselasky@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:25:43 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196362 Hans Petter Selasky changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hselasky@FreeBSD.org Assignee|freebsd-usb@FreeBSD.org |hselasky@FreeBSD.org -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-usb@FreeBSD.ORG Fri Jan 16 11:59:13 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7610DE9A; Fri, 16 Jan 2015 11:59:13 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F23F0785; Fri, 16 Jan 2015 11:59:12 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 695341FE023; Fri, 16 Jan 2015 12:59:10 +0100 (CET) Message-ID: <54B8FD3E.2080404@selasky.org> Date: Fri, 16 Jan 2015 12:59:58 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: usb_pc_cpu_flush References: <1419359192795-5975583.post@n5.nabble.com> <5499E734.1070507@selasky.org> <1419392511197-5975691.post@n5.nabble.com> <549A811D.3060204@selasky.org> <1419416870924-5975752.post@n5.nabble.com> <1419423740820-5975763.post@n5.nabble.com> <549AB711.8070005@selasky.org> <1419431704871-5975773.post@n5.nabble.com> <549BF430.8000207@selasky.org> <1419877515606-5976832.post@n5.nabble.com> <1421133295061-5980199.post@n5.nabble.com> <1421160576.14601.175.camel@freebsd.org> <54B53956.4090708@selasky.org> <1421163656.14601.184.camel@freebsd.org> <54B54073.6000409@selasky.org> <1421166591.14601.195.camel@freebsd.org> <54B54D4D.3010805@selasky.org> <1421180700.14601.209.camel@freebsd.org> <54B5FAE8.7020705@selasky.org> <1421247832.14601.258.camel@freebsd.org> In-Reply-To: <1421247832.14601.258.camel@freebsd.org> Content-Type: multipart/mixed; boundary="------------000401020609010105020704" Cc: kott , freebsd-usb@freebsd.org X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 11:59:13 -0000 This is a multi-part message in MIME format. --------------000401020609010105020704 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi Ian, Please find attached a patch which disable the double mapping of allocated DMA capable buffers in the USB stack for all drivers. Can you test it and check out the total memory usage before and after the patch? Also verify it if makes any difference on any platforms. Thank you! --HPS --------------000401020609010105020704 Content-Type: text/x-patch; name="usb_busdma.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="usb_busdma.diff" Index: sys/dev/usb/usb_transfer.c =================================================================== --- sys/dev/usb/usb_transfer.c (revision 277240) +++ sys/dev/usb/usb_transfer.c (working copy) @@ -237,7 +237,7 @@ n_obj = 1; } else { /* compute number of objects per page */ - n_obj = (USB_PAGE_SIZE / size); + n_obj = 1; /* (USB_PAGE_SIZE / size); */ /* * Compute number of DMA chunks, rounded up * to nearest one: @@ -273,8 +273,11 @@ &parm->curr_xfer->xroot->dma_parent_tag; } - if (ppc) { - *ppc = parm->xfer_page_cache_ptr; + if (ppc != NULL) { + if (n_obj != 1) + *ppc = parm->xfer_page_cache_ptr; + else + *ppc = parm->dma_page_cache_ptr; } r = count; /* set remainder count */ z = n_obj * size; /* set allocation size */ @@ -281,7 +284,18 @@ pc = parm->xfer_page_cache_ptr; pg = parm->dma_page_ptr; - for (x = 0; x != n_dma_pc; x++) { + if (n_obj == 1) { + for (x = 0; x != n_dma_pc; x++) { + if (usb_pc_alloc_mem(parm->dma_page_cache_ptr, + pg, z, align)) { + return (1); /* failure */ + } + /* Make room for one DMA page cache and "n_dma_pg" pages */ + parm->dma_page_cache_ptr++; + pg += n_dma_pg; + } + } else { + for (x = 0; x != n_dma_pc; x++) { if (r < n_obj) { /* compute last remainder */ @@ -294,7 +308,7 @@ } /* Set beginning of current buffer */ buf = parm->dma_page_cache_ptr->buffer; - /* Make room for one DMA page cache and one page */ + /* Make room for one DMA page cache and "n_dma_pg" pages */ parm->dma_page_cache_ptr++; pg += n_dma_pg; @@ -314,6 +328,7 @@ } mtx_unlock(pc->tag_parent->mtx); } + } } parm->xfer_page_cache_ptr = pc; --------------000401020609010105020704-- From owner-freebsd-usb@FreeBSD.ORG Fri Jan 16 17:32:31 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97C7F154 for ; Fri, 16 Jan 2015 17:32:31 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 769AB17B for ; Fri, 16 Jan 2015 17:32:31 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 7D5FD192A3B for ; Fri, 16 Jan 2015 17:32:30 +0000 (UTC) Message-ID: <54B94B2E.9030701@ignoranthack.me> Date: Fri, 16 Jan 2015 09:32:30 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-usb@freebsd.org Subject: Re: Lenovo x240 webcam not working with cheese/pwcview References: <54B3F25A.306@ignoranthack.me> In-Reply-To: <54B3F25A.306@ignoranthack.me> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 17:32:31 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/12/15 08:12, Sean Bruno wrote: > Unsure how to debug what's up here. webcamd seems to attach > correctly and doesn't output any errors, but cheese is unable to > access the webcam in /dev/video0 > > % ls -l /dev/video0 crw-rw---- 1 webcamd webcamd 0x6c Jan 12 > 07:54 /dev/video0 % groups sbruno sbruno wheel operator webcamd > vboxusers > > pwcview seems to abort when attaching to my X11 session: > > % pwcview Webcam set to: 320x240 (sif) at 5 fps XDM authorization > key matches an existing client!Failed to init sdl: Couldn't open > X11 display The Lenovo X240 has one of these: ugen0.3: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) webcamd and cuse4bsd seem "happy" with it: # /usr/local/sbin/webcamd -i 0 -d ugen0.3 -U webcamd -G webcamd -H Attached to ugen0.3[0] Waiting for HAL USB device. Creating /dev/video0 when trying to use cheese to test it out, I get some strangess like it can't seem to find a libvorbis package of something? (cheese:1283): cheese-WARNING **: Your GStreamer installation is missing a plug-in.: gstencodebin.c(1474): StreamGroup *_create_stream_group(GstEncodeBin *, GstEncodingProfile *, const gchar *, GstCaps *) (): /GstCameraBin:camerabin/GstEncodeBin:video-encodebin: Couldn't create encoder for format audio/x-vorbis However, I seem to have all the things required for this to work? % pkg info | grep -i vorbis gstreamer-plugins-vorbis-0.10.36_1,3 Gstreamer vorbis encoder/decoder plugin libvorbis-1.3.4_2,3 Audio compression codec library -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUuUssXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kYoIH/RjqL80m3k2MU/DNMls+KbQy MJ2okoRt2zUM4fXG1KnqqvPaqIdfEm6FJjl7rpxk9ln5E/cBfPPSKMO0yJUgImhL GdGKfPdI+zD4BRWecz6de78vMcvWWkiyKv6IfaKsJObTDOIdIcz7O5av1Pvuji3m kXj3OOTjyGDeo9blc0cORWU/XLuSpgxStFALAnZvhxNp04KWkg0IqqhYFXYP0ckb V270z8Iz9tAXavJCho3Wq4sy708pPDCxZjnqOThg8v5Pb5IogRF+scTNxqF3cbbE YPB9Vu0VBiHSJ7Nb3pe4kRxlZOFFI1c4iIEZTk0bDScPEP0VMgHv+sFqQFbJ/xo= =znnR -----END PGP SIGNATURE----- From owner-freebsd-usb@FreeBSD.ORG Fri Jan 16 18:00:14 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85873D82 for ; Fri, 16 Jan 2015 18:00:14 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 654587A8 for ; Fri, 16 Jan 2015 18:00:13 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id CC897192A3B for ; Fri, 16 Jan 2015 18:00:12 +0000 (UTC) Message-ID: <54B951AB.2000102@ignoranthack.me> Date: Fri, 16 Jan 2015 10:00:11 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-usb@freebsd.org Subject: USB 3 strange behavior, lenovo x240 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:00:14 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 I'm seeing strange behavior when I enable USB 3 support on my laptop. Running head @r276878: Disabling USB 3 makes things behave "better" in that my wireless device will actually serve traffic and /dev/video0 will really exist when I switch over. Using USB 3 makes things behave erratically if at all. Devices don't appear after a reboot and I'm seeing issues using my USB 2 devices. % usbconfig ugen0.1: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen1.1: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.2: <802.11n NIC Realtek> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) ugen1.2: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.3: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) % pciconf -lv xhci0@pci0:0:20:0: class=0x0c0330 card=0x221417aa chip=0x9c318086 rev=0x04 hdr=0x00 vendor = 'Intel Corporation' device = 'Lynx Point-LP USB xHCI HC' class = serial bus subclass = USB -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUuVGoXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kxd8H/RW6GMr9herxrJEPmuGM3Wqv 3LCNubZFBLE/RS+d4d3PIW9IqSyN/9ttSJ1+PEQ3j+6Mj0lFRaDe4pOnkJkWQH0D hnOsQ3fX9h4KtV+A+exl5P50TCBc9ie9asumWC4b9fdMSatBmkjDH1k1RhGOXVyd qP8Lari6le1IFZrpWxkFMi20g2DuzoE9heCm9D0iDiclruXFUV9gPCYtftckvUzn cWUb5cDpGVmHhxr2Klr81YtMHJlDVQrPOaB6dfPsvMuvW5mu1Z0RYHOHe1+gfC1x CJfBm1iNt1dllzLjLTWxf722zVVguylJjXCyYqyWt5mJ3hORIaG6KNTjo2+05sU= =S41L -----END PGP SIGNATURE----- From owner-freebsd-usb@FreeBSD.ORG Fri Jan 16 19:47:55 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0903D02; Fri, 16 Jan 2015 19:47:55 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FF9578F; Fri, 16 Jan 2015 19:47:54 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 78A671FE023; Fri, 16 Jan 2015 20:47:46 +0100 (CET) Message-ID: <54B96B12.3070308@selasky.org> Date: Fri, 16 Jan 2015 20:48:34 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: sbruno@freebsd.org, freebsd-usb@freebsd.org Subject: Re: USB 3 strange behavior, lenovo x240 References: <54B951AB.2000102@ignoranthack.me> In-Reply-To: <54B951AB.2000102@ignoranthack.me> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:47:55 -0000 On 01/16/15 19:00, Sean Bruno wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > I'm seeing strange behavior when I enable USB 3 support on my laptop. > Running head @r276878: > > Disabling USB 3 makes things behave "better" in that my wireless device > will actually serve traffic and /dev/video0 will really exist when I > switch over. Using USB 3 makes things behave erratically if at all. > > Devices don't appear after a reboot and I'm seeing issues using my USB 2 > devices. > Hi, Does setting: hw.usb.xhci.xhci_port_route=-1 In /boot/loader.conf Help? --HPS From owner-freebsd-usb@FreeBSD.ORG Fri Jan 16 19:57:35 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A4DF5451; Fri, 16 Jan 2015 19:57:35 +0000 (UTC) Received: from mta05.bitpro.no (mta05.bitpro.no [92.42.64.202]) by mx1.freebsd.org (Postfix) with ESMTP id 6301B895; Fri, 16 Jan 2015 19:57:34 +0000 (UTC) Received: from mail.lockless.no (mail.lockless.no [46.29.221.38]) by mta05.bitpro.no (Postfix) with ESMTPS id 2170617F861; Fri, 16 Jan 2015 20:46:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.lockless.no (Postfix) with ESMTP id AF89A221069; Fri, 16 Jan 2015 20:47:41 +0100 (CET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at lockless.no Received: from mail.lockless.no ([127.0.0.1]) by localhost (mail.lockless.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oe2adsiLXAWZ; Fri, 16 Jan 2015 20:47:40 +0100 (CET) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) by mail.lockless.no (Postfix) with ESMTPSA id 89BF422100C; Fri, 16 Jan 2015 20:47:40 +0100 (CET) Message-ID: <54B96AD0.1000002@bitfrost.no> Date: Fri, 16 Jan 2015 20:47:28 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: sbruno@freebsd.org, freebsd-usb@freebsd.org Subject: Re: USB 3 strange behavior, lenovo x240 References: <54B951AB.2000102@ignoranthack.me> In-Reply-To: <54B951AB.2000102@ignoranthack.me> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:57:35 -0000 On 01/16/15 19:00, Sean Bruno wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > I'm seeing strange behavior when I enable USB 3 support on my laptop. > Running head @r276878: > > Disabling USB 3 makes things behave "better" in that my wireless device > will actually serve traffic and /dev/video0 will really exist when I > switch over. Using USB 3 makes things behave erratically if at all. > > Devices don't appear after a reboot and I'm seeing issues using my USB 2 > devices. > Does setting "hw.usb.xhci. From owner-freebsd-usb@FreeBSD.ORG Fri Jan 16 21:12:16 2015 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EADC12A for ; Fri, 16 Jan 2015 21:12:16 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C966F8F for ; Fri, 16 Jan 2015 21:12:15 +0000 (UTC) Received: from [192.168.200.211] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id A10E1192A3B; Fri, 16 Jan 2015 21:12:09 +0000 (UTC) Message-ID: <54B97EA7.4070408@ignoranthack.me> Date: Fri, 16 Jan 2015 13:12:07 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Hans Petter Selasky , freebsd-usb@freebsd.org Subject: Re: USB 3 strange behavior, lenovo x240 References: <54B951AB.2000102@ignoranthack.me> <54B96B12.3070308@selasky.org> In-Reply-To: <54B96B12.3070308@selasky.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 21:12:16 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/16/15 11:48, Hans Petter Selasky wrote: > On 01/16/15 19:00, Sean Bruno wrote: >> >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 >> >> I'm seeing strange behavior when I enable USB 3 support on my >> laptop. Running head @r276878: >> >> Disabling USB 3 makes things behave "better" in that my wireless >> device will actually serve traffic and /dev/video0 will really >> exist when I switch over. Using USB 3 makes things behave >> erratically if at all. >> >> Devices don't appear after a reboot and I'm seeing issues using >> my USB 2 devices. >> > > Hi, > > Does setting: > > hw.usb.xhci.xhci_port_route=-1 > > In /boot/loader.conf > > Help? > > --HPS > > It does seem to help somewhat. Devices are available: % usbconfig ugen0.1: at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA) ugen1.1: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen1.2: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen1.3: <802.11n NIC Realtek> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) ugen1.4: at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) sean -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUuX6fXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kO8sIAKSgrpDOHYHzZgI4ONxJGtEh pL5CnLqMJIIFOPemIb4JCE2fkgV1KFzE3ou4bs1hcrFxbhXeK4gi4jSw4jjqIuhu 8Gwu4+mz/Hbbm/weZjGujC0lxiiFecrZAC3lstq9Q+e2yVaQnrxZ8SsCvMueLsFy 0Z3lXGYOW01vt80osI/YTCc4XZ7C7GhB5ZaC/VPtrv7xtqmUxeb3LvrjXcEXmHjo jtzgFrmEpyViGnnkhl8UOkFCafWCY1iol2kLi++wvDjEBA4YeZxElA9RZhZWuLKy sOmiAFGsAQlBMbJrEXnAkQXGZIxRhcJKmKDKtDq7rW0xpoJUZHJ/5KmqawmFgEM= =jnJf -----END PGP SIGNATURE-----