[PATCH V2] ACPI: Allow acpi binding with usb3.0 hub

2012-08-16 Thread Lan Tianyu
usb port's position and connectability can't be identified on some boards via usb hub's register. ACPI _UPC and _PLD can help to resolve such issue and so it is necessary to bind usb with acpi. This patch is to allow acpi binding with usb3.0 hub. Current acpi only can bind one struct device to one

Re: new device for qmi_wwan and option Vodafone/ZTE K5006Z

2012-08-16 Thread Marcel Holtmann
Hi Thomas, > Now I can confirm the device works via wwan-interface with ipv6 too. > > In detail: ipv6 works in 3G-mode. (umts/hspa) > > My problem was: I am more and more surrounded by LTE, and I was not able to > force the device to register to the right network. > > LTE and IPv6 seems to be

[PATCH v2 8/8] usb : Add sysfs files to control port power.

2012-08-16 Thread Lan Tianyu
This patch adds two sysfs files for each usb hub port to allow userspace to control the port power policy. For an upcoming Intel xHCI roothub, this will translate into ACPI calls to completely power off or power on the port. As a reminder, when these ports are completely powered off, the USB host

[PATCH v2 7/8] usb: Fail a get config when the port is powered off.

2012-08-16 Thread Lan Tianyu
Alan Stern pointed out that a USB port could potentially get powered off when the attached USB device is in the middle of enumerating, due to race conditions: http://marc.info/?l=linux-usb&m=134130616707548&w=2 If that happens, we need to ensure the enumeration fails. If a call to usb_get

[PATCH v2 6/8] usb/acpi: Use ACPI methods to power off ports.

2012-08-16 Thread Lan Tianyu
Upcoming Intel systems will have an ACPI method to control whether a USB port can be completely powered off. The implication of powering off a USB port is that the device and host sees a physical disconnect, and subsequent port connections and remote wakeups will be lost. Add a new function, usb_

[PATCH v2 4/8] usb/acpi: Store info on device removability.

2012-08-16 Thread Lan Tianyu
In the upcoming USB port power off patches, we need to know whether a USB port can ever see a disconnect event. Often USB ports are internal to a system, and users can't disconnect USB devices from that port. Sometimes those ports will remain empty, because the OEM chose not to connect an internal

[PATCH v2 5/8] xhci: Handle clear PORT_POWER feature.

2012-08-16 Thread Lan Tianyu
This patch makes the xHCI roothub code handle the clear PORT_POWER feature request. Setting port power is already handled. Signed-off-by: Lan Tianyu Signed-off-by: Sarah Sharp --- drivers/usb/host/xhci-hub.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/host/xhci-hub.c

[PATCH v2 3/8] usb/acpi: Bind ACPI node to USB port, not usb_device.

2012-08-16 Thread Lan Tianyu
In the ACPI DSDT table, only usb root hub and usb ports are ACPI device nodes. Originally, we bound the usb port's ACPI node to the usb device attached to the port. However, we want to access those ACPI port methods when the port is empty, and there's no usb_device associated with that port. Now

[PATCH v2 2/8] usb: move children to struct usb_port

2012-08-16 Thread Lan Tianyu
The usb_device structure contains an array of usb_device "children". This array is only valid if the usb_device is a hub, so it makes no sense to store it there. Instead, store the usb_device child in its parent usb_port structure. Since usb_port is an internal USB core structure, add a new funct

[PATCH v2 1/8] usb: make usb port a real device

2012-08-16 Thread Lan Tianyu
This patch turns each USB port on a hub into a new struct device. This new device has the USB hub interface device as its parent. The port devices are stored in a new structure (usb_port), and an array of usb_ports are dynamically allocated once we know how many ports the USB hub has. Move the p

Re: BUG: unable to handle kernel paging request in usb_match_id()

2012-08-16 Thread Greg Kroah-Hartman
On Fri, Aug 17, 2012 at 10:00:46AM +0800, Fengguang Wu wrote: > On Sun, Aug 05, 2012 at 09:58:26AM -0700, Greg KH wrote: > > On Sun, Aug 05, 2012 at 10:59:38AM +0800, Fengguang Wu wrote: > > > Hi all, > > > > > > This line triggers an oops in kvm boot test: > > > > > > usb_match_id(): > > > ==>

Re: BUG: unable to handle kernel paging request in usb_match_id()

