All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jaccon Bastiaansen <jaccon.bastiaansen@gmail.com>
Cc: netdev@vger.kernel.org,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	kernel@pengutronix.de
Subject: Re: [PATCH V2] Add platform driver support to the CS890x driver
Date: Thu, 3 Nov 2011 09:06:15 +0100	[thread overview]
Message-ID: <20111103080615.GD16886@pengutronix.de> (raw)
In-Reply-To: <CAGzjT4eKJCf36_n-W-XpiFUymUZj=tVzXYp2DNJFXb-Wjz6RVA@mail.gmail.com>

Hi Jaccon,

On Sun, Oct 09, 2011 at 10:51:23PM +0200, Jaccon Bastiaansen wrote:
> Hello,
> 
> This patch hasn't been sent to the netdev mailing list before, sorry for that.

I appreciate what you are trying to do. The cs89x0 is still not dead and
it's quite annoying that we do not have proper platform device driver
support for it. Unfortunately your patch was ignored by the important
people, so can you respin it? You should create a proper series from it
with one patch for the driver and one patch per board. This helps to
increase your visibility and also you can set the individual board
maintainers on Cc for their board. Please also Cc
netdev@vger.kernel.org and the arm linux kernel mailing list.
Your patch also contains some cleanups like the removal of the unused
QQ2440. You should create a seperate patch for this, then it will be
easier to review (and also people love to read 'cleanup' in a patch
subject ;)

Your mailer turns tabs into spaces, you should fix this before
resending.

Some more comments inline.


> 
> +static struct resource ixdp2x01_cs8900_resources[] = {
> +       {
> +               .start  = (u32)IXDP2X01_CS8900_VIRT_BASE,
> +               .end    = (u32)IXDP2X01_CS8900_VIRT_BASE + 0x1000 - 1,
> +               .flags  = IORESOURCE_MEM,
> +       },

This is wrong. resources are about physical addresses, not virtual. You
have to ioremap them in the driver.

> diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
> index 537a4b2..b7fb3bc 100644
> --- a/drivers/net/cs89x0.c
> +++ b/drivers/net/cs89x0.c
> @@ -12,6 +12,14 @@
>         The author may be reached at nelson@crynwr.com, Crynwr
>         Software, 521 Pleasant Valley Rd., Potsdam, NY 13676
> 
> +Sources
> +
> +       Crynwr packet driver epktisa.
> +
> +       Crystal Semiconductor data sheets.
> +
> +
> +

This seems unrelated to this patch. Please drop.

>   Changelog:
> 
>   Mike Cruse        : mcruse@cti-ltd.com
> @@ -98,39 +106,14 @@
>   Domenico Andreoli : cavokz@gmail.com
>                     : QQ2440 platform support
> 
> +  Jaccon Bastiaansen: jaccon.bastiaansen@gmail.com
> +                   : added platform driver support

The history in git is enough (and even better) than the changelog in the
file headers. Please drop this.

> +
> +#ifdef CONFIG_CS89x0_PLATFORM
> +static int cs89x0_platform_probe(struct platform_device *pdev)
> +{
> +       struct net_device *dev = alloc_etherdev(sizeof(struct net_local));
> +       struct resource *mem_res;
> +       struct resource *irq_res;
> +       int err;
> +
> +       if (!dev)
> +               return -ENODEV;
> +
> +       mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +       irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
> +       if (mem_res == NULL || irq_res == NULL) {
> +               pr_warning("memory and/or interrupt resource missing.\n");
> +               err = -ENOENT;
> +               goto out;
> +       }
> +
> +       cs8900_irq_map[0] = irq_res->start;

This limits the driver to a single instance. I think this is ok for now
as an intermediate step, but you should check this and bail out with
-EBUSY if a second instance is registered.

> +       err = cs89x0_probe1(dev, mem_res->start, 0);
> +       if (err) {
> +               pr_warning("no cs8900 or cs8920 detected.\n");
> +               goto out;
> +       }
> +
> +       platform_set_drvdata(pdev, dev);
> +       return 0;
> +out:
> +       free_netdev(dev);
> +       return err;
> +}

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2011-11-03  8:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 10:22 [PATCH] Add platform driver support to the CS890x driver Jaccon Bastiaansen
2011-09-07 12:50 ` Uwe Kleine-König
2011-09-10 11:37   ` Jaccon Bastiaansen
2011-09-10 14:12     ` Uwe Kleine-König
2011-09-11 17:34       ` Jaccon Bastiaansen
2011-09-11 18:53         ` Uwe Kleine-König
2011-09-12 10:52           ` Jaccon Bastiaansen
2011-09-12 12:30             ` Uwe Kleine-König
     [not found]             ` <20110928083048.GA15311@glitch.intra.local>
2011-09-30  9:01               ` Jaccon Bastiaansen
2011-10-01 17:13                 ` Russell King - ARM Linux
2011-10-12 14:28                   ` Domenico Andreoli
2011-09-13  7:44   ` Sascha Hauer
2011-09-13  7:46     ` Uwe Kleine-König
2011-09-27 18:27       ` [PATCH V2] " Jaccon Bastiaansen
2011-10-09 20:51         ` Jaccon Bastiaansen
2011-11-03  8:06           ` Sascha Hauer [this message]
2011-11-07 12:14             ` Jaccon Bastiaansen

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=20111103080615.GD16886@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=jaccon.bastiaansen@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.