[RFC PATCH V2 0/6] usb: usb port power off mechanism

2012-11-13 Thread Lan Tianyu
Change Since v1: (1) Add driver/usb/core/port.c file and move usb port related code into new file. (2) Modify usb port's runtime pm callback and set/clear PORT_POWER feature in the resume/suspend callback. (3) Power off port through suspend port device instead of setting/ clea

[RFC PATCH v2 1/6] usb: Register usb port's acpi power resources

2012-11-13 Thread Lan Tianyu
This patch is to register usb port's acpi power resources. Create link between usb port device and its acpi power resource. Signed-off-by: Lan Tianyu --- drivers/usb/core/hub.c |4 drivers/usb/core/usb-acpi.c | 22 ++ drivers/usb/core/usb.h |6 ++

[RFC PATCH v2 2/6] usb: Add driver/usb/core/port.c file to fill usb port related code.

2012-11-13 Thread Lan Tianyu
This patch is to create driver/usb/core/port.c and move usb port related code into it. Signed-off-by: Lan Tianyu --- drivers/usb/core/Makefile |1 + drivers/usb/core/hub.c| 113 +++-- drivers/usb/core/port.c | 82 ++

[RFC PATCH v2 3/6] usb: add runtime pm support for usb port device

2012-11-13 Thread Lan Tianyu
This patch is to add runtime pm callback for usb port device. Set/clear PORT_POWER feature in the resume/suspend callbak. Add portnum for struct usb_port to record port number. Signed-off-by: Lan Tianyu --- drivers/usb/core/hub.c | 14 ++ drivers/usb/core/port.c | 39 +++

[RFC PATCH v2 4/6] usb: add usb port auto power off mechanism

2012-11-13 Thread Lan Tianyu
This patch is to add usb port auto power off mechanism. When usb device is suspending, usb core will suspend usb port and usb port runtime pm callback will clear PORT_POWER feature to power off port if all conditions were met.These conditions are remote wakeup disable, pm qos NO_POWER_OFF flag clea

[RFC PATCH v2 5/6] usb: expose usb port's pm qos flags to user space

2012-11-13 Thread Lan Tianyu
This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off flag to prohibit the port from being power off. Signed-off-by: Lan Tianyu --- drivers/usb/core/port.c | 10 +- 1 file changed, 9 insertions(+), 1 d

[RFC PATCH v2 6/6] usb: add usb port's pm qos flags request to change NO_POWER_OFF flag

2012-11-13 Thread Lan Tianyu
Some usb devices can't be resumed correctly after power off. This patch is to add pm qos flags request to change NO_POWER_OFF and provide usb_device_allow_power_off() for device drivers to allow or prohibit usb core to power off the device. Signed-off-by: Lan Tianyu --- drivers/usb/core/hub.c |

[Resend PATCH V4 0/4] usb: expose DeviceRemovable to user space via sysfs attribute

2012-11-13 Thread Lan Tianyu
Change since v1: [PATCH 3] Rename link file's name "child" to "device", add check of return value of sysfs_create_link() and handle error return value properly. Change since v2: [PATCH 1] fix a logic backward problem. Add changelog about change ehci root hub descriptors based on A

[Resend PATCH V4 1/4] USB: Set usb port's DeviceRemovable according acpi information in EHCI

2012-11-13 Thread Lan Tianyu
ACPI provide "_PLD" and "_UPC" aml methods to describe usb port visibility and connectability. This patch is to use those information to change ehci root hub descriptors and set usb hub port's DeviceRemovable in the hub_configure(). When hub descriptor request is issued at first time, usb port devi

[Resend PATCH V4 2/4] usb/xhci: set root hub's DeviceRemovable according to usb port connect type

2012-11-13 Thread Lan Tianyu
This patch is to set xhci root hub's DeviceRemovable according to usb port's connect type which currently comes from ACPI information rather than xhci PORTSC register due to Windows prefers to ACPI information. If ACPI information was different with PORTSC, there would be a warning. Signed-off-by:

[Resend PATCH V4 4/4] usb: Add "portX/connect_type" attribute to expose usb port's connect type

2012-11-13 Thread Lan Tianyu
Some platforms provide usb port connect types through ACPI. This patch is to add this new attribute to expose these information to user space. Signed-off-by: Lan Tianyu --- Documentation/ABI/testing/sysfs-bus-usb |9 +++ drivers/usb/core/hub.c | 43

[Resend PATCH V4 3/4] usb: Create link files between child device and usb port device.

2012-11-13 Thread Lan Tianyu
To show the relationship between usb port and child device, add link file "port" under usb device's sysfs directoy and "device" under usb port device's sysfs directory. They are linked to each other. Signed-off-by: Lan Tianyu --- drivers/usb/core/hub.c | 26 ++ 1 file c

Sound+USB: deadlock problem

2012-11-13 Thread Jiri Slaby
Hello, I've just plugged+unplugged+plugged my USB audio card and the audio subsystem got stuck: INFO: task khubd:440 blocked for more than 120 seconds. "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. khubd D 8801cbc92400 0 440 2 0x 8

Re: Sound+USB: deadlock problem

2012-11-13 Thread Takashi Iwai
At Tue, 13 Nov 2012 09:26:17 +0100, Jiri Slaby wrote: > > Hello, > > I've just plugged+unplugged+plugged my USB audio card and the audio > subsystem got stuck: Which kernel? If it's older than 3.7-rc5, could you try 3.7-rc5? Takashi > > INFO: task khubd:440 blocked for more than 120 seconds

Re: Sound+USB: deadlock problem

2012-11-13 Thread Jiri Slaby
On 11/13/2012 09:28 AM, Takashi Iwai wrote: > At Tue, 13 Nov 2012 09:26:17 +0100, > Jiri Slaby wrote: >> >> Hello, >> >> I've just plugged+unplugged+plugged my USB audio card and the audio >> subsystem got stuck: > > Which kernel? If it's older than 3.7-rc5, could you try 3.7-rc5? Oh, forgot to

Re: autodetect USB MTP device characteristics without libusb_open()

2012-11-13 Thread Bjørn Mork
Peter Stuge writes: > Bjørn Mork wrote: >> > The problem appear when you ask a device which is not MTP >> > for that descriptor, some of them just die, so I cannot do >> > that. >> >> Really? You ask for a string descriptor and the device dies? Won't >> those devices also die if they are connec

Re: Sound+USB: deadlock problem

2012-11-13 Thread Takashi Iwai
At Tue, 13 Nov 2012 09:30:10 +0100, Jiri Slaby wrote: > > On 11/13/2012 09:28 AM, Takashi Iwai wrote: > > At Tue, 13 Nov 2012 09:26:17 +0100, > > Jiri Slaby wrote: > >> > >> Hello, > >> > >> I've just plugged+unplugged+plugged my USB audio card and the audio > >> subsystem got stuck: > > > > Whic

Re: Sound+USB: deadlock problem

2012-11-13 Thread Jiri Slaby
On 11/13/2012 09:45 AM, Takashi Iwai wrote: > At Tue, 13 Nov 2012 09:30:10 +0100, > Jiri Slaby wrote: >> >> On 11/13/2012 09:28 AM, Takashi Iwai wrote: >>> At Tue, 13 Nov 2012 09:26:17 +0100, >>> Jiri Slaby wrote: Hello, I've just plugged+unplugged+plugged my USB audio card and

[PATCH] usb: otg: twl4030: Change TWL4030_MODULE_* ids to TWL_MODULE_*

2012-11-13 Thread Peter Ujfalusi
To facilitate upcoming cleanup in twl stack. No functional changes. Signed-off-by: Peter Ujfalusi --- drivers/usb/otg/twl4030-usb.c | 46 --- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/tw

Re: [PATCH] usb: otg: twl4030: Change TWL4030_MODULE_* ids to TWL_MODULE_*

2012-11-13 Thread Felipe Balbi
On Tue, Nov 13, 2012 at 10:43:38AM +0100, Peter Ujfalusi wrote: > To facilitate upcoming cleanup in twl stack. > No functional changes. > > Signed-off-by: Peter Ujfalusi I guess this one must go together with the rest of your series... Acked-by: Felipe Balbi > --- > drivers/usb/otg/twl4030-u

Re: Sound+USB: deadlock problem

2012-11-13 Thread Takashi Iwai
At Tue, 13 Nov 2012 10:39:14 +0100, Jiri Slaby wrote: > > On 11/13/2012 09:45 AM, Takashi Iwai wrote: > > At Tue, 13 Nov 2012 09:30:10 +0100, > > Jiri Slaby wrote: > >> > >> On 11/13/2012 09:28 AM, Takashi Iwai wrote: > >>> At Tue, 13 Nov 2012 09:26:17 +0100, > >>> Jiri Slaby wrote: > >

Re: [PATCH] usb: otg: twl4030: Change TWL4030_MODULE_* ids to TWL_MODULE_*

2012-11-13 Thread Peter Ujfalusi
Hi Felipe, On 11/13/2012 10:47 AM, Felipe Balbi wrote: > On Tue, Nov 13, 2012 at 10:43:38AM +0100, Peter Ujfalusi wrote: >> To facilitate upcoming cleanup in twl stack. >> No functional changes. >> >> Signed-off-by: Peter Ujfalusi > > I guess this one must go together with the rest of your serie

Re: [PATCH] usb: otg: twl4030: Change TWL4030_MODULE_* ids to TWL_MODULE_*

2012-11-13 Thread Felipe Balbi
Hi, On Tue, Nov 13, 2012 at 11:28:15AM +0100, Peter Ujfalusi wrote: > Hi Felipe, > > On 11/13/2012 10:47 AM, Felipe Balbi wrote: > > On Tue, Nov 13, 2012 at 10:43:38AM +0100, Peter Ujfalusi wrote: > >> To facilitate upcoming cleanup in twl stack. > >> No functional changes. > >> > >> Signed-off-b

Re: [PATCH] usb: otg: twl4030: Change TWL4030_MODULE_* ids to TWL_MODULE_*

2012-11-13 Thread Peter Ujfalusi
On 11/13/2012 11:37 AM, Felipe Balbi wrote: > ok good. Unfortunately I have already sent this merge window's pull > request to Greg so I'd have to delay this until v3.9. If that's ok with > you, I can take it through my tree. I hoped that this can go with 3.8 since in 3.9 I'm planning to remove al

Re: [RFC PATCH v2 1/6] usb: Register usb port's acpi power resources

2012-11-13 Thread Sergei Shtylyov
Hello. On 13-11-2012 12:00, Lan Tianyu wrote: This patch is to register usb port's acpi power resources. Create link between usb port device and its acpi power resource. Signed-off-by: Lan Tianyu [...] diff --git a/drivers/usb/core/usb-acpi.c b/drivers/usb/core/usb-acpi.c index cef4252..

Re: [PATCH] usb: otg: twl4030: Change TWL4030_MODULE_* ids to TWL_MODULE_*

2012-11-13 Thread Felipe Balbi
Hi, On Tue, Nov 13, 2012 at 11:57:13AM +0100, Peter Ujfalusi wrote: > On 11/13/2012 11:37 AM, Felipe Balbi wrote: > > ok good. Unfortunately I have already sent this merge window's pull > > request to Greg so I'd have to delay this until v3.9. If that's ok with > > you, I can take it through my tr

[PATCH -next] usb: gadget: tcm_usb_gadge: fix to return error or 0 in tcm_usbg_drop_nexus()

2012-11-13 Thread Wei Yongjun
From: Wei Yongjun In the error handling case of tcm_usbg_drop_nexus(), the error code is assigned to 'ret', but it is ingored. We'd better return 'ret' instead of always return 0. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --

Re: [PATCH 2/4] usb: chipidea: add otg id switch and vbus connect/disconnect detect

2012-11-13 Thread Alexander Shishkin
Peter Chen writes: > The main design flow is the same with msm otg driver, that is the id and > vbus interrupt are handled at core driver, others are handled by > individual drivers. This looks good to me in general. Few comments below. > - At former design, when switch usb role from device->ho

Re: [RFC PATCH v2 1/6] usb: Register usb port's acpi power resources

2012-11-13 Thread Lan Tianyu
于 2012/11/13 19:07, Sergei Shtylyov 写道: Hello. On 13-11-2012 12:00, Lan Tianyu wrote: This patch is to register usb port's acpi power resources. Create link between usb port device and its acpi power resource. Signed-off-by: Lan Tianyu [...] diff --git a/drivers/usb/core/usb-acpi.c b/dr

[PATCH] net: cdc_ncm: add Huawei devices

2012-11-13 Thread Bjørn Mork
A number of Huawei 3G and LTE modems implement a CDC NCM function, including the necessary functional descriptors, but using a non standard interface layout and class/subclass/protocol codes. These devices can be handled by this driver with only a minor change to the probing logic, allowing a sing

Re: [PATCH 2/2] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2012-11-13 Thread Fabio Estevam
Hi Marc, On Thu, Sep 6, 2012 at 12:18 PM, Marc Kleine-Budde wrote: > On 09/06/2012 05:15 PM, Richard Zhao wrote: >> Hi Marc, >> >> usbmisc_imx6q.c is only for imx6x. And for a certain running kernel, >> there will be always one driver instance. > > It's currently only for imx6q, but I've patches[

Re: [PATCH 2/2] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2012-11-13 Thread Marc Kleine-Budde
On 11/13/2012 02:23 PM, Fabio Estevam wrote: > Hi Marc, > > On Thu, Sep 6, 2012 at 12:18 PM, Marc Kleine-Budde > wrote: >> On 09/06/2012 05:15 PM, Richard Zhao wrote: >>> Hi Marc, >>> >>> usbmisc_imx6q.c is only for imx6x. And for a certain running kernel, >>> there will be always one driver ins

Re: [PATCH -next] usb: gadget: tcm_usb_gadge: fix to return error or 0 in tcm_usbg_drop_nexus()

2012-11-13 Thread Felipe Balbi
Hi, On Tue, Nov 13, 2012 at 08:01:13PM +0800, Wei Yongjun wrote: > From: Wei Yongjun > > In the error handling case of tcm_usbg_drop_nexus(), the error code > is assigned to 'ret', but it is ingored. We'd better return 'ret' typo here: ignored. > instead of always return 0. > > dpatch engine

Re: [PATCH 2/2] usb: chipidea: usbmisc: prepare driver to handle more than one soc

2012-11-13 Thread Michael Grzeschik
On Tue, Nov 13, 2012 at 11:23:31AM -0200, Fabio Estevam wrote: > On Thu, Sep 6, 2012 at 12:18 PM, Marc Kleine-Budde > wrote: > > On 09/06/2012 05:15 PM, Richard Zhao wrote: > >> Hi Marc, > >> > >> usbmisc_imx6q.c is only for imx6x. And for a certain running kernel, > >> there will be always one d

Re: problem with Roseweil eusb3 enclosure

2012-11-13 Thread Sarah Sharp
On Fri, Nov 02, 2012 at 10:54:38AM -0700, Sarah Sharp wrote: > On Fri, Nov 02, 2012 at 01:38:26PM -0400, Alan Stern wrote: > > On Fri, 2 Nov 2012, Sarah Sharp wrote: > > > > > > I don't like that idea. It would be much simpler to put the port back > > > > into a useful state. For example, disab

Re: [PATCH] net: cdc_ncm: add Huawei devices

2012-11-13 Thread David Miller
From: Bjørn Mork Date: Tue, 13 Nov 2012 14:19:43 +0100 > A number of Huawei 3G and LTE modems implement a CDC NCM function, > including the necessary functional descriptors, but using a non > standard interface layout and class/subclass/protocol codes. > > These devices can be handled by this dr

Re: [RFC PATCH v2 1/6] usb: Register usb port's acpi power resources

2012-11-13 Thread Rafael J. Wysocki
On Tuesday, November 13, 2012 08:36:15 PM Lan Tianyu wrote: > 于 2012/11/13 19:07, Sergei Shtylyov 写道: > > Hello. > > > > On 13-11-2012 12:00, Lan Tianyu wrote: > > > >> This patch is to register usb port's acpi power resources. Create > >> link between usb port device and its acpi power resource. >

Re: [RFC PATCH v2 2/6] usb: Add driver/usb/core/port.c file to fill usb port related code.

2012-11-13 Thread Rafael J. Wysocki
On Tuesday, November 13, 2012 04:00:01 PM Lan Tianyu wrote: > This patch is to create driver/usb/core/port.c and move usb port related > code into it. It does seem to make functional changes in addition to that, however. If I'm not mistaken and that really is the case, can you (briefly) describe

Re: [RFC PATCH v2 3/6] usb: add runtime pm support for usb port device

2012-11-13 Thread Rafael J. Wysocki
On Tuesday, November 13, 2012 04:00:02 PM Lan Tianyu wrote: > This patch is to add runtime pm callback for usb port device. > Set/clear PORT_POWER feature in the resume/suspend callbak. > Add portnum for struct usb_port to record port number. > > Signed-off-by: Lan Tianyu This one looks reasonab

Re: [RFC PATCH v2 4/6] usb: add usb port auto power off mechanism

2012-11-13 Thread Rafael J. Wysocki
On Tuesday, November 13, 2012 04:00:03 PM Lan Tianyu wrote: > This patch is to add usb port auto power off mechanism. > When usb device is suspending, usb core will suspend usb port and > usb port runtime pm callback will clear PORT_POWER feature to > power off port if all conditions were met.These

Re: [RFC PATCH v2 5/6] usb: expose usb port's pm qos flags to user space

2012-11-13 Thread Rafael J. Wysocki
On Tuesday, November 13, 2012 04:00:04 PM Lan Tianyu wrote: > This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, > pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off > flag to prohibit the port from being power off. > > Signed-off-by: Lan Tianyu > --- > drive

Re: [RFC PATCH v2 6/6] usb: add usb port's pm qos flags request to change NO_POWER_OFF flag

2012-11-13 Thread Rafael J. Wysocki
On Tuesday, November 13, 2012 04:00:05 PM Lan Tianyu wrote: > Some usb devices can't be resumed correctly after power off. This > patch is to add pm qos flags request to change NO_POWER_OFF and > provide usb_device_allow_power_off() for device drivers to allow or > prohibit usb core to power off th

[PATCH] Use SCSI read/write(16) with >2TB drives

2012-11-13 Thread Jason J. Herne
From: "Jason J. Herne" Force large capacity (> 2TB) drives to use READ/WRITE(16) instead of READ/WRITE(10). Some(most/all?) USB enclosures do not like READ(10) commands when a large capacity drive is installed. Signed-off-by: Jason J. Herne --- drivers/scsi/sd.c |5 - include/

Re: [PATCH] Use SCSI read/write(16) with >2TB drives

2012-11-13 Thread Paolo Bonzini
Il 14/11/2012 01:54, Jason J. Herne ha scritto: > blk_queue_physical_block_size(sdp->request_queue, > sdkp->physical_block_size); > sdkp->device->sector_size = sector_size; > + > + /* Use read/write(16) for > 2TB disks */ > + sdp->use_16_for_r

usb phy and usb otg

2012-11-13 Thread Chao Xie
hi The USB controller in our SOC can support otg/ehci/udc, and there is a PHY around the controller. It means that when we want to enable otg or ehci or udc, we have to enable the PHY. Then i want to add a PHY driver, but the PHY does not bind to OTG. It means that if we want only udc fucntion, we

Re: [RFC PATCH v2 1/6] usb: Register usb port's acpi power resources

2012-11-13 Thread Lan Tianyu
On 2012年11月14日 07:56, Rafael J. Wysocki wrote: > On Tuesday, November 13, 2012 08:36:15 PM Lan Tianyu wrote: >> 于 2012/11/13 19:07, Sergei Shtylyov 写道: >>> Hello. >>> >>> On 13-11-2012 12:00, Lan Tianyu wrote: >>> This patch is to register usb port's acpi power resources. Create link betw

Re: [RFC PATCH v2 2/6] usb: Add driver/usb/core/port.c file to fill usb port related code.

2012-11-13 Thread Lan Tianyu
On 2012年11月14日 08:04, Rafael J. Wysocki wrote: > On Tuesday, November 13, 2012 04:00:01 PM Lan Tianyu wrote: >> This patch is to create driver/usb/core/port.c and move usb port related >> code into it. > > It does seem to make functional changes in addition to that, however. > No functional chang

Re: [PATCH v7 0/5] usb: phy: samsung: Introducing usb phy driver for samsung SoCs

2012-11-13 Thread Praveen Paneri
Hi, On Mon, Nov 12, 2012 at 10:11 AM, Kukjin Kim wrote: > Felipe Balbi wrote: >> >> Hi, >> > Hi :-) > > [...] > >> Sure, but I still need Kukjin's 'say-so' for the arch/arm/plat-samsung >> and arch/arm/mach-exynos part. >> > Basically, this approach looks OK to me. > > BTW, I have some comments a

