From 61426cf2ce361f3b06fbe855f5cc56df2e24edd2 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Thu, 26 Dec 2002 17:39:46 -0800 Subject: [PATCH] usbcore dma updates (and doc) Attached is a patch leveraging some of the new generic dma stuff: - Replaces dma mapping calls in usbcore with generic equivalents. This is a minor code shrink (which we'd hoped could happen). - Pass dma mask along, so net drivers can notice it'd be good to set NETIF_F_HIGHDMA; or scsi ones can set highmem_io. (Some Intel EHCI setups are able to support this kind of DMA.) - Updates one net driver (usbnet) to set NETIF_F_HIGHDMA when appropriate, mostly as an example (since I can't test this). - Provides Documentation/usb/dma.txt, describing current APIs. (Unchanged by this patch, except dma mask visibility.) - Converted another info() to dev_info(), and likewise a couple dbg() to dev_dbg() conversions in the modified routine. The number of FIXMEs was conserved: the generic API doesn't yet fix the error reporting bugs in the PCI-specific mapping API. --- include/linux/usb.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'include/linux') diff --git a/include/linux/usb.h b/include/linux/usb.h index 88557d5957a7..b1d92b8c585f 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -28,14 +28,6 @@ static __inline__ void wait_ms(unsigned int ms) mdelay(ms); } -/* - * USB device number allocation bitmap. There's one bitmap - * per USB tree. - */ -struct usb_devmap { - unsigned long devicemap[128 / (8*sizeof(unsigned long))]; -}; - struct usb_device; /*-------------------------------------------------------------------------*/ @@ -159,10 +151,16 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size, struct usb_operations; +/* USB device number allocation bitmap */ +struct usb_devmap { + unsigned long devicemap[128 / (8*sizeof(unsigned long))]; +}; + /* - * Allocated per bus we have + * Allocated per bus (tree of devices) we have: */ struct usb_bus { + struct device *controller; /* host/master side hardware */ int busnum; /* Bus number (in order of reg) */ char *bus_name; /* stable id (PCI slot_name etc) */ -- cgit v1.2.3