All of lore.kernel.org
 help / color / mirror / Atom feed
From: Till Immanuel Patzschke <tip@internetwork-ag.de>
To: pwang@iphase.com, acme@conectiva.com.br
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [BUG/PATCH] iphase ATM driver (Oops - Div0)
Date: Tue, 13 Nov 2001 22:43:20 +0100	[thread overview]
Message-ID: <3BF193F8.FE8C579@internetwork-ag.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

Hi,

please find attached a fix for a nasty bug in the iphase ATM NIC. If te max_sdu
exceeds the limit the internal structure ia_vcc is freed BUT the pointer in the
vcc struct is NOT been reset.  This results in a Div0 error in ia_close
(ctimeout = 300000 / ia_vcc->pcr) - clearing the referencing pointer fixes the
problem.
I've also diabled the "Misaligned SKB" check since it works fine w/o it
AND re-aligning is to expensive if it works (I know, jumping to conclusions, but
it works fine on my boxes)...
Could you please - at least - apply the pointer fix?

Thanks,

Immanuel

--
Till Immanuel Patzschke                 mailto: tip@internetwork-ag.de
interNetwork AG                         Phone:  +49-(0)611-1731-121
Bierstadter Str. 7                      Fax:    +49-(0)611-1731-31
D-65189 Wiesbaden                       Web:    http://www.internetwork-ag.de



[-- Attachment #2: qq2 --]
[-- Type: text/plain, Size: 1370 bytes --]

diff -Naur linux-2.4.10/drivers/atm/iphase.c linux-2.4.10-new/drivers/atm/iphase.c
--- linux-2.4.10/drivers/atm/iphase.c	Tue Sep 18 07:52:34 2001
+++ linux-2.4.10-new/drivers/atm/iphase.c	Tue Nov 13 18:40:49 2001
@@ -1777,8 +1777,9 @@
         memset((caddr_t)ia_vcc, 0, sizeof(*ia_vcc));
         if (vcc->qos.txtp.max_sdu > 
                          (iadev->tx_buf_sz - sizeof(struct cpcs_trailer))){
-           printk("IA:  SDU size over the configured SDU size %d\n",
-                                                          iadev->tx_buf_sz);
+           printk("IA:  SDU size over (%d) the configured SDU size %d\n",
+		  vcc->qos.txtp.max_sdu,iadev->tx_buf_sz);
+	   INPH_IA_VCC(vcc) = NULL;  
            kfree(ia_vcc);
            return -EINVAL; 
         }
@@ -2896,14 +2897,16 @@
                  dev_kfree_skb_any(skb);
           return 0;
         }
+#if 0
         if ((u32)skb->data & 3) {
-           printk("Misaligned SKB\n");
+           printk("Misaligned SKB (0x%p)\n",skb->data);
            if (vcc->pop)
                  vcc->pop(vcc, skb);
            else
                  dev_kfree_skb_any(skb);
            return 0;
         }       
+#endif
 	/* Get a descriptor number from our free descriptor queue  
 	   We get the descr number from the TCQ now, since I am using  
 	   the TCQ as a free buffer queue. Initially TCQ will be   

                 reply	other threads:[~2001-11-13 21:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BF193F8.FE8C579@internetwork-ag.de \
    --to=tip@internetwork-ag.de \
    --cc=acme@conectiva.com.br \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pwang@iphase.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.