Re: [PATCH v7 0/5] usb: phy: samsung: Introducing usb phy driver for samsung SoCs

2012-11-13 Thread Praveen Paneri
Hi Kukjin, Felipe, Since the issue is only with arch patches, which I am going to resolve asap, Will it be possible for you to consider taking only driver patches? I can resend arch patches separately to linux-samsung after updating if Kukjin is also fine with that? Thanks, Praveen On Wed, Nov 1

Re: Device detected as Digitalcamera (PTP?) instead of Portable Device (MTP?) - MS_COMP_MTP - WinXP

2012-11-13 Thread Peter Stuge
Karl Krach wrote: > Thanks a lot. It seams that the Android [1] has the 'Microsoft OS > Descriptors' implemented while Meego has not. Porting from the Android code > don't seems to be straightforward for me - do you know a better solution? Reimplement them? It shouldn't be terribly much work -

[PATCH -next v2] usb: gadget: tcm_usb_gadge: fix to return error or 0 in tcm_usbg_drop_nexus()

2012-11-13 Thread Wei Yongjun
From: Wei Yongjun In the error handling case of tcm_usbg_drop_nexus(), the error code is assigned to 'ret', but it is ignored. We'd better return 'ret' instead of always return 0. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --

Re: [PATCH -next v2] usb: gadget: tcm_usb_gadge: fix to return error or 0 in tcm_usbg_drop_nexus()

