qlcnic: Update poll controller code path
Add support for MSI/MSI-X mode in poll controller routine. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Shahed Shaikh <shahed.shaikh@qlogic.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2cc5752e49
commit
2b018ad9fe
|
@ -2925,17 +2925,39 @@ static irqreturn_t qlcnic_msix_tx_intr(int irq, void *data)
|
||||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
static void qlcnic_poll_controller(struct net_device *netdev)
|
static void qlcnic_poll_controller(struct net_device *netdev)
|
||||||
{
|
{
|
||||||
int ring;
|
|
||||||
struct qlcnic_host_sds_ring *sds_ring;
|
|
||||||
struct qlcnic_adapter *adapter = netdev_priv(netdev);
|
struct qlcnic_adapter *adapter = netdev_priv(netdev);
|
||||||
struct qlcnic_recv_context *recv_ctx = adapter->recv_ctx;
|
struct qlcnic_host_sds_ring *sds_ring;
|
||||||
|
struct qlcnic_recv_context *recv_ctx;
|
||||||
|
struct qlcnic_host_tx_ring *tx_ring;
|
||||||
|
int ring;
|
||||||
|
|
||||||
|
if (!test_bit(__QLCNIC_DEV_UP, &adapter->state))
|
||||||
|
return;
|
||||||
|
|
||||||
|
recv_ctx = adapter->recv_ctx;
|
||||||
|
|
||||||
disable_irq(adapter->irq);
|
|
||||||
for (ring = 0; ring < adapter->drv_sds_rings; ring++) {
|
for (ring = 0; ring < adapter->drv_sds_rings; ring++) {
|
||||||
sds_ring = &recv_ctx->sds_rings[ring];
|
sds_ring = &recv_ctx->sds_rings[ring];
|
||||||
qlcnic_intr(adapter->irq, sds_ring);
|
qlcnic_disable_sds_intr(adapter, sds_ring);
|
||||||
|
napi_schedule(&sds_ring->napi);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adapter->flags & QLCNIC_MSIX_ENABLED) {
|
||||||
|
/* Only Multi-Tx queue capable devices need to
|
||||||
|
* schedule NAPI for TX rings
|
||||||
|
*/
|
||||||
|
if ((qlcnic_83xx_check(adapter) &&
|
||||||
|
(adapter->flags & QLCNIC_TX_INTR_SHARED)) ||
|
||||||
|
(qlcnic_82xx_check(adapter) &&
|
||||||
|
!qlcnic_check_multi_tx(adapter)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (ring = 0; ring < adapter->drv_tx_rings; ring++) {
|
||||||
|
tx_ring = &adapter->tx_ring[ring];
|
||||||
|
qlcnic_disable_tx_intr(adapter, tx_ring);
|
||||||
|
napi_schedule(&tx_ring->napi);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
enable_irq(adapter->irq);
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue