OSDN Git Service

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[uclinux-h8/linux.git] / drivers / net / ethernet / broadcom / bnxt / bnxt_ethtool.c
index 9977757..adabbe9 100644 (file)
@@ -2727,6 +2727,7 @@ static int bnxt_poll_loopback(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
 static int bnxt_run_loopback(struct bnxt *bp)
 {
        struct bnxt_tx_ring_info *txr = &bp->tx_ring[0];
+       struct bnxt_rx_ring_info *rxr = &bp->rx_ring[0];
        struct bnxt_cp_ring_info *cpr;
        int pkt_size, i = 0;
        struct sk_buff *skb;
@@ -2734,7 +2735,9 @@ static int bnxt_run_loopback(struct bnxt *bp)
        u8 *data;
        int rc;
 
-       cpr = &txr->bnapi->cp_ring;
+       cpr = &rxr->bnapi->cp_ring;
+       if (bp->flags & BNXT_FLAG_CHIP_P5)
+               cpr = cpr->cp_ring_arr[BNXT_RX_HDL];
        pkt_size = min(bp->dev->mtu + ETH_HLEN, bp->rx_copy_thresh);
        skb = netdev_alloc_skb(bp->dev, pkt_size);
        if (!skb)