Re: usb 4-2.3: Disable of device-initiated U1 failed.

2017-08-04 Thread Greg KH
On Fri, Aug 04, 2017 at 04:38:25PM -0400, Cristian wrote:
> Hello,
> 
> dmesg:
> [13854.750858] usb 4-2.3: Disable of device-initiated U1 failed.
> [13854.754588] usb 4-2.3: Disable of device-initiated U2 failed.

And is this a problem?  Is it new?  Is something broken?  You need to be
more explicit in your emails, this is pretty useless as-is :(

thanks,

greg k-h
--
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  http://vger.kernel.org/majordomo-info.html


usb 4-2.3: Disable of device-initiated U1 failed.

2017-08-04 Thread Cristian
Hello,

dmesg:
[13854.750858] usb 4-2.3: Disable of device-initiated U1 failed.
[13854.754588] usb 4-2.3: Disable of device-initiated U2 failed.

Regards,
-- 
Cristian
[0.00] microcode: microcode updated early to revision 0x29, date = 
2013-06-12
[0.00] random: get_random_bytes called from start_kernel+0x42/0x46e 
with crng_init=0
[0.00] Linux version 4.13.0-041300rc3-generic (kernel@gloin) (gcc 
version 6.3.0 20170618 (Ubuntu 6.3.0-19ubuntu1)) #201707301631 SMP Sun Jul 30 
20:32:49 UTC 2017
[0.00] Command line: BOOT_IMAGE=/vmlinuz-4.13.0-041300rc3-generic 
root=UUID=6b614287-8ce5-49c5-b66d-e92fa9568c2b ro rootflags=subvol=@ quiet 
splash vt.handoff=7
[0.00] KERNEL supported cpus:
[0.00]   Intel GenuineIntel
[0.00]   AMD AuthenticAMD
[0.00]   Centaur CentaurHauls
[0.00] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point 
registers'
[0.00] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[0.00] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[0.00] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[0.00] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, 
using 'standard' format.
[0.00] e820: BIOS-provided physical RAM map:
[0.00] BIOS-e820: [mem 0x-0x0009d7ff] usable
[0.00] BIOS-e820: [mem 0x0009d800-0x0009] reserved
[0.00] BIOS-e820: [mem 0x000e-0x000f] reserved
[0.00] BIOS-e820: [mem 0x0010-0x1fff] usable
[0.00] BIOS-e820: [mem 0x2000-0x201f] reserved
[0.00] BIOS-e820: [mem 0x2020-0x3fff] usable
[0.00] BIOS-e820: [mem 0x4000-0x401f] reserved
[0.00] BIOS-e820: [mem 0x4020-0xc42a9fff] usable
[0.00] BIOS-e820: [mem 0xc42aa000-0xc44abfff] reserved
[0.00] BIOS-e820: [mem 0xc44ac000-0xd33eefff] usable
[0.00] BIOS-e820: [mem 0xd33ef000-0xdaeeefff] reserved
[0.00] BIOS-e820: [mem 0xdaeef000-0xdaf9efff] ACPI NVS
[0.00] BIOS-e820: [mem 0xdaf9f000-0xdaffefff] ACPI data
[0.00] BIOS-e820: [mem 0xdafff000-0xdaff] usable
[0.00] BIOS-e820: [mem 0xdb00-0xdf9f] reserved
[0.00] BIOS-e820: [mem 0xf800-0xfbff] reserved
[0.00] BIOS-e820: [mem 0xfec0-0xfec00fff] reserved
[0.00] BIOS-e820: [mem 0xfed08000-0xfed08fff] reserved
[0.00] BIOS-e820: [mem 0xfed1-0xfed19fff] reserved
[0.00] BIOS-e820: [mem 0xfed1c000-0xfed1] reserved
[0.00] BIOS-e820: [mem 0xfee0-0xfee00fff] reserved
[0.00] BIOS-e820: [mem 0xffd0-0x] reserved
[0.00] BIOS-e820: [mem 0x0001-0x00031f5f] usable
[0.00] BIOS-e820: [mem 0x00031f60-0x00031f7f] reserved
[0.00] NX (Execute Disable) protection: active
[0.00] random: fast init done
[0.00] SMBIOS 2.7 present.
[0.00] DMI: SAMSUNG ELECTRONICS CO., LTD. 
530U3C/530U4C/SAMSUNG_NP1234567890, BIOS P14AAJ 04/15/2013
[0.00] tsc: Fast TSC calibration using PIT
[0.00] e820: update [mem 0x-0x0fff] usable ==> reserved
[0.00] e820: remove [mem 0x000a-0x000f] usable
[0.00] e820: last_pfn = 0x31f600 max_arch_pfn = 0x4
[0.00] MTRR default type: uncachable
[0.00] MTRR fixed ranges enabled:
[0.00]   0-9 write-back
[0.00]   A-B uncachable
[0.00]   C-F write-protect
[0.00] MTRR variable ranges enabled:
[0.00]   0 base 0FFC0 mask FFFC0 write-protect
[0.00]   1 base 0 mask F8000 write-back
[0.00]   2 base 08000 mask FC000 write-back
[0.00]   3 base 0C000 mask FE000 write-back
[0.00]   4 base 0DC00 mask FFC00 uncachable
[0.00]   5 base 0DB00 mask FFF00 uncachable
[0.00]   6 base 1 mask F write-back
[0.00]   7 base 2 mask F write-back
[0.00]   8 base 3 mask FE000 write-back
[0.00]   9 base 31F80 mask FFF80 uncachable
[0.00] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WC  UC- WT  
[0.00] e820: last_pfn = 0xdb000 max_arch_pfn = 0x4
[0.00] found SMP MP-table at [mem 0x000f0100-0x000f010f] mapped at 
[935fc00f0100]
[0.00] Scanning 1 areas for low memory corruption
[0.00] Base memory trampoline at [935fc0097000] 97000 size 24576
[0.00] reserving inaccessible SNB gfx pages
[0.00] BRK [0x3e724000, 

[PATCH 0/5] constify videobuf_queue_ops structures

2017-08-04 Thread Julia Lawall
These videobuf_queue_ops structures are only passed as the second
argument to videobuf_queue_vmalloc_init, which is declared as const.
Thus the videobuf_queue_ops structures themselves can be const.

Done with the help of Coccinelle.

---

 drivers/media/pci/cx18/cx18-streams.c |2 +-
 drivers/media/usb/cx231xx/cx231xx-417.c   |2 +-
 drivers/media/usb/cx231xx/cx231xx-video.c |2 +-
 drivers/media/usb/tm6000/tm6000-video.c   |2 +-
 drivers/media/usb/zr364xx/zr364xx.c   |2 +-
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c |4 ++--
 6 files changed, 7 insertions(+), 7 deletions(-)
--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 5/5] [media] zr364xx: constify videobuf_queue_ops structures

2017-08-04 Thread Julia Lawall
These videobuf_queue_ops structures are only passed as the second
argument to videobuf_queue_vmalloc_init, which is declared as const.
Thus the videobuf_queue_ops structures themselves can be const.

Done with the help of Coccinelle.

// 
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct videobuf_queue_ops i@p = { ... };

@ok1@
identifier r.i;
expression e1;
position p;
@@
videobuf_queue_vmalloc_init(e1,@p,...)

@bad@
position p != {r.p,ok1.p};
identifier r.i;
struct videobuf_queue_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct videobuf_queue_ops i = { ... };
// 

Signed-off-by: Julia Lawall 

---
 drivers/media/usb/zr364xx/zr364xx.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/zr364xx/zr364xx.c 
b/drivers/media/usb/zr364xx/zr364xx.c
index efdcd5b..24d5860 100644
--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -439,7 +439,7 @@ static void buffer_release(struct videobuf_queue *vq,
free_buffer(vq, buf);
 }
 
-static struct videobuf_queue_ops zr364xx_video_qops = {
+static const struct videobuf_queue_ops zr364xx_video_qops = {
.buf_setup = buffer_setup,
.buf_prepare = buffer_prepare,
.buf_queue = buffer_queue,

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 00/11] constify usb attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Arvind Yadav (11):
  [PATCH 01/11] usb: atm: ueagle-atm: constify attribute_group structures.
  [PATCH 02/11] usb: chipidea: constify attribute_group structures.
  [PATCH 03/11] usb: chipidea: otg_fsm: constify attribute_group structures.
  [PATCH 04/11] usb: usbtmc: constify attribute_group structures.
  [PATCH 05/11] usb: hcd: constify attribute_group structures.
  [PATCH 06/11] usb: usbsevseg: constify attribute_group structures.
  [PATCH 07/11] usb: phy-mv-usb: constify attribute_group structures.
  [PATCH 08/11] usb: phy-tahvo: constify attribute_group structures.
  [PATCH 09/11] usb: wusbcore: cbaf: constify attribute_group structures.
  [PATCH 10/11] usb: wusbcore: dev-sysfs: constify attribute_group structures.
  [PATCH 11/11] usb: wusbcore: wusbhc: constify attribute_group structures.

 drivers/usb/atm/ueagle-atm.c | 2 +-
 drivers/usb/chipidea/core.c  | 2 +-
 drivers/usb/chipidea/otg_fsm.c   | 2 +-
 drivers/usb/class/usbtmc.c   | 4 ++--
 drivers/usb/core/hcd.c   | 2 +-
 drivers/usb/misc/usbsevseg.c | 2 +-
 drivers/usb/phy/phy-mv-usb.c | 2 +-
 drivers/usb/phy/phy-tahvo.c  | 2 +-
 drivers/usb/wusbcore/cbaf.c  | 2 +-
 drivers/usb/wusbcore/dev-sysfs.c | 2 +-
 drivers/usb/wusbcore/wusbhc.c| 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)

-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 01/11] usb: atm: ueagle-atm: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/atm/ueagle-atm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index df67815..5f31d88 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -2522,7 +2522,7 @@ static int claim_interface(struct usb_device *usb_dev,
_attr_stat_firmid.attr,
NULL,
 };
