RE: [PATCH net-next 0/4] r8152: firmware support

2014-08-24 Thread Hayes Wang
From: David Miller [mailto:da...@davemloft.net] [...] > That still doesn't convince me. > > The functions I see you removing are just programming a set of > registers in some way. That is to clear the break point of the firmware. If a firmware exists, you should clear it before updating a new o

Re: [PATCH v2 1/1] usb: ehci: using wIndex + 1 for hub port

2014-08-24 Thread Peter Chen
On Tue, Aug 5, 2014 at 8:28 AM, Peter Chen wrote: > The roothub's index per controller is from 0, but the hub port index per hub > is from 1, this patch fixes "can't find device at roohub" problem for > connecting > test fixture at roohub when do USB-IF Embedded Host High-Speed Electrical > Test

Re: [PATCH net-next 0/4] r8152: firmware support

2014-08-24 Thread David Miller
From: Hayes Wang Date: Mon, 25 Aug 2014 03:43:04 + > From: David Miller [mailto:da...@davemloft.net] > [...] >> You haven't told us why you need to do this. >> >> These are just programming registers in the chip, and I see no reason >> to not keep these in the driver with real code. >> >>

RE: [PATCH net-next 0/4] r8152: firmware support

2014-08-24 Thread Hayes Wang
From: David Miller [mailto:da...@davemloft.net] [...] > You haven't told us why you need to do this. > > These are just programming registers in the chip, and I see no reason > to not keep these in the driver with real code. > > I'm not applying this series, you haven't explained what is happen

RE: [PATCH net-next 4/4] r8152: support firmware files

