Subject: netpoll causes malformed protocol message

From: Stephen Hemminger <[email-masked]>
Date: Wed, 18 Oct 2006 15:49:15 -0700

Now that I know what this is, perhaps others should know.

> Linus Torvalds <[email-masked]> wrote:
>   
> > 
> > Since I've been re-testing the Apple Intel Mac Mini suspend/resume due to 
> > a USB problem, I thought I might as well see if this rings any bells..
> > 
> > On resume, networking does actually eventually work, but it takes a while 
> > before it gets going. The dmesg for the resume shows:
> > 
> > 	sky2 eth0: Link is up at 100 Mbps, full duplex, flow control both
> > 	protocol 0000 is buggy, dev eth0
> > 	protocol 0000 is buggy, dev eth0  
> 
> 

The packets created by netpoll trigger the check for bogus protocol
in net/core/dev.c if it gets busy enough to actually use the netpoll
tx queue.

I'll whip a fix, the skb should be setup better and it shouldn't call
different xmit paths for the queued/non-queued case. Follow on patch
to replace the roll your own skb queue's with the already there sk_buff_head
routines. Given the normal case is lots of small writes, probably
better to just have a character queue to cause coalescing.

The netpoll code is a step child it looks like and ignores using
standard code when it should.