-static struct attribute_group attr_grp = {
+static const struct attribute_group attr_grp = {
.attrs = attrs,
 };
 
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 02/11] usb: chipidea: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/chipidea/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index b17ed3a..1ef3ae4 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -887,7 +887,7 @@ static ssize_t ci_role_store(struct device *dev,
NULL,
 };
 
-static struct attribute_group ci_attr_group = {
+static const struct attribute_group ci_attr_group = {
.attrs = ci_attrs,
 };
 
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 04/11] usb: usbtmc: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/class/usbtmc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 578f424..6ebfabf 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -1085,7 +1085,7 @@ static DEVICE_ATTR_RO(name)
NULL,
 };
 
-static struct attribute_group capability_attr_grp = {
+static const struct attribute_group capability_attr_grp = {
.attrs = capability_attrs,
 };
 
@@ -1151,7 +1151,7 @@ static DEVICE_ATTR_RW(name)
NULL,
 };
 
-static struct attribute_group data_attr_grp = {
+static const struct attribute_group data_attr_grp = {
.attrs = data_attrs,
 };
 
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 05/11] usb: hcd: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/core/hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index ab1bb3b..df978d6 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -972,7 +972,7 @@ static ssize_t interface_authorized_default_store(struct 
device *dev,
NULL,
 };
 
