Re: 2.2.1-8: Unable to print if printer in ON during boot

Serguei Miridonov (mirsev@cicese.mx)
Wed, 12 May 1999 22:38:08 -0700


Hi,

OK, looks like only reset is necessary:

outb (0x08, PPORT+CONTROL);
usleep (1);
outb (0x0c, PPORT+CONTROL);

BTW, Win98 and probably other OSs send RESET to printer during boot. At
least, when the printer is ON and Win98 is loading, the printer performes the
very same movements as when I send reset command using this code.

Tim Waugh wrote:

> On Sat, 8 May 1999, Serguei Miridonov wrote:
>
> > The situation: If the printer (HP DeskJet 520) in ON during kernel
> > loading, the printing is impossible without some special means. If the
> > printer is OFF on Linux loading and is turned ON after that, everything
> > is OK.
>
> I had another report exactly like this, but it wasn't possible to test out
> patches. :-(
>
> > outb (0xd9, PPORT+STATUS);
> > usleep (1);
> > outb (0xd8, PPORT+STATUS);
> > usleep (100);
>
> clear EPP timeout
>
> > outb (0x08, PPORT+CONTROL);
> > usleep (1);
> > outb (0x0c, PPORT+CONTROL);
>
> reset
>
> > while ((inb(PPORT+STATUS) & 0x80) == 0)
> > usleep(1000);
>
> wait for idle
>
> > outb (0xd9, PPORT+STATUS);
> > usleep (1);
> > outb (0xd8, PPORT+STATUS);
> > usleep (1);
>
> clear EPP timeout
>
> Is it possible to leave any of those stages out? Do you need to wait for
> the printer to go idle, for instance? Do you need the first 'clear EPP
> timeout'?
>
> Tim.
> */

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