Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/usb/usb_busdma_loader.c
Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | usb_pc_alloc_mem(struct usb_page_cache *pc, struct usb_page *pg, | ||||
pc->page_start = pg; | pc->page_start = pg; | ||||
pc->page_offset_buf = 0; | pc->page_offset_buf = 0; | ||||
pc->page_offset_end = size; | pc->page_offset_end = size; | ||||
pc->map = NULL; | pc->map = NULL; | ||||
pc->tag = ptr; | pc->tag = ptr; | ||||
pc->ismultiseg = (align == 1); | pc->ismultiseg = (align == 1); | ||||
/* compute physical address */ | /* 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); | usb_pc_cpu_flush(pc); | ||||
return (0); | return (0); | ||||
error: | error: | ||||
/* reset most of the page cache */ | /* reset most of the page cache */ | ||||
pc->buffer = NULL; | pc->buffer = NULL; | ||||
pc->page_start = NULL; | pc->page_start = NULL; | ||||
▲ Show 20 Lines • Show All 375 Lines • Show Last 20 Lines |