-static struct attribute_group usb_bus_attr_group = {
+static const struct attribute_group usb_bus_attr_group = {
.name = NULL,   /* we want them in the same directory */
.attrs = usb_bus_attrs,
 };
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 03/11] usb: chipidea: otg_fsm: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/chipidea/otg_fsm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/chipidea/otg_fsm.c b/drivers/usb/chipidea/otg_fsm.c
index 949183e..5ea0246 100644
--- a/drivers/usb/chipidea/otg_fsm.c
+++ b/drivers/usb/chipidea/otg_fsm.c
@@ -193,7 +193,7 @@ static DEVICE_ATTR(a_bus_drop, S_IRUGO | S_IWUSR, 
get_a_bus_drop,
NULL,
 };
 
-static struct attribute_group inputs_attr_group = {
+static const struct attribute_group inputs_attr_group = {
.name = "inputs",
.attrs = inputs_attrs,
 };
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 06/11] usb: usbsevseg: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/misc/usbsevseg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/misc/usbsevseg.c b/drivers/usb/misc/usbsevseg.c
index 388fae6..3f6a280 100644
--- a/drivers/usb/misc/usbsevseg.c
+++ b/drivers/usb/misc/usbsevseg.c
@@ -330,7 +330,7 @@ static ssize_t set_attr_textmode(struct device *dev,
NULL
 };
 
