Re: [PARPORT] PPUSR/PPDEV for Wine and possible uninterruptible hang

From: Tim Waugh (twaugh@redhat.com)
Date: Wed Jul 19 2000 - 06:31:49 EDT

  • Next message: Tim Waugh: "Re: [PARPORT] cdr on parallel port cause kernel problems"

    On Tue, Jul 18, 2000 at 10:33:02AM +0200, Uwe Bonnes wrote:

    > I try to make wine use ppuser/ppdev to implement a direct port acces
    > in the user process with the ppuser/ppdev ioctls.

    Cool.

    > The first problems is with the (not yet exiting) standard for the
    > ppuser/ppdev header which makes it hard for the compile time detection
    > of ppuser/ppdev capabilities. Wine is configured via './configure' and
    > ideas for a portable detection of ppuser/ppdev capabilities via
    > autoconf are welcome. Is ppuser/ppdev available on other system
    > then linux?

    It isn't available anywhere but Linux. *BSD has a similar device I
    think, but it has an entirely different interface. ( :-( )

    > The second problem is a real showstopper. This is with run time
    > detection of the capabilities of the parport devices given by the user
    > in the wine configuration. As it is not know when the user process
    > will access what port, I must open and PPCLAIM all user configured
    > ports. I must expect this user configuration to be broken. This might
    > result in a sequence like
    >
    > fd1=open("/dev/parport00",O_RDWR);
    > ioctl(fd1,PPCLAIM,0);
    > fd2=open("/dev/parport01",O_RDWR);
    > ioctl(fd2,PPCLAIM,0);
    >
    > In this situation the second ioctl hangs _uninterruptible_ as the
    > secon PPCLAIM will wait for a PPVIELD on the first device...

    Do /dev/parport00 and /dev/parport01 definitely have different minors?
    Which kernel version are you using? This sounds like a bug: two ports
    are entirely separate from one another and so claims on them should
    not interfere with each other.

    > Even shutting down the machine results in a file system check on reboot.

    !

    > The Vmware vmppuser has an additional PPGETBASE ioctl. I could check
    > before claiming a device if that claim would happen on the same base
    > adress as of a device already claimed before.

    If you have to double-check that the devices are what they say they
    are, use stat.

    > Will PPGETBASE get a standard ioctl? Any reason to disable PPGETBASE
    > on a device not PPCLAIMed before?

    PPGETBASE was added to ppuser for VMware because they wanted a
    short-term solution, and only used /dev/parport devices in order to
    claim the port; from then on they just go straight to the hardware.

    Tim.
    */



    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 06:40:43 EDT