netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bryan Wu <bryan.wu@analog.com>
To: Michael Buesch <mb@bu3sch.de>
Cc: bryan.wu@analog.com, Jeff Garzik <jeff@garzik.org>,
	LKML <linux-kernel@vger.kernel.org>,
	netdev@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/3] Blackfin ethernet driver: on chip ethernet MAC controller driver
Date: Sun, 15 Jul 2007 17:52:30 +0800	[thread overview]
Message-ID: <1184493150.3140.65.camel@roc-laptop> (raw)
In-Reply-To: <200707151136.05223.mb@bu3sch.de>

On Sun, 2007-07-15 at 11:36 +0200, Michael Buesch wrote:
> On Sunday 15 July 2007 11:16:56 Bryan Wu wrote:
> > In current Blackfin DMA allocation/free, the return value from 
> > bfin_mac_alloc() is used as the dma_handle, here it is the
> > tx_desc/rx_desc. 
> > The "dma_handle" is useless in the following code.
> 
> I think a comment has to be added, at least, as it's very confusing.

No problem, it should be.
> 
> > This is some magic code for PHY ID. In the future, we will rewrite some
> > code based on kernel phy abstraction layer to support more phy device.
> 
> Ok, nice idea.
> 
> > > Unwind the allocations above, if registering fails.
> > > 
> > 
> > In fact, it is safe. Because if registering fails, bf537mac_probe will
> > return none zero to bfin_mac_probe which will do free_netdev.
> 
> Hm, weren't there some DMA allocations, too? Are they free'd properly?
> 

Oh, the DMA allocation happens in bf537mac_open not in bf537mac_probe.
so when registering fails, only free_netdev should be ok.

I sent out a new driver patch for #2 try, please give us some comments

Thanks
- Bryan Wu

  reply	other threads:[~2007-07-15  9:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-14 18:49 [PATCH 1/3] Blackfin ethernet driver: on chip ethernet MAC controller driver Bryan Wu
2007-07-14 19:38 ` Michael Buesch
2007-07-14 19:49   ` Mike Frysinger
2007-07-14 20:17     ` Michael Buesch
2007-07-14 20:33       ` Jeff Garzik
2007-07-14 20:38       ` Mike Frysinger
2007-07-15 13:04         ` Dan Williams
2007-07-15 13:55           ` Bryan Wu
2007-07-15  9:16   ` Bryan Wu
2007-07-15  9:36     ` Michael Buesch
2007-07-15  9:52       ` Bryan Wu [this message]
2007-07-15 13:12 ` Dan Williams
2007-07-15 15:09   ` Bryan Wu

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=1184493150.3140.65.camel@roc-laptop \
    --to=bryan.wu@analog.com \
    --cc=akpm@linux-foundation.org \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --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;
as well as URLs for NNTP newsgroup(s).