From 09332b4c60063e0f0f975f80211d2554eb18389f Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 24 Aug 2020 13:04:37 +0200 Subject: [PATCH] usb: xhci: xhci_bulk_tx: Don't "BUG" when comparing addresses Octeon uses mapped addresses for virtual and physical memory. It's not that easy to calculate the resulting addresses here. So let's remove this BUG_ON() completely, as it's not really helpful. Please also note, that BUG_ON() is not recommended any more in the Linux kernel. Signed-off-by: Stefan Roese Reviewed-by: Bin Meng Cc: Bin Meng Cc: Marek Vasut --- drivers/usb/host/xhci-ring.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 27e7a39571..af8a12fc21 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -729,8 +729,6 @@ int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe, BUG_ON(TRB_TO_SLOT_ID(field) != slot_id); BUG_ON(TRB_TO_EP_INDEX(field) != ep_index); - BUG_ON(*(void **)(uintptr_t)le64_to_cpu(event->trans_event.buffer) - - buffer > (size_t)length); record_transfer_result(udev, event, length); xhci_acknowledge_event(ctrl);