Re: [PATCH v3 2/2] usb: host: ehci-tegra: Avoid getting the same reset twice

2016-05-05 Thread Hans de Goede
Hi, On 04-05-16 22:25, Thierry Reding wrote: On Wed, May 04, 2016 at 11:23:20AM -0600, Stephen Warren wrote: On 05/04/2016 08:40 AM, Thierry Reding wrote: From: Thierry Reding Starting with commit 0b52297f2288 ("reset: Add support for shared reset controls") there is a reference count for re

Re: [PATCH v3 2/2] usb: host: ehci-tegra: Avoid getting the same reset twice

2016-05-05 Thread Hans de Goede
Hi, On 05-05-16 18:00, Stephen Warren wrote: On 05/05/2016 02:05 AM, Hans de Goede wrote: Hi, On 04-05-16 22:25, Thierry Reding wrote: On Wed, May 04, 2016 at 11:23:20AM -0600, Stephen Warren wrote: On 05/04/2016 08:40 AM, Thierry Reding wrote: From: Thierry Reding Starting with commit

[PATCH 1/2] musb: sunxi: Add set_mode platform function

2016-05-12 Thread Hans de Goede
Move the mode handling to the platform_set_mode callback. Signed-off-by: Hans de Goede --- drivers/usb/musb/sunxi.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c index fdab423..2c33d9b

[PATCH 2/2] musb: sunxi: Set state to A_WAIT_VRISE when enabling VBus

2016-05-12 Thread Hans de Goede
the otg state to A_WAIT_VRISE upon enabling Vbus making musb_stage0_irq() ignore the first VBUSERR_RETRY_COUNT VBUSERROR interrupts, fixing connection issues in these cases. Signed-off-by: Hans de Goede --- drivers/usb/musb/sunxi.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff

Re: [linux-sunxi] Re: [PATCH 2/2] musb: sunxi: Set state to A_WAIT_VRISE when enabling VBus

2016-05-14 Thread Hans de Goede
Hi, On 13-05-16 20:35, Bin Liu wrote: Hi, On Thu, May 12, 2016 at 08:31:09PM +0200, Hans de Goede wrote: When the board is powering attached usb devices via the otg port sometimes / on some devices it takes slightly too long for the VBus detection code in phy-sun4i-usb.c to signal that VBus

[PATCH v2 1/2] musb: sunxi: Add set_mode platform function

2016-05-14 Thread Hans de Goede
Move the mode handling to the platform_set_mode callback. Signed-off-by: Hans de Goede --- Changes in v2: -No changes --- drivers/usb/musb/sunxi.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb

[PATCH v2 2/2] musb: sunxi: Set state to A_WAIT_VRISE when enabling Vbus

2016-05-14 Thread Hans de Goede
the otg state to A_WAIT_VRISE upon enabling Vbus making musb_stage0_irq() ignore the first VBUSERR_RETRY_COUNT VBUSERROR interrupts, fixing connection issues in these cases. Signed-off-by: Hans de Goede --- Changes in v2: -Use curly-braces in both branches of if-else --- drivers/usb/musb/sunxi.c

[PATCH] usb: quirks: Add no-lpm quirk for Acer C120 LED Projector

2016-05-18 Thread Hans de Goede
The Acer C120 LED Projector is a USB-3 connected pico projector which takes both its power and video data from USB-3. In combination with some hubs this device does not play well with lpm, so disable lpm for it. Signed-off-by: Hans de Goede --- drivers/usb/core/quirks.c | 3 +++ 1 file changed

[PATCH v2 1/2] usb: quirks: Fix sorting

2016-05-19 Thread Hans de Goede
Properly sort all the entries by vendor id. Signed-off-by: Hans de Goede --- Changes in v2: -This is a new patch in v2 of this patch-set --- drivers/usb/core/quirks.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/usb/core/quirks.c b/drivers

[PATCH v2 2/2] usb: quirks: Add no-lpm quirk for Acer C120 LED Projector

2016-05-19 Thread Hans de Goede
The Acer C120 LED Projector is a USB-3 connected pico projector which takes both its power and video data from USB-3. In combination with some hubs this device does not play well with lpm, so disable lpm for it. Signed-off-by: Hans de Goede --- Changes in v2: -Properly sort entries by vendor id

Re: [regression] uas no longer queues commands since v4.5.2

2016-05-23 Thread Hans de Goede
Hi, On 22-05-16 12:39, Tom Yan wrote: With commit 198de51dbc3454d95b015ca0a055b673f85f01bb, uas no longer set `queue_depth` with scsi_change_queue_depth(), so now `queue_depth` of UAS drives are 1. Even though `can_queue` is set to `devinfo->qdepth - 2`, but apparently that does not help, since

[PATCH] USB: uas: Fix slave queue_depth not being set

2016-05-23 Thread Hans de Goede
ct, without the scsi_change_queue_depth() call the slave's queue_depth defaults to 1, introducing a performance regression. This commit restores the call, fixing the performance regression. Cc: sta...@vger.kernel.org Fixes: 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") Reported-by: T

Re: [PATCH] USB: uas: Fix slave queue_depth not being set

