linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Iyappan Subramanian <isubramanian@apm.com>
To: Mark Salter <msalter@redhat.com>
Cc: David Miller <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"jcm@redhat.com" <jcm@redhat.com>,
	Greg KH <gregkh@linuxfoundation.org>, patches <patches@apm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Keyur Chudgar <kchudgar@apm.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	Ravi Patel <rapatel@apm.com>
Subject: Re: [PATCH v4 4/4] drivers: net: Add APM X-Gene SoC ethernet driver support.
Date: Fri, 16 May 2014 10:30:24 -0700	[thread overview]
Message-ID: <CAKh23FnAJZ-fa06WtCjJ+Of3_cDPypb+kgFFbWMy2-twjQhuPg@mail.gmail.com> (raw)
In-Reply-To: <1400258705.21547.217.camel@deneb.redhat.com>

On Fri, May 16, 2014 at 9:45 AM, Mark Salter <msalter@redhat.com> wrote:
> On Mon, 2014-05-05 at 14:47 -0700, Iyappan Subramanian wrote:
>> +static int xgene_enet_probe(struct platform_device *pdev)
>> +{
>> +       struct net_device *ndev;
>> +       struct xgene_enet_pdata *pdata;
>> +       struct device *dev = &pdev->dev;
>> +       struct napi_struct *napi;
>> +       int ret = 0;
>> +
>> +       ndev = alloc_etherdev(sizeof(struct xgene_enet_pdata));
>> +       if (!ndev)
>> +               return -ENOMEM;
>> +
>> +       pdata = netdev_priv(ndev);
>> +
>> +       pdata->pdev = pdev;
>> +       pdata->ndev = ndev;
>> +       SET_NETDEV_DEV(ndev, dev);
>> +       platform_set_drvdata(pdev, pdata);
>> +       ndev->netdev_ops = &xgene_ndev_ops;
>> +       ndev->features |= NETIF_F_IP_CSUM;
>> +       ndev->features |= NETIF_F_GSO;
>> +       ndev->features |= NETIF_F_GRO;
>> +
>
> You're missing:
>
>          spin_lock_init(&pdata->stats_lock);

I really appreciate the help.  This fixed the crash.

>
> Lockdep (if enabled) complains:
>
>  xgene_enet_probe: 852
>  INFO: trying to register non-static key.
>  the code is fine but needs lockdep annotation.
>  turning off the locking correctness validator.
>  CPU: 4 PID: 1 Comm: swapper/0 Not tainted 3.15.0-rc4+ #13
>  Call trace:
>  [<ffffffc000087ef4>] dump_backtrace+0x0/0x16c
>  [<ffffffc000088070>] show_stack+0x10/0x1c
>  [<ffffffc000766b04>] dump_stack+0x88/0xb8
>  [<ffffffc00010243c>] __lock_acquire+0x1914/0x1ce0
>  [<ffffffc000102fa0>] lock_acquire+0x9c/0x1d0
>  [<ffffffc00076d418>] _raw_spin_lock+0x40/0x58
>  [<ffffffc0004fced0>] xgene_enet_get_stats+0x34/0x140
>  [<ffffffc0005fd7dc>] dev_get_stats+0x90/0xbc
>  [<ffffffc00061736c>] rtnl_fill_ifinfo+0x388/0x8e4
>  [<ffffffc000617938>] rtmsg_ifinfo+0x70/0x10c
>  [<ffffffc000609e98>] register_netdevice+0x370/0x400
>  [<ffffffc000609f3c>] register_netdev+0x14/0x2c
>  [<ffffffc0004fd7ec>] xgene_enet_probe+0x1cc/0x618
>  [<ffffffc0004a1928>] platform_drv_probe+0x28/0x80
>  [<ffffffc00049fc38>] driver_probe_device+0x98/0x3ac
>  [<ffffffc0004a0040>] __driver_attach+0xa0/0xa8
>  [<ffffffc00049dd78>] bus_for_each_dev+0x54/0x98
>  [<ffffffc00049f65c>] driver_attach+0x1c/0x28
>  [<ffffffc00049f234>] bus_add_driver+0x164/0x240
>  [<ffffffc0004a06b8>] driver_register+0x64/0x130
>  [<ffffffc0004a187c>] __platform_driver_register+0x5c/0x68
>  [<ffffffc000c08e14>] xgene_enet_driver_init+0x14/0x20
>  [<ffffffc000081418>] do_one_initcall+0xc4/0x154
>  [<ffffffc000bd2a74>] kernel_init_freeable+0x204/0x2a8
>  [<ffffffc00075e8a0>] kernel_init+0xc/0xd4
>
>> +       ret = xgene_enet_get_resources(pdata);
>> +       if (ret)
>> +               goto err;
>> +
>> +       ret = register_netdev(ndev);
>
>

  reply	other threads:[~2014-05-16 17:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-05 21:47 [PATCH v4 0/4] net: Add APM X-Gene SoC Ethernet driver support Iyappan Subramanian
2014-05-05 21:47 ` [PATCH v4 1/4] MAINTAINERS: Add entry for APM X-Gene SoC ethernet driver Iyappan Subramanian
2014-05-05 21:47 ` [PATCH v4 2/4] Documentation: dts: Add bindings " Iyappan Subramanian
2014-05-05 21:57   ` Florian Fainelli
2014-06-02 18:33     ` Iyappan Subramanian
2014-05-05 21:47 ` [PATCH v4 3/4] " Iyappan Subramanian
2014-05-05 21:47 ` [PATCH v4 4/4] drivers: net: Add APM X-Gene SoC ethernet driver support Iyappan Subramanian
2014-05-05 22:17   ` Florian Fainelli
2014-05-30  1:19     ` Iyappan Subramanian
2014-05-14 15:18   ` Dean Nelson
2014-05-29 23:48     ` Iyappan Subramanian
2014-05-16 16:45   ` Mark Salter
2014-05-16 17:30     ` Iyappan Subramanian [this message]
2014-05-13  4:24 ` [PATCH v4 0/4] net: Add APM X-Gene SoC Ethernet " Ming Lei
2014-05-22  7:41   ` Iyappan Subramanian

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=CAKh23FnAJZ-fa06WtCjJ+Of3_cDPypb+kgFFbWMy2-twjQhuPg@mail.gmail.com \
    --to=isubramanian@apm.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jcm@redhat.com \
    --cc=kchudgar@apm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=msalter@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=patches@apm.com \
    --cc=rapatel@apm.com \
    /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).