Loading drivers/net/ethernet/intel/e1000/e1000_main.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -3380,7 +3380,7 @@ static void e1000_dump(struct e1000_adapter *adapter) for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) { for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) { struct e1000_tx_desc *tx_desc = E1000_TX_DESC(*tx_ring, i); struct e1000_tx_desc *tx_desc = E1000_TX_DESC(*tx_ring, i); struct e1000_buffer *buffer_info = &tx_ring->buffer_info[i]; struct e1000_buffer *buffer_info = &tx_ring->buffer_info[i]; struct my_u { u64 a; u64 b; }; struct my_u { __le64 a; __le64 b; }; struct my_u *u = (struct my_u *)tx_desc; struct my_u *u = (struct my_u *)tx_desc; const char *type; const char *type; Loading Loading @@ -3424,7 +3424,7 @@ rx_ring_summary: for (i = 0; rx_ring->desc && (i < rx_ring->count); i++) { for (i = 0; rx_ring->desc && (i < rx_ring->count); i++) { struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rx_ring, i); struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rx_ring, i); struct e1000_buffer *buffer_info = &rx_ring->buffer_info[i]; struct e1000_buffer *buffer_info = &rx_ring->buffer_info[i]; struct my_u { u64 a; u64 b; }; struct my_u { __le64 a; __le64 b; }; struct my_u *u = (struct my_u *)rx_desc; struct my_u *u = (struct my_u *)rx_desc; const char *type; const char *type; Loading drivers/net/ethernet/intel/igb/igb_main.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2771,8 +2771,6 @@ void igb_configure_tx_ring(struct igb_adapter *adapter, txdctl |= E1000_TXDCTL_QUEUE_ENABLE; txdctl |= E1000_TXDCTL_QUEUE_ENABLE; wr32(E1000_TXDCTL(reg_idx), txdctl); wr32(E1000_TXDCTL(reg_idx), txdctl); netdev_tx_reset_queue(txring_txq(ring)); } } /** /** Loading Loading @@ -3282,6 +3280,8 @@ static void igb_clean_tx_ring(struct igb_ring *tx_ring) igb_unmap_and_free_tx_resource(tx_ring, buffer_info); igb_unmap_and_free_tx_resource(tx_ring, buffer_info); } } netdev_tx_reset_queue(txring_txq(tx_ring)); size = sizeof(struct igb_tx_buffer) * tx_ring->count; size = sizeof(struct igb_tx_buffer) * tx_ring->count; memset(tx_ring->tx_buffer_info, 0, size); memset(tx_ring->tx_buffer_info, 0, size); Loading drivers/net/ethernet/intel/ixgbe/ixgbe.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -574,9 +574,6 @@ extern struct ixgbe_info ixgbe_82599_info; extern struct ixgbe_info ixgbe_X540_info; extern struct ixgbe_info ixgbe_X540_info; #ifdef CONFIG_IXGBE_DCB #ifdef CONFIG_IXGBE_DCB extern const struct dcbnl_rtnl_ops dcbnl_ops; extern const struct dcbnl_rtnl_ops dcbnl_ops; extern int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg, struct ixgbe_dcb_config *dst_dcb_cfg, int tc_max); #endif #endif extern char ixgbe_driver_name[]; extern char ixgbe_driver_name[]; Loading drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c +20 −23 Original line number Original line Diff line number Diff line Loading @@ -44,18 +44,26 @@ #define DCB_NO_HW_CHG 1 /* DCB configuration did not change */ #define DCB_NO_HW_CHG 1 /* DCB configuration did not change */ #define DCB_HW_CHG 2 /* DCB configuration changed, no reset */ #define DCB_HW_CHG 2 /* DCB configuration changed, no reset */ int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *scfg, static int ixgbe_copy_dcb_cfg(struct ixgbe_adapter *adapter, int tc_max) struct ixgbe_dcb_config *dcfg, int tc_max) { { struct ixgbe_dcb_config *scfg = &adapter->temp_dcb_cfg; struct ixgbe_dcb_config *dcfg = &adapter->dcb_cfg; struct tc_configuration *src = NULL; struct tc_configuration *src = NULL; struct tc_configuration *dst = NULL; struct tc_configuration *dst = NULL; int i, j; int i, j; int tx = DCB_TX_CONFIG; int tx = DCB_TX_CONFIG; int rx = DCB_RX_CONFIG; int rx = DCB_RX_CONFIG; int changes = 0; int changes = 0; #ifdef IXGBE_FCOE struct dcb_app app = { .selector = DCB_APP_IDTYPE_ETHTYPE, .protocol = ETH_P_FCOE, }; u8 up = dcb_getapp(adapter->netdev, &app); if (!scfg || !dcfg) if (up && !(up & (1 << adapter->fcoe.up))) return changes; changes |= BIT_APP_UPCHG; #endif for (i = DCB_PG_ATTR_TC_0; i < tc_max + DCB_PG_ATTR_TC_0; i++) { for (i = DCB_PG_ATTR_TC_0; i < tc_max + DCB_PG_ATTR_TC_0; i++) { src = &scfg->tc_config[i - DCB_PG_ATTR_TC_0]; src = &scfg->tc_config[i - DCB_PG_ATTR_TC_0]; Loading Loading @@ -332,28 +340,12 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev); int ret = DCB_NO_HW_CHG; int ret = DCB_NO_HW_CHG; int i; int i; #ifdef IXGBE_FCOE struct dcb_app app = { .selector = DCB_APP_IDTYPE_ETHTYPE, .protocol = ETH_P_FCOE, }; u8 up; /* In IEEE mode, use the IEEE Ethertype selector value */ if (adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) { app.selector = IEEE_8021QAZ_APP_SEL_ETHERTYPE; up = dcb_ieee_getapp_mask(netdev, &app); } else { up = dcb_getapp(netdev, &app); } #endif /* Fail command if not in CEE mode */ /* Fail command if not in CEE mode */ if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) return ret; return ret; adapter->dcb_set_bitmap |= ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, adapter->dcb_set_bitmap |= ixgbe_copy_dcb_cfg(adapter, &adapter->dcb_cfg, MAX_TRAFFIC_CLASS); MAX_TRAFFIC_CLASS); if (!adapter->dcb_set_bitmap) if (!adapter->dcb_set_bitmap) return ret; return ret; Loading Loading @@ -440,8 +432,13 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) * FCoE is using changes. This happens if the APP info * FCoE is using changes. This happens if the APP info * changes or the up2tc mapping is updated. * changes or the up2tc mapping is updated. */ */ if ((up && !(up & (1 << adapter->fcoe.up))) || if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { (adapter->dcb_set_bitmap & BIT_APP_UPCHG)) { struct dcb_app app = { .selector = DCB_APP_IDTYPE_ETHTYPE, .protocol = ETH_P_FCOE, }; u8 up = dcb_getapp(netdev, &app); adapter->fcoe.up = ffs(up) - 1; adapter->fcoe.up = ffs(up) - 1; ixgbe_dcbnl_devreset(netdev); ixgbe_dcbnl_devreset(netdev); ret = DCB_HW_CHG_RST; ret = DCB_HW_CHG_RST; Loading drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -1780,6 +1780,8 @@ static u16 ixgbe_clean_test_rings(struct ixgbe_ring *rx_ring, rx_desc = IXGBE_RX_DESC(rx_ring, rx_ntc); rx_desc = IXGBE_RX_DESC(rx_ring, rx_ntc); } } netdev_tx_reset_queue(txring_txq(tx_ring)); /* re-map buffers to ring, store next to clean values */ /* re-map buffers to ring, store next to clean values */ ixgbe_alloc_rx_buffers(rx_ring, count); ixgbe_alloc_rx_buffers(rx_ring, count); rx_ring->next_to_clean = rx_ntc; rx_ring->next_to_clean = rx_ntc; Loading Loading
drivers/net/ethernet/intel/e1000/e1000_main.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -3380,7 +3380,7 @@ static void e1000_dump(struct e1000_adapter *adapter) for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) { for (i = 0; tx_ring->desc && (i < tx_ring->count); i++) { struct e1000_tx_desc *tx_desc = E1000_TX_DESC(*tx_ring, i); struct e1000_tx_desc *tx_desc = E1000_TX_DESC(*tx_ring, i); struct e1000_buffer *buffer_info = &tx_ring->buffer_info[i]; struct e1000_buffer *buffer_info = &tx_ring->buffer_info[i]; struct my_u { u64 a; u64 b; }; struct my_u { __le64 a; __le64 b; }; struct my_u *u = (struct my_u *)tx_desc; struct my_u *u = (struct my_u *)tx_desc; const char *type; const char *type; Loading Loading @@ -3424,7 +3424,7 @@ rx_ring_summary: for (i = 0; rx_ring->desc && (i < rx_ring->count); i++) { for (i = 0; rx_ring->desc && (i < rx_ring->count); i++) { struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rx_ring, i); struct e1000_rx_desc *rx_desc = E1000_RX_DESC(*rx_ring, i); struct e1000_buffer *buffer_info = &rx_ring->buffer_info[i]; struct e1000_buffer *buffer_info = &rx_ring->buffer_info[i]; struct my_u { u64 a; u64 b; }; struct my_u { __le64 a; __le64 b; }; struct my_u *u = (struct my_u *)rx_desc; struct my_u *u = (struct my_u *)rx_desc; const char *type; const char *type; Loading
drivers/net/ethernet/intel/igb/igb_main.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2771,8 +2771,6 @@ void igb_configure_tx_ring(struct igb_adapter *adapter, txdctl |= E1000_TXDCTL_QUEUE_ENABLE; txdctl |= E1000_TXDCTL_QUEUE_ENABLE; wr32(E1000_TXDCTL(reg_idx), txdctl); wr32(E1000_TXDCTL(reg_idx), txdctl); netdev_tx_reset_queue(txring_txq(ring)); } } /** /** Loading Loading @@ -3282,6 +3280,8 @@ static void igb_clean_tx_ring(struct igb_ring *tx_ring) igb_unmap_and_free_tx_resource(tx_ring, buffer_info); igb_unmap_and_free_tx_resource(tx_ring, buffer_info); } } netdev_tx_reset_queue(txring_txq(tx_ring)); size = sizeof(struct igb_tx_buffer) * tx_ring->count; size = sizeof(struct igb_tx_buffer) * tx_ring->count; memset(tx_ring->tx_buffer_info, 0, size); memset(tx_ring->tx_buffer_info, 0, size); Loading
drivers/net/ethernet/intel/ixgbe/ixgbe.h +0 −3 Original line number Original line Diff line number Diff line Loading @@ -574,9 +574,6 @@ extern struct ixgbe_info ixgbe_82599_info; extern struct ixgbe_info ixgbe_X540_info; extern struct ixgbe_info ixgbe_X540_info; #ifdef CONFIG_IXGBE_DCB #ifdef CONFIG_IXGBE_DCB extern const struct dcbnl_rtnl_ops dcbnl_ops; extern const struct dcbnl_rtnl_ops dcbnl_ops; extern int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg, struct ixgbe_dcb_config *dst_dcb_cfg, int tc_max); #endif #endif extern char ixgbe_driver_name[]; extern char ixgbe_driver_name[]; Loading
drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_nl.c +20 −23 Original line number Original line Diff line number Diff line Loading @@ -44,18 +44,26 @@ #define DCB_NO_HW_CHG 1 /* DCB configuration did not change */ #define DCB_NO_HW_CHG 1 /* DCB configuration did not change */ #define DCB_HW_CHG 2 /* DCB configuration changed, no reset */ #define DCB_HW_CHG 2 /* DCB configuration changed, no reset */ int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *scfg, static int ixgbe_copy_dcb_cfg(struct ixgbe_adapter *adapter, int tc_max) struct ixgbe_dcb_config *dcfg, int tc_max) { { struct ixgbe_dcb_config *scfg = &adapter->temp_dcb_cfg; struct ixgbe_dcb_config *dcfg = &adapter->dcb_cfg; struct tc_configuration *src = NULL; struct tc_configuration *src = NULL; struct tc_configuration *dst = NULL; struct tc_configuration *dst = NULL; int i, j; int i, j; int tx = DCB_TX_CONFIG; int tx = DCB_TX_CONFIG; int rx = DCB_RX_CONFIG; int rx = DCB_RX_CONFIG; int changes = 0; int changes = 0; #ifdef IXGBE_FCOE struct dcb_app app = { .selector = DCB_APP_IDTYPE_ETHTYPE, .protocol = ETH_P_FCOE, }; u8 up = dcb_getapp(adapter->netdev, &app); if (!scfg || !dcfg) if (up && !(up & (1 << adapter->fcoe.up))) return changes; changes |= BIT_APP_UPCHG; #endif for (i = DCB_PG_ATTR_TC_0; i < tc_max + DCB_PG_ATTR_TC_0; i++) { for (i = DCB_PG_ATTR_TC_0; i < tc_max + DCB_PG_ATTR_TC_0; i++) { src = &scfg->tc_config[i - DCB_PG_ATTR_TC_0]; src = &scfg->tc_config[i - DCB_PG_ATTR_TC_0]; Loading Loading @@ -332,28 +340,12 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev); int ret = DCB_NO_HW_CHG; int ret = DCB_NO_HW_CHG; int i; int i; #ifdef IXGBE_FCOE struct dcb_app app = { .selector = DCB_APP_IDTYPE_ETHTYPE, .protocol = ETH_P_FCOE, }; u8 up; /* In IEEE mode, use the IEEE Ethertype selector value */ if (adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE) { app.selector = IEEE_8021QAZ_APP_SEL_ETHERTYPE; up = dcb_ieee_getapp_mask(netdev, &app); } else { up = dcb_getapp(netdev, &app); } #endif /* Fail command if not in CEE mode */ /* Fail command if not in CEE mode */ if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) return ret; return ret; adapter->dcb_set_bitmap |= ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, adapter->dcb_set_bitmap |= ixgbe_copy_dcb_cfg(adapter, &adapter->dcb_cfg, MAX_TRAFFIC_CLASS); MAX_TRAFFIC_CLASS); if (!adapter->dcb_set_bitmap) if (!adapter->dcb_set_bitmap) return ret; return ret; Loading Loading @@ -440,8 +432,13 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev) * FCoE is using changes. This happens if the APP info * FCoE is using changes. This happens if the APP info * changes or the up2tc mapping is updated. * changes or the up2tc mapping is updated. */ */ if ((up && !(up & (1 << adapter->fcoe.up))) || if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) { (adapter->dcb_set_bitmap & BIT_APP_UPCHG)) { struct dcb_app app = { .selector = DCB_APP_IDTYPE_ETHTYPE, .protocol = ETH_P_FCOE, }; u8 up = dcb_getapp(netdev, &app); adapter->fcoe.up = ffs(up) - 1; adapter->fcoe.up = ffs(up) - 1; ixgbe_dcbnl_devreset(netdev); ixgbe_dcbnl_devreset(netdev); ret = DCB_HW_CHG_RST; ret = DCB_HW_CHG_RST; Loading
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +2 −0 Original line number Original line Diff line number Diff line Loading @@ -1780,6 +1780,8 @@ static u16 ixgbe_clean_test_rings(struct ixgbe_ring *rx_ring, rx_desc = IXGBE_RX_DESC(rx_ring, rx_ntc); rx_desc = IXGBE_RX_DESC(rx_ring, rx_ntc); } } netdev_tx_reset_queue(txring_txq(tx_ring)); /* re-map buffers to ring, store next to clean values */ /* re-map buffers to ring, store next to clean values */ ixgbe_alloc_rx_buffers(rx_ring, count); ixgbe_alloc_rx_buffers(rx_ring, count); rx_ring->next_to_clean = rx_ntc; rx_ring->next_to_clean = rx_ntc; Loading