From: Chris Snook <csnook@redhat.com>
To: Alan <alan@lxorguk.ukuu.org.uk>
Cc: Jay Cliburn <jacliburn@bellsouth.net>,
jeff@garzik.org, shemminger@osdl.org, romieu@fr.zoreil.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/4] atl1: Revised Attansic L1 ethernet driver
Date: Mon, 20 Nov 2006 01:34:40 -0500 [thread overview]
Message-ID: <45614C80.5070303@redhat.com> (raw)
In-Reply-To: <20061120011534.54b1e010@localhost.localdomain>
Alan wrote:
> Would be nice if it used atl_ not at_ so its less likely to cause
> namespace clashes.
Some of this code looked like Attansic may have meant to share it
between drivers for atl1/atl2/atf1/atf2, but seeing as I can't find any
code for those, I'll convert it all to atl1_ and let Attansic generalize
the code if they ever decide they want to submit drivers.
> You have various macros for swaps that are pretty ugly - we have
> cpu_to and le/be_to_cpu functions for most swapping cases and these are
> generally optimised assembler (eg bswap on x86)
>
> AT_DESC_USED/UNUSED would be better as inline functions but thats not a
> serious concern.
>
> Be careful with :1 bitfields when working with hardware - the compiler
> has more than one choice about how to pack them.
Lacking a spec, I'm not entirely sure what the original intent was, so
we're stuck with testing. Is there a specific disambiguation technique
you recommend?
> The irq enable/disable use for locking on vlan appears unsafe. PCI
> interrupt delivery is asynchronous which means you can get this happen
>
>
> card sends PCI interrupt
> We call irq_disable
> We take lock
> We poke bits
> We drop lock
>
> PCI interrupt arrives
>
>
> This really does happen, typically its nasty to debug as well because you
> usually only get it on PIII boards on the one in n-zillion times a
> message collides and is retransmitted on the APIC bus.
Nice catch. I admit the VLAN code is not so well audited or tested.
Fortunately, the chip only seems to be on Asus M2V motherboards, at
least for now, but I want to audit all of the locking code at some point.
> skb->len is unsigned so <= 0 can be == 0. More importantly the subtraction
> before the test will wrap and is completely unsafe (see at_xmit_frame)
Thanks!
-- Chris
next prev parent reply other threads:[~2006-11-20 6:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-19 20:28 [PATCH 0/4] atl1: Revised Attansic L1 ethernet driver Jay Cliburn
2006-11-20 1:15 ` Alan
2006-11-20 6:34 ` Chris Snook [this message]
2006-11-20 9:46 ` Alan
2006-11-20 6:37 ` Chris Snook
2006-11-21 20:25 ` Luca Tettamanti
2006-11-22 22:34 ` Chris Ott
2006-11-23 17:38 ` russell_i_brown
2006-11-25 22:43 ` Luca Tettamanti
2006-11-26 1:33 ` Jay Cliburn
2006-12-09 1:45 ` Vasco
2006-12-09 1:51 ` Vasco
2006-12-10 15:07 ` Luca Tettamanti
2006-12-14 3:44 ` Vasco Visser
2006-12-14 21:25 ` Luca Tettamanti
-- strict thread matches above, loose matches on Subject: below --
2006-11-29 2:32 Jonathan deBoer
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=45614C80.5070303@redhat.com \
--to=csnook@redhat.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jacliburn@bellsouth.net \
--cc=jeff@garzik.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
--cc=shemminger@osdl.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 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.