diff options
author | Huan.Feng <huan.feng@starfivetech.com> | 2021-04-02 08:46:25 +0300 |
---|---|---|
committer | Huan.Feng <huan.feng@starfivetech.com> | 2021-04-02 08:46:25 +0300 |
commit | d890f1b4023722422f4a3399697168081470a27d (patch) | |
tree | fce1c27a1198e3ed920d8fb02e5f701a089291bb /include | |
parent | 59f2287bf167539dcfa8924bf90870305b6105c5 (diff) | |
download | linux-d890f1b4023722422f4a3399697168081470a27d.tar.xz |
deal with that there is 'L2CACHE: flush64 out of range:' message when enable uas
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 91477daef4a9..a147d4fb2ef6 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1676,7 +1676,14 @@ static inline void usb_fill_bulk_urb(struct urb *urb, urb->complete = complete_fn; urb->context = context; #ifdef CONFIG_USB_CDNS3_HOST_FLUSH_DMA - cdns_virt_flush_dcache(transfer_buffer, buffer_length); + { + unsigned long start = dw_virt_to_phys(transfer_buffer); + + if(!(start < CONFIG_SIFIVE_L2_FLUSH_START || + (start + buffer_length) > (CONFIG_SIFIVE_L2_FLUSH_START + + CONFIG_SIFIVE_L2_FLUSH_SIZE))) + cdns_virt_flush_dcache(transfer_buffer, buffer_length); + } #endif } |