On Tue, May 30, 2000, Johan Verrept <[EMAIL PROTECTED]> wrote:
> Johannes Erdfelt wrote:
> >
> > On Mon, May 29, 2000, David Brownell <[EMAIL PROTECTED]> wrote:
> > > Re control queuing, I think that's likely the wrong model.
> > >
> > > Scenario: driver1 sees some state, issues a control request
> > > based on it. Concurrently, driver2 does the same. One of
> > > them "wins" the race, and the state when its request completes
> > > makes the other driver's request into something undesired (an
> > > error, corrupts state, etc).
> >
> > That is a problem, but I think 2 drivers (or driver and process) won't
> > be controlling the same part of a device.
>
> no, but they might be controlling two seperate parts of the same device by
> using the same control port... and the same status information.(even if only
> one of the parts can influence that status, you still have the race...)
So, have the driver synchronize access to it.
> > Take the HID driver. It sets up some simple stuff at the beginning
> > (configuration, alternate setting, hid specific stuff, etc) and the only
> > does HID control messages to turn on leds, set hid specific parametes,
> > etc.
>
> Say an ADSL modem driver, it sets up the modem and does the management from
> user or kernel space.
>
> > Then we have some userspace client which does a control transfer to
> > request some descriptors or something (string, device, etc).
>
> And a seperate part that does the real traffic transport on a certain
> endpoint. It needs the status of the ADSL modem (UP or DOWN). Actually, I
> think it doesn't really need it but it is useless to send huge amounts of data
> over the USB bus that will be dropped anyway...
>
> I can probably avoid that in this driver, but it might not always be the case.
> (Currently the two parts are still united, this avoids the problem for me...)
To clarify what I was saying, if there are situations where this occurs,
have that code synchronize access to the data/resource in question.
Since you are talking about the status of a modem, it's at best part of a
class specification. So, have the modem driver provide an API to access
and/or modify the status, etc.
JE
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]