From owner-p4-projects@FreeBSD.ORG Fri Jan 26 13:50:39 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 91FC216A403; Fri, 26 Jan 2007 13:50:39 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5221216A402 for ; Fri, 26 Jan 2007 13:50:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 4570F13C487 for ; Fri, 26 Jan 2007 13:50:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0QDod6J041661 for ; Fri, 26 Jan 2007 13:50:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0QDockE041658 for perforce@freebsd.org; Fri, 26 Jan 2007 13:50:38 GMT (envelope-from hselasky@FreeBSD.org) Date: Fri, 26 Jan 2007 13:50:38 GMT Message-Id: <200701261350.l0QDockE041658@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 113559 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 13:50:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=113559 Change 113559 by hselasky@hselasky_mini_itx on 2007/01/26 13:50:34 Store the completion time in milliseconds for isochronous transfer. This information can be useful to echo-cancellers and the alike. Correct a comment. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/ehci.c#22 edit .. //depot/projects/usb/src/sys/dev/usb/ohci.c#18 edit .. //depot/projects/usb/src/sys/dev/usb/uhci.c#19 edit .. //depot/projects/usb/src/sys/dev/usb/usb_subr.h#31 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/ehci.c#22 (text+ko) ==== @@ -2470,6 +2470,8 @@ DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next)); } + xfer->isoc_complete_time = (xfer->pipe->isoc_next + xfer->nframes) % USBD_ISOC_TIME_MAX; + nframes = xfer->nframes; if(nframes == 0) @@ -2703,6 +2705,8 @@ DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next)); } + xfer->isoc_complete_time = (xfer->pipe->isoc_next + xfer->nframes) % USBD_ISOC_TIME_MAX; + nframes = xfer->nframes; if(nframes == 0) ==== //depot/projects/usb/src/sys/dev/usb/ohci.c#18 (text+ko) ==== @@ -1905,6 +1905,8 @@ DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next)); } + xfer->isoc_complete_time = (xfer->pipe->isoc_next + xfer->nframes) % USBD_ISOC_TIME_MAX; + nframes = xfer->nframes; if(nframes == 0) ==== //depot/projects/usb/src/sys/dev/usb/uhci.c#19 (text+ko) ==== @@ -2010,6 +2010,8 @@ DPRINTFN(2,("start next=%d\n", xfer->pipe->isoc_next)); } + xfer->isoc_complete_time = (xfer->pipe->isoc_next + xfer->nframes) % USBD_ISOC_TIME_MAX; + nframes = xfer->nframes; if(nframes == 0) ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.h#31 (text+ko) ==== @@ -362,6 +362,9 @@ uint16_t max_frame_size; uint16_t qh_pos; +#define USBD_ISOC_TIME_MAX 128 /* ms */ + + uint8_t isoc_complete_time; /* in ms */ uint8_t address; uint8_t endpoint; uint8_t interval; /* milliseconds */ @@ -791,7 +794,7 @@ #define USB_CDEV_FLAG_FWD_SHORT 0x00040000 /* can be set to forward short transfers */ #define USB_CDEV_FLAG_READ_ONLY 0x00080000 /* device is read only */ -#define USB_CDEV_FLAG_WRITE_ONLY 0x00100000 /* device is read only */ +#define USB_CDEV_FLAG_WRITE_ONLY 0x00100000 /* device is write only */ #define USB_CDEV_FLAG_WAKEUP_RD_IMMED 0x00200000 /* wakeup read thread immediately */ #define USB_CDEV_FLAG_WAKEUP_WR_IMMED 0x00400000 /* wakeup write thread immediately */