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

Commit 7ed2a0d0 authored by David S. Miller's avatar David S. Miller
Browse files


Ben Hutchings says:

====================
1. Change PTP clock name to 'sfc'.
2. Complete support for hardware timestamping and PTP clock on the
SFC9100 family.
3. Various cleanups for the PTP code.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents f52d81dc bbbe7149
Loading
Loading
Loading
Loading
+125 −3
Original line number Original line Diff line number Diff line
@@ -264,6 +264,8 @@ static int efx_ef10_probe(struct efx_nic *efx)
	if (rc)
	if (rc)
		goto fail3;
		goto fail3;


	efx_ptp_probe(efx, NULL);

	return 0;
	return 0;


fail3:
fail3:
@@ -472,9 +474,10 @@ static void efx_ef10_remove(struct efx_nic *efx)
	struct efx_ef10_nic_data *nic_data = efx->nic_data;
	struct efx_ef10_nic_data *nic_data = efx->nic_data;
	int rc;
	int rc;


	efx_ptp_remove(efx);

	efx_mcdi_mon_remove(efx);
	efx_mcdi_mon_remove(efx);


	/* This needs to be after efx_ptp_remove_channel() with no filters */
	efx_ef10_rx_free_indir_table(efx);
	efx_ef10_rx_free_indir_table(efx);


	if (nic_data->wc_membase)
	if (nic_data->wc_membase)
@@ -1469,8 +1472,9 @@ static void efx_ef10_rx_init(struct efx_rx_queue *rx_queue)
	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_LABEL, efx_rx_queue_index(rx_queue));
	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_LABEL, efx_rx_queue_index(rx_queue));
	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_INSTANCE,
	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_INSTANCE,
		       efx_rx_queue_index(rx_queue));
		       efx_rx_queue_index(rx_queue));
	MCDI_POPULATE_DWORD_1(inbuf, INIT_RXQ_IN_FLAGS,
	MCDI_POPULATE_DWORD_2(inbuf, INIT_RXQ_IN_FLAGS,
			      INIT_RXQ_IN_FLAG_PREFIX, 1);
			      INIT_RXQ_IN_FLAG_PREFIX, 1,
			      INIT_RXQ_IN_FLAG_TIMESTAMP, 1);
	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_OWNER_ID, 0);
	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_OWNER_ID, 0);
	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_PORT_ID, EVB_PORT_ID_ASSIGNED);
	MCDI_SET_DWORD(inbuf, INIT_RXQ_IN_PORT_ID, EVB_PORT_ID_ASSIGNED);


@@ -3406,6 +3410,119 @@ static void efx_ef10_ptp_write_host_time(struct efx_nic *efx, u32 host_time)
	_efx_writed(efx, cpu_to_le32(host_time), ER_DZ_MC_DB_LWRD);
	_efx_writed(efx, cpu_to_le32(host_time), ER_DZ_MC_DB_LWRD);
}
}


static int efx_ef10_rx_enable_timestamping(struct efx_channel *channel,
					   bool temp)
{
	MCDI_DECLARE_BUF(inbuf, MC_CMD_PTP_IN_TIME_EVENT_SUBSCRIBE_LEN);
	int rc;

	if (channel->sync_events_state == SYNC_EVENTS_REQUESTED ||
	    channel->sync_events_state == SYNC_EVENTS_VALID ||
	    (temp && channel->sync_events_state == SYNC_EVENTS_DISABLED))
		return 0;
	channel->sync_events_state = SYNC_EVENTS_REQUESTED;

	MCDI_SET_DWORD(inbuf, PTP_IN_OP, MC_CMD_PTP_OP_TIME_EVENT_SUBSCRIBE);
	MCDI_SET_DWORD(inbuf, PTP_IN_PERIPH_ID, 0);
	MCDI_SET_DWORD(inbuf, PTP_IN_TIME_EVENT_SUBSCRIBE_QUEUE,
		       channel->channel);

	rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP,
			  inbuf, sizeof(inbuf), NULL, 0, NULL);

	if (rc != 0)
		channel->sync_events_state = temp ? SYNC_EVENTS_QUIESCENT :
						    SYNC_EVENTS_DISABLED;

	return rc;
}

