[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAGXr9JE3R_h=JnZvfu91aVhAkn8A56mekGY2k_vyRE0ei5vuBA@mail.gmail.com>
Date: Thu, 30 Jul 2015 15:43:17 -0700
From: Petri Gynther <pgynther@...gle.com>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: netdev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Jaedon Shin <jaedon.shin@...il.com>,
vivien.didelot@...oirfairelinux.com,
jerome.oufella@...oirfairelinux.com, linux@...ck-us.net,
andrew@...n.ch, cphealy@...il.com, mathieu@...eaurora.org,
jonasj76@...il.com, andrey.volkov@...vision.fr,
Chris.Packham@...iedtelesis.co.nz, alexander.h.duyck@...hat.com
Subject: Re: [PATCH net-next 1/4] net: bcmgenet: Add netconsole support
On Thu, Jul 30, 2015 at 2:04 PM, Petri Gynther <pgynther@...gle.com> wrote:
> On Thu, Jul 30, 2015 at 12:35 PM, Florian Fainelli <f.fainelli@...il.com>
> wrote:
>>
>> Implement a poll controller for netconsole which invokes the RX
>> interrupt handler to poll for incoming packets, and cleans up all TX
>> queues.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
>> ---
>> drivers/net/ethernet/broadcom/genet/bcmgenet.c | 13 +++++++++++++
>> 1 file changed, 13 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
>> b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
>> index c6f2d396edf0..544160f39c1b 100644
>> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
>> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
>> @@ -2388,6 +2388,16 @@ static irqreturn_t bcmgenet_wol_isr(int irq, void
>> *dev_id)
>> return IRQ_HANDLED;
>> }
>>
>> +#ifdef CONFIG_NET_POLL_CONTROLLER
>> +static void bcmgenet_poll_controller(struct net_device *dev)
>> +{
>> + struct bcmgenet_priv *priv = netdev_priv(dev);
>> +
>> + bcmgenet_isr0(priv->irq0, priv);
>
>
> Need to add here:
> bcmgenet_isr1(priv->irq1, priv);
>
> for handling Rx + Tx priority queues.
>
>>
>> + bcmgenet_tx_reclaim_all(dev);
Do you need the above call to bcmgenet_tx_reclaim_all()?
bcmgenet_isr0() and bcmgenet_isr1() will schedule NAPI handlers for
all Rx and Tx queues that need it.
>> +}
>> +#endif
>> +
>> static void bcmgenet_umac_reset(struct bcmgenet_priv *priv)
>> {
>> u32 reg;
>> @@ -2939,6 +2949,9 @@ static const struct net_device_ops
>> bcmgenet_netdev_ops = {
>> .ndo_set_mac_address = bcmgenet_set_mac_addr,
>> .ndo_do_ioctl = bcmgenet_ioctl,
>> .ndo_set_features = bcmgenet_set_features,
>> +#ifdef CONFIG_NET_POLL_CONTROLLER
>> + .ndo_poll_controller = bcmgenet_poll_controller,
>> +#endif
>> };
>>
>> /* Array of GENET hardware parameters/characteristics */
>> --
>> 2.1.0
>>
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists