From: Eric Dumazet <eric.dumazet@gmail.com>
To: Mike Sinkovsky <msink@permonline.ru>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 0/2] Ethernet drivers for WIZnet chips
Date: Tue, 03 Apr 2012 14:29:16 +0200 [thread overview]
Message-ID: <1333456156.18626.93.camel@edumazet-glaptop> (raw)
In-Reply-To: <4F7AE9D3.80204@permonline.ru>
On Tue, 2012-04-03 at 18:15 +0600, Mike Sinkovsky wrote:
> 03.04.2012 17:39, Eric Dumazet написал:
> > On Tue, 2012-04-03 at 16:58 +0600, Mike Sinkovsky wrote:
> >> Based on original driver from chip manufacturer, but nearly full rewite.
> >> Tested and used in production with Blackfin BF531 embedded processor.
> >>
> >> Signed-off-by: Mike Sinkovsky<msink@permonline.ru>
> >> ---
> >> v6:
> >> - remove (S0_TX_FSR< skb->len) check in TX handler, it doesn't work
> >> anyway. Chip can transmit only one frame with MTU 1500 at a time,
> >> and tx buffer size is bigger.
> >
> > So what happens if XXX frames are given to start_xmit() in a flood ?
> >
> > You removed any flow control, how can this work ?
> >
> > Device has an infinite queue ?
>
> As I understand from datasheet, device doesn't have tx queue at all.
> It have tx buffer, processor must save transmitted frame to it, and then
> save SEND command to command register. When transmission completed,
> SENDOK bit in interrupt register will be set to '1', and interrupt
> handler will be called.
>
> So, according to datasheet, driver must stop queue in start_xmit()
> routine, and wake in interrupt handler of SENDOK bit.
> I tried this, and it basically works, but SOMETIMES, very rare, I see
> tx_timeout().
>
> And without any flow control - driver works perfectly.
> Weird, don't know why.
Really this should be fixed, since your driver makes qdisc flow control
impossible (unless adding a rate limiter like HTB/CBQ)
You probably had a race on your xmit routine, and interrupt routine.
You need proper synchronization : A spinlock to make this easy, or a
smart barrier game.
next prev parent reply other threads:[~2012-04-03 12:29 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 9:23 [PATCH v2] ethernet driver for the WIZnet W5300 chip Mike Sinkovsky
2012-03-20 18:08 ` Ben Hutchings
2012-03-21 6:20 ` Mike Sinkovsky
2012-03-22 16:57 ` Ben Hutchings
2012-03-21 14:49 ` Florian Fainelli
2012-03-22 6:58 ` Mike Sinkovsky
2012-03-24 11:02 ` [PATCH v3] Ethernet " Mike Sinkovsky
2012-03-24 15:53 ` Joe Perches
2012-03-24 16:10 ` Eric Dumazet
2012-03-26 9:05 ` Mike Sinkovsky
2012-03-26 9:07 ` [PATCH v4] " Mike Sinkovsky
2012-03-28 2:35 ` David Miller
2012-03-28 5:52 ` Mike Sinkovsky
2012-03-28 6:22 ` David Miller
2012-03-30 7:00 ` [PATCH v5 1/2] " Mike Sinkovsky
2012-03-31 21:45 ` Mark Brown
2012-03-30 7:00 ` [PATCH v5 2/2] Ethernet driver for the WIZnet W5100 chip Mike Sinkovsky
2012-03-30 9:23 ` Eric Dumazet
2012-03-31 9:40 ` Francois Romieu
2012-03-31 9:46 ` Francois Romieu
2012-03-31 9:52 ` Mike Sinkovsky
2012-03-31 10:24 ` Eric Dumazet
2012-03-31 21:23 ` Mark Brown
2012-04-02 9:40 ` Mike Sinkovsky
2012-04-02 11:21 ` Mark Brown
2012-04-03 10:58 ` [PATCH v6 0/2] Ethernet drivers for WIZnet chips Mike Sinkovsky
2012-04-03 11:39 ` Eric Dumazet
2012-04-03 12:15 ` Mike Sinkovsky
2012-04-03 12:29 ` Eric Dumazet [this message]
2012-04-04 5:58 ` Mike Sinkovsky
2012-04-04 6:17 ` Eric Dumazet
2012-04-04 7:25 ` Mike Sinkovsky
2012-04-04 7:23 ` [PATCH v7 " Mike Sinkovsky
2012-04-04 11:57 ` [PATCH v8 " Mike Sinkovsky
2012-04-05 1:15 ` David Miller
2012-04-05 5:36 ` Mike Sinkovsky
2012-04-04 11:57 ` [PATCH v8 1/2] Ethernet driver for the WIZnet W5300 chip Mike Sinkovsky
2012-04-04 11:57 ` [PATCH v8 2/2] Ethernet driver for the WIZnet W5100 chip Mike Sinkovsky
2012-04-04 12:08 ` [PATCH v8 0/2] Ethernet drivers for WIZnet chips Mike Sinkovsky
2012-04-05 5:33 ` [PATCH v9 " Mike Sinkovsky
2012-04-05 5:47 ` David Miller
2012-04-05 5:33 ` [PATCH v9 1/2] Ethernet driver for the WIZnet W5300 chip Mike Sinkovsky
2012-04-05 5:33 ` [PATCH v9 2/2] Ethernet driver for the WIZnet W5100 chip Mike Sinkovsky
2012-04-04 12:08 ` [PATCH v8 1/2] Ethernet driver for the WIZnet W5300 chip Mike Sinkovsky
2012-04-04 12:08 ` [PATCH v8 2/2] Ethernet driver for the WIZnet W5100 chip Mike Sinkovsky
2012-04-04 7:23 ` [PATCH v7 1/2] Ethernet driver for the WIZnet W5300 chip Mike Sinkovsky
2012-04-04 7:23 ` [PATCH v7 2/2] Ethernet driver for the WIZnet W5100 chip Mike Sinkovsky
2012-04-03 10:58 ` [PATCH v6 1/2] Ethernet driver for the WIZnet W5300 chip Mike Sinkovsky
2012-04-03 13:36 ` Mark Brown
2012-04-04 6:18 ` Mike Sinkovsky
2012-04-04 10:01 ` Mark Brown
2012-04-04 11:00 ` Mike Sinkovsky
2012-04-03 10:58 ` [PATCH v6 2/2] Ethernet driver for the WIZnet W5100 chip Mike Sinkovsky
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=1333456156.18626.93.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=msink@permonline.ru \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox