Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[cascardo/linux.git] / drivers / net / ethernet / broadcom / bnxt / bnxt_ethtool.c
index 0f7dd86..b83e174 100644 (file)
@@ -362,9 +362,13 @@ static void bnxt_get_channels(struct net_device *dev,
        channel->max_other = 0;
        if (bp->flags & BNXT_FLAG_SHARED_RINGS) {
                channel->combined_count = bp->rx_nr_rings;
+               if (BNXT_CHIP_TYPE_NITRO_A0(bp))
+                       channel->combined_count--;
        } else {
-               channel->rx_count = bp->rx_nr_rings;
-               channel->tx_count = bp->tx_nr_rings_per_tc;
+               if (!BNXT_CHIP_TYPE_NITRO_A0(bp)) {
+                       channel->rx_count = bp->rx_nr_rings;
+                       channel->tx_count = bp->tx_nr_rings_per_tc;
+               }
        }
 }
 
@@ -387,6 +391,10 @@ static int bnxt_set_channels(struct net_device *dev,
            (channel->rx_count || channel->tx_count))
                return -EINVAL;
 
+       if (BNXT_CHIP_TYPE_NITRO_A0(bp) && (channel->rx_count ||
+                                           channel->tx_count))
+               return -EINVAL;
+
        if (channel->combined_count)
                sh = true;
 
@@ -1684,7 +1692,7 @@ static int bnxt_get_module_eeprom(struct net_device *dev,
 {
        struct bnxt *bp = netdev_priv(dev);
        u16  start = eeprom->offset, length = eeprom->len;
-       int rc;
+       int rc = 0;
 
        memset(data, 0, eeprom->len);