Date: Sat, 15 Dec 2007 17:38:46 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 130964 for review Message-ID: <200712151738.lBFHcksM084934@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=130964 Change 130964 by hselasky@hselasky_laptop001 on 2007/12/15 17:38:18 Style change by "usb_style.sh". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_subr.c#72 edit .. //depot/projects/usb/src/sys/dev/usb/usb_subr.h#77 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.c#72 (text+ko) ==== @@ -1970,40 +1970,39 @@ if (pc->page_start) { - /* Case 1 - something has been loaded into DMA */ + /* Case 1 - something has been loaded into DMA */ - if (pc->buffer) { + if (pc->buffer) { - /* Case 1a - Kernel Virtual Address */ + /* Case 1a - Kernel Virtual Address */ - res->buffer = USBD_ADD_BYTES(pc->buffer, offset); - } + res->buffer = USBD_ADD_BYTES(pc->buffer, offset); + } + offset += pc->page_offset_buf; - offset += pc->page_offset_buf; + /* compute destination page */ - /* compute destination page */ + page = pc->page_start; - page = pc->page_start; + page += (offset / USB_PAGE_SIZE); - page += (offset / USB_PAGE_SIZE); + offset %= USB_PAGE_SIZE; - offset %= USB_PAGE_SIZE; + res->length = USB_PAGE_SIZE - offset; + res->physaddr = page->physaddr + offset; + if (!pc->buffer) { - res->length = USB_PAGE_SIZE - offset; - res->physaddr = page->physaddr + offset; - if (!pc->buffer) { + /* Case 1b - Non Kernel Virtual Address */ - /* Case 1b - Non Kernel Virtual Address */ - - res->buffer = USBD_ADD_BYTES(page->buffer, offset); - } + res->buffer = USBD_ADD_BYTES(page->buffer, offset); + } } else { - /* Case 2 - Plain PIO */ + /* Case 2 - Plain PIO */ - res->buffer = USBD_ADD_BYTES(pc->buffer, offset); - res->length = 0-1; - res->physaddr = 0; + res->buffer = USBD_ADD_BYTES(pc->buffer, offset); + res->length = 0 - 1; + res->physaddr = 0; } return; } ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.h#77 (text+ko) ==== @@ -219,7 +219,7 @@ struct usbd_page { bus_size_t physaddr; - void *buffer; /* non Kernel Virtual Address */ + void *buffer; /* non Kernel Virtual Address */ }; struct usbd_page_search {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712151738.lBFHcksM084934>