On Tue, 11 Sep 2007 11:46:44 +0200
Pierre-Yves Ritschard <[EMAIL PROTECTED]> wrote:

> > My bad, I hadn't tested VLAN acceleration code in a while so must
> > have broken it when more error checking was added.
> > 
> I did check without vlans and the messages don't appear so it seems
> to be working correctly. When vlans are enabled I do receive a few
> frames that have the length difference but not the GMR_FS_VLAN bit
> set, since there's high traffic on the interfaces it might be a
> firmware bug that is triggered sometimes (running with my patch the
> occurences are about 10/hour).
> 
> > Your fix looks right. Could you format properly for kernel patch
> > inclusion. Also, instead of hard coding 4, please use VLAN_HLEN.
> 
> Since the snippet became a patch, here goes:
> 
> Signed-off-by: Pierre-Yves Ritschard <[EMAIL PROTECTED]>
> 
The patch was mangled by my mailer, sorry about that:

Signed-off-by: Pierre-Yves Ritschard <[EMAIL PROTECTED]>

--- linux-2.6.22.6/drivers/net/sky2.c.orig      2007-09-10 15:34:15.000000000 
+0200
+++ linux-2.6.22.6/drivers/net/sky2.c   2007-09-11 11:38:54.000000000 +0200
@@ -2059,6 +2059,9 @@ static struct sk_buff *sky2_receive(stru
        sky2->rx_next = (sky2->rx_next + 1) % sky2->rx_pending;
        prefetch(sky2->rx_ring + sky2->rx_next);
 
+       if (status & GMR_FS_VLAN)
+               length += VLAN_HLEN;
+
        if (status & GMR_FS_ANY_ERR)
                goto error;
 
@@ -2081,6 +2084,8 @@ len_mismatch:
        /* Truncation of overlength packets
           causes PHY length to not match MAC length */
        ++sky2->net_stats.rx_length_errors;
+       printk(KERN_INFO PFX "%s: rx length mismatch: length %d != %d\n",
+              dev->name, length, status >> 16);
 
 error:
        ++sky2->net_stats.rx_errors;
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to