xhci: Remove BUG in xhci_setup_addressable_virt_dev
authorMathias Nyman <mathias.nyman@linux.intel.com>
Wed, 24 Apr 2013 00:17:40 +0000 (17:17 -0700)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 14 Jun 2013 20:52:39 +0000 (13:52 -0700)
commitbd18fd5c21b2e60d9b79a9d2ce8f38a672f560a6
tree33945a76ed7c8161c282a1b57e788987f533d234
parent92f8e76769c687a7c38c5067ff375c187666ac18
xhci: Remove BUG in xhci_setup_addressable_virt_dev

We may have more speed types in the future, so fail gracefully, rather
than causing the kernel to panic.

BUG() was called if the device speed was unknown when setting max packet
size.  Set the max packet size at the same time as the slot speed and
get rid of one switch statement with BUG() option completely.

[Note: Sarah merged a patch that she wrote that touched the
xhci_setup_addressable_virt_dev function with this patch from Mathias
for clarity.]

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci-mem.c