On Thu, Jul 30, 2015 at 2:04 PM, Petri Gynther <[email protected]> wrote:
> On Thu, Jul 30, 2015 at 12:35 PM, Florian Fainelli <[email protected]>
> 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 <[email protected]>
>> ---
>> 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html