Use properly aligned buffer in usb_alloc
The PA adress must be gathered from an aligned VA, not the RAW pointer to the memory space. Reviewed by: hselasky Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4140
This commit is contained in:
parent
9dbc22c5aa
commit
7f34c97a79
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291399
@ -233,7 +233,7 @@ usb_pc_alloc_mem(struct usb_page_cache *pc, struct usb_page *pg,
|
||||
pc->ismultiseg = (align == 1);
|
||||
|
||||
/* compute physical address */
|
||||
usb_pc_common_mem_cb(pc, ptr, size);
|
||||
usb_pc_common_mem_cb(pc, pc->buffer, size);
|
||||
|
||||
usb_pc_cpu_flush(pc);
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user