summaryrefslogtreecommitdiffstats
path: root/sys/boot/usb
diff options
context:
space:
mode:
authorzbb <zbb@FreeBSD.org>2015-11-27 18:13:28 +0000
committerzbb <zbb@FreeBSD.org>2015-11-27 18:13:28 +0000
commit1c5f113511af76d622150344c41ad5a327c70cb0 (patch)
tree15335c1ee5ad0785ebb55b405841676e5b4b6f27 /sys/boot/usb
parente8a2618836375a8f43f736a85e362532fe044d58 (diff)
downloadFreeBSD-src-1c5f113511af76d622150344c41ad5a327c70cb0.zip
FreeBSD-src-1c5f113511af76d622150344c41ad5a327c70cb0.tar.gz
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
Diffstat (limited to 'sys/boot/usb')
-rw-r--r--sys/boot/usb/usb_busdma_loader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/usb/usb_busdma_loader.c b/sys/boot/usb/usb_busdma_loader.c
index ad7180b..90dc169 100644
--- a/sys/boot/usb/usb_busdma_loader.c
+++ b/sys/boot/usb/usb_busdma_loader.c
@@ -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);
OpenPOWER on IntegriCloud