PERFORCE change 130021 for review

Hans Petter Selasky hselasky at FreeBSD.org
Sun Dec 2 06:59:09 PST 2007


http://perforce.freebsd.org/chv.cgi?CH=130021

Change 130021 by hselasky at hselasky_laptop001 on 2007/12/02 14:58:29

	
	Add new helper function go get virtual buffer given
	a page cache.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/usb_subr.c#64 edit
.. //depot/projects/usb/src/sys/dev/usb/usb_subr.h#65 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/usb_subr.c#64 (text+ko) ====

@@ -1817,6 +1817,15 @@
 }
 
 /*------------------------------------------------------------------------*
+ *	usbd_get_buffer
+ *------------------------------------------------------------------------*/
+void   *
+usbd_get_buffer(struct usbd_page_cache *pc, uint32_t offset)
+{
+	return (USBD_ADD_BYTES(pc->buffer, offset));
+}
+
+/*------------------------------------------------------------------------*
  *  usbd_copy_in - copy directly to DMA-able memory
  *------------------------------------------------------------------------*/
 void

==== //depot/projects/usb/src/sys/dev/usb/usb_subr.h#65 (text+ko) ====

@@ -691,6 +691,7 @@
 void	usbd_set_desc(device_t dev, struct usbd_device *udev);
 void   *usbd_alloc_mbufs(struct malloc_type *type, struct usbd_ifqueue *ifq, uint32_t block_size, uint16_t block_number);
 void	usbd_get_page(struct usbd_page_cache *cache, uint32_t offset, struct usbd_page_search *res);
+void   *usbd_get_buffer(struct usbd_page_cache *pc, uint32_t offset);
 void	usbd_copy_in(struct usbd_page_cache *cache, uint32_t offset, const void *ptr, uint32_t len);
 void	usbd_m_copy_in(struct usbd_page_cache *cache, uint32_t dst_offset, struct mbuf *m, uint32_t src_offset, uint32_t src_len);
 int	usbd_uiomove(struct usbd_page_cache *pc, struct uio *uio, uint32_t pc_offset, uint32_t len);


More information about the p4-projects mailing list