Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e4767aa authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'sfc'



Shradha Shah says:

====================
Cleanup patches for the SFC driver

This patch set consists of some cleanup and housekeeping
patches for the sfc driver.
These patches help to reduce the differences between the in-
tree and out-of-tree driver.

Ben Hutchings (12):
  sfc: Cache skb->data in local variable in efx_ptp_rx()
  sfc: Rewrite adjustment of PPS event in a clearer way
  sfc: Replace TSOH_OFFSET with the equivalent NET_IP_ALIGN
  sfc: Rename 'use_options' variable in tso_start() to clearer
    'use_opt_desc'
  sfc: Remove unused definitions of EF10 user-mode DMA descriptors
  sfc: Correct comment about number of TX queues used on EF10
  sfc: Preserve rx_frm_trunc counters when resizing DMA rings
  sfc: Use canonical pointer type for MAC address in
    efx_set_mac_address()
  sfc: Update product naming
  sfc: Cosmetic changes to self-test from the out-of-tree driver
  sfc: Fail self-test with -EBUSY, not -EIO, if the device is busy
  sfc: Add/remove blank lines to taste

Laurence Evans (1):
  sfc: Removed adhoc scheme to rate limit PTP event queue overflow
    message
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents a146b591 5b3b7608
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -172,8 +172,8 @@ static int efx_ef10_probe(struct efx_nic *efx)
	struct efx_ef10_nic_data *nic_data;
	struct efx_ef10_nic_data *nic_data;
	int i, rc;
	int i, rc;


	/* We can have one VI for each 8K region.  However we need
	/* We can have one VI for each 8K region.  However, until we
	 * multiple TX queues per channel.
	 * use TX option descriptors we need two TX queues per channel.
	 */
	 */
	efx->max_channels =
	efx->max_channels =
		min_t(unsigned int,
		min_t(unsigned int,
+0 −61
Original line number Original line Diff line number Diff line
@@ -227,36 +227,6 @@
#define	ESF_DZ_RX_KER_BUF_ADDR_LBN 0
#define	ESF_DZ_RX_KER_BUF_ADDR_LBN 0
#define	ESF_DZ_RX_KER_BUF_ADDR_WIDTH 48
#define	ESF_DZ_RX_KER_BUF_ADDR_WIDTH 48


/* RX_USER_DESC */
#define	ESF_DZ_RX_USR_RESERVED_LBN 62
#define	ESF_DZ_RX_USR_RESERVED_WIDTH 2
#define	ESF_DZ_RX_USR_BYTE_CNT_LBN 48
#define	ESF_DZ_RX_USR_BYTE_CNT_WIDTH 14
#define	ESF_DZ_RX_USR_BUF_PAGE_SIZE_LBN 44
#define	ESF_DZ_RX_USR_BUF_PAGE_SIZE_WIDTH 4
#define	ESE_DZ_USR_BUF_PAGE_SZ_4MB 10
#define	ESE_DZ_USR_BUF_PAGE_SZ_1MB 8
#define	ESE_DZ_USR_BUF_PAGE_SZ_64KB 4
#define	ESE_DZ_USR_BUF_PAGE_SZ_4KB 0
#define	ESF_DZ_RX_USR_BUF_ID_OFFSET_LBN 0
#define	ESF_DZ_RX_USR_BUF_ID_OFFSET_WIDTH 44
#define	ESF_DZ_RX_USR_4KBPS_BUF_ID_LBN 12
#define	ESF_DZ_RX_USR_4KBPS_BUF_ID_WIDTH 32
#define	ESF_DZ_RX_USR_64KBPS_BUF_ID_LBN 16
#define	ESF_DZ_RX_USR_64KBPS_BUF_ID_WIDTH 28
#define	ESF_DZ_RX_USR_1MBPS_BUF_ID_LBN 20
#define	ESF_DZ_RX_USR_1MBPS_BUF_ID_WIDTH 24
#define	ESF_DZ_RX_USR_4MBPS_BUF_ID_LBN 22
#define	ESF_DZ_RX_USR_4MBPS_BUF_ID_WIDTH 22
#define	ESF_DZ_RX_USR_4MBPS_BYTE_OFFSET_LBN 0
#define	ESF_DZ_RX_USR_4MBPS_BYTE_OFFSET_WIDTH 22
#define	ESF_DZ_RX_USR_1MBPS_BYTE_OFFSET_LBN 0
#define	ESF_DZ_RX_USR_1MBPS_BYTE_OFFSET_WIDTH 20
#define	ESF_DZ_RX_USR_64KBPS_BYTE_OFFSET_LBN 0
#define	ESF_DZ_RX_USR_64KBPS_BYTE_OFFSET_WIDTH 16
#define	ESF_DZ_RX_USR_4KBPS_BYTE_OFFSET_LBN 0
#define	ESF_DZ_RX_USR_4KBPS_BYTE_OFFSET_WIDTH 12

/* TX_CSUM_TSTAMP_DESC */
/* TX_CSUM_TSTAMP_DESC */
#define	ESF_DZ_TX_DESC_IS_OPT_LBN 63
#define	ESF_DZ_TX_DESC_IS_OPT_LBN 63
#define	ESF_DZ_TX_DESC_IS_OPT_WIDTH 1
#define	ESF_DZ_TX_DESC_IS_OPT_WIDTH 1
@@ -338,37 +308,6 @@
#define	ESF_DZ_TX_TSO_TCP_SEQNO_LBN 0
#define	ESF_DZ_TX_TSO_TCP_SEQNO_LBN 0
#define	ESF_DZ_TX_TSO_TCP_SEQNO_WIDTH 32
#define	ESF_DZ_TX_TSO_TCP_SEQNO_WIDTH 32


/* TX_USER_DESC */
#define	ESF_DZ_TX_USR_TYPE_LBN 63
#define	ESF_DZ_TX_USR_TYPE_WIDTH 1
#define	ESF_DZ_TX_USR_CONT_LBN 62
#define	ESF_DZ_TX_USR_CONT_WIDTH 1
#define	ESF_DZ_TX_USR_BYTE_CNT_LBN 48
#define	ESF_DZ_TX_USR_BYTE_CNT_WIDTH 14
#define	ESF_DZ_TX_USR_BUF_PAGE_SIZE_LBN 44
#define	ESF_DZ_TX_USR_BUF_PAGE_SIZE_WIDTH 4
#define	ESE_DZ_USR_BUF_PAGE_SZ_4MB 10
#define	ESE_DZ_USR_BUF_PAGE_SZ_1MB 8
#define	ESE_DZ_USR_BUF_PAGE_SZ_64KB 4
#define	ESE_DZ_USR_BUF_PAGE_SZ_4KB 0
#define	ESF_DZ_TX_USR_BUF_ID_OFFSET_LBN 0
#define	ESF_DZ_TX_USR_BUF_ID_OFFSET_WIDTH 44
#define	ESF_DZ_TX_USR_4KBPS_BUF_ID_LBN 12
#define	ESF_DZ_TX_USR_4KBPS_BUF_ID_WIDTH 32
#define	ESF_DZ_TX_USR_64KBPS_BUF_ID_LBN 16
#define	ESF_DZ_TX_USR_64KBPS_BUF_ID_WIDTH 28
#define	ESF_DZ_TX_USR_1MBPS_BUF_ID_LBN 20
#define	ESF_DZ_TX_USR_1MBPS_BUF_ID_WIDTH 24
#define	ESF_DZ_TX_USR_4MBPS_BUF_ID_LBN 22
#define	ESF_DZ_TX_USR_4MBPS_BUF_ID_WIDTH 22
#define	ESF_DZ_TX_USR_4MBPS_BYTE_OFFSET_LBN 0
#define	ESF_DZ_TX_USR_4MBPS_BYTE_OFFSET_WIDTH 22
#define	ESF_DZ_TX_USR_1MBPS_BYTE_OFFSET_LBN 0
#define	ESF_DZ_TX_USR_1MBPS_BYTE_OFFSET_WIDTH 20
#define	ESF_DZ_TX_USR_64KBPS_BYTE_OFFSET_LBN 0
#define	ESF_DZ_TX_USR_64KBPS_BYTE_OFFSET_WIDTH 16
#define	ESF_DZ_TX_USR_4KBPS_BYTE_OFFSET_LBN 0
#define	ESF_DZ_TX_USR_4KBPS_BYTE_OFFSET_WIDTH 12
/*************************************************************************/
/*************************************************************************/


/* TX_DESC_UPD_REG: Transmit descriptor update register.
/* TX_DESC_UPD_REG: Transmit descriptor update register.
+2 −4
Original line number Original line Diff line number Diff line
@@ -503,8 +503,6 @@ static int efx_probe_channel(struct efx_channel *channel)
			goto fail;
			goto fail;
	}
	}


	channel->n_rx_frm_trunc = 0;

	return 0;
	return 0;


fail:
fail:
@@ -2115,7 +2113,7 @@ static int efx_set_mac_address(struct net_device *net_dev, void *data)
{
{
	struct efx_nic *efx = netdev_priv(net_dev);
	struct efx_nic *efx = netdev_priv(net_dev);
	struct sockaddr *addr = data;
	struct sockaddr *addr = data;
	char *new_addr = addr->sa_data;
	u8 *new_addr = addr->sa_data;


	if (!is_valid_ether_addr(new_addr)) {
	if (!is_valid_ether_addr(new_addr)) {
		netif_err(efx, drv, efx->net_dev,
		netif_err(efx, drv, efx->net_dev,
@@ -3273,6 +3271,6 @@ module_exit(efx_exit_module);


MODULE_AUTHOR("Solarflare Communications and "
MODULE_AUTHOR("Solarflare Communications and "
	      "Michael Brown <mbrown@fensystems.co.uk>");
	      "Michael Brown <mbrown@fensystems.co.uk>");
MODULE_DESCRIPTION("Solarflare Communications network driver");
MODULE_DESCRIPTION("Solarflare network driver");
MODULE_LICENSE("GPL");
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, efx_pci_table);
MODULE_DEVICE_TABLE(pci, efx_pci_table);
+1 −1
Original line number Original line Diff line number Diff line
@@ -14,7 +14,7 @@
#include "net_driver.h"
#include "net_driver.h"
#include "filter.h"
#include "filter.h"


/* Solarstorm controllers use BAR 0 for I/O space and BAR 2(&3) for memory */
/* All controllers use BAR 0 for I/O space and BAR 2(&3) for memory */
#define EFX_MEM_BAR 2
#define EFX_MEM_BAR 2


/* TX */
/* TX */
+14 −7
Original line number Original line Diff line number Diff line
@@ -251,6 +251,9 @@ static void efx_fill_test(unsigned int test_index, u8 *strings, u64 *data,
 * @test_index:		Starting index of the test
 * @test_index:		Starting index of the test
 * @strings:		Ethtool strings, or %NULL
 * @strings:		Ethtool strings, or %NULL
 * @data:		Ethtool test results, or %NULL
 * @data:		Ethtool test results, or %NULL
 *
 * Fill in a block of loopback self-test entries.  Return new test
 * index.
 */
 */
static int efx_fill_loopback_test(struct efx_nic *efx,
static int efx_fill_loopback_test(struct efx_nic *efx,
				  struct efx_loopback_self_tests *lb_tests,
				  struct efx_loopback_self_tests *lb_tests,
@@ -290,6 +293,12 @@ static int efx_fill_loopback_test(struct efx_nic *efx,
 * @tests:		Efx self-test results structure, or %NULL
 * @tests:		Efx self-test results structure, or %NULL
 * @strings:		Ethtool strings, or %NULL
 * @strings:		Ethtool strings, or %NULL
 * @data:		Ethtool test results, or %NULL
 * @data:		Ethtool test results, or %NULL
 *
 * Get self-test number of strings, strings, and/or test results.
 * Return number of strings (== number of test results).
 *
 * The reason for merging these three functions is to make sure that
 * they can never be inconsistent.
 */
 */
static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
static int efx_ethtool_fill_self_tests(struct efx_nic *efx,
				       struct efx_self_tests *tests,
				       struct efx_self_tests *tests,
@@ -444,7 +453,7 @@ static void efx_ethtool_self_test(struct net_device *net_dev,
{
{
	struct efx_nic *efx = netdev_priv(net_dev);
	struct efx_nic *efx = netdev_priv(net_dev);
	struct efx_self_tests *efx_tests;
	struct efx_self_tests *efx_tests;
	int already_up;
	bool already_up;
	int rc = -ENOMEM;
	int rc = -ENOMEM;


	efx_tests = kzalloc(sizeof(*efx_tests), GFP_KERNEL);
	efx_tests = kzalloc(sizeof(*efx_tests), GFP_KERNEL);
@@ -452,8 +461,8 @@ static void efx_ethtool_self_test(struct net_device *net_dev,
		goto fail;
		goto fail;


	if (efx->state != STATE_READY) {
	if (efx->state != STATE_READY) {
		rc = -EIO;
		rc = -EBUSY;
		goto fail1;
		goto out;
	}
	}


	netif_info(efx, drv, efx->net_dev, "starting %sline testing\n",
	netif_info(efx, drv, efx->net_dev, "starting %sline testing\n",
@@ -466,7 +475,7 @@ static void efx_ethtool_self_test(struct net_device *net_dev,
		if (rc) {
		if (rc) {
			netif_err(efx, drv, efx->net_dev,
			netif_err(efx, drv, efx->net_dev,
				  "failed opening device.\n");
				  "failed opening device.\n");
			goto fail1;
			goto out;
		}
		}
	}
	}


@@ -479,8 +488,7 @@ static void efx_ethtool_self_test(struct net_device *net_dev,
		   rc == 0 ? "passed" : "failed",
		   rc == 0 ? "passed" : "failed",
		   (test->flags & ETH_TEST_FL_OFFLINE) ? "off" : "on");
		   (test->flags & ETH_TEST_FL_OFFLINE) ? "off" : "on");


fail1:
out:
	/* Fill ethtool results structures */
	efx_ethtool_fill_self_tests(efx, efx_tests, NULL, data);
	efx_ethtool_fill_self_tests(efx, efx_tests, NULL, data);
	kfree(efx_tests);
	kfree(efx_tests);
fail:
fail:
@@ -691,7 +699,6 @@ static void efx_ethtool_get_pauseparam(struct net_device *net_dev,
	pause->autoneg = !!(efx->wanted_fc & EFX_FC_AUTO);
	pause->autoneg = !!(efx->wanted_fc & EFX_FC_AUTO);
}
}



static void efx_ethtool_get_wol(struct net_device *net_dev,
static void efx_ethtool_get_wol(struct net_device *net_dev,
				struct ethtool_wolinfo *wol)
				struct ethtool_wolinfo *wol)
{
{
Loading