diff options
-rw-r--r-- | drivers/net/ethernet/sfc/ethtool.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/falcon.c | 17 | ||||
-rw-r--r-- | drivers/net/ethernet/sfc/nic.h | 5 |
3 files changed, 6 insertions, 18 deletions
diff --git a/drivers/net/ethernet/sfc/ethtool.c b/drivers/net/ethernet/sfc/ethtool.c index 58ae28b8820d..55c3826447fa 100644 --- a/drivers/net/ethernet/sfc/ethtool.c +++ b/drivers/net/ethernet/sfc/ethtool.c | |||
@@ -205,8 +205,6 @@ static int efx_ethtool_get_settings(struct net_device *net_dev, | |||
205 | efx->phy_op->get_settings(efx, ecmd); | 205 | efx->phy_op->get_settings(efx, ecmd); |
206 | mutex_unlock(&efx->mac_lock); | 206 | mutex_unlock(&efx->mac_lock); |
207 | 207 | ||
208 | /* GMAC does not support 1000Mbps HD */ | ||
209 | ecmd->supported &= ~SUPPORTED_1000baseT_Half; | ||
210 | /* Both MACs support pause frames (bidirectional and respond-only) */ | 208 | /* Both MACs support pause frames (bidirectional and respond-only) */ |
211 | ecmd->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause; | 209 | ecmd->supported |= SUPPORTED_Pause | SUPPORTED_Asym_Pause; |
212 | 210 | ||
diff --git a/drivers/net/ethernet/sfc/falcon.c b/drivers/net/ethernet/sfc/falcon.c index 3c99b6c2d531..76a9e0dd2308 100644 --- a/drivers/net/ethernet/sfc/falcon.c +++ b/drivers/net/ethernet/sfc/falcon.c | |||
@@ -131,8 +131,8 @@ | |||
131 | #define XgDmaDone_offset 0xD4 | 131 | #define XgDmaDone_offset 0xD4 |
132 | #define XgDmaDone_WIDTH 32 | 132 | #define XgDmaDone_WIDTH 32 |
133 | 133 | ||
134 | #define FALCON_STATS_NOT_DONE 0x00000000 | 134 | #define FALCON_XMAC_STATS_DMA_FLAG(efx) \ |
135 | #define FALCON_STATS_DONE 0xffffffff | 135 | (*(u32 *)((efx)->stats_buffer.addr + XgDmaDone_offset)) |
136 | 136 | ||
137 | #define FALCON_STAT_OFFSET(falcon_stat) EFX_VAL(falcon_stat, offset) | 137 | #define FALCON_STAT_OFFSET(falcon_stat) EFX_VAL(falcon_stat, offset) |
138 | #define FALCON_STAT_WIDTH(falcon_stat) EFX_VAL(falcon_stat, WIDTH) | 138 | #define FALCON_STAT_WIDTH(falcon_stat) EFX_VAL(falcon_stat, WIDTH) |
@@ -1398,10 +1398,7 @@ static void falcon_stats_request(struct efx_nic *efx) | |||
1398 | WARN_ON(nic_data->stats_pending); | 1398 | WARN_ON(nic_data->stats_pending); |
1399 | WARN_ON(nic_data->stats_disable_count); | 1399 | WARN_ON(nic_data->stats_disable_count); |
1400 | 1400 | ||
1401 | if (nic_data->stats_dma_done == NULL) | 1401 | FALCON_XMAC_STATS_DMA_FLAG(efx) = 0; |
1402 | return; /* no mac selected */ | ||
1403 | |||
1404 | *nic_data->stats_dma_done = FALCON_STATS_NOT_DONE; | ||
1405 | nic_data->stats_pending = true; | 1402 | nic_data->stats_pending = true; |
1406 | wmb(); /* ensure done flag is clear */ | 1403 | wmb(); /* ensure done flag is clear */ |
1407 | 1404 | ||
@@ -1423,7 +1420,7 @@ static void falcon_stats_complete(struct efx_nic *efx) | |||
1423 | return; | 1420 | return; |
1424 | 1421 | ||
1425 | nic_data->stats_pending = false; | 1422 | nic_data->stats_pending = false; |
1426 | if (*nic_data->stats_dma_done == FALCON_STATS_DONE) { | 1423 | if (FALCON_XMAC_STATS_DMA_FLAG(efx)) { |
1427 | rmb(); /* read the done flag before the stats */ | 1424 | rmb(); /* read the done flag before the stats */ |
1428 | falcon_update_stats_xmac(efx); | 1425 | falcon_update_stats_xmac(efx); |
1429 | } else { | 1426 | } else { |
@@ -1706,7 +1703,6 @@ static int falcon_probe_port(struct efx_nic *efx) | |||
1706 | (u64)efx->stats_buffer.dma_addr, | 1703 | (u64)efx->stats_buffer.dma_addr, |
1707 | efx->stats_buffer.addr, | 1704 | efx->stats_buffer.addr, |
1708 | (u64)virt_to_phys(efx->stats_buffer.addr)); | 1705 | (u64)virt_to_phys(efx->stats_buffer.addr)); |
1709 | nic_data->stats_dma_done = efx->stats_buffer.addr + XgDmaDone_offset; | ||
1710 | 1706 | ||
1711 | return 0; | 1707 | return 0; |
1712 | } | 1708 | } |
@@ -2554,8 +2550,7 @@ static void falcon_update_nic_stats(struct efx_nic *efx) | |||
2554 | efx->n_rx_nodesc_drop_cnt += | 2550 | efx->n_rx_nodesc_drop_cnt += |
2555 | EFX_OWORD_FIELD(cnt, FRF_AB_RX_NODESC_DROP_CNT); | 2551 | EFX_OWORD_FIELD(cnt, FRF_AB_RX_NODESC_DROP_CNT); |
2556 | 2552 | ||
2557 | if (nic_data->stats_pending && | 2553 | if (nic_data->stats_pending && FALCON_XMAC_STATS_DMA_FLAG(efx)) { |
2558 | *nic_data->stats_dma_done == FALCON_STATS_DONE) { | ||
2559 | nic_data->stats_pending = false; | 2554 | nic_data->stats_pending = false; |
2560 | rmb(); /* read the done flag before the stats */ | 2555 | rmb(); /* read the done flag before the stats */ |
2561 | falcon_update_stats_xmac(efx); | 2556 | falcon_update_stats_xmac(efx); |
@@ -2588,7 +2583,7 @@ void falcon_stop_nic_stats(struct efx_nic *efx) | |||
2588 | /* Wait enough time for the most recent transfer to | 2583 | /* Wait enough time for the most recent transfer to |
2589 | * complete. */ | 2584 | * complete. */ |
2590 | for (i = 0; i < 4 && nic_data->stats_pending; i++) { | 2585 | for (i = 0; i < 4 && nic_data->stats_pending; i++) { |
2591 | if (*nic_data->stats_dma_done == FALCON_STATS_DONE) | 2586 | if (FALCON_XMAC_STATS_DMA_FLAG(efx)) |
2592 | break; | 2587 | break; |
2593 | msleep(1); | 2588 | msleep(1); |
2594 | } | 2589 | } |
diff --git a/drivers/net/ethernet/sfc/nic.h b/drivers/net/ethernet/sfc/nic.h index 2b84aeb3c8ce..c3e0f1fd5047 100644 --- a/drivers/net/ethernet/sfc/nic.h +++ b/drivers/net/ethernet/sfc/nic.h | |||
@@ -117,9 +117,6 @@ enum { | |||
117 | (1 << LOOPBACK_XGXS) | \ | 117 | (1 << LOOPBACK_XGXS) | \ |
118 | (1 << LOOPBACK_XAUI)) | 118 | (1 << LOOPBACK_XAUI)) |
119 | 119 | ||
120 | #define FALCON_GMAC_LOOPBACKS \ | ||
121 | (1 << LOOPBACK_GMAC) | ||
122 | |||
123 | /* Alignment of PCIe DMA boundaries (4KB) */ | 120 | /* Alignment of PCIe DMA boundaries (4KB) */ |
124 | #define EFX_PAGE_SIZE 4096 | 121 | #define EFX_PAGE_SIZE 4096 |
125 | /* Size and alignment of buffer table entries (same) */ | 122 | /* Size and alignment of buffer table entries (same) */ |
@@ -201,7 +198,6 @@ static inline bool falcon_spi_present(const struct falcon_spi_device *spi) | |||
201 | * @stats_disable_count: Nest count for disabling statistics fetches | 198 | * @stats_disable_count: Nest count for disabling statistics fetches |
202 | * @stats_pending: Is there a pending DMA of MAC statistics. | 199 | * @stats_pending: Is there a pending DMA of MAC statistics. |
203 | * @stats_timer: A timer for regularly fetching MAC statistics. | 200 | * @stats_timer: A timer for regularly fetching MAC statistics. |
204 | * @stats_dma_done: Pointer to the flag which indicates DMA completion. | ||
205 | * @spi_flash: SPI flash device | 201 | * @spi_flash: SPI flash device |
206 | * @spi_eeprom: SPI EEPROM device | 202 | * @spi_eeprom: SPI EEPROM device |
207 | * @spi_lock: SPI bus lock | 203 | * @spi_lock: SPI bus lock |
@@ -214,7 +210,6 @@ struct falcon_nic_data { | |||
214 | unsigned int stats_disable_count; | 210 | unsigned int stats_disable_count; |
215 | bool stats_pending; | 211 | bool stats_pending; |
216 | struct timer_list stats_timer; | 212 | struct timer_list stats_timer; |
217 | u32 *stats_dma_done; | ||
218 | struct falcon_spi_device spi_flash; | 213 | struct falcon_spi_device spi_flash; |
219 | struct falcon_spi_device spi_eeprom; | 214 | struct falcon_spi_device spi_eeprom; |
220 | struct mutex spi_lock; | 215 | struct mutex spi_lock; |