2016-05-23 Thread Hans de Goede
Hi, On 23-05-16 19:36, James Bottomley wrote: On Mon, 2016-05-23 at 13:49 +0200, Hans de Goede wrote: Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") removed the scsi_change_queue_depth() call from uas_slave_configure() assuming that the slave would inherit

Re: [PATCH v2 1/1] uas: remove can_queue set in host template

2016-05-23 Thread Hans de Goede
ng this is good: Acked-by: Hans de Goede Regards, Hans diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 4d49fce..e03c490 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -848,7 +848,6 @@ static struct scsi_host_template uas_hos

Re: [uas/scsi] untagged commands?

2016-05-24 Thread Hans de Goede
Hi, On 24-05-16 10:18, Tom Yan wrote: In this commit: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/usb/storage/uas.c?id=198de51dbc3454d95b015ca0a055b673f85f01bb There is the following comment: 1 tag is reserved for untagged commands So my question is, what e

Re: [PATCH] USB: uas: Fix slave queue_depth not being set

2016-05-25 Thread Hans de Goede
Hi, On 24-05-16 14:44, James Bottomley wrote: On Tue, 2016-05-24 at 08:53 +0200, Hans de Goede wrote: Hi, On 23-05-16 19:36, James Bottomley wrote: On Mon, 2016-05-23 at 13:49 +0200, Hans de Goede wrote: Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") r

Re: [PATCH] reset: Put back *_optional variants

2016-05-26 Thread Hans de Goede
Hi, On 26-05-16 03:15, John Youn wrote: Prior to commit 6c96f05c8bb8 ("reset: Make [of_]reset_control_get[_foo] functions wrappers"), the optional variants returned -ENOTSUPP when CONFIG_RESET_CONTROLLER was not set. This patch reverts to this behavior. Otherwise those calls will return -EINVAL

Re: [PATCH] reset: Put back *_optional variants

2016-05-27 Thread Hans de Goede
Hi, On 26-05-16 23:44, John Youn wrote: On 5/26/2016 1:25 PM, Hans de Goede wrote: Hi, On 26-05-16 03:15, John Youn wrote: Prior to commit 6c96f05c8bb8 ("reset: Make [of_]reset_control_get[_foo] functions wrappers"), the optional variants returned -ENOTSUPP when CONFIG_RESET_CONT

Re: [PATCH] reset: Put back *_optional variants

2016-05-30 Thread Hans de Goede
Hi, On 30-05-16 12:18, Philipp Zabel wrote: Hi, Am Freitag, den 27.05.2016, 09:06 +0200 schrieb Hans de Goede: [...] So IMHO the following change would be a better way to fix this: --- a/include/linux/reset.h +++ b/include/linux/reset.h @@ -65,14 +65,14 @@ static inline struct reset_control

[PATCH resend 0/1] USB: uas: Fix slave queue_depth not being set

2016-05-31 Thread Hans de Goede
Hi Greg, There was some discussion about this patch during its initial posting, but the concensus seems to be that this patch, which is in essence a partial revert of the patch causing the problem, is the best way to fix this. So I'm resending this to make sure it does not fall through the cracks

[PATCH resend] USB: uas: Fix slave queue_depth not being set

2016-05-31 Thread Hans de Goede
ct, without the scsi_change_queue_depth() call the slave's queue_depth defaults to 1, introducing a performance regression. This commit restores the call, fixing the performance regression. Cc: sta...@vger.kernel.org Fixes: 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") Reported-by: T

[PATCH] USB: xhci: Add broken streams quirk for Frescologic device id 1009

2016-06-01 Thread Hans de Goede
disabled. Cc: sta...@vger.kernel.org Signed-off-by: Hans de Goede --- drivers/usb/host/xhci-pci.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index 48672fa..c10972f 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host

Re: [PATCH] USB: xhci: Add broken streams quirk for Frescologic device id 1009

2016-06-01 Thread Hans de Goede
Hi, On 01-06-16 21:03, Greg Kroah-Hartman wrote: On Wed, Jun 01, 2016 at 09:01:29PM +0200, Hans de Goede wrote: I got one of these cards for testing uas with, it seems that with streams it dma-s all over the place, corrupting memory. On my first tests it managed to dma over the BIOS of the

[PATCH v5 resend 2/2] ohci-platform: Add support for controllers with multiple reset lines

2016-06-02 Thread Hans de Goede
At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple reset lines, the controller will not initialize while the reset for its companion is still asserted, which means we need to de-assert 2 resets for the controller to work. Signed-off-by: Hans de Goede --- Changes in v2: -New

[PATCH v5 resend 0/2] ?hci-platform: Add support for controllers with more then one reset line

2016-06-02 Thread Hans de Goede
Here is a resend of my last version of the patch set to support usb controllers which have multiple resets. The shared reset controller support this depends on has landed in 4.7-rc1, so this patch-set should be ready for merging now. Changes in v2: -Switch to now shared reset_[de]assert functions

[PATCH v5 resend 1/2] ehci-platform: Add support for controllers with multiple reset lines

2016-06-02 Thread Hans de Goede
Signed-off-by: Hans de Goede --- Changes in v2: -Use the new reset_control_[de]assert_shared reset-controller functions --- Documentation/devicetree/bindings/usb/usb-ehci.txt | 2 +- drivers/usb/host/ehci-platform.c | 41 -- 2 files changed, 24 insertions

