Re: [PARPORT] automatically setting the TRUST_IRQ flag in a modularized setup...


David Campbell (campbell@gear.torque.net)
Mon, 14 Jun 1999 07:22:34 +0800


From: amalmin@coho.halcyon.com
Date sent: Sat, 12 Jun 1999 23:58:58 -0700
To: linux-parport@torque.net, amalmin@halcyon.com
Subject: [PARPORT] automatically setting the TRUST_IRQ
flag in a modularized setup...

> Howdy.
>
> I have an HP Deskjet 694C printer which parport says could benefit from
> the use of the TRUST_IRQ flag. However, I am using a modularized printing
> setup...so parport only gets loaded when I actually print something. Is there
> a way, short of recompiling the kernel, to set this flag automatically when
> the module loads?
>
> The same port also hosts an old (PPA) zip drive. Will the TRUST_IRQ flag
> annoy it? I suspect it won't, because I don't think the PPA module uses
> interrupts...but I though I'd ask anyway.
>
> I've included some relevant syslog entries just for the hell of it...
>
> Jun 6 12:43:54 skaro kernel: parport0: PC-style at 0x378, irq 7 [SPP,PS2,EPP]
> Jun 6 12:43:54 skaro kernel: lp0: using parport0 (interrupt-driven).
> Jun 6 12:44:07 skaro kernel: lp0: the printing could be optimized using the TRUST_IRQ flag, see
the top of linux/drivers/char/lp.c

Without going into the vagarities of parport, autoenabling IRQs is
more trouble than it is worth for the parallel port developers.

The problem arises when another parallel port device attempts to use
the port while the lp driver is using interrupts. From memory the lp
driver now automatically disables IRQs if another device is on the
same parallel port.

I have had to cut back the speed of the ppa/imm drivers since it
caused more grief than it was worth, better to have a stable driver
than one that breaks on 10% of the available hardware.

> Jun 11 16:56:02 skaro kernel: ppa: Version 2.03 (for Linux 2.2.x)
> Jun 11 16:56:02 skaro kernel: ppa: Found device at ID 6, Attempting to use EPP 32 bit
> Jun 11 16:56:02 skaro kernel: ppa: Communication established with ID 6 using EPP 32 bit
> Jun 11 16:56:02 skaro kernel: scsi1 : Iomega VPI0 (ppa) interface
> Jun 11 16:56:02 skaro kernel: scsi : 2 hosts.
> Jun 11 16:56:02 skaro kernel: Vendor: IOMEGA Model: ZIP 100 Rev: J.03
> Jun 11 16:56:02 skaro kernel: Type: Direct-Access ANSI SCSI revision: 02

> Jun 11 16:56:02 skaro kernel: Detected scsi removable disk sda at scsi1, channel 0, id 6, lun 0
> Jun 11 16:56:03 skaro kernel: sda : READ CAPACITY failed.
> Jun 11 16:56:03 skaro kernel: sda : status = 0, message = 00, host = 0, driver = 28
> Jun 11 16:56:03 skaro kernel: sda : extended sense code = 2
> Jun 11 16:56:03 skaro kernel: sda : block size assumed to be 512 bytes, disk size 1GB.
> Jun 11 16:56:03 skaro kernel: sda:scsidisk I/O error: dev 08:00, sector 0
> Jun 11 16:56:03 skaro kernel: unable to read partition table

I need to send Linus a patch for ppa/imm (you are right about the
message being caused by no disk present).

David Campbell

=======================================================
campbell@torque.net
"This is not an office, rather Hell with fluorescent lighting"

-- 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 2.0b3 on Sun 13 Jun 1999 - 19:24:25 EDT