2014-08-24 Thread Hayes Wang
Francois Romieu [mailto:rom...@fr.zoreil.com] [...] > > +static void rtl_request_firmware(struct r8152 *tp) > > +{ > > + char *fw_name = NULL; > > + > > + if (tp->rtl_fw.fw) > > + goto out_request; > > + > > + switch (tp->version) { > > + case RTL_VER_01: > > + fw_name

Good News

2014-08-24 Thread Henry Kjallman
Dear Sir/Madam, I saw your email address during the course of my research today. My name is Bill William Groner my wife and I won a Jackpot Lottery of $50 Million Dollars in December 2013, we are donating the sum of $1 million Dollars to 6 lucky individual all over the world as part of our cha

[RFC PATCH 3/7] usb: gadget: configfs: add reset API at usb_gadget_driver

2014-08-24 Thread Peter Chen
Add reset API at usb_gadget_driver Signed-off-by: Peter Chen --- drivers/usb/gadget/configfs.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index 811c2c7..8fe33b4 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/

[RFC PATCH 7/7] usb: gadget: udc-core: call gadget driver's disconnect at soft disconnect

2014-08-24 Thread Peter Chen
We have moved usb_gadget_disconnect to individual gadget driver's disconnect, besides, it is suitable to call gadget driver's disconnect before stopping udc, so using udc->driver->disconnect instead of usb_gadget_disconnect at soft disconnect. Signed-off-by: Peter Chen --- drivers/usb/gadget/udc

[RFC PATCH 6/7] usb: gadget: udc-core: delete usb_gadget_disconnect at usb_gadget_remove_driver

2014-08-24 Thread Peter Chen
The usb_gadget_disconnect will be called at individual gadget driver's disconnect, so delete it at udc core. Signed-off-by: Peter Chen --- drivers/usb/gadget/udc/udc-core.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.

[RFC PATCH 0/7] usb: gadget: add reset API at usb_gadget_driver

2014-08-24 Thread Peter Chen
Hi Felipe & Alan, It is the follow-up for: http://www.spinics.net/lists/linux-usb/msg112193.html This patchset adds reset API at usb_gadget_driver, the UDC driver can call it at bus_reset handler instead of calling disconnect. The benefits of this patchset are: - We can let the gadget driver do d

[RFC PATCH 1/7] usb: gadget: add reset API at usb_gadget_driver

2014-08-24 Thread Peter Chen
Adding reset API for UDC bus reset handler is useful for below two issues. Current disconnect API at usb_gadget_driver is also invoked at udc's bus reset handler, but the document says it is invoked when the host is disconnected. Besides, we may expect the gadget_driver to do different things for

[RFC PATCH 4/7] usb: gadget: gadgetfs: add reset API at usb_gadget_driver

2014-08-24 Thread Peter Chen
Add reset API at usb_gadget_driver Signed-off-by: Peter Chen --- drivers/usb/gadget/legacy/inode.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c index 2e4ce77..337340d 100644 --- a/dri

[RFC PATCH 2/7] usb: gadget: composite: add reset API at usb_gadget_driver

2014-08-24 Thread Peter Chen
Add reset API at usb_gadget_driver, and export it for other driver use (eg, configfs). Signed-off-by: Peter Chen --- drivers/usb/gadget/composite.c | 13 - include/linux/usb/composite.h |1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/com

[RFC PATCH 5/7] usb: gadget: dbgp: add reset API at usb_gadget_driver

2014-08-24 Thread Peter Chen
Add reset API at usb_gadget_driver Signed-off-by: Peter Chen --- drivers/usb/gadget/legacy/dbgp.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/legacy/dbgp.c b/drivers/usb/gadget/legacy/dbgp.c index 986fc51..b34140d 100644 --- a/drivers/u

Re: [PATCH 1/4] usbip: move usbip userspace code out of staging

2014-08-24 Thread Valentina Manea
On Tue, Aug 19, 2014 at 9:30 PM, Valentina Manea wrote: > At this point, USB/IP userspace code is fully functional > and can be moved out of staging. > > Signed-off-by: Valentina Manea Bumping this in case Greg missed the patch series. Valentina -- To unsubscribe from this list: send the line "

Re: [PATCH net-next 4/4] r8152: support firmware files

2014-08-24 Thread Francois Romieu
Hayes Wang : > diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c > index 937d132..63542cc 100644 > --- a/drivers/net/usb/r8152.c > +++ b/drivers/net/usb/r8152.c [...] > +static void rtl_request_firmware(struct r8152 *tp) > +{ > + char *fw_name = NULL; > + > + if (tp->rtl_fw.fw

Re: [GIT PULL] USB fixes for v3.17-rc2

2014-08-24 Thread Greg KH
On Wed, Aug 20, 2014 at 12:13:34PM -0500, Felipe Balbi wrote: > Hi Greg, > > Here's my first set of fixes for this merge window. All patches have soaked in > mailing list for a while, and what I could, I tested on the platforms I have. > > Please consider merging on top of your usb-linus branch.

patch "Revert "usb: gadget: u_ether: synchronize with transmit when stopping" added to usb tree

2014-08-24 Thread gregkh
This is a note to let you know that I've just added the patch titled Revert "usb: gadget: u_ether: synchronize with transmit when stopping to my usb git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git in the usb-linus branch. The patch will show u

[PATCH 2/4] usb: gadget: f_uac2: add short-hand for 'dev'

2014-08-24 Thread Daniel Mack
In afunc_bind() and afunc_set_alt(), &uac2->pdev.dev are used multiple times. Adding a short-hand for them makes lines shorter so we can remove some line wraps. No functional change. Signed-off-by: Daniel Mack --- drivers/usb/gadget/function/f_uac2.c | 29 +++-- 1 file c

[PATCH 4/4] usb: gadget: f_uac2: tie capture clocking to system clock

2014-08-24 Thread Daniel Mack
The UAC2 function driver currently responds to all packets at all times with wMaxPacketSize packets. That results in way too fast audio playback as the function driver (which is in fact supposed to define the audio stream pace) delivers as fast as it can. Consider the following setup: the host use

[PATCH 1/4] usb: gadget: f_uac2: restructure some code in afunc_set_alt()

2014-08-24 Thread Daniel Mack
Restructure some code to make it easier to read. While at it, return -ENOMEM instead of -EINVAL if usb_ep_alloc_request() fails, and omit the logging in such cases (the mm core will complain loud enough). Signed-off-by: Daniel Mack --- drivers/usb/gadget/function/f_uac2.c | 39 +++--

[PATCH 3/4] usb: gadget: f_uac2: set UAC_EP_CS_ATTR_FILL_MAX in bmAttributes

2014-08-24 Thread Daniel Mack
For the capture endpoint, set the UAC_EP_CS_ATTR_FILL_MAX bit in bmAttributes to that the host only send IN tokens with wMaxPacketSize bytes. If that bit isn't set, snd-usb will calculate a smaller packet size, which is answered by a fixed-size (512 bytes) response from the gadget driver. That cons

[PATCH 0/4] usb: gadget: f_uac2: cleanups and capture timing

2014-08-24 Thread Daniel Mack
Hi, Sebastian Reimers recently reported issues with the f_uac2 gadget with BBB's musb stack when connected to a Linux host, with the host in capture and the gadget in playback mode. I had a look, and can confirm two independent issues. a) Linux snd-usb-audio currently pre-calculates the estimate

Re: What is the command line commands to use UAC2 at USB client side?

2014-08-24 Thread Daniel Mack
On 08/24/2014 06:26 PM, Jassi Brar wrote: > On Sun, Aug 24, 2014 at 7:26 PM, Daniel Mack wrote: >> f_uac2, however, currently always completes its buffers with 512 bytes >> packets, > Current uac2 uses the max packset size (which may not be 512 for every > udc) for the EP. Probably it (wMaxPacket

Re: What is the command line commands to use UAC2 at USB client side?

2014-08-24 Thread Jassi Brar
On Sun, Aug 24, 2014 at 7:26 PM, Daniel Mack wrote: > Hi Jassi, > > On 08/19/2014 11:52 AM, Jassi Brar wrote: >> Its been quite some time now, but I think we designed the uac2 to rely >> on USB's ISO packets' rate control to send and receive audio data at >> announced sampling rate. > > I'm still

Re: [PATCH 1/1] HID: usbhid: add usb_clear_halt determination for next hid_start_in

2014-08-24 Thread Alan Stern
On Sun, 24 Aug 2014, vichy wrote: > hi Alan: > > > > I originally tried using usb_reset_device, and it caused a deadlock: > > > > Unplug the HID device. > > > > I/O error occurs. hid_io_error schedules reset_work. > > > > The reset_work callback routine is hid_reset. It c

Re: some question about unbind and rebind usb interfaces

2014-08-24 Thread Alan Stern
On Sun, 24 Aug 2014, vichy wrote: > hi all: > below patch introduce unbind and rebind interfaces during usb reset > https://lists.ubuntu.com/archives/kernel-team/2014-April/042177.html > "If a driver claims additional interfaces, the > claim may fail because the old binding instance may still own

Re: [linux-usb] USB Gadget drivers Windows 7/8 support and .bAlternateSetting in interface descriptor

2014-08-24 Thread Daniel Mack
On 08/22/2014 04:43 AM, Xuebing Wang wrote: > static inline bool gadget_supports_altsettings(struct usb_gadget *gadget) > { > /* PXA 21x/25x/26x has no altsettings at all */ > if (gadget_is_pxa(gadget)) > return false; > > /* PXA 27x and 3xx have *broken

Re: [Bug 80711] [PATCH]SG_FLAG_LUN_INHIBIT is no longer implemented and there's not way to prevent the kernel from using the 2nd cdb byte for the LUN

2014-08-24 Thread Christoph Hellwig
On Fri, Aug 22, 2014 at 01:29:32PM -0400, Alan Stern wrote: > > Other than this, I'm fine with the code ... you can add the acked by > > from me when we resolve the above question. > > Okay. It's true that this issue is only tangentially related to the > main point of the patch. It could be rem

Re: [PATCH 1/1] HID: usbhid: add usb_clear_halt determination for next hid_start_in

2014-08-24 Thread vichy
hi Alan: > > I originally tried using usb_reset_device, and it caused a deadlock: > > Unplug the HID device. > > I/O error occurs. hid_io_error schedules reset_work. > > The reset_work callback routine is hid_reset. It calls > usb_reset_device. > > The rese

Re: [PATCH v5 3/3] usb: gadget: f_fs: virtual endpoint address mapping

2014-08-24 Thread Michal Nazarewicz
On Thu, Aug 21 2014, Robert Baldyga wrote: > This patch introduces virtual endpoint address mapping. It separates > function logic form physical endpoint addresses making it more hardware > independent. > > Following modifications changes user space API, so to enable them user > have to switch on

Re: [PATCH v5 2/3] usb: gadget: f_fs: add ioctl returning ep descriptor

2014-08-24 Thread Michal Nazarewicz
On Thu, Aug 21 2014, Robert Baldyga wrote: > This patch introduces ioctl named FUNCTIONFS_ENDPOINT_DESC, which > returns endpoint descriptor to userspace. It works only if function > is active. > > Signed-off-by: Robert Baldyga With the change described below: Acked-by: Michal Nazarewicz > --

Re: [PATCH v5 1/3] usb: gadget: f_fs: fix the redundant ep files problem

2014-08-24 Thread Michal Nazarewicz
On Thu, Aug 21 2014, Robert Baldyga wrote: > Up to now, when endpoint addresses in descriptors were non-consecutive, > there were created redundant files, which could cause problems in kernel, > when user tryed to read/write to them. It was result of fact that maximum ^ -- tried

Re: What is the command line commands to use UAC2 at USB client side?

2014-08-24 Thread Daniel Mack
Hi Jassi, On 08/19/2014 11:52 AM, Jassi Brar wrote: > Its been quite some time now, but I think we designed the uac2 to rely > on USB's ISO packets' rate control to send and receive audio data at > announced sampling rate. I'm still thinking how that setup should have ever been possible with snd-

some question about unbind and rebind usb interfaces

2014-08-24 Thread vichy
hi all: below patch introduce unbind and rebind interfaces during usb reset https://lists.ubuntu.com/archives/kernel-team/2014-April/042177.html "If a driver claims additional interfaces, the claim may fail because the old binding instance may still own the additional interface when the new instanc