Thomas Davis <[EMAIL PROTECTED]> writes:

> > New patch is out for testing. This patch contains a few bug-fixes to the
> > previous patch, so you should all consider upgrading.
> > 
> > Changes:
> > 
> > o IrLPT is now working! In fact all of IrCOMM should now be working
> >   correctly and I'll soon call it 1.0 (me)
> > 
> 
> Nope.  Still not right; you can print once, and then it gets confused.

Hmm, I cannot reproduce this one. Which printer are you using? My HP 2100TN
printer has no problems at all, and I can print as many documents as I
like. I'll try with a 6MP at work and some of the LPT adaptors.
 
> Starts complaining about 'didn't find mself'.

This is _your_ flow control scheme in action! You print and ship a lot of
skb's down the stack. Then lpd closes the device before all the skb's have
been deallocated, and they start to complain that their ircomm instance is
gone. This is harmless and expected behaviour, since you only need to do
flow-control when the device is open. So just remove this debug line if you 
don't like to see it ;-)
 
> and warnings about size=2064 of sk_buff.

I noticed this once, but didn't want to accept it ;-) Well, time to dive
into the code again. 

dagbnb /usr/src/ # diff -urN linux-2.3.13-irda-patch/net/irda/ircomm/ircomm_tty.c 
linux/net/irda/ircomm/ircomm_tty.c 
--- linux-2.3.13-irda-patch/net/irda/ircomm/ircomm_tty.c        Mon Aug 23 21:31:52 
1999
+++ linux/net/irda/ircomm/ircomm_tty.c  Tue Aug 24 08:15:43 1999
@@ -6,7 +6,7 @@
  * Status:        Experimental.
  * Author:        Dag Brattli <[EMAIL PROTECTED]>
  * Created at:    Sun Jun  6 21:00:56 1999
- * Modified at:   Mon Aug 23 12:31:47 1999
+ * Modified at:   Tue Aug 24 08:15:43 1999
  * Modified by:   Dag Brattli <[EMAIL PROTECTED]>
  * Sources:       serial.c and previous IrCOMM work by Takahide Higuchi
  * 
@@ -653,9 +653,11 @@
                if (skb) {                      
                        /* 
                         * Any room for more data at the end of the current 
-                        * transmit buffer? 
+                        * transmit buffer? Cannot use skb_tailroom, since
+                        * dev_alloc_skb gives us a larger skb than we 
+                        * requested
                         */
-                       if ((tailroom = skb_tailroom(skb)) > 0) {
+                       if ((tailroom = (self->max_data_size-skb->len)) > 0) {
                                /* Adjust data to tailroom */
                                if (size > tailroom)
                                        size = tailroom;

Hmm, looks good now! This might have been the reason why the Palm III sync
went wrong 1 out of 4 times (full sync that takes about 5 min). Now I
cannot make it fail anymore. I works all the time for me. I was blaming the
Palm for its bad IrDA impl. but I guess it was my fault after-all (sending
it frames larger than 514 bytes ;-)

If Thomas can print two documents in a row now, then I'll decleare it 1.0 ;-)

-- Dag

-- 
   / Dag Brattli                   | The Linux-IrDA Project               /
  // University of Tromsoe, Norway | Infrared communication for Linux    //
 /// http://www.cs.uit.no/~dagb    | http://www.cs.uit.no/linux-irda/   ///

_______________________________________________
Linux-IrDA mailing list  -  [EMAIL PROTECTED]
http://www.pasta.cs.UiT.No/mailman/listinfo/linux-irda

Reply via email to