[PARPORT] RE: patch-2.1.131-ac11-1284-2


Tim Waugh (twaugh@matra.co.uk)
Wed, 16 Dec 1998 17:55:00 -0000


> I am CCing also to linux-parport just to allow more people to complain
> about my patches.

;-)

> This first is a bugfix. Due this bug I readded in my tree the comma at the
> end of every parport lowlevel ops ;)

Okay, you got me. Pah.

> This will allow us at least to use best the polling loop.
> [patch to change udelay(25) to udelay(5)

That looks better. Thanks.

> I also
> reinserted the interrupt make sense message because I want to see when I
> am really using irqs ;)

If fast polling works, the semaphore will be upped but not downed. After a
whole block of data is transferred using fast polling, the semaphore's count
could be fairly high. Probably we should reset the semaphore (cleanly, and
without introducing races) after we're happy that we don't need to wait.

> Here the most important thing. Yesterday I didn' t understood well the
> point of your code. That was emergency code that runs for 5
> sec. If the port is shared we can' t really gain the port for such long
> time.

If we need the interrupts, we need to have the port claimed. No two ways
about it. If the user wants to share devices, better poll instead.

> This way
> my ppa returned to run continously and _fast_ whatever I done with the
> printer. Also the printing is _fast_ while ppa is running cp /dev/sda
> /dev/null btw ;). There' s no noticable slowdown with my new
> printer using
> parport sharing or not.

Were you getting "Woo hoo! Interrupt makes sense!" messages? If so, maybe
the parport irq handling is wrong.

> Theorically we should
> do something very similar also in write_compat (where now I
> removed the
> `&& polling (dev)') to handle the irq and parport sharing as best...

Not sure about this.

> +#define REVERT_TO_POLLING \
> +do { \
> + sti(); \
> + goto polling; \
> +} while (0)
> +
> [...]
> + } else
> + REVERT_TO_POLLING;
> + sti();
> + }

Don't use macros to comment your code -- use comments instead. ;-)

Tim.
*/

-- 
twaugh@matra.co.uk     MATRA Systems (UK) Ltd., Home Farm, Leigh Road,
                       Eastleigh, SO50 9EU  Registered in Cardiff 2642797

-- 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 Wed 30 Dec 1998 - 10:18:57 EST