git: usb4bsd - Fix poll/select/kqfilter issues with ums and usb_fifo*() API

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Mar 9 17:06:06 PDT 2014


commit 4bcecc80cde102c21a6cc5a8e562b60da0be724c
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Mar 9 17:01:41 2014 -0700

    usb4bsd - Fix poll/select/kqfilter issues with ums and usb_fifo*() API
    
    * Fix handling of f->flag_isselect.  It was being improperly cleared on
      event notification.  It can only be cleared when the knote is removed.
    
    * Call f->methods->f_start_read() unconditionally in usb_filter_read().
      Conditionalizing on f->queue_data will fail with devices (aka ums) which
      allocate the buffer independantly of starting the interrupt xfer.
    
    * Call usb_fifo_wakeup() in mbuf re-queue cases to handle races when
      the read() code pulls an mbuf off the queue and then puts it back on.
    
    * Fix bugs in UMS - Keep track of whether the interrupt transfer is running
      or not and do not re-submit or re-stop the transfer unconditionally.

Summary of changes:
 sys/bus/u4b/input/ums.c | 20 ++++++++++++++------
 sys/bus/u4b/usb_dev.c   | 19 ++++++-------------
 2 files changed, 20 insertions(+), 19 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4bcecc80cde102c21a6cc5a8e562b60da0be724c


-- 
DragonFly BSD source repository



More information about the Commits mailing list