-static struct attribute_group dev_attr_grp = {
+static const struct attribute_group dev_attr_grp = {
.attrs = dev_attrs,
 };
 
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 09/11] usb: wusbcore: cbaf: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/wusbcore/cbaf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/wusbcore/cbaf.c b/drivers/usb/wusbcore/cbaf.c
index fb70cbef..aa4e440 100644
--- a/drivers/usb/wusbcore/cbaf.c
+++ b/drivers/usb/wusbcore/cbaf.c
@@ -586,7 +586,7 @@ static ssize_t cbaf_wusb_ck_store(struct device *dev,
NULL,
 };
 
-static struct attribute_group cbaf_dev_attr_group = {
+static const struct attribute_group cbaf_dev_attr_group = {
.name = NULL,   /* we want them in the same directory */
.attrs = cbaf_dev_attrs,
 };
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 08/11] usb: phy-tahvo: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/phy/phy-tahvo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-tahvo.c
index a31c868..8babd31 100644
--- a/drivers/usb/phy/phy-tahvo.c
+++ b/drivers/usb/phy/phy-tahvo.c
@@ -326,7 +326,7 @@ static ssize_t otg_mode_store(struct device *device,
NULL
 };
 
-static struct attribute_group tahvo_attr_group = {
+static const struct attribute_group tahvo_attr_group = {
.attrs = tahvo_attributes,
 };
 
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 07/11] usb: phy-mv-usb: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/phy/phy-mv-usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/phy/phy-mv-usb.c b/drivers/usb/phy/phy-mv-usb.c
index 697a741..d17cc92 100644
--- a/drivers/usb/phy/phy-mv-usb.c
+++ b/drivers/usb/phy/phy-mv-usb.c
@@ -650,7 +650,7 @@ static DEVICE_ATTR(a_bus_drop, S_IRUGO | S_IWUSR,
NULL,
 };
 
-static struct attribute_group inputs_attr_group = {
+static const struct attribute_group inputs_attr_group = {
.name = "inputs",
.attrs = inputs_attrs,
 };
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 11/11] usb: wusbcore: wusbhc: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/wusbcore/wusbhc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/wusbcore/wusbhc.c b/drivers/usb/wusbcore/wusbhc.c
index a273a91..5338e42 100644
--- a/drivers/usb/wusbcore/wusbhc.c
+++ b/drivers/usb/wusbcore/wusbhc.c
@@ -244,7 +244,7 @@ static ssize_t wusb_retry_count_store(struct device *dev,
NULL,
 };
 
-static struct attribute_group wusbhc_attr_group = {
+static const struct attribute_group wusbhc_attr_group = {
.name = NULL,   /* we want them in the same directory */
.attrs = wusbhc_attrs,
 };
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH 10/11] usb: wusbcore: dev-sysfs: constify attribute_group structures.

2017-08-04 Thread Arvind Yadav
attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by  work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav 
---
 drivers/usb/wusbcore/dev-sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/wusbcore/dev-sysfs.c b/drivers/usb/wusbcore/dev-sysfs.c
index d4de56b..78212f8 100644
--- a/drivers/usb/wusbcore/dev-sysfs.c
+++ b/drivers/usb/wusbcore/dev-sysfs.c
@@ -114,7 +114,7 @@ static ssize_t wusb_ck_store(struct device *dev,
NULL,
 };
 