static int efx_ef10_rx_disable_timestamping(struct efx_channel *channel,
					    bool temp)
{
	MCDI_DECLARE_BUF(inbuf, MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_LEN);
	int rc;

	if (channel->sync_events_state == SYNC_EVENTS_DISABLED ||
	    (temp && channel->sync_events_state == SYNC_EVENTS_QUIESCENT))
		return 0;
	if (channel->sync_events_state == SYNC_EVENTS_QUIESCENT) {
		channel->sync_events_state = SYNC_EVENTS_DISABLED;
		return 0;
	}
	channel->sync_events_state = temp ? SYNC_EVENTS_QUIESCENT :
					    SYNC_EVENTS_DISABLED;

	MCDI_SET_DWORD(inbuf, PTP_IN_OP, MC_CMD_PTP_OP_TIME_EVENT_UNSUBSCRIBE);
	MCDI_SET_DWORD(inbuf, PTP_IN_PERIPH_ID, 0);
	MCDI_SET_DWORD(inbuf, PTP_IN_TIME_EVENT_UNSUBSCRIBE_CONTROL,
		       MC_CMD_PTP_IN_TIME_EVENT_UNSUBSCRIBE_SINGLE);
	MCDI_SET_DWORD(inbuf, PTP_IN_TIME_EVENT_UNSUBSCRIBE_QUEUE,
		       channel->channel);

	rc = efx_mcdi_rpc(channel->efx, MC_CMD_PTP,
			  inbuf, sizeof(inbuf), NULL, 0, NULL);

	return rc;
}

static int efx_ef10_ptp_set_ts_sync_events(struct efx_nic *efx, bool en,
					   bool temp)
{
	int (*set)(struct efx_channel *channel, bool temp);
	struct efx_channel *channel;

	set = en ?
	      efx_ef10_rx_enable_timestamping :
	      efx_ef10_rx_disable_timestamping;

	efx_for_each_channel(channel, efx) {
		int rc = set(channel, temp);
		if (en && rc != 0) {
			efx_ef10_ptp_set_ts_sync_events(efx, false, temp);
			return rc;
		}
	}

	return 0;
}

static int efx_ef10_ptp_set_ts_config(struct efx_nic *efx,
				      struct hwtstamp_config *init)
{
	int rc;

	switch (init->rx_filter) {
	case HWTSTAMP_FILTER_NONE:
		efx_ef10_ptp_set_ts_sync_events(efx, false, false);
		/* if TX timestamping is still requested then leave PTP on */
		return efx_ptp_change_mode(efx,
					   init->tx_type != HWTSTAMP_TX_OFF, 0);
	case HWTSTAMP_FILTER_ALL:
	case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
	case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
	case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
	case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
	case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
	case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
	case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
	case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
	case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
	case HWTSTAMP_FILTER_PTP_V2_EVENT:
	case HWTSTAMP_FILTER_PTP_V2_SYNC:
	case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
		init->rx_filter = HWTSTAMP_FILTER_ALL;
		rc = efx_ptp_change_mode(efx, true, 0);
		if (!rc)
			rc = efx_ef10_ptp_set_ts_sync_events(efx, true, false);
		if (rc)
			efx_ptp_change_mode(efx, false, 0);
		return rc;
	default:
		return -ERANGE;
	}
}

