virtual bus locking

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

 



Hi,

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)

http://jusst.de/hg/af901x/file/4d69cf364d21/linux/drivers/media/dvb/af9xxx/af9015_biu.c
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

http://jusst.de/hg/af901x/file/4d69cf364d21/linux/drivers/media/dvb/af9xxx/af9015_i2c.c
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 ? :)

Thanks,
Manu

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux