Date: Sun, 27 Jan 2008 13:46:40 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 134192 for review Message-ID: <200801271346.m0RDkeC8082987@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=134192 Change 134192 by hselasky@hselasky_laptop001 on 2008/01/27 13:46:33 Bugfix. Only extend segments if we are multi segmented which is defined by the physical memory alignment being equal to 1. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_subr.c#87 edit .. //depot/projects/usb/src/sys/dev/usb/usb_subr.h#96 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.c#87 (text+ko) ==== @@ -2318,7 +2318,7 @@ * XXX so we need to extend the last segment if we are * XXX unaligned and cross the segment boundary! */ - if (ext_seg) { + if (ext_seg && pc->ismultiseg) { (pg + 1)->physaddr = pg->physaddr + USB_PAGE_SIZE; } if (xfer) { @@ -2381,6 +2381,7 @@ pc->page_offset_end = size; pc->map = map; pc->tag = tag; + pc->ismultiseg = (align == 1); /* load memory into DMA */ if (bus_dmamap_load @@ -2635,7 +2636,7 @@ * XXX so we need to extend the last segment if we are * XXX unaligned and cross the segment boundary! */ - if (ext_seg) { + if (ext_seg && pc->ismultiseg) { (pg + 1)->physaddr = pg->physaddr + USB_PAGE_SIZE; } if (xfer) { @@ -2722,6 +2723,7 @@ pc->page_offset_end = size; pc->map = map; pc->tag = tag; + pc->ismultiseg = (align == 1); usbd_pc_alloc_mem_cb(pc, utag->p_seg, seg_count, 0); ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.h#96 (text+ko) ==== @@ -262,6 +262,7 @@ uint32_t page_offset_buf; uint32_t page_offset_end; uint8_t isread:1; + uint8_t ismultiseg:1; /* set if we can have multiple segments */ }; struct usbd_setup_params {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801271346.m0RDkeC8082987>