const struct efx_nic_type efx_hunt_a0_nic_type = {
const struct efx_nic_type efx_hunt_a0_nic_type = {
	.mem_map_size = efx_ef10_mem_map_size,
	.mem_map_size = efx_ef10_mem_map_size,
	.probe = efx_ef10_probe,
	.probe = efx_ef10_probe,
@@ -3484,11 +3601,14 @@ const struct efx_nic_type efx_hunt_a0_nic_type = {
	.mtd_sync = efx_mcdi_mtd_sync,
	.mtd_sync = efx_mcdi_mtd_sync,
#endif
#endif
	.ptp_write_host_time = efx_ef10_ptp_write_host_time,
	.ptp_write_host_time = efx_ef10_ptp_write_host_time,
	.ptp_set_ts_sync_events = efx_ef10_ptp_set_ts_sync_events,
	.ptp_set_ts_config = efx_ef10_ptp_set_ts_config,


	.revision = EFX_REV_HUNT_A0,
	.revision = EFX_REV_HUNT_A0,
	.max_dma_mask = DMA_BIT_MASK(ESF_DZ_TX_KER_BUF_ADDR_WIDTH),
	.max_dma_mask = DMA_BIT_MASK(ESF_DZ_TX_KER_BUF_ADDR_WIDTH),
	.rx_prefix_size = ES_DZ_RX_PREFIX_SIZE,
	.rx_prefix_size = ES_DZ_RX_PREFIX_SIZE,
	.rx_hash_offset = ES_DZ_RX_PREFIX_HASH_OFST,
	.rx_hash_offset = ES_DZ_RX_PREFIX_HASH_OFST,
	.rx_ts_offset = ES_DZ_RX_PREFIX_TSTAMP_OFST,
	.can_rx_scatter = true,
	.can_rx_scatter = true,
	.always_rx_scatter = true,
	.always_rx_scatter = true,
	.max_interrupt_mode = EFX_INT_MODE_MSIX,
	.max_interrupt_mode = EFX_INT_MODE_MSIX,
@@ -3497,4 +3617,6 @@ const struct efx_nic_type efx_hunt_a0_nic_type = {
			     NETIF_F_RXHASH | NETIF_F_NTUPLE),
			     NETIF_F_RXHASH | NETIF_F_NTUPLE),
	.mcdi_max_ver = 2,
	.mcdi_max_ver = 2,
	.max_rx_ip_filters = HUNT_FILTER_TBL_ROWS,
	.max_rx_ip_filters = HUNT_FILTER_TBL_ROWS,
	.hwtstamp_filters = 1 << HWTSTAMP_FILTER_NONE |
			    1 << HWTSTAMP_FILTER_ALL,
};
};
+110 −7
Original line number Original line Diff line number Diff line
@@ -1117,6 +1117,77 @@ static void efx_remove_port(struct efx_nic *efx)
 *
 *
 **************************************************************************/
 **************************************************************************/


static LIST_HEAD(efx_primary_list);
static LIST_HEAD(efx_unassociated_list);

static bool efx_same_controller(struct efx_nic *left, struct efx_nic *right)
{
	return left->type == right->type &&
		left->vpd_sn && right->vpd_sn &&
		!strcmp(left->vpd_sn, right->vpd_sn);
}

static void efx_associate(struct efx_nic *efx)
{
	struct efx_nic *other, *next;

	if (efx->primary == efx) {
		/* Adding primary function; look for secondaries */

		netif_dbg(efx, probe, efx->net_dev, "adding to primary list\n");
		list_add_tail(&efx->node, &efx_primary_list);

		list_for_each_entry_safe(other, next, &efx_unassociated_list,
					 node) {
			if (efx_same_controller(efx, other)) {
				list_del(&other->node);
				netif_dbg(other, probe, other->net_dev,
					  "moving to secondary list of %s %s\n",
					  pci_name(efx->pci_dev),
					  efx->net_dev->name);
				list_add_tail(&other->node,
					      &efx->secondary_list);
				other->primary = efx;
			}
		}
	} else {
		/* Adding secondary function; look for primary */

		list_for_each_entry(other, &efx_primary_list, node) {
			if (efx_same_controller(efx, other)) {
				netif_dbg(efx, probe, efx->net_dev,
					  "adding to secondary list of %s %s\n",
					  pci_name(other->pci_dev),
					  other->net_dev->name);
				list_add_tail(&efx->node,
					      &other->secondary_list);
				efx->primary = other;
				return;
			}
		}

		netif_dbg(efx, probe, efx->net_dev,
			  "adding to unassociated list\n");
		list_add_tail(&efx->node, &efx_unassociated_list);
	}
}

static void efx_dissociate(struct efx_nic *efx)
{
	struct efx_nic *other, *next;

	list_del(&efx->node);
	efx->primary = NULL;

	list_for_each_entry_safe(other, next, &efx->secondary_list, node) {
		list_del(&other->node);
		netif_dbg(other, probe, other->net_dev,
			  "moving to unassociated list\n");
		list_add_tail(&other->node, &efx_unassociated_list);
		other->primary = NULL;
	}
}

