Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 890558 Details for
Bug 1067126
Virt-manager doesn't configure bridge for VM
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Test patch 2 - with return value added
I217_RAR_V2.patch (text/plain), 6.64 KB, created by
Dave Ertman
on 2014-04-28 18:46:22 UTC
(
hide
)
Description:
Test patch 2 - with return value added
Filename:
MIME Type:
Creator:
Dave Ertman
Created:
2014-04-28 18:46:22 UTC
Size:
6.64 KB
patch
obsolete
>[FIX] Failure to write SHRA turns on PROMISC mode > >From: Dave Ertman <davidx.m.ertman@intel.com> > >Previously, the check to turn on promiscuous mode only took into account >the total number of SHared Receive Address registers and if we were requesting >one within that range. It is possible that the Management Engine might have >locked the requested SHRA and not allowed a new address to be written. > >This patch adds a return value to the function attempting to write an >address to a SHRA, and it will return a -ENOMEM error if the write fails. >The error code will be passed up the chain and allow the driver to set >UNICAST PROMISC when this happens. > >Signed-off-by: Dave Ertman <davidx.m.ertman@intel.com> >--- > drivers/net/ethernet/intel/e1000e/hw.h | 2 +- > drivers/net/ethernet/intel/e1000e/ich8lan.c | 19 +++++++++++-------- > drivers/net/ethernet/intel/e1000e/mac.c | 4 +++- > drivers/net/ethernet/intel/e1000e/mac.h | 2 +- > drivers/net/ethernet/intel/e1000e/netdev.c | 6 +++++- > 5 files changed, 21 insertions(+), 12 deletions(-) > >diff --git a/drivers/net/ethernet/intel/e1000e/hw.h b/drivers/net/ethernet/intel/e1000e/hw.h >index 6b3de5f..9372f0f 100644 >--- a/drivers/net/ethernet/intel/e1000e/hw.h >+++ b/drivers/net/ethernet/intel/e1000e/hw.h >@@ -469,7 +469,7 @@ struct e1000_mac_operations { > s32 (*setup_led)(struct e1000_hw *); > void (*write_vfta)(struct e1000_hw *, u32, u32); > void (*config_collision_dist)(struct e1000_hw *); >- void (*rar_set)(struct e1000_hw *, u8 *, u32); >+ int (*rar_set)(struct e1000_hw *, u8 *, u32); > s32 (*read_mac_addr)(struct e1000_hw *); > }; > >diff --git a/drivers/net/ethernet/intel/e1000e/ich8lan.c b/drivers/net/ethernet/intel/e1000e/ich8lan.c >index 74d9341..32cda68 100644 >--- a/drivers/net/ethernet/intel/e1000e/ich8lan.c >+++ b/drivers/net/ethernet/intel/e1000e/ich8lan.c >@@ -139,8 +139,8 @@ static s32 e1000_k1_gig_workaround_hv(struct e1000_hw *hw, bool link); > static s32 e1000_set_mdio_slow_mode_hv(struct e1000_hw *hw); > static bool e1000_check_mng_mode_ich8lan(struct e1000_hw *hw); > static bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw); >-static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index); >-static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index); >+static int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index); >+static int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index); > static s32 e1000_k1_workaround_lv(struct e1000_hw *hw); > static void e1000_gate_hw_phy_config_ich8lan(struct e1000_hw *hw, bool gate); > static s32 e1000_disable_ulp_lpt_lp(struct e1000_hw *hw, bool force); >@@ -1655,7 +1655,7 @@ static bool e1000_check_mng_mode_pchlan(struct e1000_hw *hw) > * contain the MAC address but RAR[1-6] are reserved for manageability (ME). > * Use SHRA[0-3] in place of those reserved for ME. > **/ >-static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index) >+static int e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index) > { > u32 rar_low, rar_high; > >@@ -1677,7 +1677,7 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index) > e1e_flush(); > ew32(RAH(index), rar_high); > e1e_flush(); >- return; >+ return 0; > } > > /* RAR[1-6] are owned by manageability. Skip those and program the >@@ -1700,14 +1700,16 @@ static void e1000_rar_set_pch2lan(struct e1000_hw *hw, u8 *addr, u32 index) > /* verify the register updates */ > if ((er32(SHRAL(index - 1)) == rar_low) && > (er32(SHRAH(index - 1)) == rar_high)) >- return; >+ return 0; > > e_dbg("SHRA[%d] might be locked by ME - FWSM=0x%8.8x\n", > (index - 1), er32(FWSM)); >+ return -ENOMEM; > } > > out: > e_dbg("Failed to write receive address at index %d\n", index); >+ return -ENOMEM; > } > > /** >@@ -1721,7 +1723,7 @@ out: > * contain the MAC address. SHRA[0-10] are the shared receive address > * registers that are shared between the Host and manageability engine (ME). > **/ >-static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index) >+static int e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index) > { > u32 rar_low, rar_high; > u32 wlock_mac; >@@ -1743,7 +1745,7 @@ static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index) > e1e_flush(); > ew32(RAH(index), rar_high); > e1e_flush(); >- return; >+ return 0; > } > > /* The manageability engine (ME) can lock certain SHRAR registers that >@@ -1775,12 +1777,13 @@ static void e1000_rar_set_pch_lpt(struct e1000_hw *hw, u8 *addr, u32 index) > /* verify the register updates */ > if ((er32(SHRAL_PCH_LPT(index - 1)) == rar_low) && > (er32(SHRAH_PCH_LPT(index - 1)) == rar_high)) >- return; >+ return 0; > } > } > > out: > e_dbg("Failed to write receive address at index %d\n", index); >+ return -ENOMEM; > } > > /** >diff --git a/drivers/net/ethernet/intel/e1000e/mac.c b/drivers/net/ethernet/intel/e1000e/mac.c >index baa0a46..b422a79 100644 >--- a/drivers/net/ethernet/intel/e1000e/mac.c >+++ b/drivers/net/ethernet/intel/e1000e/mac.c >@@ -220,7 +220,7 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw) > * Sets the receive address array register at index to the address passed > * in by addr. > **/ >-void e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index) >+int e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index) > { > u32 rar_low, rar_high; > >@@ -244,6 +244,8 @@ void e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index) > e1e_flush(); > ew32(RAH(index), rar_high); > e1e_flush(); >+ >+ return 0; > } > > /** >diff --git a/drivers/net/ethernet/intel/e1000e/mac.h b/drivers/net/ethernet/intel/e1000e/mac.h >index 4e81c28..a45076f 100644 >--- a/drivers/net/ethernet/intel/e1000e/mac.h >+++ b/drivers/net/ethernet/intel/e1000e/mac.h >@@ -61,7 +61,7 @@ void e1000e_update_adaptive(struct e1000_hw *hw); > void e1000_write_vfta_generic(struct e1000_hw *hw, u32 offset, u32 value); > > void e1000_set_lan_id_multi_port_pcie(struct e1000_hw *hw); >-void e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index); >+int e1000e_rar_set_generic(struct e1000_hw *hw, u8 *addr, u32 index); > void e1000e_config_collision_dist_generic(struct e1000_hw *hw); > > #endif >diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c >index e4207ef..35bc2c6 100644 >--- a/drivers/net/ethernet/intel/e1000e/netdev.c >+++ b/drivers/net/ethernet/intel/e1000e/netdev.c >@@ -3332,9 +3332,13 @@ static int e1000e_write_uc_addr_list(struct net_device *netdev) > * combining > */ > netdev_for_each_uc_addr(ha, netdev) { >+ int rval; >+ > if (!rar_entries) > break; >- hw->mac.ops.rar_set(hw, ha->addr, rar_entries--); >+ rval = hw->mac.ops.rar_set(hw, ha->addr, rar_entries--); >+ if (rval < 0) >+ return -ENOMEM; > count++; > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1067126
:
870010
|
870491
|
885015
| 890558 |
891627
|
891643