Skip to content

Commit

Permalink
deal with that there is 'L2CACHE: flush64 out of range:' message when…
Browse files Browse the repository at this point in the history
… enable uas
  • Loading branch information
huanfeng-sf authored and MichaelZhuxx committed Apr 19, 2021
1 parent b04e2f7 commit e6aa768
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion include/linux/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

1 comment on commit e6aa768

@marckleinebudde
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.