/* This configures the PCI device to enable I/O and DMA. */
/* This configures the PCI device to enable I/O and DMA. */
static int efx_init_io(struct efx_nic *efx)
static int efx_init_io(struct efx_nic *efx)
{
{
@@ -2214,6 +2285,8 @@ static int efx_register_netdev(struct efx_nic *efx)
			efx_init_tx_queue_core_txq(tx_queue);
			efx_init_tx_queue_core_txq(tx_queue);
	}
	}


	efx_associate(efx);

	rtnl_unlock();
	rtnl_unlock();


	rc = device_create_file(&efx->pci_dev->dev, &dev_attr_phy_type);
	rc = device_create_file(&efx->pci_dev->dev, &dev_attr_phy_type);
@@ -2227,6 +2300,7 @@ static int efx_register_netdev(struct efx_nic *efx)


fail_registered:
fail_registered:
	rtnl_lock();
	rtnl_lock();
	efx_dissociate(efx);
	unregister_netdevice(net_dev);
	unregister_netdevice(net_dev);
fail_locked:
fail_locked:
	efx->state = STATE_UNINIT;
	efx->state = STATE_UNINIT;
@@ -2568,6 +2642,8 @@ static int efx_init_struct(struct efx_nic *efx,
	int i;
	int i;


	/* Initialise common structures */
	/* Initialise common structures */
	INIT_LIST_HEAD(&efx->node);
	INIT_LIST_HEAD(&efx->secondary_list);
	spin_lock_init(&efx->biu_lock);
	spin_lock_init(&efx->biu_lock);
#ifdef CONFIG_SFC_MTD
#ifdef CONFIG_SFC_MTD
	INIT_LIST_HEAD(&efx->mtd_list);
	INIT_LIST_HEAD(&efx->mtd_list);
@@ -2586,6 +2662,8 @@ static int efx_init_struct(struct efx_nic *efx,
		NET_IP_ALIGN ? (efx->rx_prefix_size + NET_IP_ALIGN) % 4 : 0;
		NET_IP_ALIGN ? (efx->rx_prefix_size + NET_IP_ALIGN) % 4 : 0;
	efx->rx_packet_hash_offset =
	efx->rx_packet_hash_offset =
		efx->type->rx_hash_offset - efx->type->rx_prefix_size;
		efx->type->rx_hash_offset - efx->type->rx_prefix_size;
	efx->rx_packet_ts_offset =
		efx->type->rx_ts_offset - efx->type->rx_prefix_size;
	spin_lock_init(&efx->stats_lock);
	spin_lock_init(&efx->stats_lock);
	mutex_init(&efx->mac_lock);
	mutex_init(&efx->mac_lock);
	efx->phy_op = &efx_dummy_phy_operations;
	efx->phy_op = &efx_dummy_phy_operations;
@@ -2626,6 +2704,8 @@ static void efx_fini_struct(struct efx_nic *efx)
	for (i = 0; i < EFX_MAX_CHANNELS; i++)
	for (i = 0; i < EFX_MAX_CHANNELS; i++)
		kfree(efx->channel[i]);
		kfree(efx->channel[i]);


	kfree(efx->vpd_sn);

	if (efx->workqueue) {
	if (efx->workqueue) {
		destroy_workqueue(efx->workqueue);
		destroy_workqueue(efx->workqueue);
		efx->workqueue = NULL;
		efx->workqueue = NULL;
@@ -2670,6 +2750,7 @@ static void efx_pci_remove(struct pci_dev *pci_dev)


	/* Mark the NIC as fini, then stop the interface */
	/* Mark the NIC as fini, then stop the interface */
	rtnl_lock();
	rtnl_lock();
	efx_dissociate(efx);
	dev_close(efx->net_dev);
	dev_close(efx->net_dev);
	efx_disable_interrupts(efx);
	efx_disable_interrupts(efx);
	rtnl_unlock();
	rtnl_unlock();
@@ -2696,12 +2777,12 @@ static void efx_pci_remove(struct pci_dev *pci_dev)
 * always appear within the first 512 bytes.
 * always appear within the first 512 bytes.
 */
 */
#define SFC_VPD_LEN 512
#define SFC_VPD_LEN 512
static void efx_print_product_vpd(struct efx_nic *efx)
static void efx_probe_vpd_strings(struct efx_nic *efx)
{
{
	struct pci_dev *dev = efx->pci_dev;
	struct pci_dev *dev = efx->pci_dev;
	char vpd_data[SFC_VPD_LEN];
	char vpd_data[SFC_VPD_LEN];
	ssize_t vpd_size;
	ssize_t vpd_size;
	int i, j;
	int ro_start, ro_size, i, j;


	/* Get the vpd data from the device */
	/* Get the vpd data from the device */
	vpd_size = pci_read_vpd(dev, 0, sizeof(vpd_data), vpd_data);
	vpd_size = pci_read_vpd(dev, 0, sizeof(vpd_data), vpd_data);
@@ -2711,14 +2792,15 @@ static void efx_print_product_vpd(struct efx_nic *efx)
	}
	}


	/* Get the Read only section */
	/* Get the Read only section */
	i = pci_vpd_find_tag(vpd_data, 0, vpd_size, PCI_VPD_LRDT_RO_DATA);
	ro_start = pci_vpd_find_tag(vpd_data, 0, vpd_size, PCI_VPD_LRDT_RO_DATA);
	if (i < 0) {
	if (ro_start < 0) {
		netif_err(efx, drv, efx->net_dev, "VPD Read-only not found\n");
		netif_err(efx, drv, efx->net_dev, "VPD Read-only not found\n");
		return;
		return;
	}
	}


	j = pci_vpd_lrdt_size(&vpd_data[i]);
	ro_size = pci_vpd_lrdt_size(&vpd_data[ro_start]);
	i += PCI_VPD_LRDT_TAG_SIZE;
	j = ro_size;
	i = ro_start + PCI_VPD_LRDT_TAG_SIZE;
	if (i + j > vpd_size)
	if (i + j > vpd_size)
		j = vpd_size - i;
		j = vpd_size - i;


@@ -2738,6 +2820,27 @@ static void efx_print_product_vpd(struct efx_nic *efx)


	netif_info(efx, drv, efx->net_dev,
	netif_info(efx, drv, efx->net_dev,
		   "Part Number : %.*s\n", j, &vpd_data[i]);
		   "Part Number : %.*s\n", j, &vpd_data[i]);

	i = ro_start + PCI_VPD_LRDT_TAG_SIZE;
	j = ro_size;
	i = pci_vpd_find_info_keyword(vpd_data, i, j, "SN");
	if (i < 0) {
		netif_err(efx, drv, efx->net_dev, "Serial number not found\n");
		return;
	}

	j = pci_vpd_info_field_size(&vpd_data[i]);
	i += PCI_VPD_INFO_FLD_HDR_SIZE;
	if (i + j > vpd_size) {
		netif_err(efx, drv, efx->net_dev, "Incomplete serial number\n");
		return;
	}

	efx->vpd_sn = kmalloc(j + 1, GFP_KERNEL);
	if (!efx->vpd_sn)
		return;

	snprintf(efx->vpd_sn, j + 1, "%s", &vpd_data[i]);
}
}




@@ -2834,7 +2937,7 @@ static int efx_pci_probe(struct pci_dev *pci_dev,
	netif_info(efx, probe, efx->net_dev,
	netif_info(efx, probe, efx->net_dev,
		   "Solarflare NIC detected\n");
		   "Solarflare NIC detected\n");


	efx_print_product_vpd(efx);
	efx_probe_vpd_strings(efx);


	/* Set up basic I/O (BAR mappings etc) */
	/* Set up basic I/O (BAR mappings etc) */
	rc = efx_init_io(efx);
	rc = efx_init_io(efx);
+2 −0
Original line number Original line Diff line number Diff line
@@ -2247,6 +2247,8 @@ static int falcon_probe_nic(struct efx_nic *efx)
	struct falcon_board *board;
	struct falcon_board *board;
	int rc;
	int rc;


	efx->primary = efx; /* only one usable function per controller */

	/* Allocate storage for hardware specific data */
	/* Allocate storage for hardware specific data */
	nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL);
	nic_data = kzalloc(sizeof(*nic_data), GFP_KERNEL);
	if (!nic_data)
	if (!nic_data)
+23 −2
Original line number Original line Diff line number Diff line
@@ -102,6 +102,10 @@ int efx_mcdi_init(struct efx_nic *efx)
		netif_err(efx, probe, efx->net_dev,
		netif_err(efx, probe, efx->net_dev,
			  "Host already registered with MCPU\n");
			  "Host already registered with MCPU\n");


	if (efx->mcdi->fn_flags &
	    (1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY))
		efx->primary = efx;

	return 0;
	return 0;
}
}


