diff options
| author | David S. Miller <davem@davemloft.net> | 2013-04-19 16:16:42 -0400 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-04-19 16:16:42 -0400 | 
| commit | 92352df1dbc5fa2dacfa3b16d57b4641d26be880 (patch) | |
| tree | 0078d9ad099b27e4f15efe0ca3ec3dfa9b817f5b /drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | |
| parent | 42bbcb780307d85e6585971242f32bd4f6401c99 (diff) | |
| parent | c63762782076765433b602b215ee394af54d1066 (diff) | |
| download | olio-linux-3.10-92352df1dbc5fa2dacfa3b16d57b4641d26be880.tar.xz olio-linux-3.10-92352df1dbc5fa2dacfa3b16d57b4641d26be880.zip  | |
Merge branch 'qlcnic'
Rajesh Borundia says:
====================
* "qlcnic: Change 82xx adapter VLAN id endian type".
  - Adapter requires VLAN id in little endian. VLAN id was being
    converted to __le16 and then passed as a parameter. Pass VLAN id
    as u16 and then use cpu_to_le16 at appropriate places. It is
    appropriate for net-next as SR-IOV patches have a dependency on it.
* "qlcnic: Fix loopback test for SR-IOV PF".
  - It is appropriate for net-next as change is needed for SRIOV PF
    only.
* Remaining patches add enhancements to SR-IOV functionality like
  - FLR handling
  - Adapter reset recovery handling
  - iproute2 tool support for configuring MAC address, Tx rate and
    VLAN id.
  - Mailbox polling support for SR-IOV PF in case mailbox interrupts
    are disabled.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c')
| -rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 34 | 
1 files changed, 29 insertions, 5 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c index f4f279d5cba..9f7aade4667 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c @@ -859,9 +859,11 @@ clear_diag_irq:  	return ret;  } -#define QLCNIC_ILB_PKT_SIZE 64 -#define QLCNIC_NUM_ILB_PKT	16 -#define QLCNIC_ILB_MAX_RCV_LOOP 10 +#define QLCNIC_ILB_PKT_SIZE		64 +#define QLCNIC_NUM_ILB_PKT		16 +#define QLCNIC_ILB_MAX_RCV_LOOP		10 +#define QLCNIC_LB_PKT_POLL_DELAY_MSEC	1 +#define QLCNIC_LB_PKT_POLL_COUNT	20  static void qlcnic_create_loopback_buff(unsigned char *data, u8 mac[])  { @@ -898,9 +900,9 @@ int qlcnic_do_lb_test(struct qlcnic_adapter *adapter, u8 mode)  		loop = 0;  		do { -			msleep(1); +			msleep(QLCNIC_LB_PKT_POLL_DELAY_MSEC);  			qlcnic_process_rcv_ring_diag(sds_ring); -			if (loop++ > QLCNIC_ILB_MAX_RCV_LOOP) +			if (loop++ > QLCNIC_LB_PKT_POLL_COUNT)  				break;  		} while (!adapter->ahw->diag_cnt); @@ -1539,3 +1541,25 @@ const struct ethtool_ops qlcnic_ethtool_ops = {  	.get_dump_data = qlcnic_get_dump_data,  	.set_dump = qlcnic_set_dump,  }; + +const struct ethtool_ops qlcnic_sriov_vf_ethtool_ops = { +	.get_settings		= qlcnic_get_settings, +	.get_drvinfo		= qlcnic_get_drvinfo, +	.get_regs_len		= qlcnic_get_regs_len, +	.get_regs		= qlcnic_get_regs, +	.get_link		= ethtool_op_get_link, +	.get_eeprom_len		= qlcnic_get_eeprom_len, +	.get_eeprom		= qlcnic_get_eeprom, +	.get_ringparam		= qlcnic_get_ringparam, +	.set_ringparam		= qlcnic_set_ringparam, +	.get_channels		= qlcnic_get_channels, +	.get_pauseparam		= qlcnic_get_pauseparam, +	.get_wol		= qlcnic_get_wol, +	.get_strings		= qlcnic_get_strings, +	.get_ethtool_stats	= qlcnic_get_ethtool_stats, +	.get_sset_count		= qlcnic_get_sset_count, +	.get_coalesce		= qlcnic_get_intr_coalesce, +	.set_coalesce		= qlcnic_set_intr_coalesce, +	.set_msglevel		= qlcnic_set_msglevel, +	.get_msglevel		= qlcnic_get_msglevel, +};  |