aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc/ef10.c
diff options
context:
space:
mode:
authorDaniel Pieczko <dpieczko@solarflare.com>2014-04-01 08:10:34 -0400
committerDavid S. Miller <davem@davemloft.net>2014-04-01 16:25:51 -0400
commit52ad762b85ed7947ec9eff6b036eb985352f6874 (patch)
treeeeb702d106b39d7eea57cbd425713f2767ba319b /drivers/net/ethernet/sfc/ef10.c
parente9d8b2c2968499c1f96563e6522c56958d5a1d0d (diff)
Call efx_set_channels() before efx->type->dimension_resources()
When using the "separate_tx_channels=1" module parameter, the TX queues are initially numbered starting from the first TX-only channel number (after all the RX-only channels). efx_set_channels() renumbers the queues so that they are indexed from zero. On EF10, the TX queues need to be relabelled in this way before calling the dimension_resources NIC type operation, otherwise the TX queue PIO buffers can be linked to the wrong VIs when using "separate_tx_channels=1". Added comments to explain UC/WC mappings for PIO buffers Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10.c')
-rw-r--r--drivers/net/ethernet/sfc/ef10.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 651626e133f9..21c20ea0dad0 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -565,10 +565,17 @@ static int efx_ef10_dimension_resources(struct efx_nic *efx)
565 * several of each (in fact that's the only option if host 565 * several of each (in fact that's the only option if host
566 * page size is >4K). So we may allocate some extra VIs just 566 * page size is >4K). So we may allocate some extra VIs just
567 * for writing PIO buffers through. 567 * for writing PIO buffers through.
568 *
569 * The UC mapping contains (min_vis - 1) complete VIs and the
570 * first half of the next VI. Then the WC mapping begins with
571 * the second half of this last VI.
568 */ 572 */
569 uc_mem_map_size = PAGE_ALIGN((min_vis - 1) * EFX_VI_PAGE_SIZE + 573 uc_mem_map_size = PAGE_ALIGN((min_vis - 1) * EFX_VI_PAGE_SIZE +
570 ER_DZ_TX_PIOBUF); 574 ER_DZ_TX_PIOBUF);
571 if (nic_data->n_piobufs) { 575 if (nic_data->n_piobufs) {
576 /* pio_write_vi_base rounds down to give the number of complete
577 * VIs inside the UC mapping.
578 */
572 pio_write_vi_base = uc_mem_map_size / EFX_VI_PAGE_SIZE; 579 pio_write_vi_base = uc_mem_map_size / EFX_VI_PAGE_SIZE;
573 wc_mem_map_size = (PAGE_ALIGN((pio_write_vi_base + 580 wc_mem_map_size = (PAGE_ALIGN((pio_write_vi_base +
574 nic_data->n_piobufs) * 581 nic_data->n_piobufs) *