[linux-dvb] virtual bus locking
abraham.manu at gmail.com
Wed Oct 24 22:25:36 CEST 2007
I ran into a racy situation while handling multiple virtual adapters, the solution was
simple to use a mutex_lock on the physical bus interface.
What i have is 3 virtual transaction interfaces, all of them using the same physical bus.
Now transactions are all fine except that there are cases when transactions get
interleaved, the device thus will be in an undefined state.
(This is the reason for me to implement a bus lock in this circumstance)
Now, while looking at it, i found that i can't get a pointer back to the device state
struct back from struct usb_device (at least looks like that to me)
int af9015_biu_xfer(struct usb_device *udev, struct af9015_biu_msg *msgs, int num)
A quick thought was to initialize it static, but then the other two transactions happen
to be elsewhere in
int af9015_virt_0_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs, int num)
int af9015_virt_1_xfer(struct i2c_adapter *i2c, struct i2c_msg *msgs, int num)
Someone can provide some "pointers" or better ideas before i start pulling out hair ? :)
More information about the linux-dvb