Ticket #13768: 0001-xhci-fix-hub-descriptor-command-request.patch

File 0001-xhci-fix-hub-descriptor-command-request.patch, 1.1 KB (added by GregCrain, 6 years ago)
  • src/add-ons/kernel/busses/usb/xhci.cpp

    From 784a05bd24b00e10b0eedffb1af297995ff46f8f Mon Sep 17 00:00:00 2001
    From: Greg Crain <gcrain70@gmail.com>
    Date: Wed, 29 Nov 2017 08:22:08 -0500
    Subject: [PATCH] xhci: fix hub descriptor command request
    
    The command to get the hub descriptor needs to be a class request and was incorrect causing a Stall error for the hub. The the driver does not handle a stall error yet, causing odd behavior.
    ---
     src/add-ons/kernel/busses/usb/xhci.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/add-ons/kernel/busses/usb/xhci.cpp b/src/add-ons/kernel/busses/usb/xhci.cpp
    index 605c207..b757727 100644
    a b XHCI::AllocateDevice(Hub *parent, int8 hubAddress, uint8 hubPort,  
    13411341        size_t actualLength = 0;
    13421342        usb_hub_descriptor hubDescriptor;
    13431343        pipe.SendRequest(
    1344             USB_REQTYPE_DEVICE_IN | USB_REQTYPE_STANDARD,       // type
     1344            USB_REQTYPE_DEVICE_IN | USB_REQTYPE_CLASS,          // type
    13451345            USB_REQUEST_GET_DESCRIPTOR,                         // request
    13461346            USB_DESCRIPTOR_HUB << 8,                            // value
    13471347            0,                                                  // index