tech-kern archive

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

Re: nick-nhusb merge coming soon



On 04/13/16 08:05, Taylor R Campbell wrote:
    Date: Wed, 13 Apr 2016 07:59:20 +0100
    From: Nick Hudson <skrll%netbsd.org@localhost>

    I think the first phase of nick-nhusb is in a state ready to be
    merged. I'd like to merge it in the next few days, but in the meantime
    I've put some kernels for testing here:

         http://www.netbsd.org/~skrll/nick-nhusb

Cool!

Can you write a brief summary of what changed in the USB driver API?

The main change is to replace

   void *usbd_alloc_buffer(struct usbd_xfer *, u_int32_t);
   void usbd_free_buffer(struct usbd_xfer *);

   struct usbd_xfer *usbd_alloc_xfer(struct usbd_device *dev);
   usbd_status usbd_free_xfer(struct usbd_xfer *xfer);

with

int usbd_create_xfer(struct usbd_pipe *pipe, size_t len, unsigned int flags,
      unsigned int nframes, struct usbd_xfer **xp)

    void usbd_destroy_xfer(struct usbd_xfer *xfer)

and the pipe argument is dropped from the usbd_setup_* functions

The idea being that transfers are linked to the pipe/endpoint when created and the HCD can, if required, allocate all resources for the transfer before being started.

Have any man pages been updated in your branch?
I have local changes I'll commit at merge time.

Nick



Home | Main Index | Thread Index | Old Index