Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Apr 2011 14:38:30 +0200
From:      Bartosz Fabianowski <freebsd@chillt.de>
To:        Hans Petter Selasky <hselasky@c2i.net>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Is there some implicit locking of device methods?
Message-ID:  <4DB6BCC6.5050001@chillt.de>
In-Reply-To: <201104261217.23858.hselasky@c2i.net>
References:  <4DB695DB.1080505@chillt.de> <201104261217.23858.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> You need to handle all cases in your driver. Fortunately there exists a
> solution for this already, called USB cdev. See

I went through all the USB drivers with a fine comb (the driver I am 
porting was based on the old USB stack and so I needed to adjust it for 
the new stack). Drivers like ulpt seem to be based around usb_fifo_* 
structures. If I understand usb_fifo_* right, it gives you a single 
device with FIFO semantics. This is not sufficient in my case. My device 
is opened for reading by several processes in parallel and needs to keep 
a separate FIFO per process. I implemented this via device cloning - and 
I could not see how to integrate that with usb_fifo_*. Thus, I based my 
driver on the raw cdev framework. Am I missing something obvious and 
making my life unnecessarily hard?

- Bartosz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4DB6BCC6.5050001>