11 May, 2012

4 commits

  • Use the new bool function ether_addr_equal_64bits to add
    some clarity and reduce the likelihood for misuse of
    compare_ether_addr_64bits for sorting.

    Done via cocci script:

    $ cat compare_ether_addr_64bits.cocci
    @@
    expression a,b;
    @@
    - !compare_ether_addr_64bits(a, b)
    + ether_addr_equal_64bits(a, b)

    @@
    expression a,b;
    @@
    - compare_ether_addr_64bits(a, b)
    + !ether_addr_equal_64bits(a, b)

    @@
    expression a,b;
    @@
    - !ether_addr_equal_64bits(a, b) == 0
    + ether_addr_equal_64bits(a, b)

    @@
    expression a,b;
    @@
    - !ether_addr_equal_64bits(a, b) != 0
    + !ether_addr_equal_64bits(a, b)

    @@
    expression a,b;
    @@
    - ether_addr_equal_64bits(a, b) == 0
    + !ether_addr_equal_64bits(a, b)

    @@
    expression a,b;
    @@
    - ether_addr_equal_64bits(a, b) != 0
    + ether_addr_equal_64bits(a, b)

    @@
    expression a,b;
    @@
    - !!ether_addr_equal_64bits(a, b)
    + ether_addr_equal_64bits(a, b)

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Use the new bool function ether_addr_equal to add
    some clarity and reduce the likelihood for misuse
    of compare_ether_addr for sorting.

    Done via cocci script:

    $ cat compare_ether_addr.cocci
    @@
    expression a,b;
    @@
    - !compare_ether_addr(a, b)
    + ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - compare_ether_addr(a, b)
    + !ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - !ether_addr_equal(a, b) == 0
    + ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - !ether_addr_equal(a, b) != 0
    + !ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - ether_addr_equal(a, b) == 0
    + !ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - ether_addr_equal(a, b) != 0
    + ether_addr_equal(a, b)

    @@
    expression a,b;
    @@
    - !!ether_addr_equal(a, b)
    + ether_addr_equal(a, b)

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • Calling pci_disable_sriov() while VFs are assigned to VMs causes
    kernel panic. This patch uses PCI_DEV_FLAGS_ASSIGNED bit state of the
    VF's pci_dev to avoid this. Also, the unconditional function reset cmd
    issued on a PF probe can delete the VF configuration for the
    previously enabled VFs. A scratchpad register is now used to issue a
    function reset only when needed (i.e., in a crash dump scenario.)

    Signed-off-by: Sathya Perla
    Signed-off-by: David S. Miller

    Sathya Perla
     
  • David S. Miller
     

10 May, 2012

