1. 16 9月, 2011 1 次提交
    • J
      net: consolidate and fix ethtool_ops->get_settings calling · 4bc71cb9
      Jiri Pirko 提交于
      This patch does several things:
      - introduces __ethtool_get_settings which is called from ethtool code and
        from drivers as well. Put ASSERT_RTNL there.
      - dev_ethtool_get_settings() is replaced by __ethtool_get_settings()
      - changes calling in drivers so rtnl locking is respected. In
        iboe_get_rate was previously ->get_settings() called unlocked. This
        fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same
        problem. Also fixed by calling __dev_get_by_index() instead of
        dev_get_by_index() and holding rtnl_lock for both calls.
      - introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create()
        so bnx2fc_if_create() and fcoe_if_create() are called locked as they
        are from other places.
      - use __ethtool_get_settings() in bonding code
      Signed-off-by: NJiri Pirko <jpirko@redhat.com>
      
      v2->v3:
      	-removed dev_ethtool_get_settings()
      	-added ASSERT_RTNL into __ethtool_get_settings()
      	-prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock
      	 around it and __ethtool_get_settings() call
      v1->v2:
              add missing export_symbol
      Reviewed-by: Ben Hutchings <bhutchings@solarflare.com> [except FCoE bits]
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4bc71cb9
  2. 17 8月, 2011 5 次提交
  3. 01 7月, 2011 1 次提交
    • A
      net: add external loopback test in ethtool self test · 0209bcd4
      Amit Kumar Salecha 提交于
      External loopback test can be performed by application without any driver
      support on normal Ethernet cards.
      But on CNA devices, where multiple functions share same physical port.
      Here internal loopback test and external loopback test can be initiated by
      multiple functions at same time. To co exist all functions, firmware need
      to regulate what test can be run by which function. So before performing external
      loopback test, command need to send to firmware, which will quiescent other functions.
      
      User may not want to run external loopback test always. As special cable need to be
      connected for this test.
      So adding explicit flag in ethtool self test, which will specify interface
      to perform external loopback test.
       ETH_TEST_FL_EXTERNAL_LB: Application set to request external loopback test
       ETH_TEST_FL_EXTERNAL_LB_DONE: Driver ack if test performed
      Signed-off-by: NAmit Kumar Salecha <amit.salecha@qlogic.com>
      Reviewed-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0209bcd4
  4. 10 6月, 2011 1 次提交
  5. 09 6月, 2011 1 次提交
    • A
      v2 ethtool: remove support for ETHTOOL_GRXNTUPLE · bff55273
      Alexander Duyck 提交于
      This change is meant to remove all support for displaying an ntuple as
      strings via ETHTOOL_GRXNTUPLE.  The reason for this change is due to the
      fact that multiple issues have been found including:
       - Multiple buffer overruns for strings being displayed.
       - Incorrect filters displayed, cleared filters with ring of -2 are displayed
       - Setting get_rx_ntuple displays no rules if defined.
       - Endianess wrong on displayed values.
       - Hard limit of 1024 filters makes display functionality extremely limited
      
      The only driver that had supported this interface was ixgbe.  Since it no
      longer uses the interface and due to the issues mentioned above I am
      submitting this patch to remove it.
      
      v2:
      Updated based on comments from Ben Hutchings
       - Left ETH_SS_NTUPLE_FILTERS in code but commented on it being deprecated
       - Removed ethtool_rx_ntuple_list and ethtool_rx_ntuple_flow_spec_container
       - Left ETHTOOL_GRXNTUPLE but commented it as deprecated
      
      Also cleaned up set_rx_ntuple since there is no flow spec container to
      maintain we can drop all the code for the alloc and free of it and just
      return ops->set_rx_ntuple().
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@intel.com>
      Acked-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bff55273
  6. 14 5月, 2011 1 次提交
    • A
      ethtool: Added support for FW dump · 29dd54b7
      Anirban Chakraborty 提交于
      Added code to take FW dump via ethtool. Dump level can be controlled via setting the
      dump flag. A get function is provided to query the current setting of the dump flag.
      Dump data is obtained from the driver via a separate get function.
      
      Changes from v3:
      Fixed buffer length issue in ethtool_get_dump_data function.
      Updated kernel doc for ethtool_dump struct and get_dump_flag function.
      
      Changes from v2:
      Provided separate commands for get flag and data.
      Check for minimum of the two buffer length obtained via ethtool and driver and
      use that for dump buffer
      Pass up the driver return error codes up to the caller.
      Added kernel doc comments.
      Signed-off-by: NAnirban Chakraborty <anirban.chakraborty@qlogic.com>
      Reviewed-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      29dd54b7
  7. 09 5月, 2011 2 次提交
  8. 30 4月, 2011 2 次提交
  9. 15 4月, 2011 1 次提交
    • A
      ethtool: allow custom interval for physical identification · fce55922
      Allan, Bruce W 提交于
      When physical identification of an adapter is done by toggling the
      mechanism on and off through software utilizing the set_phys_id operation,
      it is done with a fixed duration for both on and off states.  Some drivers
      may want to set a custom duration for the on/off intervals.  This patch
      changes the API so the return code from the driver's entry point when it
      is called with ETHTOOL_ID_ACTIVE can specify the frequency at which to
      cycle the on/off states, and updates the drivers that have already been
      converted to use the new set_phys_id and use the synchronous method for
      identifying an adapter.
      
      The physical identification frequency set in the updated drivers is based
      on how it was done prior to the introduction of set_phys_id.
      
      Compile tested only.  Also fixes a compiler warning in sfc.
      
      v2: drivers do not return -EINVAL for ETHOOL_ID_ACTIVE
      v3: fold patchset into single patch and cleanup per Ben's feedback
      Signed-off-by: NBruce Allan <bruce.w.allan@intel.com>
      Cc: Ben Hutchings <bhutchings@solarflare.com>
      Cc: Sathya Perla <sathya.perla@emulex.com>
      Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com>
      Cc: Ajit Khaparde <ajit.khaparde@emulex.com>
      Cc: Michael Chan <mchan@broadcom.com>
      Cc: Eilon Greenstein <eilong@broadcom.com>
      Cc: Divy Le Ray <divy@chelsio.com>
      Cc: Don Fry <pcnet32@frontier.com>
      Cc: Jon Mason <jdmason@kudzu.us>
      Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
      Cc: Steve Hodgson <shodgson@solarflare.com>
      Cc: Stephen Hemminger <shemminger@linux-foundation.org>
      Cc: Matt Carlson <mcarlson@broadcom.com>
      Acked-by: NJon Mason <jdmason@kudzu.us>
      Acked-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fce55922
  10. 14 4月, 2011 1 次提交
    • A
      net: ethtool support to configure number of channels · 8b5933c3
      amit salecha 提交于
      Ethtool support to configure RX, TX and other channels. combined field
      in struct ethtool_channels to reflect set of channel (RX, TX or other).
      Other channel can be link interrupts, SR-IOV coordination etc.
      
      ETHTOOL_GCHANNELS will report max and current number of RX channels,
      max and current number of TX channels, max and current number of other channel
      or max and current number of combined channel.
      
      Number of channel can be modify upto max number of channel through
      ETHTOOL_SCHANNELS command.
      
      Ben Hutchings:
      o define 'combined' and 'other' types.  Most multiqueue drivers pair up RX and TX
        queues so that most channels combine RX and TX work.
      o Please could you use a kernel-doc comment to describe the structure.
      Signed-off-by: NAmit Kumar Salecha <amit.salecha@qlogic.com>
      Reviewed-by: NBen Hutchings <bhutchings@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b5933c3
  11. 12 4月, 2011 1 次提交
  12. 05 4月, 2011 3 次提交
  13. 31 3月, 2011 1 次提交
  14. 28 3月, 2011 1 次提交
    • S
      net: fix ethtool->set_flags not intended -EINVAL return value · 673e63c6
      Stanislaw Gruszka 提交于
      After commit d5dbda23 "ethtool: Add
      support for vlan accleration.", drivers that have NETIF_F_HW_VLAN_TX,
      and/or NETIF_F_HW_VLAN_RX feature, but do not allow enable/disable vlan
      acceleration via ethtool set_flags, always return -EINVAL from that
      function. Fix by returning -EINVAL only if requested features do not
      match current settings and can not be changed by driver.
      
      Change any driver that define ethtool->set_flags to use
      ethtool_invalid_flags() to avoid similar problems in the future
      (also on drivers that do not have the problem).
      
      Tested with modified (to reproduce this bug) myri10ge driver.
      
      Cc: stable@kernel.org # 2.6.37+
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      673e63c6
  15. 22 3月, 2011 1 次提交
  16. 19 3月, 2011 1 次提交
  17. 24 2月, 2011 1 次提交
  18. 18 2月, 2011 2 次提交
    • M
      net: introduce NETIF_F_RXCSUM · e83d360d
      Michał Mirosław 提交于
      Introduce NETIF_F_RXCSUM to replace device-private flags for RX checksum
      offload. Integrate it with ndo_fix_features.
      
      ethtool_op_get_rx_csum() is removed altogether as nothing in-tree uses it.
      Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e83d360d
    • M
      net: Introduce new feature setting ops · 5455c699
      Michał Mirosław 提交于
      This introduces a new framework to handle device features setting.
      It consists of:
        - new fields in struct net_device:
      	+ hw_features - features that hw/driver supports toggling
      	+ wanted_features - features that user wants enabled, when possible
        - new netdev_ops:
      	+ feat = ndo_fix_features(dev, feat) - API checking constraints for
      		enabling features or their combinations
      	+ ndo_set_features(dev) - API updating hardware state to match
      		changed dev->features
        - new ethtool commands:
      	+ ETHTOOL_GFEATURES/ETHTOOL_SFEATURES: get/set dev->wanted_features
      		and trigger device reconfiguration if resulting dev->features
      		changed
      	+ ETHTOOL_GSTRINGS(ETH_SS_FEATURES): get feature bits names (meaning)
      Signed-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5455c699
  19. 11 12月, 2010 1 次提交
  20. 21 10月, 2010 1 次提交
  21. 22 9月, 2010 2 次提交
  22. 18 9月, 2010 2 次提交
  23. 16 9月, 2010 2 次提交
  24. 01 7月, 2010 2 次提交
  25. 29 6月, 2010 1 次提交
    • B
      ethtool: Fix potential user buffer overflow for ETHTOOL_{G, S}RXFH · bf988435
      Ben Hutchings 提交于
      struct ethtool_rxnfc was originally defined in 2.6.27 for the
      ETHTOOL_{G,S}RXFH command with only the cmd, flow_type and data
      fields.  It was then extended in 2.6.30 to support various additional
      commands.  These commands should have been defined to use a new
      structure, but it is too late to change that now.
      
      Since user-space may still be using the old structure definition
      for the ETHTOOL_{G,S}RXFH commands, and since they do not need the
      additional fields, only copy the originally defined fields to and
      from user-space.
      Signed-off-by: NBen Hutchings <bhutchings@solarflare.com>
      Cc: stable@kernel.org
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bf988435
  26. 15 6月, 2010 1 次提交
  27. 08 4月, 2010 1 次提交