2012-08-16 Thread Fengguang Wu
On Sun, Aug 05, 2012 at 09:58:26AM -0700, Greg KH wrote: > On Sun, Aug 05, 2012 at 10:59:38AM +0800, Fengguang Wu wrote: > > Hi all, > > > > This line triggers an oops in kvm boot test: > > > > usb_match_id(): > > ==> 748 for (; id->idVendor || id->idProduct || > > id->bDeviceClass

Re: [RFC 0/2] USB gadget - configfs

2012-08-16 Thread Joel Becker
On Thu, Aug 16, 2012 at 03:47:15PM +0200, Sebastian Andrzej Siewior wrote: > On 08/16/2012 03:17 PM, Andrzej Pietrasiewicz wrote: > >A lun is "opened" on storing the "file" attribute of the lun, it is in > >fsg_lun_store_file, storage_common.c. So, again, this is a configfs > >callback. > > > >On s

Re: [PATCH 3/3] usb: musb: gadget: implement proper ->reset handling

2012-08-16 Thread Peter Chen
On Fri, Aug 17, 2012 at 12:10 AM, Rajaram R wrote: > On Thu, Aug 16, 2012 at 11:51 AM, Felipe Balbi wrote: >> After introducing the new ->reset method on >> struct usb_gadget_driver, UDC drivers are >> required to implement proper handling for it. >> >> This patch adds proper ->reset handling for

Re: Potential fsg->state problem at file_storage.c

2012-08-16 Thread Peter Chen
Alan, will you submit a patch to add reset callback for file_storage? If not, I can help send a patch. On Thu, Aug 16, 2012 at 9:53 AM, Chen Peter-B29397 wrote: > >> >> that sounds like a plan :-) Tomorrow I can send a series of patches >> starting off the split, then people can just send in more

Re: [patch] mos7840: fix chars_in_buffer()

2012-08-16 Thread Greg KH
On Fri, Aug 10, 2012 at 02:38:58PM +0400, Stas Sergeev wrote: > Hello, > > The TIOCOUTQ ioctl calls chars_in_buffer(), and > some apps depend on a correct behaviour of that. > mos7840 implements it wrongly: if you write just > one char, TIOCOUTQ will return 32. > The attached patch should fix it.

Re: new device for qmi_wwan and option Vodafone/ZTE K5006Z

2012-08-16 Thread Thomas Schäfer
Now I can confirm the device works via wwan-interface with ipv6 too. In detail: ipv6 works in 3G-mode. (umts/hspa) My problem was: I am more and more surrounded by LTE, and I was not able to force the device to register to the right network. LTE and IPv6 seems to be a new topic, not for the li

Re: [PATCH] usb: gadget: lpc32xx_udc: Port to new start/stop interface

