mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-17 02:56:47 +07:00
e1000: Made an adapter struct variable into a local (txb2b)
Made an adapter struct variable into a local (txb2b) Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: John Ronciak <john.ronciak@intel.com>
This commit is contained in:
parent
e619d52349
commit
fe7fe28ea5
@ -334,7 +334,6 @@ struct e1000_adapter {
|
|||||||
boolean_t have_msi;
|
boolean_t have_msi;
|
||||||
#endif
|
#endif
|
||||||
/* to not mess up cache alignment, always add to the bottom */
|
/* to not mess up cache alignment, always add to the bottom */
|
||||||
boolean_t txb2b;
|
|
||||||
#ifdef NETIF_F_TSO
|
#ifdef NETIF_F_TSO
|
||||||
boolean_t tso_force;
|
boolean_t tso_force;
|
||||||
#endif
|
#endif
|
||||||
|
@ -2247,6 +2247,7 @@ e1000_watchdog_task(struct e1000_adapter *adapter)
|
|||||||
|
|
||||||
if (link) {
|
if (link) {
|
||||||
if (!netif_carrier_ok(netdev)) {
|
if (!netif_carrier_ok(netdev)) {
|
||||||
|
boolean_t txb2b = 1;
|
||||||
e1000_get_speed_and_duplex(&adapter->hw,
|
e1000_get_speed_and_duplex(&adapter->hw,
|
||||||
&adapter->link_speed,
|
&adapter->link_speed,
|
||||||
&adapter->link_duplex);
|
&adapter->link_duplex);
|
||||||
@ -2260,15 +2261,14 @@ e1000_watchdog_task(struct e1000_adapter *adapter)
|
|||||||
* and adjust the timeout factor */
|
* and adjust the timeout factor */
|
||||||
netdev->tx_queue_len = adapter->tx_queue_len;
|
netdev->tx_queue_len = adapter->tx_queue_len;
|
||||||
adapter->tx_timeout_factor = 1;
|
adapter->tx_timeout_factor = 1;
|
||||||
adapter->txb2b = 1;
|
|
||||||
switch (adapter->link_speed) {
|
switch (adapter->link_speed) {
|
||||||
case SPEED_10:
|
case SPEED_10:
|
||||||
adapter->txb2b = 0;
|
txb2b = 0;
|
||||||
netdev->tx_queue_len = 10;
|
netdev->tx_queue_len = 10;
|
||||||
adapter->tx_timeout_factor = 8;
|
adapter->tx_timeout_factor = 8;
|
||||||
break;
|
break;
|
||||||
case SPEED_100:
|
case SPEED_100:
|
||||||
adapter->txb2b = 0;
|
txb2b = 0;
|
||||||
netdev->tx_queue_len = 100;
|
netdev->tx_queue_len = 100;
|
||||||
/* maybe add some timeout factor ? */
|
/* maybe add some timeout factor ? */
|
||||||
break;
|
break;
|
||||||
@ -2276,7 +2276,7 @@ e1000_watchdog_task(struct e1000_adapter *adapter)
|
|||||||
|
|
||||||
if ((adapter->hw.mac_type == e1000_82571 ||
|
if ((adapter->hw.mac_type == e1000_82571 ||
|
||||||
adapter->hw.mac_type == e1000_82572) &&
|
adapter->hw.mac_type == e1000_82572) &&
|
||||||
adapter->txb2b == 0) {
|
txb2b == 0) {
|
||||||
#define SPEED_MODE_BIT (1 << 21)
|
#define SPEED_MODE_BIT (1 << 21)
|
||||||
uint32_t tarc0;
|
uint32_t tarc0;
|
||||||
tarc0 = E1000_READ_REG(&adapter->hw, TARC0);
|
tarc0 = E1000_READ_REG(&adapter->hw, TARC0);
|
||||||
|
Loading…
Reference in New Issue
Block a user