]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
be2net: Fix INTx processing for Lancer
authorPadmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Mon, 19 Dec 2011 01:53:35 +0000 (01:53 +0000)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Mon, 7 May 2012 21:44:11 +0000 (14:44 -0700)
Lancer does not have HW registers to indicate the EQ causing the INTx
interrupt. As a result EQE entries of one EQ may be consumed when interrupt
is caused by another EQ. Fix this by arming CQs at the end of NAPI poll
routine to regenerate the EQEs.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/benet/be_main.c

index caf16b3299f14e1022bd47e05e6ef24663e29848..efe2c1e8abd3c7d9a29de5e6dccb20762b21cc7d 100644 (file)
@@ -1969,6 +1969,7 @@ static int be_poll_tx_mcc(struct napi_struct *napi, int budget)
        struct be_eq_obj *tx_eq = container_of(napi, struct be_eq_obj, napi);
        struct be_adapter *adapter =
                container_of(tx_eq, struct be_adapter, tx_eq);
+       struct be_mcc_obj *mcc_obj = &adapter->mcc_obj;
        struct be_tx_obj *txo;
        struct be_eth_tx_compl *txcp;
        int tx_compl, mcc_compl, status = 0;
@@ -2005,12 +2006,19 @@ static int be_poll_tx_mcc(struct napi_struct *napi, int budget)
        mcc_compl = be_process_mcc(adapter, &status);
 
        if (mcc_compl) {
-               struct be_mcc_obj *mcc_obj = &adapter->mcc_obj;
                be_cq_notify(adapter, mcc_obj->cq.id, true, mcc_compl);
        }
 
        napi_complete(napi);
 
+       /* Arm CQ again to regenerate EQEs for Lancer in INTx mode */
+       if (lancer_chip(adapter) && !msix_enabled(adapter)) {
+               for_all_tx_queues(adapter, txo, i)
+                       be_cq_notify(adapter, txo->cq.id, true, 0);
+
+               be_cq_notify(adapter, mcc_obj->cq.id, true, 0);
+       }
+
        be_eq_notify(adapter, tx_eq->q.id, true, false, 0);
        adapter->drv_stats.tx_events++;
        return 1;