2012-08-16 Thread Roland Stigge
On 08/16/2012 06:05 PM, Sebastian Andrzej Siewior wrote: >> --- linux-2.6.orig/drivers/usb/gadget/lpc32xx_udc.c >> +++ linux-2.6/drivers/usb/gadget/lpc32xx_udc.c >> @@ -2987,14 +2986,14 @@ static irqreturn_t lpc32xx_usb_vbus_irq( >> return IRQ_HANDLED; >> } >> >> -static int lpc32xx_start(s

Re: [PATCH 3/3] usb: musb: gadget: implement proper ->reset handling

2012-08-16 Thread Rajaram R
On Thu, Aug 16, 2012 at 11:51 AM, Felipe Balbi wrote: > After introducing the new ->reset method on > struct usb_gadget_driver, UDC drivers are > required to implement proper handling for it. > > This patch adds proper ->reset handling for > musb driver. > > Signed-off-by: Felipe Balbi > --- > d

Re: [PATCH] usb: gadget: lpc32xx_udc: Port to new start/stop interface

2012-08-16 Thread Sebastian Andrzej Siewior
On 08/16/2012 05:34 PM, Roland Stigge wrote: --- linux-2.6.orig/drivers/usb/gadget/lpc32xx_udc.c +++ linux-2.6/drivers/usb/gadget/lpc32xx_udc.c @@ -2987,14 +2986,14 @@ static irqreturn_t lpc32xx_usb_vbus_irq( return IRQ_HANDLED; } -static int lpc32xx_start(struct usb_gadget_driver *dri

[PATCH] usb: gadget: lpc32xx_udc: Port to new start/stop interface

2012-08-16 Thread Roland Stigge
This patch adjusts the LPC32xx USB gadget driver to the new udc_start / udc_stop interface. Signed-off-by: Roland Stigge --- Applies to v3.6-rc1 drivers/usb/gadget/lpc32xx_udc.c | 44 +-- 1 file changed, 15 insertions(+), 29 deletions(-) --- linux-2.6.or

Re: [RFC/PATCH] usb: gadget: composite: don't call f->set_alt() from USB_REQ_SET_CONFIGURATION

2012-08-16 Thread Alan Stern
On Thu, 16 Aug 2012, Sebastian Andrzej Siewior wrote: > * Felipe Balbi | 2012-08-16 09:30:05 [+0300]: > > >I couldn't find anywhere in the USB Specification > >where it requires us to make sure all interfaces start > >on Alternate Setting zero. IMHO, we should consider > >initial state as UNKNOWN

Re: [PATCH 2/9] scripts/modpost: add a exception for USB gadget drivers

2012-08-16 Thread ABRAHAM, KISHON VIJAY
On Thu, Aug 16, 2012 at 6:33 PM, Felipe Balbi wrote: > On Thu, Aug 16, 2012 at 06:35:07PM +0530, ABRAHAM, KISHON VIJAY wrote: >> Hi Sebastian, >> >> On Thu, Aug 16, 2012 at 1:29 AM, Sebastian Andrzej Siewior >> wrote: >> > The "driver" struct for a gadget driver is named *_driver. On module >> >

Re: disconnect and uas_work_list

2012-08-16 Thread Sebastian Andrzej Siewior
On Tue, Aug 14, 2012 at 05:48:56PM +0200, Oliver Neukum wrote: > going through uas it looks to me like there is a race by which > uas_do_work() can walk uas_work_list and do IO to a device > after it has been removed. This makes me wonder why you used > a single global list. Could you comment on th

Re: [RFC 0/2] USB gadget - configfs

2012-08-16 Thread Sebastian Andrzej Siewior
On 08/16/2012 03:17 PM, Andrzej Pietrasiewicz wrote: A lun is "opened" on storing the "file" attribute of the lun, it is in fsg_lun_store_file, storage_common.c. So, again, this is a configfs callback. On storing the connect attribute, the following happens: a composite driver is probed, then al

RE: [RFC 0/2] USB gadget - configfs

2012-08-16 Thread Andrzej Pietrasiewicz
Hello Joel, Thank you for your reply. Please find comments inline. On Wednesday, August 15, 2012 10:14 AM Joel Becker wrote: > > So, the config item corresponding to the lun becomes depended on during > > the write file operation, the same with undepend. Can this be expressed > > with configfs

Re: [PATCH 2/9] scripts/modpost: add a exception for USB gadget drivers

2012-08-16 Thread Felipe Balbi
On Thu, Aug 16, 2012 at 06:35:07PM +0530, ABRAHAM, KISHON VIJAY wrote: > Hi Sebastian, > > On Thu, Aug 16, 2012 at 1:29 AM, Sebastian Andrzej Siewior > wrote: > > The "driver" struct for a gadget driver is named *_driver. On module > > load, the gadget expects a UDC driver to be loaded and avaiab

Re: [PATCH 2/9] scripts/modpost: add a exception for USB gadget drivers

2012-08-16 Thread ABRAHAM, KISHON VIJAY
Hi Sebastian, On Thu, Aug 16, 2012 at 1:29 AM, Sebastian Andrzej Siewior wrote: > The "driver" struct for a gadget driver is named *_driver. On module > load, the gadget expects a UDC driver to be loaded and avaiable. If this > is not the case => -ENODEV and bye bye. That means that the gadget Wi

Re: gadgetfs, functionfs, composite

2012-08-16 Thread Michal Nazarewicz
Sebastian Andrzej Siewior writes: > On 08/15/2012 08:28 PM, Michal Nazarewicz wrote: >>> sendpage()& splice() would probably do more good, no? >> >> splice() is for moving data between two files descriptors, so that won't >> be that useful with FFS (I mean, it could be useful in addition), sinc

Re: [PATCH] usb: hcd: use *resource_size_t* for specifying resource data

2012-08-16 Thread Felipe Balbi
Hi, On Thu, Aug 16, 2012 at 06:24:19PM +0530, Kishon Vijay Abraham I wrote: > Changed the type of rsrc_start and rsrc_len from u64 to resource_size_t > so that it behaves well with resource API's like *resource_size()* on both > 32bit and 64bit devices. > > Signed-off-by: Kishon Vijay Abraham I

[PATCH] usb: hcd: use *resource_size_t* for specifying resource data

2012-08-16 Thread Kishon Vijay Abraham I
Changed the type of rsrc_start and rsrc_len from u64 to resource_size_t so that it behaves well with resource API's like *resource_size()* on both 32bit and 64bit devices. Signed-off-by: Kishon Vijay Abraham I --- include/linux/usb/hcd.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(

[PATCH] usb/musb/omap2430.c Delete unused variable.

2012-08-16 Thread Matthias Brugger
Variable ret is always evaluated as true, so we don't need to check it. Signed-off-by: Matthias Brugger --- drivers/usb/musb/omap2430.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 5fdb9da..2d207c6 10064

[PATCH] usb/musb/omap2430.c Delete unused variable

2012-08-16 Thread Matthias Brugger
Signed-off-by: Matthias Brugger --- drivers/usb/musb/omap2430.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c index 5fdb9da..2d207c6 100644 --- a/drivers/usb/musb/omap2430.c +++ b/drivers/usb/musb/omap2430.c @@

Re: [PATCH] usb/musb/omap2430.c Delete unused variable

2012-08-16 Thread Felipe Balbi
On Thu, Aug 16, 2012 at 12:22:14PM +0200, Matthias Brugger wrote: > Signed-off-by: Matthias Brugger I need a commit log, even if obvious. -- balbi signature.asc Description: Digital signature

Re: Why is lpc32xx_udc still using old style start/stop functions?

2012-08-16 Thread Felipe Balbi
On Thu, Aug 16, 2012 at 10:12:46AM +0200, Roland Stigge wrote: > Hi! > > On 08/15/2012 07:04 PM, Sebastian Andrzej Siewior wrote: > > The new style start/stop interface was merged in 352c2dc8b0, v3.1-rc1. > > The UDC was merged in 24a28e4, v3.5-rc1. We did not want old style udcs. > > Is anyone go

Re: [PATCH 8/9] usb/gadget: Add I2C dependency for USB_LPC32XX

2012-08-16 Thread Roland Stigge
Hi, On 08/15/2012 09:59 PM, Sebastian Andrzej Siewior wrote: > | drivers/usb/gadget/lpc32xx_udc.c: In function ‘isp1301_udc_configure’: > | drivers/usb/gadget/lpc32xx_udc.c:606: error: implicit declaration of > function ‘i2c_smbus_write_byte_data’ > | drivers/usb/gadget/lpc32xx_udc.c:665: error:

Re: Why is lpc32xx_udc still using old style start/stop functions?

2012-08-16 Thread Roland Stigge
Hi! On 08/15/2012 07:04 PM, Sebastian Andrzej Siewior wrote: > The new style start/stop interface was merged in 352c2dc8b0, v3.1-rc1. > The UDC was merged in 24a28e4, v3.5-rc1. We did not want old style udcs. > Is anyone going to convert it to new style start/stop? Looks like I missed that one wh

Re: [RFC/PATCH] usb: gadget: composite: don't call f->set_alt() from USB_REQ_SET_CONFIGURATION

2012-08-16 Thread Felipe Balbi
On Thu, Aug 16, 2012 at 09:58:14AM +0200, Sebastian Andrzej Siewior wrote: > * Felipe Balbi | 2012-08-16 09:30:05 [+0300]: > > >I couldn't find anywhere in the USB Specification > >where it requires us to make sure all interfaces start > >on Alternate Setting zero. IMHO, we should consider > >init

Re: [RFC/PATCH] usb: gadget: composite: don't call f->set_alt() from USB_REQ_SET_CONFIGURATION

2012-08-16 Thread Sebastian Andrzej Siewior
* Felipe Balbi | 2012-08-16 09:30:05 [+0300]: >I couldn't find anywhere in the USB Specification >where it requires us to make sure all interfaces start >on Alternate Setting zero. IMHO, we should consider >initial state as UNKNOWN and not rely on that being >zero or anything. Table 9-1 in USB2.0

Re: gadgetfs, functionfs, composite

2012-08-16 Thread Sebastian Andrzej Siewior
On 08/15/2012 08:28 PM, Michal Nazarewicz wrote: sendpage()& splice() would probably do more good, no? splice() is for moving data between two files descriptors, so that won't be that useful with FFS (I mean, it could be useful in addition), since I'm talking about kernel<->user space transfer