Date: Sun, 2 Dec 2007 01:10:54 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 129942 for review Message-ID: <200712020110.lB21AsSn022273@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=129942 Change 129942 by hselasky@hselasky_laptop001 on 2007/12/02 01:10:15 Handle the case where "page_start == NULL". Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_subr.c#58 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.c#58 (text+ko) ==== @@ -1801,12 +1801,22 @@ page = pc->page_start; - page += (offset / USB_PAGE_SIZE); + if (page) { + + page += (offset / USB_PAGE_SIZE); + + offset %= USB_PAGE_SIZE; + + res->length = USB_PAGE_SIZE - offset; + res->physaddr = page->physaddr + offset; + + } else { - offset %= USB_PAGE_SIZE; + offset %= USB_PAGE_SIZE; - res->length = USB_PAGE_SIZE - offset; - res->physaddr = page->physaddr + offset; + res->length = USB_PAGE_SIZE - offset; + res->physaddr = 0; + } return; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712020110.lB21AsSn022273>