Date: Fri, 20 Mar 2009 15:29:47 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 159519 for review Message-ID: <200903201529.n2KFTlaq093676@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=159519 Change 159519 by hselasky@hselasky_laptop001 on 2009/03/20 15:29:06 USB core: Fix compilation without strings and busdma. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/usb_bus.h#4 edit .. //depot/projects/usb/src/sys/dev/usb/usb_busdma.h#4 edit .. //depot/projects/usb/src/sys/dev/usb/usb_device.c#11 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/usb_bus.h#4 (text+ko) ==== @@ -75,9 +75,10 @@ device_t parent; device_t bdev; /* filled by HC driver */ +#if USB_HAVE_BUSDMA struct usb2_dma_parent_tag dma_parent_tag[1]; struct usb2_dma_tag dma_tags[USB_BUS_DMA_TAG_MAX]; - +#endif struct usb2_bus_methods *methods; /* filled by HC driver */ struct usb2_device **devices; ==== //depot/projects/usb/src/sys/dev/usb/usb_busdma.h#4 (text+ko) ==== @@ -48,6 +48,7 @@ struct usb2_xfer_root; struct usb2_dma_parent_tag; +struct usb2_dma_tag; /* * The following typedef defines the USB DMA load done callback. @@ -115,11 +116,11 @@ /* * The following structure describes the parent USB DMA tag. */ +#if USB_HAVE_BUSDMA struct usb2_dma_parent_tag { -#if USB_HAVE_BUSDMA && defined(__FreeBSD__) +#if defined(__FreeBSD__) struct cv cv[1]; /* internal condition variable */ #endif -#if USB_HAVE_BUSDMA bus_dma_tag_t tag; /* always set */ struct mtx *mtx; /* private mutex, always set */ @@ -128,27 +129,31 @@ uint8_t dma_error; /* set if DMA load operation failed */ uint8_t dma_bits; /* number of DMA address lines */ uint8_t utag_max; /* number of USB DMA tags */ +}; +#else +struct usb2_dma_parent_tag {}; /* empty struct */ #endif -}; /* * The following structure describes an USB DMA tag. */ +#if USB_HAVE_BUSDMA struct usb2_dma_tag { -#if USB_HAVE_BUSDMA && defined(__NetBSD__) +#if defined(__NetBSD__) bus_dma_segment_t *p_seg; #endif -#if USB_HAVE_BUSDMA struct usb2_dma_parent_tag *tag_parent; bus_dma_tag_t tag; usb2_size_t align; usb2_size_t size; -#endif -#if USB_HAVE_BUSDMA && defined(__NetBSD__) +#if defined(__NetBSD__) usb2_size_t n_seg; #endif }; +#else +struct usb2_dma_tag {}; /* empty struct */ +#endif /* function prototypes */ ==== //depot/projects/usb/src/sys/dev/usb/usb_device.c#11 (text+ko) ==== @@ -2238,6 +2238,7 @@ static void usb2_notify_addq(const char *type, struct usb2_device *udev) { +#if USB_HAVE_STRINGS char *data = NULL; struct malloc_type *mt; @@ -2297,6 +2298,7 @@ device_get_nameunit(device_get_parent(udev->bus->bdev))); } devctl_queue_data(data); +#endif } #if USB_HAVE_UGEN
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903201529.n2KFTlaq093676>