Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: usb and no bus_dma(9)



Hi! tsutsui-san,


From: Izumi Tsutsui <tsutsui%ceres.dti.ne.jp@localhost>
Date: Thu, 17 Mar 2011 22:13:00 +0900

> > > For compromise, how about:
> > >  - use "#if NUHCI > 0 || NOHCI > 0 || NEHCI > 0" (or so) in *.c sources
> > >  - prepare dummy typedefs in MD bus.h for structures in headers
> > >    (I guess landisk one might help)
> > 
> > I remake this patch.
>  :
> 
> > --- usb_mem.c       4 Jan 2011 01:37:55 -0000       1.45
> > +++ usb_mem.c       17 Mar 2011 07:58:43 -0000
>  :
> > +#if (NEHCI + NOHCI + NUHCI) > 0
> 
> As Manuel suggested, it's better to use usb_dma attribute
> because slhci(4) doesn't require functions in usb_mem.c
> except MALLOC_DEFINE(), which is not DMA related and
> can be moved into usb_subr.c etc. (patch attached)

  <...snip...>

> Index: dev/usb/usb_subr.c
> ===================================================================
> RCS file: /cvsroot/src/sys/dev/usb/usb_subr.c,v
> retrieving revision 1.177
> diff -u -p -r1.177 usb_subr.c
> --- dev/usb/usb_subr.c        3 Nov 2010 22:34:24 -0000       1.177
> +++ dev/usb/usb_subr.c        17 Mar 2011 12:51:06 -0000
> @@ -68,6 +68,10 @@ extern int usbdebug;
>  #define DPRINTFN(n,x)
>  #endif
>  
> +MALLOC_DEFINE(M_USB, "USB", "USB misc. memory");
> +MALLOC_DEFINE(M_USBDEV, "USB device", "USB device driver");
> +MALLOC_DEFINE(M_USBHC, "USB HC", "USB host controller");
> +
>  Static usbd_status usbd_set_config(usbd_device_handle, int);
>  Static void usbd_devinfo(usbd_device_handle, int, char *, size_t);
>  Static void usbd_devinfo_vp(usbd_device_handle, char *, size_t, char *, 
> size_t,

Oh! good status.  mmeye+slhci(4) work!
Please commit.

Thanks,
--
kiyohara


Home | Main Index | Thread Index | Old Index