Re: [PATCH] 2.6.6 synclink_cs.c

From: Paul Fulghum
Date: Tue Jun 01 2004 - 18:06:05 EST


Russell King wrote:

To put my PCMCIA hat on,

Is that the one with a propeller and flashing LEDs?
I'm jealous.

are you sure you should be registering with
a subsystem which can cause you to create tty devices before you've
registered with the tty subsystem?

Eg, what could happen if you register with PCMCIA, PCMCIA hands you
a card to drive and register a tty for, and you do all of that
_before_ you've registered with the tty subsystem?


Nothing.

Devices can come and go. Until the driver
registers with the tty subsystem they are not
externally accessible. The driver itself does
nothing tty related until it registers with the
tty subsystem and an external entity opens
the device as a tty device.

I believe what you describe happens with the 1st card insertion:
1. cardmgr loads the driver
2. driver registers with pcmcia
3. pcmcia creates device
4. driver registers with tty

Registering with pcmcia first makes cleanup a little easier
if it fails for some reason. This scheme has worked so far.

--
Paul Fulghum
paulkf@xxxxxxxxxxxxx

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/