[PARPORT] Polling/IRQ


Mark Hinds (zoro@tc.fluke.com)
Fri, 10 Apr 1998 10:32:36 -0700


I use /dev/lp0 for fast down-loading. The prior to 2.1.90
I could download at about 60kb/sec as of 2.1.90 the download
speed increased to about 100kb/sec. As of 2.1.93 the speed
went back down to 60kb/sec. Needless to say I prefer 100kb/sec.

I looked at the diffs from 2.1.90 and find that polling is
no longer available, and that the ioctl to set
the irq is essential disabled.

With out lots of further verbage, here's a path that makes things
go fast again in IRQ mode. Basically it allows the LP_READY polling
count to be applied in IRQ mode as well as POLLING mode. I believe
this is the right thing to do and would like to see this incorporated
into 2.1.95 if possible.

-------------------------- BEGIN CUT ---------------------------
*** lp.c.orig Fri Apr 10 10:00:54 1998
--- lp.c Fri Apr 10 10:01:52 1998
***************
*** 162,185 ****
  {
          int status;
          unsigned int wait = 0;
! unsigned long count = 0;
          struct lp_stats *stats;
  
          for (;;) {
                  lp_yield(minor);
                  status = r_str (minor);
! if (++count == LP_CHAR(minor))
                          return 0;
- if (LP_POLLING(minor))
- {
- if (LP_READY(minor, status))
- break;
- } else {
- if (!LP_READY(minor, status))
- return 0;
- else
- break;
- }
          }
  
          w_dtr(minor, lpchar);
--- 162,177 ----
  {
          int status;
          unsigned int wait = 0;
! unsigned long count = LP_CHAR(minor);
          struct lp_stats *stats;
  
          for (;;) {
                  lp_yield(minor);
                  status = r_str (minor);
! if (LP_READY(minor, status))
! break;
! if (--count == 0)
                          return 0;
          }
  
          w_dtr(minor, lpchar);
--------------------------------- END CUT --------------------------------

 

-- 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:17:36 EST