parport-arca-9 [was Re: [PARPORT] Re: PARPORT_DEV_EXCL ]

Andrea Arcangeli (
Sat, 26 Sep 1998 15:33:16 +0200 (CEST)

On Sat, 26 Sep 1998, Tim Waugh wrote:

>On Sat, 26 Sep 1998, Andrea Arcangeli wrote:
>> Looking at the patch seems perfect. What about to remove also the lurking
>> stuff just now (also from plip)?
>I'm jumpy about removing it altogether, but how's this?

I produced a new parport-arca with your patch applyed.

Now when a pardevice want exclusive access only need to set the
PARPORT_DEV_EXCL flag at parport_registration time. This will help sysadm.

>Incidentally, can someone who knows more about PLIP than me tell me if it
>actually works when sharing with other things? Or should it be

Plip seems fine (except that it claim the port as LURK that does mean
nothing now), look at this function:

static int
plip_connection_close(struct device *dev, struct net_local *nl,
                      struct plip_local *snd, struct plip_local *rcv)
        if (nl->connection == PLIP_CN_CLOSING) {
                nl->connection = PLIP_CN_NONE;
                dev->tbusy = 0;
        if (nl->should_relinquish) {
                nl->should_relinquish = nl->port_owner = 0;
        return OK;

Should relinquish is set by the preemt function so it seems to be

I just fixed the few drivers that seems to need EXCL access to the port
(note that parport was misused in such drivers since it was implemented
the preemt callback that was _only_ returning always 1 specifying that the
driver was not able to preemt). Such devices was also used to claim the
port as LURK and so I removed the LURK flag too.

I also removed the loop in the ppa/imm claim functions. BTW there' s a lot
of code duplication between imm and ppa. It would be nice to join the
common code in a library object file I think (to fix bugs only in one
place ;-).

The new parport-arca-9 can be download from:

It would be nice if people with ham radio stuff and hfmodems would try
the patch and feedback.

Andrea[s] Arcangeli

 drivers/char/hfmodem/main.c | 12 ---
 drivers/misc/parport_arc.c | 7 +-
 drivers/misc/parport_ax.c | 29 +++-----
 drivers/misc/parport_pc.c | 28 +++-----
 drivers/misc/parport_procfs.c | 39 +++++++----
 drivers/misc/parport_share.c | 129 +++++++++++++++++++++++---------------
 drivers/net/hamradio/baycom_epp.c | 12 ---
 drivers/net/hamradio/baycom_par.c | 12 ---
 drivers/net/plip.c | 2
 drivers/scsi/imm.c | 18 ++++-
 drivers/scsi/ppa.c | 12 +++
 include/linux/parport.h | 32 +++++++--
 include/linux/parport_pc.h | 2
 13 files changed, 195 insertions, 139 deletions

-- To unsubscribe, send mail to: --
-- with the single word "unsubscribe" in the body of the message. --

This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:18:24 EST