02 Apr, 2014

1 commit

  • This commit fixes a build error reported by Fengguang, that is
    triggered when CONFIG_NETWORK_PHY_TIMESTAMPING is not set:

    ERROR: "ptp_classify_raw" [drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.ko] undefined!

    The fix is to introduce its own file for the PTP BPF classifier,
    so that PTP_1588_CLOCK and/or NETWORK_PHY_TIMESTAMPING can select
    it independently from each other. IXP4xx driver on ARM needs to
    select it as well since it does not seem to select PTP_1588_CLOCK
    or similar that would pull it in automatically.

    This also allows for hiding all of the internals of the BPF PTP
    program inside that file, and only exporting relevant API bits
    to drivers.

    This patch also adds a kdoc documentation of ptp_classify_raw()
    API to make it clear that it can return PTP_CLASS_* defines. Also,
    the BPF program has been translated into bpf_asm code, so that it
    can be more easily read and altered (extensively documented in [1]).

    In the kernel tree under tools/net/ we have bpf_asm and bpf_dbg
    tools, so the commented program can simply be translated via
    `./bpf_asm -c prog` where prog is a file that contains the
    commented code. This makes it easily readable/verifiable and when
    there's a need to change something, jump offsets etc do not need
    to be replaced manually which can be very error prone. Instead,
    a newly translated version via bpf_asm can simply replace the old
    code. I have checked opcode diffs before/after and it's the very
    same filter.

    [1] Documentation/networking/filter.txt

    Fixes: 164d8c666521 ("net: ptp: do not reimplement PTP/BPF classifier")
    Reported-by: Fengguang Wu
    Signed-off-by: Daniel Borkmann
    Signed-off-by: Alexei Starovoitov
    Cc: Richard Cochran
    Cc: Jiri Benc
    Acked-by: Richard Cochran
    Signed-off-by: David S. Miller

    Daniel Borkmann
     

22 Mar, 2014

3 commits


16 Jan, 2014

1 commit

  • On archs like S390 or um this driver cannot build nor work.
    Make it depend on HAS_IOMEM to bypass build failures.

    drivers/ptp/ptp_pch.c: In function ‘pch_remove’:
    drivers/ptp/ptp_pch.c:571:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
    drivers/ptp/ptp_pch.c: In function ‘pch_probe’:
    drivers/ptp/ptp_pch.c:621:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]

    Signed-off-by: Richard Weinberger
    Signed-off-by: David S. Miller

    Richard Weinberger
     

27 Sep, 2013

1 commit

  • This platform supports gpiolib, so remove the custom API use
    and replace with calls to gpiolib. Also request the GPIO before
    starting to use it.

    Cc: Imre Kaloz
    Cc: Alexandre Courbot
    Cc: netdev@vger.kernel.org
    Acked-by: Richard Cochran
    Acked-by: Krzysztof Halasa
    Signed-off-by: Linus Walleij

    Linus Walleij
     

27 Jul, 2013

1 commit


25 Jun, 2013

1 commit

  • Some drivers can be built on more platforms than they run on. This is
    a burden for users and distributors who package a kernel. They have to
    manually deselect some (for them useless) drivers when updating their
    configs via oldconfig. And yet, sometimes it is even impossible to
    disable the drivers without patching the kernel.

    Introduce a new config option COMPILE_TEST and make all those drivers
    to depend on the platform they run on, or on the COMPILE_TEST option.
    Now, when users/distributors choose COMPILE_TEST=n they will not have
    the drivers in their allmodconfig setups, but developers still can
    compile-test them with COMPILE_TEST=y.

    Now the drivers where we use this new option:
    * PTP_1588_CLOCK_PCH: The PCH EG20T is only compatible with Intel Atom
    processors so it should depend on x86.
    * FB_GEODE: Geode is 32-bit only so only enable it for X86_32.
    * USB_CHIPIDEA_IMX: The OF_DEVICE dependency will be met on powerpc
    systems -- which do not actually support the hardware via that
    method.
    * INTEL_MID_PTI: It is specific to the Penwell type of Intel Atom
    device.

    [v2]
    * remove EXPERT dependency

    [gregkh - remove chipidea portion, as it's incorrect, and also doesn't
    apply to my driver-core tree]

    Signed-off-by: Jiri Slaby
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Jeff Mahoney
    Cc: Alexander Shishkin
    Cc: linux-usb@vger.kernel.org
    Cc: Florian Tobias Schandinat
    Cc: linux-geode@lists.infradead.org
    Cc: linux-fbdev@vger.kernel.org
    Cc: Richard Cochran
    Cc: netdev@vger.kernel.org
    Cc: Ben Hutchings
    Cc: "Keller, Jacob E"
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

26 May, 2013

1 commit


13 Apr, 2013

1 commit

  • As network adapters supporting PTP are becoming more common, machines with
    many NICs suddenly have many PHCs, too. The current limit of eight /dev/ptp*
    char devices (and thus, 8 network interfaces with PHC) is insufficient. Let
    the ptp driver allocate the char devices dynamically.

    Tested with 28 PHCs, removing and re-adding some of them.

    Thanks to Ben Hutchings for advice leading to simpler and cleaner patch.

    Signed-off-by: Jiri Benc
    Acked-by: Richard Cochran
    Signed-off-by: David S. Miller

    Jiri Benc
     

28 Mar, 2013

1 commit

  • This fixes a number of sparse warnings like:
    warning: incorrect type in argument 2 (different address spaces)
    expected void volatile [noderef] *addr
    got unsigned int *

    warning: Using plain integer as NULL pointer

    Additionally this fixes a warning from checkpatch.pl like:
    WARNING: sizeof pch_param.station should be sizeof(pch_param.station)

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

    Sahara
     

27 Mar, 2013

1 commit


13 Dec, 2012

1 commit

  • Pull networking changes from David Miller:

    1) Allow to dump, monitor, and change the bridge multicast database
    using netlink. From Cong Wang.

    2) RFC 5961 TCP blind data injection attack mitigation, from Eric
    Dumazet.

    3) Networking user namespace support from Eric W. Biederman.

    4) tuntap/virtio-net multiqueue support by Jason Wang.

    5) Support for checksum offload of encapsulated packets (basically,
    tunneled traffic can still be checksummed by HW). From Joseph
    Gasparakis.

    6) Allow BPF filter access to VLAN tags, from Eric Dumazet and
    Daniel Borkmann.

    7) Bridge port parameters over netlink and BPDU blocking support
    from Stephen Hemminger.

    8) Improve data access patterns during inet socket demux by rearranging
    socket layout, from Eric Dumazet.

    9) TIPC protocol updates and cleanups from Ying Xue, Paul Gortmaker, and
    Jon Maloy.

    10) Update TCP socket hash sizing to be more in line with current day
    realities. The existing heurstics were choosen a decade ago.
    From Eric Dumazet.

    11) Fix races, queue bloat, and excessive wakeups in ATM and
    associated drivers, from Krzysztof Mazur and David Woodhouse.

    12) Support DOVE (Distributed Overlay Virtual Ethernet) extensions
    in VXLAN driver, from David Stevens.

    13) Add "oops_only" mode to netconsole, from Amerigo Wang.

    14) Support set and query of VEB/VEPA bridge mode via PF_BRIDGE, also
    allow DCB netlink to work on namespaces other than the initial
    namespace. From John Fastabend.

    15) Support PTP in the Tigon3 driver, from Matt Carlson.

    16) tun/vhost zero copy fixes and improvements, plus turn it on
    by default, from Michael S. Tsirkin.

    17) Support per-association statistics in SCTP, from Michele
    Baldessari.

    And many, many, driver updates, cleanups, and improvements. Too
    numerous to mention individually.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits)
    net/mlx4_en: Add support for destination MAC in steering rules
    net/mlx4_en: Use generic etherdevice.h functions.
    net: ethtool: Add destination MAC address to flow steering API
    bridge: add support of adding and deleting mdb entries
    bridge: notify mdb changes via netlink
    ndisc: Unexport ndisc_{build,send}_skb().
    uapi: add missing netconf.h to export list
    pkt_sched: avoid requeues if possible
    solos-pci: fix double-free of TX skb in DMA mode
    bnx2: Fix accidental reversions.
    bna: Driver Version Updated to 3.1.2.1
    bna: Firmware update
    bna: Add RX State
    bna: Rx Page Based Allocation
    bna: TX Intr Coalescing Fix
    bna: Tx and Rx Optimizations
    bna: Code Cleanup and Enhancements
    ath9k: check pdata variable before dereferencing it
    ath5k: RX timestamp is reported at end of frame
    ath9k_htc: RX timestamp is reported at end of frame
    ...

    Linus Torvalds
     

29 Nov, 2012

2 commits


27 Nov, 2012

2 commits


18 Nov, 2012

1 commit

  • In commit a24006ed12616bde1bbdb26868495906a212d8dc ('ptp: Enable clock
    drivers along with associated net/PHY drivers') I wrongly made
    PTP_1588_CLOCK_PCH depend on PCH_GBE. The dependency is really the
    other way around. Therefore make PCH_GBE select PTP_1588_CLOCK_PCH
    and remove the 'default y' from the latter.

    Reported-by: Randy Dunlap
    Signed-off-by: Ben Hutchings
    Acked-by: Randy Dunlap
    Signed-off-by: David S. Miller

    Ben Hutchings
     

01 Nov, 2012

4 commits

  • This patch adds an ioctl for PTP Hardware Clock (PHC) devices that allows
    user space to measure the time offset between the PHC and the system
    clock. Rather than hard coding any kind of estimation algorithm into the
    kernel, this patch takes the more flexible approach of just delivering
    an array of raw clock readings. In that way, the user space clock servo
    may be adapted to new and different hardware clocks.

    Signed-off-by: Richard Cochran
    Acked-by: Jacob Keller
    Signed-off-by: David S. Miller

    Richard Cochran
     
  • Where a PTP clock driver is associated with a net or PHY driver, it
    should be enabled automatically whenever that driver is enabled.
    Therefore:

    - Make PTP clock drivers select rather than depending on PTP_1588_CLOCK
    - Remove separate boolean options for PTP clock drivers that are built
    as part of net driver modules. (This also fixes cases where the PTP
    subsystem is wrongly forced to be built-in.)
    - Set 'default y' for PTP clock drivers that depend on specific net
    drivers but are built separately

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • PTP hardware clock drivers that select PTP_1588_CLOCK must currently
    also select PPS. For those drivers that don't, the user must enable
    PPS, then enable PTP_1588_CLOCK, then the driver. Simplify things for
    developers and users by putting this selection in one place.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • These are now established subsystems, and we want drivers to be able
    to select PPS and PTP_1588_CLOCK without depending on EXPERIMENTAL.
    Further, the use of EXPERIMENTAL is now deprecated in general.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David S. Miller

    Ben Hutchings
     

23 Sep, 2012

3 commits

  • PTP Hardware Clock devices appear as class devices in sysfs. This patch
    changes the registration API to use the parent device, clarifying the
    clock's relationship to the underlying device.

    Signed-off-by: Richard Cochran
    Acked-by: Ben Hutchings
    Acked-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Richard Cochran
     
  • If the timex.mode field indicates a query, then we provide the value of
    the current frequency adjustment.

    [ Get rid of extraneous empty lines -DaveM ]

    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Richard Cochran
     
  • This patch adds a field to the representation of a PTP hardware clock in
    order to remember the frequency adjustment value dialed by the user.

    Adding this field will let us answer queries in the manner of adjtimex
    in a follow on patch.

    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Richard Cochran
     

08 Sep, 2012

1 commit

  • Initial version by Stuart Hodgson

    Some PHC device drivers may deliver PPS events with a significant
    and variable delay, but still be able to measure precisely what
    that delay is.

    Add a pps_sub_ts() function for subtracting a delay from the
    timestamp(s) in a PPS event, and a PTP event type (PTP_CLOCK_PPSUSR)
    for which the caller provides a complete PPS event.

    Signed-off-by: Ben Hutchings

    Ben Hutchings
     

23 May, 2012

1 commit

  • Pull trivial updates from Jiri Kosina:
    "As usual, it's mostly typo fixes, redundant code elimination and some
    documentation updates."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (57 commits)
    edac, mips: don't change code that has been removed in edac/mips tree
    xtensa: Change mail addresses of Hannes Weiner and Oskar Schirmer
    lib: Change mail address of Oskar Schirmer
    net: Change mail address of Oskar Schirmer
    arm/m68k: Change mail address of Sebastian Hess
    i2c: Change mail address of Oskar Schirmer
    net: Fix tcp_build_and_update_options comment in struct tcp_sock
    atomic64_32.h: fix parameter naming mismatch
    Kconfig: replace "--- help ---" with "---help---"
    c2port: fix bogus Kconfig "default no"
    edac: Fix spelling errors.
    qla1280: Remove redundant NULL check before release_firmware() call
    remoteproc: remove redundant NULL check before release_firmware()
    qla2xxx: Remove redundant NULL check before release_firmware() call.
    aic94xx: Get rid of redundant NULL check before release_firmware() call
    tehuti: delete redundant NULL check before release_firmware()
    qlogic: get rid of a redundant test for NULL before call to release_firmware()
    bna: remove redundant NULL test before release_firmware()
    tg3: remove redundant NULL test before release_firmware() call
    typhoon: get rid of redundant conditional before all to release_firmware()
    ...

    Linus Torvalds
     

17 May, 2012

2 commits


22 Apr, 2012

4 commits

  • This patch fixes the driver so that multicast PTP event messages can
    be recognized by the hardware time stamping unit. The station address
    register must be set according to the desired transport type.

    [ RC - Rebased Takahiro's changes and wrote a commit message
    explaining the changes. ]

    Signed-off-by: Takahiro Shimizu
    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Takahiro Shimizu
     
  • We will let the pch_gbe code do that according to the receive time stamp
    filter.

    [ RC - Rebased Takahiro's changes and wrote a commit message
    explaining the changes. ]

    Signed-off-by: Takahiro Shimizu
    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Takahiro Shimizu
     
  • The code in phc_gbe_main will need to call this method in order to set the
    station address register according to the receive time stamping filter.

    [ RC - Rebased Takahiro's changes and wrote a commit message
    explaining the changes. ]

    Signed-off-by: Takahiro Shimizu
    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Takahiro Shimizu
     
  • This patch fixes the helper functions that give the transmit and
    receive time stamps to return nanoseconds, instead of arbitrary clock
    ticks.

    [ RC - Rebased Takahiro's changes and wrote a commit message
    explaining the changes. ]

    Signed-off-by: Takahiro Shimizu
    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Takahiro Shimizu
     

16 Apr, 2012

1 commit


13 Apr, 2012

1 commit

  • Commit e77bd1ec121ee4163a6b42a44e87b2e382c39e04 added support for a
    new ethtool function, but that cannot compile due to a misnamed global
    variable. Not that it really matters (since the IXP4xx does compile
    either, as of about Linux 3.1) but just in case, this patch fixes the
    misnamed variable in the PHC driver.

    Signed-off-by: Richard Cochran
    Signed-off-by: David S. Miller

    Richard Cochran
     

04 Apr, 2012

2 commits


17 Mar, 2012

1 commit


10 Mar, 2012

2 commits