2012-11-13 Thread Felipe Balbi
Hi, On Wed, Nov 14, 2012 at 01:47:23PM +0800, Wei Yongjun wrote: > From: Wei Yongjun > > In the error handling case of tcm_usbg_drop_nexus(), the error code > is assigned to 'ret', but it is ignored. We'd better return 'ret' > instead of always return 0. > > dpatch engine is used to auto genera

[PATCH] Try #2: Use SCSI read/write(16) with >2TB drives

2012-11-13 Thread Jason J. Herne
From: "Jason J. Herne" Force large capacity (> 2TB) drives to use READ/WRITE(16) instead of READ/WRITE(10). Some(most/all?) USB enclosures do not like READ(10) commands when a large capacity drive is installed. Signed-off-by: Jason J. Herne --- drivers/scsi/sd.c |5 - include/

Re: [RFC PATCH v2 3/6] usb: add runtime pm support for usb port device

2012-11-13 Thread Lan Tianyu
On 2012年11月14日 08:08, Rafael J. Wysocki wrote: > On Tuesday, November 13, 2012 04:00:02 PM Lan Tianyu wrote: >> This patch is to add runtime pm callback for usb port device. >> Set/clear PORT_POWER feature in the resume/suspend callbak. >> Add portnum for struct usb_port to record port number. >> >