[PATCH 4/4] musb: sunxi: Simplify dr_mode handling

2016-06-02 Thread Hans de Goede
when in host-only mode. This also enables host- and peripheral-only mode with vbus monitoring. Signed-off-by: Hans de Goede --- drivers/usb/musb/sunxi.c | 68 ++-- 1 file changed, 25 insertions(+), 43 deletions(-) diff --git a/drivers/usb/musb/sunxi.c

[PATCH 2/4] phy-sun4i-usb: Add support for peripheral-only mode

2016-06-02 Thread Hans de Goede
devicetree. Signed-off-by: Hans de Goede --- drivers/phy/phy-sun4i-usb.c | 62 ++--- 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c index bae54f7..1ea71f5 100644 --- a/drivers/phy/phy

[PATCH 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-02 Thread Hans de Goede
: Hans de Goede --- drivers/usb/common/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c index e3d0161..9806433 100644 --- a/drivers/usb/common/common.c +++ b/drivers/usb/common/common.c @@ -145,7 +145,7 @@ enum

[PATCH 3/4] phy-sun4i-usb: Add workaround for missing Vbus det interrupts on A31

2016-06-02 Thread Hans de Goede
The A31 companion pmic (axp221) does not generate vbus change interrupts when the board is driving vbus, so we must poll when using the pmic for vbus-det _and_ we're driving vbus. Signed-off-by: Hans de Goede --- drivers/phy/phy-sun4i-usb.c | 34 -- 1

Re: [PATCH 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-03 Thread Hans de Goede
Hi, On 02-06-16 20:16, Bin Liu wrote: Hi, On Thu, Jun 02, 2016 at 07:31:03PM +0200, Hans de Goede wrote: Some SoCs have a single phy-hw-block with multiple phys, this is modelled by a single phy dts node, so we end up with multiple controller nodes with a phys property pointing to the phy

Re: [PATCH 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-03 Thread Hans de Goede
Hi, On 03-06-16 13:20, Kishon Vijay Abraham I wrote: Hi, On Thursday 02 June 2016 11:01 PM, Hans de Goede wrote: Some SoCs have a single phy-hw-block with multiple phys, this is modelled by a single phy dts node, so we end up with multiple controller nodes with a phys property pointing to the

Re: [PATCH 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-03 Thread Hans de Goede
Hi, On 03-06-16 15:04, Bin Liu wrote: Hi, On Fri, Jun 03, 2016 at 12:34:35PM +0200, Hans de Goede wrote: Hi, On 02-06-16 20:16, Bin Liu wrote: Hi, On Thu, Jun 02, 2016 at 07:31:03PM +0200, Hans de Goede wrote: Some SoCs have a single phy-hw-block with multiple phys, this is modelled by a

Re: [PATCH 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-03 Thread Hans de Goede
Hi, On 03-06-16 15:12, Bin Liu wrote: Hi, On Fri, Jun 03, 2016 at 01:39:26PM +0200, Hans de Goede wrote: Hi, On 03-06-16 13:20, Kishon Vijay Abraham I wrote: Hi, On Thursday 02 June 2016 11:01 PM, Hans de Goede wrote: Some SoCs have a single phy-hw-block with multiple phys, this is

[PATCH v2 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-03 Thread Hans de Goede
for the otg controller. Signed-off-by: Hans de Goede --- -Changes in v2: Add a args0 parameter instead of looking for nodes with a dr_mode property --- drivers/usb/common/common.c | 31 ++- drivers/usb/phy/phy-am335x.c | 2 +- include/linux/usb/of.h | 4 ++-- 3

[PATCH v2 3/4] phy-sun4i-usb: Add workaround for missing Vbus det interrupts on A31

2016-06-03 Thread Hans de Goede
The A31 companion pmic (axp221) does not generate vbus change interrupts when the board is driving vbus, so we must poll when using the pmic for vbus-det _and_ we're driving vbus. Signed-off-by: Hans de Goede --- Changes in v2: -No changes --- drivers/phy/phy-sun4i-usb.c

[PATCH v2 2/4] phy-sun4i-usb: Add support for peripheral-only mode

2016-06-03 Thread Hans de Goede
devicetree. Signed-off-by: Hans de Goede --- Changes in v2: -Adjust for of_usb_get_dr_mode_by_phy now taking an args0 parameter --- drivers/phy/phy-sun4i-usb.c | 62 ++--- 1 file changed, 42 insertions(+), 20 deletions(-) diff --git a/drivers/phy/phy-sun4i

[PATCH v2 4/4] musb: sunxi: Simplify dr_mode handling

2016-06-03 Thread Hans de Goede
when in host-only mode. This also enables host- and peripheral-only mode with vbus monitoring. Signed-off-by: Hans de Goede --- Changes in v2: -No changes --- drivers/usb/musb/sunxi.c | 68 ++-- 1 file changed, 25 insertions(+), 43 deletions(-) diff

[PATCH] musb: sunxi: Fix NULL ptr deref when gadget is registered before musb

2016-06-04 Thread Hans de Goede
platform_device_register_full() has returned. Instead store a pointer to struct musb in struct sunxi_glue when sunxi_musb_enable gets called. Note that sunxi_musb_enable always gets called before sunxi_musb_work() can run. Signed-off-by: Hans de Goede --- drivers/usb/musb/sunxi.c | 15 +-- 1 file

[PATCH] musb: sunxi: Remove bogus "Frees glue" comment

2016-06-04 Thread Hans de Goede
The comment is wrong, glue is devm_kzalloc-ed mem attached to the "allwinner,sun4i-a10-musb" compatible platform-dev. Where as glue->musb_pdev is a newly created "musb-hdrc" platform-dev. Signed-off-by: Hans de Goede --- drivers/usb/musb/sunxi.c | 2 +- 1 file cha

[PATCH v3 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-05 Thread Hans de Goede
for the otg controller. Signed-off-by: Hans de Goede --- Changes in v2: -Add a args0 parameter instead of looking for nodes with a dr_mode property Changes in v3: -No changes --- drivers/usb/common/common.c | 31 ++- drivers/usb/phy/phy-am335x.c | 2 +- include/linux

[PATCH v3 2/4] phy-sun4i-usb: Add support for peripheral-only mode

2016-06-05 Thread Hans de Goede
devicetree. Signed-off-by: Hans de Goede --- Changes in v2: -Adjust for of_usb_get_dr_mode_by_phy now taking an args0 parameter Changes in v3: -Only toggle the phy vbus-det bit on id-change on systems without vbus-det when in otg mode --- drivers/phy/phy-sun4i-usb.c | 68

[PATCH v3 4/4] musb: sunxi: Simplify dr_mode handling

2016-06-05 Thread Hans de Goede
when in host-only mode. This also enables host- and peripheral-only mode with vbus monitoring. Signed-off-by: Hans de Goede --- Changes in v2: -No changes Changes in v3: -No changes --- drivers/usb/musb/sunxi.c | 68 ++-- 1 file changed, 25 insertions

[PATCH v3 3/4] phy-sun4i-usb: Add workaround for missing Vbus det interrupts on A31

2016-06-05 Thread Hans de Goede
The A31 companion pmic (axp221) does not generate vbus change interrupts when the board is driving vbus, so we must poll when using the pmic for vbus-det _and_ we're driving vbus. Signed-off-by: Hans de Goede --- Changes in v2: -No changes Changes in v3: -No changes --- drivers/phy/phy-

Race condition in usbfs / libusb when using reap-after-disconnect

2016-06-06 Thread Hans de Goede
Hi All, While looking at libusb today I ended up looking at the reap-after-disconnect code. What stands out is that libusb expects to be able to reap all outstanding urbs on a device on receiving a POLL_ERR status from poll (on supported kernels). But the usbfs poll implementation will return P

Re: Race condition in usbfs / libusb when using reap-after-disconnect

2016-06-06 Thread Hans de Goede
Hi, On 06-06-16 16:48, Greg Kroah-Hartman wrote: On Mon, Jun 06, 2016 at 01:44:23PM +0200, Hans de Goede wrote: Hi All, While looking at libusb today I ended up looking at the reap-after-disconnect code. What stands out is that libusb expects to be able to reap all outstanding urbs on a

Re: Race condition in usbfs / libusb when using reap-after-disconnect

2016-06-07 Thread Hans de Goede
Hi, On 06-06-16 19:03, Alan Stern wrote: On Mon, 6 Jun 2016, Hans de Goede wrote: Hi, On 06-06-16 16:48, Greg Kroah-Hartman wrote: On Mon, Jun 06, 2016 at 01:44:23PM +0200, Hans de Goede wrote: Hi All, While looking at libusb today I ended up looking at the reap-after-disconnect code

Re: [PATCH v3 4/4] musb: sunxi: Simplify dr_mode handling

2016-06-08 Thread Hans de Goede
Hi, On 08-06-16 12:23, Maxime Ripard wrote: Hi, On Sun, Jun 05, 2016 at 04:59:36PM +0200, Hans de Goede wrote: phy-sun4i-usb now has proper dr_mode handling, it always registers an extcon, and sends a notify with the mode (even when in peripheral- / host-only mode) at least once. So we can

Re: Race condition in usbfs / libusb when using reap-after-disconnect

2016-06-08 Thread Hans de Goede
Hi, On 07-06-16 17:18, Alan Stern wrote: On Tue, 7 Jun 2016, Hans de Goede wrote: Hi, On 06-06-16 19:03, Alan Stern wrote: On Mon, 6 Jun 2016, Hans de Goede wrote: Hi, On 06-06-16 16:48, Greg Kroah-Hartman wrote: On Mon, Jun 06, 2016 at 01:44:23PM +0200, Hans de Goede wrote: Hi All

Re: [PATCH v5 resend 1/2] ehci-platform: Add support for controllers with multiple reset lines

2016-06-08 Thread Hans de Goede
Hi, On 08-06-16 07:22, Greg Kroah-Hartman wrote: On Thu, Jun 02, 2016 at 05:14:05PM +0200, Hans de Goede wrote: From: Reinder de Haan At least the EHCI/OHCI found on the Allwinnner H3 SoC needs multiple reset lines, the controller will not initialize while the reset for its companion is

[PATCH] ehci-platform: Add support for shared reset controllers

2016-06-08 Thread Hans de Goede
ehci-platform reset handling code inline with ohci-platform. Signed-off-by: Hans de Goede --- drivers/usb/host/ehci-platform.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/usb/host/ehci-platform.c b/drivers/usb/host/ehci-platform.c index bc33f45

Re: [PATCH] ehci-platform: Add support for shared reset controllers

2016-06-08 Thread Hans de Goede
Hi, On 08-06-16 19:47, Alan Stern wrote: On Wed, 8 Jun 2016, Hans de Goede wrote: Add support for shared platform controllers by using devm_reset_control_get_shared_by_index instead of of_reset_control_get_by_index. Note we use the devm function because there is no

Re: [PATCH v3 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-09 Thread Hans de Goede
Hi, On 09-06-16 16:30, Bin Liu wrote: Hi, On Sun, Jun 05, 2016 at 04:59:33PM +0200, Hans de Goede wrote: Some SoCs have a single phy-hw-block with multiple phys, this is modelled by a single phy dts node, so we end up with multiple controller nodes with a phys property pointing to the phy

Re: [PATCH v3 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-10 Thread Hans de Goede
Hi, On 09-06-16 21:49, Bin Liu wrote: Hi, On Thu, Jun 09, 2016 at 04:51:45PM +0200, Hans de Goede wrote: Hi, On 09-06-16 16:30, Bin Liu wrote: Hi, On Sun, Jun 05, 2016 at 04:59:33PM +0200, Hans de Goede wrote: Some SoCs have a single phy-hw-block with multiple phys, this is modelled by a

[PATCH v4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-10 Thread Hans de Goede
for the otg controller. Signed-off-by: Hans de Goede --- Changes in v2: -Add a arg0 parameter instead of looking for nodes with a dr_mode property Changes in v3: -No changes Changes in v4: -When arg0 == -1, use of_parse_phandle instead of of_parse_phandle_with_args because using

Re: [PATCH v4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-10 Thread Hans de Goede
Hi, On 10-06-16 17:00, Bin Liu wrote: Hi, On Fri, Jun 10, 2016 at 11:46:25AM +0200, Hans de Goede wrote: Some SoCs have a single phy-hw-block with multiple phys, this is modelled by a single phy dts node, so we end up with multiple controller nodes with a phys property pointing to the phy

[PATCH v4 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-10 Thread Hans de Goede
for the otg controller. Signed-off-by: Hans de Goede --- Changes in v2: -Add a arg0 parameter instead of looking for nodes with a dr_mode property Changes in v3: -No changes Changes in v4: -When arg0 == -1, use of_parse_phandle instead of of_parse_phandle_with_args because using

[PATCH v4 0/4] usb: musb: sunxi: Fixes + peripheral-only mode

2016-06-10 Thread Hans de Goede
Hi All, Here is v4 of my patch-set with a couple of fixed and peripheral-only mode for the sunxi musb / otg-phy code. The first patch changes a generic usb helper function, the next 2 patches are phy patches and the last patch is a musb patch. And all 4 patches depend on eachother. As such I bel

[PATCH v4 3/4] phy-sun4i-usb: Add workaround for missing Vbus det interrupts on A31

2016-06-10 Thread Hans de Goede
The A31 companion pmic (axp221) does not generate vbus change interrupts when the board is driving vbus, so we must poll when using the pmic for vbus-det _and_ we're driving vbus. Signed-off-by: Hans de Goede --- Changes in v2: -No changes Changes in v3: -No changes Changes in v4: -No ch

[PATCH v4 2/4] phy-sun4i-usb: Add support for peripheral-only mode

2016-06-10 Thread Hans de Goede
devicetree. Signed-off-by: Hans de Goede --- Changes in v2: -Adjust for of_usb_get_dr_mode_by_phy now taking an args0 parameter Changes in v3: -Only toggle the phy vbus-det bit on id-change on systems without vbus-det when in otg mode Changes in v4: -No changes --- drivers/phy/phy-sun4i-usb.c | 68

[PATCH v4 4/4] usb: musb: sunxi: Simplify dr_mode handling

2016-06-10 Thread Hans de Goede
when in host-only mode. This also enables host- and peripheral-only mode with vbus monitoring. Tested-by: Maxime Ripard Signed-off-by: Hans de Goede Acked-by: Bin Liu --- Changes in v2: -No changes Changes in v3: -No changes Changes in v4: -Add Maxime's Tested-by -Add Bin Liu'

Re: [PATCH resend] USB: uas: Fix slave queue_depth not being set

2016-06-13 Thread Hans de Goede
Hi, On 13-06-16 14:05, Oliver Neukum wrote: On Tue, 2016-05-31 at 09:18 +0200, Hans de Goede wrote: Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") removed the scsi_change_queue_depth() call from uas_slave_configure() assuming that the slave would inherit

[PATCH v5 0/4] usb: musb: sunxi: Fixes + peripheral-only mode

2016-06-18 Thread Hans de Goede
Hi Kishon, I noticed that you've merged a phy-sun4i-usb fix into your linux-phy/fixes branch, this caused a conflict in the 3th patch of this set, so I'm posting a new rebased version here. Since these patches depend on each other and now also depend on changes in your fixes branch, can you pleas

[PATCH v5 2/4] phy-sun4i-usb: Add support for peripheral-only mode

2016-06-18 Thread Hans de Goede
devicetree. Signed-off-by: Hans de Goede Acked-by: Kishon Vijay Abraham I --- Changes in v2: -Adjust for of_usb_get_dr_mode_by_phy now taking an args0 parameter Changes in v3: -Only toggle the phy vbus-det bit on id-change on systems without vbus-det when in otg mode Changes in v4: -No changes

[PATCH v5 3/4] phy-sun4i-usb: Add workaround for missing Vbus det interrupts on A31

2016-06-18 Thread Hans de Goede
The A31 companion pmic (axp221) does not generate vbus change interrupts when the board is driving vbus, so we must poll when using the pmic for vbus-det _and_ we're driving vbus. Signed-off-by: Hans de Goede Acked-by: Kishon Vijay Abraham I --- Changes in v2: -No changes Changes in v3

[PATCH v5 1/4] USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block

2016-06-18 Thread Hans de Goede
for the otg controller. Signed-off-by: Hans de Goede --- Changes in v2: -Add a arg0 parameter instead of looking for nodes with a dr_mode property Changes in v3: -No changes Changes in v4: -When arg0 == -1, use of_parse_phandle instead of of_parse_phandle_with_args because using

[PATCH v5 4/4] usb: musb: sunxi: Simplify dr_mode handling

2016-06-18 Thread Hans de Goede
when in host-only mode. This also enables host- and peripheral-only mode with vbus monitoring. Tested-by: Maxime Ripard Signed-off-by: Hans de Goede Acked-by: Bin Liu --- Changes in v2: -No changes Changes in v3: -No changes Changes in v4: -Add Maxime's Tested-by -Add Bin Liu's Acked-

[PATCH v5] phy-sun4i-usb: Fix irq free conditions to match request conditions

2016-06-18 Thread Hans de Goede
failing probe") Signed-off-by: Hans de Goede --- drivers/phy/phy-sun4i-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c index 8c2570d..8c7eb33 100644 --- a/drivers/phy/phy-sun4i-usb.c +++ b/drivers/phy/phy-s

Re: ASM1153 SATA bridge fails with Crucial MX100 512GB SSD

2016-06-28 Thread Hans de Goede
Hi, On 27-06-16 23:12, Alistair Buxton wrote: I have a USB to SATA bridge which claims to be a ASM1153. It works fine with all the other drives I tried, but not with a Crucial MX100 512GB SSD. I can read approximately the first 1.7GB of the disk with dd and then it stops, always at the same poin

[PATCH v5 resend 0/2] phy-sun4i-usb: peripheral-mode + a31 otg workaround

2016-06-29 Thread Hans de Goede
Hi Kishon, The "USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block" patch on which this series depends is in usb-next now: https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=ce15ed4c5dfb3f7757e6611902aed5db253af977 Can you please merge this series? Regards

[PATCH v5 resend 2/2] phy-sun4i-usb: Add workaround for missing Vbus det interrupts on A31

2016-06-29 Thread Hans de Goede
The A31 companion pmic (axp221) does not generate vbus change interrupts when the board is driving vbus, so we must poll when using the pmic for vbus-det _and_ we're driving vbus. Signed-off-by: Hans de Goede Acked-by: Kishon Vijay Abraham I --- Changes in v2: -No changes Changes in v3

[PATCH v5 resend 1/2] phy-sun4i-usb: Add support for peripheral-only mode

2016-06-29 Thread Hans de Goede
devicetree. Signed-off-by: Hans de Goede Acked-by: Kishon Vijay Abraham I --- Changes in v2: -Adjust for of_usb_get_dr_mode_by_phy now taking an args0 parameter Changes in v3: -Only toggle the phy vbus-det bit on id-change on systems without vbus-det when in otg mode Changes in v4: -No changes

[PATCH v5 resend] usb: musb: sunxi: Simplify dr_mode handling

2016-06-29 Thread Hans de Goede
when in host-only mode. This also enables host- and peripheral-only mode with vbus monitoring. Tested-by: Maxime Ripard Signed-off-by: Hans de Goede Acked-by: Bin Liu --- Changes in v2: -No changes Changes in v3: -No changes Changes in v4: -Add Maxime's Tested-by -Add Bin Liu's Acked-

[PATCH v5 resend 0/1] usb: musb: sunxi: Simplify dr_mode handling

2016-06-29 Thread Hans de Goede
Hi Bin Liu, The "USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block" patch on which this patch indirectly depends is in usb-next now: https://git.kernel.org/cgit/linux/kernel/git/gregkh/usb.git/commit/?h=usb-next&id=ce15ed4c5dfb3f7757e6611902aed5db253af977 Can you please merge this now?

Re: [PATCH v5 resend 0/2] phy-sun4i-usb: peripheral-mode + a31 otg workaround

2016-07-02 Thread Hans de Goede
Hi, On 30-06-16 07:47, Kishon Vijay Abraham I wrote: Hi, On Wednesday 29 June 2016 11:44 PM, Hans de Goede wrote: Hi Kishon, The "USB: Fix of_usb_get_dr_mode_by_phy with a shared phy block" patch on which this series depends is in usb-next now: https://git.kernel.org/cgit/linux/

Re: JMS56x not working reliably with uas driver

2016-12-21 Thread Hans de Goede
FUA | US_FL_NO_REPORT_OPCODES), +/* Reported-by George Cherian */ +UNUSUAL_DEV(0x152d, 0x9561, 0x, 0x, +"JMicron", +"JMS56x", +USB_SC_DEVICE, USB_PR_DEVICE, NULL, +US_FL_NO_REPORT_OPCODES), + /* Rep

Re: JMS56x not working reliably with uas driver

2016-12-21 Thread Hans de Goede
Hi, On 21-12-16 12:42, Oliver Neukum wrote: On Wed, 2016-12-21 at 17:09 +0530, George Cherian wrote: Hi Oliver, I was working with this JMicron device and using the uas driver. I am seeing the following 2 issues. 1) On connect I see the following messages. Thanks. Do you want to submit it t

Re: JMS56x not working reliably with uas driver

2016-12-21 Thread Hans de Goede
Hi, On 21-12-16 13:07, George Cherian wrote: On 12/21/2016 05:12 PM, Oliver Neukum wrote: On Wed, 2016-12-21 at 17:09 +0530, George Cherian wrote: Hi Oliver, I was working with this JMicron device and using the uas driver. I am seeing the following 2 issues. 1) On connect I see the followi

[PATCH 1/2] usb: dwc3-pci: Fix dr_mode misspelling

2016-12-22 Thread Hans de Goede
usb_get_dr_mode() expects the device-property to be spelled "dr_mode" not "dr-mode". Spelling it properly fixes the following warning showing up in dmesg: [ 8704.500545] dwc3 dwc3.2.auto: Configuration mismatch. dr_mode forced to gadget Signed-off-by: Hans de Goede --- d

[PATCH 2/2] usb: dwc3-pci: Do not use PLATFORM_DEVID_AUTO for platform child-device id

2016-12-22 Thread Hans de Goede
allocator, so that the name will always be dwc3.0 for the first (and most likely only) dwc3 controller enumerated. Signed-off-by: Hans de Goede --- drivers/usb/dwc3/dwc3-pci.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb

[PATCH 1/2] usb: xhci: Add Intel cherrytrail extended cap / otg phy mux handling

2016-12-22 Thread Hans de Goede
. So this commit adds a simple handler for this extended capability, which creates a platform device with the caps mmio region as resource, this allows us to write a separate platform phy driver for the mux. Signed-off-by: Hans de Goede --- drivers/usb/host/Makefile | 2 +- drivers/usb

[PATCH 0/2] Intel cherrytrail xhci extended cap phy/mux support

2016-12-22 Thread Hans de Goede
Hi All, Here are 2 patches which can and should be merged separately, but which do belong together, as together they add support for the usb-phy / mux bits found in the Intel Cherrytrail xhci vendor defined extended capabilities registers. I did not want to hide an entire phy driver inside the xh

[PATCH 2/2] phy: Add new Intel Cherrytrail USB OTG phy driver

2016-12-22 Thread Hans de Goede
nts to the Intel Vendor Defined XHCI extended capabilities region. Signed-off-by: Hans de Goede --- drivers/phy/Kconfig | 10 ++ drivers/phy/Makefile| 1 + drivers/phy/phy-intel-cht-usb.c | 367 3 files changed, 378 insertions(

Re: [PATCH 0/2] Intel cherrytrail xhci extended cap phy/mux support

2016-12-22 Thread Hans de Goede
Hi, On 22-12-16 13:11, Felipe Balbi wrote: Hi, Hans de Goede writes: Hi All, Here are 2 patches which can and should be merged separately, but which do belong together, as together they add support for the usb-phy / mux bits found in the Intel Cherrytrail xhci vendor defined extended

Re: [PATCH 0/2] Intel cherrytrail xhci extended cap phy/mux support

2016-12-22 Thread Hans de Goede
Hi, On 22-12-16 14:18, Felipe Balbi wrote: Hans de Goede writes: Baolu has worked on this for months but it turned out that several folks said 'no' to his patchset. You're not really dealing with a PHY, it's just a portmux which can generate some UTMI messages to mak

Re: [PATCH 0/2] Intel cherrytrail xhci extended cap phy/mux support

2016-12-22 Thread Hans de Goede
Hi, On 22-12-16 17:28, Mathias Nyman wrote: On 22.12.2016 14:45, Hans de Goede wrote: Hi, On 22-12-16 13:11, Felipe Balbi wrote: Hi, Hans de Goede writes: Hi All, Here are 2 patches which can and should be merged separately, but which do belong together, as together they add support for

Re: [PATCH 0/2] Intel cherrytrail xhci extended cap phy/mux support

2016-12-23 Thread Hans de Goede
HI, On 22-12-16 17:28, Mathias Nyman wrote: On 22.12.2016 14:45, Hans de Goede wrote: Hi, On 22-12-16 13:11, Felipe Balbi wrote: Hi, Hans de Goede writes: Hi All, Here are 2 patches which can and should be merged separately, but which do belong together, as together they add support for

Re: [PATCH 2/2] phy: Add new Intel Cherrytrail USB OTG phy driver

2016-12-23 Thread Hans de Goede
Hi, On 23-12-16 02:04, Lu Baolu wrote: Hi, On 12/22/2016 07:47 PM, Hans de Goede wrote: +static int intel_cht_usb_phy_probe(struct platform_device *pdev) +{ + struct intel_cht_usb_phy *phy; + struct device *dev = &pdev->dev; + struct resource *res; + resource

Re: [PATCH 0/2] Intel cherrytrail xhci extended cap phy/mux support

2016-12-23 Thread Hans de Goede
HI, On 23-12-16 02:25, Lu Baolu wrote: Hi, On 12/22/2016 09:18 PM, Felipe Balbi wrote: Hi, Hans de Goede writes: Matthias, assuming Felipe is ok with putting this in drivers/misc (minus the phy bindings), are you ok with the xhci blurb which registers the platform-device for the "

[PATCH] usb: xhci: Disable streams on Intel Cherrytrail controllers

2016-12-26 Thread Hans de Goede
vices, so lets disable streams on cherrytrail until we can find a better workaround. Cc: sta...@vger.kernel.org Cc: Oliver Neukum Signed-off-by: Hans de Goede --- drivers/usb/host/xhci-pci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-

Re: [PATCH 1/2] usb: dwc3-pci: Fix dr_mode misspelling

2016-12-31 Thread Hans de Goede
Hi, On 27-12-16 12:14, Felipe Balbi wrote: Hi, Hans de Goede writes: usb_get_dr_mode() expects the device-property to be spelled "dr_mode" not "dr-mode". Spelling it properly fixes the following warning showing up in dmesg: [ 8704.500545] dwc3 dwc3.2.auto: Configurati

Re: [linux-sunxi] Re: [PATCH 1/4] phy: sun4i-usb: support PHY0 on H3 in MUSB mode

2017-01-20 Thread Hans de Goede
iments with the MUSB in the A31s in host mode I can report that I hadn't been able to get multiple HIDs (in my case keyboard and mouse) working at the same time. The keyboard alone worked without problems, the mouse alone worked without problems, but when both were connected, only one of them wo

Re: [linux-sunxi] Re: [PATCH 1/4] phy: sun4i-usb: support PHY0 on H3 in MUSB mode

2017-01-22 Thread Hans de Goede
HI, On 22-01-17 10:39, Icenowy Zheng wrote: 20.01.2017, 16:04, "Hans de Goede" : HI, On 19-01-17 21:27, Karsten Merker wrote: On Thu, Jan 19, 2017 at 11:10:08PM +0800, Icenowy Zheng wrote: 19.01.2017, 22:34, "Maxime Ripard" : On Wed, Jan 18, 2017 at 04:09:32AM

[PATCH resend v4] musb: sunxi: Add support for platform_set_mode

2016-09-11 Thread Hans de Goede
This allows run-time dr_mode switching support via the "mode" musb sysfs attribute. Signed-off-by: Hans de Goede --- Changes in v2: -No changes Changes in v3: -Fix switch-case code style Changes in v4: -Call musb_root_disconnect() before role change to make sure any attached devices g

[PATCH resend v4 0/1] musb: sunxi: Add support for platform_set_mode

2016-09-11 Thread Hans de Goede
Hi Bin Liu, I believe this patch is ready for merging now (the sun4i-usb-phy bits have been merged already), please merge. Thanks & Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCHv3] usb: musb: Fix unbalanced platform_disable

2016-09-15 Thread Hans de Goede
ng it's PM runtime call only needed in twl4030_phy_power_on and have it autosuspend. The cable state will keep the phy active when connected. Cc: Hans de Goede Cc: Kishon Vijay Abraham I Fixes: a83e17d0f73b ("usb: musb: Improve PM runtime and phy handling for 2430 glue layer") Reported-by

Re: [PATCHv3] usb: musb: Fix unbalanced platform_disable

2016-09-15 Thread Hans de Goede
Hi, On 15-09-16 16:43, Tony Lindgren wrote: * Hans de Goede [160915 07:00]: Hi, On 14-09-16 20:10, Tony Lindgren wrote: Commit a83e17d0f73b ("usb: musb: Improve PM runtime and phy handling for 2430 glue layer") moved PHY enable/disable calls to happen from omap2430_musb_enab

Re: next-20160915 build: 2 failures 16 warnings (next-20160915)

2016-09-16 Thread Hans de Goede
Hi, On 15-09-16 17:41, Mark Brown wrote: On Thu, Sep 15, 2016 at 12:43:41PM +0100, Build bot for Mark Brown wrote: Today's -next fails to build both arm and arm64 allmodconfigs due to: arm64-allmodconfig ERROR: "musb_root_disconnect" [drivers/usb/musb/sunxi.ko] undefined! a

[PATCH] musb: Export musb_root_disconnect for use in modules

2016-09-16 Thread Hans de Goede
Export musb_root_disconnect for use in modules, so that musb glue code build as module can use it. Signed-off-by: Hans de Goede --- drivers/usb/musb/musb_virthub.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c index fe08e77

[PATCH v2] musb: Export musb_root_disconnect for use in modules

2016-09-17 Thread Hans de Goede
Export musb_root_disconnect for use in modules, so that musb glue code build as module can use it. This fixes the buildbot errors for -next in arm64-allmodconfig and arm-allmodconfig. Fixes: 7cba17ec9adc8cf ("musb: sunxi: Add support for platform_set_mode") Signed-off-by: Han

  1   2   3   4   5   6   7   8   9   10   >