23 commits

  • Update version number to better match the version of the out of tree
    driver with similar functionality.

    Signed-off-by: Don Skidmore
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Don Skidmore
     
  • When the hwmon code was initially added it was with the assumption that a
    sysfs patch would be also coming soon. Since that isn't the case some
    clean up needs to be done. This patch does that.

    Signed-off-by: Don Skidmore
    Tested-by: Stephen Ko
    Signed-off-by: Jeff Kirsher

    Don Skidmore
     
  • Kernel software timestamping requires that the driver calls skb_tx_timestamp
    just before passing the skb to the MAC, in order to provide the best software
    timestamps. This patch adds this call for that support.

    Signed-off-by: Jacob Keller
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • This patch adds support for the ethtool get_ts_info operation, which enables
    access of available timestamp/timesync support for that device. It can query
    which ptp clock device is associated with the particular port.

    Signed-off-by: Jacob Keller
    Tested-by: Stephen Ko
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • The current value of the udelay timeout for ixgbe_disable_rx_buff is too
    short. This causes the security path to not not be properly disabled during
    the section that is meant to have it turned off. The end result causes a race
    condition that results in RX issues.

    Signed-off-by: Jacob Keller
    Tested-by: Phil Schmitt
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • This patch enables the PPS system in the PHC framework, by enabling
    the clock-out feature on the X540 device. Causes the SDP0 to be set as
    a 1Hz clock. Also configures the timesync interrupt cause in order to
    report each pulse to the PPS via the PHC framework, which can be used
    for general system clock synchronization. (This allows a stable method
    for tuning the general system time via the on-board SYSTIM register
    based clock.)

    Signed-off-by: Jacob E Keller
    Tested-by: Stephen Ko
    Signed-off-by: Jeff Kirsher

    Jacob E Keller
     
  • This patch enables hardware timestamping for use with PTP software by
    extracting a ns counter from an arbitrary fixed point cycles counter.
    The hardware generates SYSTIME registers using the DMA tick which
    changes based on the current link speed. These SYSTIME registers are
    converted to ns using the cyclecounter and timecounter structures
    provided by the kernel. Using the SO_TIMESTAMPING api, software can
    enable and access timestamps for PTP packets.

    The SO_TIMESTAMPING API has space for 3 different kinds of timestamps,
    SYS, RAW, and SOF. SYS hardware timestamps are hardware ns values that
    are then scaled to the software clock. RAW hardware timestamps are the
    direct raw value of the ns counter. SOF software timestamps are the
    software timestamp calculated as close as possible to the software
    transmit, but are not offloaded to the hardware. This patch only
    supports the RAW hardware timestamps due to inefficiency of the SYS
    design.

    This patch also enables the PHC subsystem features for atomically
    adjusting the cycle register, and adjusting the clock frequency in
    parts per billion. This frequency adjustment works by slightly
    adjusting the value added to the cycle registers each DMA tick. This
    causes the hardware registers to overflow rapidly (approximately once
    every 34 seconds, when at 10gig link). To solve this, the timecounter
    structure is used, along with a timer set for every 25 seconds. This
    allows for detecting register overflow and converting the cycle
    counter registers into ns values needed for providing useful
    timestamps to the network stack.

    Only the basic required clock functions are supported at this time,
    although the hardware supports some ancillary features and these could
    easily be enabled in the future.

    Note that use of this hardware timestamping requires modifying daemon
    software to use the SO_TIMESTAMPING API for timestamps, and the
    ptp_clock PHC framework for accessing the clock. The timestamps have
    no relation to the system time at all, so software must use the posix
    clock generated by the PHC framework instead.

    Signed-off-by: Jacob E Keller
    Tested-by: Stephen Ko
    Signed-off-by: Jeff Kirsher

    Jacob Keller
     
  • If the VF sends a MACVLAN request with index of zero then it is not
    actually trying to add a filter. Check the index value and only
    indicate that operation is not allowed when the VF is actually trying
    to add a filter.

    Signed-off-by: Greg Rose
    Tested-by: Sibai Li
    Signed-off-by: Jeff Kirsher

    Greg Rose
     
  • The drop enable bit can be used to improve the performance of the adapter
    in the case of multiple queues being present. This performance gain is due
    to the fact that some slower CPUs can cause the FIFO to backfill preventing
    faster CPUs from receiving additional work. By setting the drop enable bit
    we prevent this and instead just drop the packets that would have been
    bound for the slower CPU.

    Signed-off-by: Alexander Duyck
    Tested-by: Ross Brattain
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • This change cleans up the logic in the priority based flow control
    configuration routines. Both the 82599 and 82598 based routines perform
    similar functions however they are both arranged completely differently.
    This patch goes over both of them to clean up the code.

    In addition I am dropping the ixgbe_fc_pfc flow control mode and instead
    just replacing it with checks for if priority flow control is enabled.
    This allows us to maintain some of the link flow control information which
    allows for an easier transition between link and priority flow control.

    Signed-off-by: Alexander Duyck
    Tested-by: Ross Brattain
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • Previously we would get a mailbox error and still process the message.
    Instead we should exit on error.

    In addition we should also be flushing the ACK of the message so that we
    can guarantee that the other end is aware we have received the message
    while we are processing it.

    Signed-off-by: Alexander Duyck
    Tested-by: Sibai Li
    Signed-off-by: Jeff Kirsher

    Alexander Duyck
     
  • Current igb outputs registers related to TX/RX queues(ex. RDT, RDH, TDT, TDH).
    But it thinks the number of RX/TX queues is 4. But 82576 has 16 RX/TX queues.
    This patch modifies igb to output the rest of the registers if the device is
    82576.

    Signed-off-by: Koki Sanagi
    Acked-by: Carolyn Wyborny
    Tested-by: Aaron Brown
    Signed-off-by: Jeff Kirsher

    Koki Sanagi
     
  • o Linux stack estimates MSS from skb->len or skb_shinfo(skb)->gso_size.
    In case of LRO skb->len is aggregate of len of number of packets hence MSS
    obtained using skb->len would be incorrect. Incorrect estimation of recv MSS
    would lead to delayed acks in some traffic patterns (which sends two or three
    packets and wait for ack and only then send remaining packets). This leads to
    drop in performance. Hence we need to set gso_size to MSS obtained from firmware.

    o This is fixed recently in firmware hence the MSS is obtained based on
    capability. If fw is capable of sending the MSS then only driver sets the gso_size.

    Signed-off-by: Rajesh Borundia
    Signed-off-by: David S. Miller

    Rajesh Borundia
     
  • Driver queries DIMM information from firmware and accordingly
    sets "presence" field of the structure.
    "presence" field when set to 0xff denotes invalid flag. And when
    set to 0x0 denotes DIMM memory is not present.

    Signed-off-by: Sucheta Chakraborty
    Signed-off-by: Rajesh Borundia
    Signed-off-by: David S. Miller

    Sucheta Chakraborty
     
  • o 0x3, 0x7, 0xF, 0x1F, 0x3F, 0x7F and 0xFF are the allowed capture masks.

    Signed-off-by: Manish chopra
    Signed-off-by: Rajesh Borundia
    Signed-off-by: David S. Miller

    Manish chopra
     
  • disable fw dump by default at start up.

    Signed-off-by: Sritej Velaga
    Signed-off-by: Rajesh Borundia
    Signed-off-by: David S. Miller

    Sritej Velaga
     
  • Signed-off-by: Ben Hutchings

    Ben Hutchings
     
  • Currently allows for SFP+ eeprom to be returned using the ethtool API.
    This can be extended in future to handle different eeprom formats
    and sizes

    Signed-off-by: Stuart Hodgson
    [bwh: Drop redundant validation, comment, whitespace]
    Signed-off-by: Ben Hutchings

    Stuart Hodgson
     
  • Previously we refilled with much larger batches, which caused large latency
    spikes. We now have many more much much smaller spikes!

    Signed-off-by: Ben Hutchings

    David Riddoch
     
  • There was no runtime control of the fast_fill_limit in any case, so purged
    that field.

    Signed-off-by: Ben Hutchings

    David Riddoch
     
  • We need to clear the private data pointer in the PCI device.
    Also reorder cleanup in efx_pci_remove() for symmetry.

    Signed-off-by: Ben Hutchings

    Ben Hutchings
     
  • efx_nic_fatal_interrupt() disables DMA before scheduling a reset.
    After this, we need not and *cannot* flush queues.

    Signed-off-by: Ben Hutchings

    Stuart Hodgson
     
  • During merge of net to net-next the changes in patch:

    e1000e: Fix default interrupt throttle rate not set in NIC HW

    got munged in param.c of the e1000e driver. This rectifies the
    merge issues.

    Signed-off-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Jeff Kirsher
     

09 May, 2012

1 commit


08 May, 2012

12 commits

  • This patch allows the GPIO/LED settings to be configured by the
    EEPROM if present, and only sets the default values (LED outputs
    for link/activity) when an EEPROM is not detected.

    Signed-off-by: Steve Glendinning
    Signed-off-by: David S. Miller

    Steve Glendinning
     
  • Only a write is necessary to clear the interrupt status, and we
    don't use the value from the preceding read operation. This
    patch eliminates the unnecessary read.

    Signed-off-by: Steve Glendinning
    Signed-off-by: David S. Miller

    Steve Glendinning
     
  • This patch defines PHY_INT_SRC_CLEAR_ALL to replace the value 0xffff
    in order to be more self-documenting.

    This patch should make no functional change, it is purely cosmetic.

    Signed-off-by: Steve Glendinning
    Signed-off-by: David S. Miller

    Steve Glendinning
     
  • Conflicts:
    drivers/net/ethernet/intel/e1000e/param.c
    drivers/net/wireless/iwlwifi/iwl-agn-rx.c
    drivers/net/wireless/iwlwifi/iwl-trans-pcie-rx.c
    drivers/net/wireless/iwlwifi/iwl-trans.h

    Resolved the iwlwifi conflict with mainline using 3-way diff posted
    by John Linville and Stephen Rothwell. In 'net' we added a bug
    fix to make iwlwifi report a more accurate skb->truesize but this
    conflicted with RX path changes that happened meanwhile in net-next.

    In e1000e a conflict arose in the validation code for settings of
    adapter->itr. 'net-next' had more sophisticated logic so that
    logic was used.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Michael S. Tsirkin says:

    --------------------
    There are mostly bugfixes here.
    I hope to merge some more patches by 3.5, in particular
    vlan support fixes are waiting for Eric's ack,
    and a version of tracepoint patch might be
    ready in time, but let's merge what's ready so it's testable.

    This includes a ton of zerocopy fixes by Jason -
    good stuff but too intrusive for 3.4 and zerocopy is experimental
    anyway.

    virtio supported delayed interrupt for a while now
    so adding support to the virtio tool made sense
    --------------------

    Signed-off-by: David S. Miller

    David S. Miller
     
  • The GPIO pins select which sub bus is connected to the master.

    Initially tested with an sn74cbtlv3253 switch device wired into the
    MDIO bus.

    Signed-off-by: David Daney
    Signed-off-by: David S. Miller

    David Daney
     
  • This patch adds a somewhat generic framework for MDIO bus
    multiplexers. It is modeled on the I2C multiplexer.

    The multiplexer is needed if there are multiple PHYs with the same
    address connected to the same MDIO bus adepter, or if there is
    insufficient electrical drive capability for all the connected PHY
    devices.

    Conceptually it could look something like this:

    ------------------
    | Control Signal |
    --------+---------
    |
    --------------- --------+------
    | MDIO MASTER |---| Multiplexer |
    --------------- --+-------+----
    | |
    C C
    h h
    i i
    l l
    d d
    | |
    --------- A B ---------
    | | | | | |
    | PHY@1 +-------+ +---+ PHY@1 |
    | | | | | |
    --------- | | ---------
    --------- | | ---------
    | | | | | |
    | PHY@2 +-------+ +---+ PHY@2 |
    | | | |
    --------- ---------

    This framework configures the bus topology from device tree data. The
    mechanics of switching the multiplexer is left to device specific
    drivers.

    The follow-on patch contains a multiplexer driven by GPIO lines.

    Signed-off-by: David Daney
    Signed-off-by: David S. Miller

    David Daney
     
  • Add of_mdio_find_bus() which allows an mii_bus to be located given its
    associated the device tree node.

    This is needed by the follow-on patch to add a driver for MDIO bus
    multiplexers.

    The of_mdiobus_register() function is modified so that the device tree
    node is recorded in the mii_bus. Then we can find it again by
    iterating over all mdio_bus_class devices.

    Because the OF device tree has now become an integral part of the
    kernel, this can live in mdio_bus.c (which contains the needed
    mdio_bus_class structure) instead of of_mdio.c.

    Signed-off-by: David Daney
    Cc: Grant Likely
    Cc: "David S. Miller"
    Signed-off-by: David S. Miller

    David Daney
     
  • If Kernel CAPI is compiled without CONFIG_ISDN_CAPI_MIDDLEWARE,
    the structure retrieved via capincci_find() is never actually
    used, so don't compile that function in that case.

    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • Fix up some of the readibility deterioration caused by the recent
    whitespace coding style cleanup.

    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • Various functions in the Gigaset driver were using different
    conventions for the meaning of their int return values.
    Align them to the usual negative error numbers convention.

    Inspired-by: Julia Lawall
    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt
     
  • Functions clear_at_state and free_strings did the same thing;
    drop one of them, keeping the more descriptive name.
    Drop a redundant call.
    Rename function dealloc_at_states to dealloc_temp_at_states
    to clarify its purpose.

    Signed-off-by: Tilman Schmidt
    Signed-off-by: David S. Miller

    Tilman Schmidt