Date: Sat, 17 Nov 2007 18:42:49 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 129168 for review Message-ID: <200711171842.lAHIgnrB020085@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=129168 Change 129168 by hselasky@hselasky_laptop001 on 2007/11/17 18:42:01 The first step into fully supporting loading of virtual buffers directly into DMA memory. Hence the BUS-DMA framework does not support any form of memory load cancel we need to keep track of the BUS-DMA state in the USB transfer. This commit adds the necessary states. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_subr.h#52 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_subr.h#52 (text+ko) ==== @@ -72,12 +72,28 @@ #define USBD_GET_STATE(xfer) ((xfer)->usb_state) +/* USB transfer states */ + enum { USBD_ST_SETUP, USBD_ST_TRANSFERRED, USBD_ST_ERROR, }; +/* + * USB BUS-DMA transfer states + * + * Hence the BUS-DMA framework does not support DMA load abort we need + * to keep track of the BUS-DMA state in the USB transfer. + */ + +enum { + USBD_BDMA_ST_IDLE, + USBD_BDMA_ST_LOADING, + USBD_BDMA_ST_CANCELLING, + USBD_BDMA_ST_CANCEL_AND_LOAD, +}; + struct usbd_xfer; struct usbd_pipe; struct usbd_bus; @@ -343,6 +359,11 @@ uint8_t ext_buffer:1; /* uses external DMA buffer */ uint8_t manual_status:1; /* non automatic status stage on * control transfers */ + uint8_t bdma_enable:1; /* setting this flag allows you to + * load buffers directly into DMA for + * the USB transfer the flag belongs + * to. The flag can not be changed + * during operation. */ }; struct usbd_xfer_flags_int { @@ -360,6 +381,7 @@ uint8_t short_frames_ok:1; /* filtered version */ uint8_t short_xfer_ok:1; /* filtered version */ + uint8_t bdma_state:2; /* BUS-DMA state */ }; struct usbd_config {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711171842.lAHIgnrB020085>