@@ -1018,6 +1022,9 @@ void efx_mcdi_process_event(struct efx_channel *channel,
	case MCDI_EVENT_CODE_PTP_PPS:
	case MCDI_EVENT_CODE_PTP_PPS:
		efx_ptp_event(efx, event);
		efx_ptp_event(efx, event);
		break;
		break;
	case MCDI_EVENT_CODE_PTP_TIME:
		efx_time_sync_event(channel, event);
		break;
	case MCDI_EVENT_CODE_TX_FLUSH:
	case MCDI_EVENT_CODE_TX_FLUSH:
	case MCDI_EVENT_CODE_RX_FLUSH:
	case MCDI_EVENT_CODE_RX_FLUSH:
		/* Two flush events will be sent: one to the same event
		/* Two flush events will be sent: one to the same event
@@ -1132,13 +1139,27 @@ static int efx_mcdi_drv_attach(struct efx_nic *efx, bool driver_operating,
		goto fail;
		goto fail;
	}
	}


	if (driver_operating) {
		if (outlen >= MC_CMD_DRV_ATTACH_EXT_OUT_LEN) {
			efx->mcdi->fn_flags =
				MCDI_DWORD(outbuf,
					   DRV_ATTACH_EXT_OUT_FUNC_FLAGS);
		} else {
			/* Synthesise flags for Siena */
			efx->mcdi->fn_flags =
				1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL |
				1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED |
				(efx_port_num(efx) == 0) <<
				MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_PRIMARY;
		}
	}

	/* We currently assume we have control of the external link
	/* We currently assume we have control of the external link
	 * and are completely trusted by firmware.  Abort probing
	 * and are completely trusted by firmware.  Abort probing
	 * if that's not true for this function.
	 * if that's not true for this function.
	 */
	 */
	if (driver_operating &&
	if (driver_operating &&
	    outlen >= MC_CMD_DRV_ATTACH_EXT_OUT_LEN &&
	    (efx->mcdi->fn_flags &
	    (MCDI_DWORD(outbuf, DRV_ATTACH_EXT_OUT_FUNC_FLAGS) &
	     (1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL |
	     (1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL |
	      1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED)) !=
	      1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED)) !=
	    (1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL |
	    (1 << MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_LINKCTRL |
+2 −0
Original line number Original line Diff line number Diff line
@@ -94,12 +94,14 @@ struct efx_mcdi_mtd_partition {
 * struct efx_mcdi_data - extra state for NICs that implement MCDI
 * struct efx_mcdi_data - extra state for NICs that implement MCDI
 * @iface: Interface/protocol state
 * @iface: Interface/protocol state
 * @hwmon: Hardware monitor state
 * @hwmon: Hardware monitor state
 * @fn_flags: Flags for this function, as returned by %MC_CMD_DRV_ATTACH.
 */
 */
struct efx_mcdi_data {
struct efx_mcdi_data {
	struct efx_mcdi_iface iface;
	struct efx_mcdi_iface iface;
#ifdef CONFIG_SFC_MCDI_MON
#ifdef CONFIG_SFC_MCDI_MON
	struct efx_mcdi_mon hwmon;
	struct efx_mcdi_mon hwmon;
#endif
#endif
	u32 fn_flags;
};
};


#ifdef CONFIG_SFC_MCDI_MON
#ifdef CONFIG_SFC_MCDI_MON
Loading