Skip to contentSkip to conversation

ixgbe: set the correct DCB bit for pg tx settings

PATCH Applied Jeff Kirsher 2 participants 4 messages Jan 28, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ixgbe: set the correct DCB bit for pg tx settings

From: John Fastabend <[email protected]>

Set the correct bit BIT_PG_TX when tx PG settings are set.

---

 drivers/net/ixgbe/ixgbe_dcb_nl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/ixgbe/ixgbe_dcb_nl.c +1 -1
index 56f37f6..383e799 100644
@@ -223,7 +223,7 @@ static void ixgbe_dcbnl_set_pg_bwg_cfg_tx(struct net_device *netdev, int bwg_id,
 
 	if (adapter->temp_dcb_cfg.bw_percentage[0][bwg_id] !=
 	    adapter->dcb_cfg.bw_percentage[0][bwg_id]) {
-		adapter->dcb_set_bitmap |= BIT_PG_RX;
+		adapter->dcb_set_bitmap |= BIT_PG_TX;
 		adapter->dcb_set_bitmap |= BIT_RESETLINK;
 	}
 }
#1 lore raw

PATCH 2/2 ixgbe: if ixgbe_copy_dcb_cfg is going to fail learn about it early

From: John Fastabend <[email protected]>

Call ixgbe_copy_dcb_cfg() earlier in the ixgbe_dcbnl_set_all() so that we can learn if this is going to fail as early as possible. Previously, ixgbe_down or ixgbe_close were being called before this check and the IXGBE_RESETTING bit was being set and cleared. Worse if this failed the corresponding ixgbe_up/ndo_open would not called.

---

 drivers/net/ixgbe/ixgbe_dcb_nl.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)
drivers/net/ixgbe/ixgbe_dcb_nl.c +6 -8
index 383e799..dd4883f 100644
@@ -341,6 +341,12 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
 	if (!adapter->dcb_set_bitmap)
 		return DCB_NO_HW_CHG;
 
+	ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg,
+				 adapter->ring_feature[RING_F_DCB].indices);
+
+	if (ret)
+		return DCB_NO_HW_CHG;
+
 	/*
 	 * Only take down the adapter if the configuration change
 	 * requires a reset.
@@ -359,14 +365,6 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
 		}
 	}
 
-	ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg,
-				 adapter->ring_feature[RING_F_DCB].indices);
-	if (ret) {
-		if (adapter->dcb_set_bitmap & BIT_RESETLINK)
-			clear_bit(__IXGBE_RESETTING, &adapter->state);
-		return DCB_NO_HW_CHG;
-	}
-
 	if (adapter->dcb_cfg.pfc_mode_enable) {
 		if ((adapter->hw.mac.type != ixgbe_mac_82598EB) &&
 			(adapter->hw.fc.current_mode != ixgbe_fc_pfc))
maintainer Applied
#2 lore raw

Re: [net-2.6 PATCH 2/2] ixgbe: if ixgbe_copy_dcb_cfg is going to fail learn about it early

From: Jeff Kirsher <[email protected]>
Date: Wed, 27 Jan 2010 18:38:06 -0800

Quoted 11 lines

From: John Fastabend <[email protected]>

Call ixgbe_copy_dcb_cfg() earlier in the ixgbe_dcbnl_set_all() so that we can learn if this is going to fail as early as possible. Previously, ixgbe_down or ixgbe_close were being called before this check and the IXGBE_RESETTING bit was being set and cleared. Worse if this failed the corresponding ixgbe_up/ndo_open would not called.

Applied.