[Linux-parport] Negotiating IEEE1284_MODE_EPP
Gerhard Bertelsmann
hallo at gerhard-bertelsmann.de
Tue May 25 10:52:37 EDT 2004
Hello,
I'm having a problem to negotiate EPP mode for parport.
I've done this with ppdev in user mode with no problem using
ppdev:
mode = IEEE1284_MODE_EPP;
negotiate_first=0;
if (negotiate_first)
{
ioctl (pport, PPNEGOT, &mode);
} else
{
ioctl (pport, PPSETMODE, &mode);
}
that's working but the parport modul is driving me crazy (I'm sure I've
missed something :-():
pdev = parport_register_device(port, "PCF8584 EPP",
NULL, NULL, NULL, PARPORT_FLAG_EXCL, NULL);
if (!pdev)
{
printk(KERN_ERR "Unable to register with parport\n");
goto ERROR0;
}
if (parport_claim_or_block(pdev) < 0) {
printk(KERN_ERR "Could not claim parallel port\n");
goto ERROR1;
}
printk(KERN_ALERT "parport capabilities (0x%x)\n", pdev->port->modes);
value=parport_negotiate(pdev->port, IEEE1284_MODE_EPP);
if (value)
{
printk(KERN_ALERT "negotiation failed: %d (0x%x)\n",
value,pdev->port->modes);
}
dmesg output:
pcf8584-parport: attaching to parport0
parport capabilities (0x4)
negotiation failed: -1 (0x4)
Could someone give me a hint what's missing ?
Regards
Gerd
BTW:
parport0: PC-style at 0x378 [PCSPP,TRISTATE,EPP]
parport_pc: Via 686A parallel port: io=0x378
modul lp unloaded
More information about the Linux-parport
mailing list