On 05/02/2017 06:19 AM, Greg KH wrote:
On Tue, May 02, 2017 at 02:31:40PM +0800, wangjianxing5...@163.com wrote:
From: "Jianxing.Wang" <wangjianxing5...@163.com>

When notebook with intel-3165-wifi suspend and resume,crash for
udev->bos is NULL.

I'm sorry, I don't understand, how can udev->bos be NULL here?  Why does
the wifi device matter to the USB device?


Signed-off-by: Jianxing.Wang <wangjianxing5...@163.com>
---
 drivers/usb/core/hub.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 5286bf6..3b5493a 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4281,10 +4281,12 @@ static void hub_set_initial_usb2_lpm_policy(struct 
usb_device *udev)
        if (hub)
                connect_type = hub->ports[udev->portnum - 1]->connect_type;

-       if ((udev->bos->ext_cap->bmAttributes & cpu_to_le32(USB_BESL_SUPPORT)) 
||
-                       connect_type == USB_PORT_CONNECT_TYPE_HARD_WIRED) {
-               udev->usb2_hw_lpm_allowed = 1;
-               usb_set_usb2_hardware_lpm(udev, 1);
+       if (udev->bos != NULL) {

This is already checked a few lines above this, how can it have changed
already?


That check was added recently with 7b2db29fbb4e7, which also explains how it
can happen. Question here is if the problem with intel-3165-wifi was seen
on a kernel which doesn't have that patch.

This is a good example why it is useful to provide a crash log as well as
some context information.

Guenter

--
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

Reply via email to