-static struct attribute_group wusb_dev_attr_group = {
+static const struct attribute_group wusb_dev_attr_group = {
.name = NULL,   /* we want them in the same directory */
.attrs = wusb_dev_attrs,
 };
-- 
1.9.1

--
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  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume

2017-08-04 Thread Felipe Balbi

Hi,

Sandeep Singh  writes:
> From: Sandeep Singh 
>
> Certain HP keyboards would keep inputting a character automatically which
> is the wake-up key after S3 resume
>
> On some AMD platforms USB host fails to respond (by holding resume-K) to
> USB device (an HP keyboard) resume request within 1ms (TURSM) and ensures
> that resume is signaled for at least 20 ms (TDRSMDN), which is defined in
> USB 2.0 spec. The result is that the keyboard is out of function.
>
> In SNPS USB design, the host responds to the resume request only after
> system gets back to S0 and the host gets to functional after the internal
> HW restore operation that is more than 1 second after the initial resume
> request from the USB device.
>
> As a workaround for specific keyboard ID(HP Keyboards), applying port reset
> after resume when the keyboard is plugged in.
>
> Signed-off-by: Sandeep Singh 
> Signed-off-by: Shyam Sundar S K 
> cc: Nehal Shah 

seems correct now:

Reviewed-by: Felipe Balbi 

-- 
balbi


signature.asc
Description: PGP signature


[PATCH v3] usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume

2017-08-04 Thread Sandeep Singh
From: Sandeep Singh 

Certain HP keyboards would keep inputting a character automatically which
is the wake-up key after S3 resume

On some AMD platforms USB host fails to respond (by holding resume-K) to
USB device (an HP keyboard) resume request within 1ms (TURSM) and ensures
that resume is signaled for at least 20 ms (TDRSMDN), which is defined in
USB 2.0 spec. The result is that the keyboard is out of function.

In SNPS USB design, the host responds to the resume request only after
system gets back to S0 and the host gets to functional after the internal
HW restore operation that is more than 1 second after the initial resume
request from the USB device.

As a workaround for specific keyboard ID(HP Keyboards), applying port reset
after resume when the keyboard is plugged in.

Signed-off-by: Sandeep Singh 
Signed-off-by: Shyam Sundar S K 
cc: Nehal Shah 
---
 drivers/usb/core/quirks.c |  1 +
 drivers/usb/host/pci-quirks.c | 17 -
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 3116edf..2e9cde0 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -249,6 +249,7 @@ static const struct usb_device_id 
usb_amd_resume_quirk_list[] = {
{ USB_DEVICE(0x093a, 0x2500), .driver_info = USB_QUIRK_RESET_RESUME },
{ USB_DEVICE(0x093a, 0x2510), .driver_info = USB_QUIRK_RESET_RESUME },
{ USB_DEVICE(0x093a, 0x2521), .driver_info = USB_QUIRK_RESET_RESUME },
+   { USB_DEVICE(0x03f0, 0x2b4a), .driver_info = USB_QUIRK_RESET_RESUME },
 
/* Logitech Optical Mouse M90/M100 */
{ USB_DEVICE(0x046d, 0xc05a), .driver_info = USB_QUIRK_RESET_RESUME },
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index c8989c6..5f4ca78 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -98,6 +98,7 @@ enum amd_chipset_gen {
AMD_CHIPSET_HUDSON2,
AMD_CHIPSET_BOLTON,
AMD_CHIPSET_YANGTZE,
+   AMD_CHIPSET_TAISHAN,
AMD_CHIPSET_UNKNOWN,
 };
 
@@ -141,6 +142,11 @@ static int amd_chipset_sb_type_init(struct 
amd_chipset_info *pinfo)
pinfo->sb_type.gen = AMD_CHIPSET_SB700;
else if (rev >= 0x40 && rev <= 0x4f)
pinfo->sb_type.gen = AMD_CHIPSET_SB800;
+   }
+   pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
+ 0x145c, NULL);
+   if (pinfo->smbus_dev) {
+   pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN;
} else {
pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL);
@@ -260,11 +266,12 @@ int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
 {
/* Make sure amd chipset type has already been initialized */
usb_amd_find_chipset_info();
-   if (amd_chipset.sb_type.gen != AMD_CHIPSET_YANGTZE)
-   return 0;
-
-   dev_dbg(>dev, "QUIRK: Enable AMD remote wakeup fix\n");
-   return 1;
+   if (amd_chipset.sb_type.gen == AMD_CHIPSET_YANGTZE ||
+   amd_chipset.sb_type.gen == AMD_CHIPSET_TAISHAN) {
+   dev_dbg(>dev, "QUIRK: Enable AMD remote wakeup fix\n");
+   return 1;
+   }
+   return 0;
 }
 EXPORT_SYMBOL_GPL(usb_hcd_amd_remote_wakeup_quirk);
 
-- 
2.7.4

--
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  http://vger.kernel.org/majordomo-info.html


[PATCH] usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter

2017-08-04 Thread Kai-Heng Feng
The Realtek r8153 ethernet does not work on Genesys Logic hub, no-lpm
quirk can make it work.

Since another r8153 dongle at my hand does not have the issue, so add
the quirk to the hub instead.

Signed-off-by: Kai-Heng Feng 
---
 drivers/usb/core/quirks.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 3116edfcdc18..c96daf34431e 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -150,6 +150,9 @@ static const struct usb_device_id usb_quirk_list[] = {
/* appletouch */
{ USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
 
+   /* Moshi USB to Ethernet Adapter */
+   { USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM },
+
/* Avision AV600U */
{ USB_DEVICE(0x0638, 0x0a13), .driver_info =
  USB_QUIRK_STRING_FETCH_255 },
-- 
2.13.4

--
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  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume

2017-08-04 Thread Sandeep Singh


On 8/4/2017 1:21 PM, Felipe Balbi wrote:
> 
> Hi,
> 
> Sandeep Singh  writes:
> Sandeep Singh  writes:
>> @@ -260,11 +266,12 @@ int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev 
>> *pdev)
>>  {
>>  /* Make sure amd chipset type has already been initialized */
>>  usb_amd_find_chipset_info();
>> -if (amd_chipset.sb_type.gen != AMD_CHIPSET_YANGTZE)
>> -return 0;
>> -
>> -dev_dbg(>dev, "QUIRK: Enable AMD remote wakeup fix\n");
>> -return 1;
>> +if (amd_chipset.sb_type.gen == AMD_CHIPSET_YANGTZE ||
>> +AMD_CHIPSET_TAISHAN) {
>
> Sure this is what you wanna do?
>

 Yes. Please..
>>>
>>> Are you sure this works the way you think it will?
>>>
>> Yes. Can you please help me to understand your concern.
> 
> Try evaluating that expression in your head. When will it be true and
> when will it false?
> 
Apologies.. that was a blunder from my side :( I will take care of this in the 
new version of the patch. Thank you for pointing it out. Lessons learnt.
--
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  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume

2017-08-04 Thread Felipe Balbi

Hi,

Sandeep Singh  writes:
 Sandeep Singh  writes:
> @@ -260,11 +266,12 @@ int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev 
> *pdev)
>  {
>   /* Make sure amd chipset type has already been initialized */
>   usb_amd_find_chipset_info();
> - if (amd_chipset.sb_type.gen != AMD_CHIPSET_YANGTZE)
> - return 0;
> -
> - dev_dbg(>dev, "QUIRK: Enable AMD remote wakeup fix\n");
> - return 1;
> + if (amd_chipset.sb_type.gen == AMD_CHIPSET_YANGTZE ||
> + AMD_CHIPSET_TAISHAN) {

 Sure this is what you wanna do?

>>>
>>> Yes. Please..
>> 
>> Are you sure this works the way you think it will?
>> 
> Yes. Can you please help me to understand your concern.

Try evaluating that expression in your head. When will it be true and
when will it false?

-- 
balbi


signature.asc
Description: PGP signature


Re: [PATCH] dma-mapping: skip USB devices when configuring DMA during probe

2017-08-04 Thread Johan Hovold
On Fri, Aug 04, 2017 at 03:40:42AM +0800, kbuild test robot wrote:
> Hi Johan,
> 
> [auto build test ERROR on driver-core/driver-core-testing]
> [also build test ERROR on v4.13-rc3 next-20170803]
> [if your patch is applied to the wrong git tree, please drop us a note to 
> help improve the system]
> 
> url:
> https://github.com/0day-ci/linux/commits/Johan-Hovold/dma-mapping-skip-USB-devices-when-configuring-DMA-during-probe/20170804-014620
> config: microblaze-mmu_defconfig (attached as .config)
> compiler: microblaze-linux-gcc (GCC) 6.2.0
> reproduce:
> wget 
> https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O 
> ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=microblaze 
> 
> All errors (new ones prefixed by >>):
> 
>drivers/base/dma-mapping.o: In function `dma_configure':
> >> drivers/base/dma-mapping.c:350: undefined reference to `usb_bus_type'
>drivers/base/dma-mapping.o: In function `dma_deconfigure':
>drivers/base/dma-mapping.c:377: undefined reference to `usb_bus_type'
>net/sunrpc/stats.o: In function `rpc_print_iostats':
>net/sunrpc/stats.c:206: undefined reference to `_GLOBAL_OFFSET_TABLE_'
>scripts/link-vmlinux.sh: line 93: 76193 Segmentation fault  ${LD} 
> ${LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} -T ${lds} ${objects}

Thanks for the report. Alan Stern pointed this out during review, so
this patch has already been superseded. 

Johan
--
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  http://vger.kernel.org/majordomo-info.html