Throttle/unthrottle race?

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

 



I'm writing a USB serial device driver and I'm running into some puzzling behavior. At reasonably high data rates (about 3 Mbs) I occasionally get a driver lockup. At these rates I ordinarily receive a sequence of throttle/unthrottle calls, but once in a while I get them in the other order. I.e.:

throttle
unthrottle
throttle
unthrottle
unthrottle
throttle

The n_tty line discipline uses an atomic test and set flag to send the throttle first and then the unthrottle, but my driver actually receives them in the other order. It appears to me that there is no mechanism in place to prevent this race if the throttling code and the unthrottling code are running on different processors.

I confess that some of the interactions between the driver, the line discipline, and the tty core remain a bit murky to me, and I could easily have misunderstood how it fits together. Is it a problem in the line discipline, my driver, or me?

I'm running 2.6.30-rc3-0058-g6b35ca0 (pulled from Greg KH's tree a week or so ago) on a dual processor machine.

Thanks for any advice,

Rob.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux