13 Aug, 2014
1 commit
-
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
meet kernel coding style guidelines. This issue was reported by checkpatch.A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/)://
@@
identifier i;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer z;
@@- DEFINE_PCI_DEVICE_TABLE(i)
+ const struct pci_device_id i[]
= z;//
[bhelgaas: add semantic patch]
Signed-off-by: Benoit Taine
Signed-off-by: Bjorn Helgaas
02 Jul, 2014
1 commit
-
The ptp pin function programming does not allow calibration pin to change
function. This is problematic on hardware that uses the default calibration
pin for other purposes.Removing this limitation does not impact calibration if userspace does not
reprogram the calibration pin.Signed-off-by: Stefan Sørensen
Signed-off-by: David S. Miller
18 Jun, 2014
1 commit
-
The ptp_pch driver is for a companion chip to the Intel Atom E600
series processors. These are 32-bit x86 processors so the driver is
only needed on X86_32.Signed-off-by: Jean Delvare
Cc: Richard Cochran
Acked-by: Richard Cochran
Signed-off-by: David S. Miller
13 May, 2014
1 commit
-
Conflicts:
drivers/net/ethernet/altera/altera_sgdma.c
net/netlink/af_netlink.c
net/sched/cls_api.c
net/sched/sch_api.cThe netlink conflict dealt with moving to netlink_capable() and
netlink_ns_capable() in the 'net' tree vs. supporting 'tc' operations
in non-init namespaces. These were simple transformations from
netlink_capable to netlink_ns_capable.The Altera driver conflict was simply code removal overlapping some
void pointer cast cleanups in net-next.Signed-off-by: David S. Miller
12 May, 2014
1 commit
-
Fix kconfig warnings:
PTP_1588_CLOCK selects NET_PTP_CLASSIFY, which depends on NET,
so PTP_1588_CLOCK should also depend on NET.PTP_1588_CLOCK_PCH selects PTP_1588_CLOCK so the former should
depend on NET.warning: (IXP4XX_ETH && PTP_1588_CLOCK) selects NET_PTP_CLASSIFY which has unmet direct dependencies (NET)
warning: (SFC && TILE_NET && BFIN_MAC_USE_HWSTAMP && TIGON3 && FEC && E1000E && IGB && IXGBE && I40E && MLX4_EN && SXGBE_ETH && STMMAC_ETH && TI_CPTS && PTP_1588_CLOCK_GIANFAR && PTP_1588_CLOCK_IXP46X && DP83640_PHY && PTP_1588_CLOCK_PCH) selects PTP_1588_CLOCK which has unmet direct dependencies (NET)
[This warning is caused by the new 'depends on NET' in PTP_1588_CLOCK.]Signed-off-by: Randy Dunlap
Acked-by: Richard Cochran
Signed-off-by: David S. Miller
29 Apr, 2014
1 commit
-
PTP Hardware Clock drivers specify a maximum frequency adjustment that
their clocks can accommodate. Normally, user space programs will want to
respect the advertised limits. However, no kernel or driver code checks
that the dialed frequency offset is within the bounds, and out of range
values can lead to surprising results.This patch fixes the issue by rejecting bad values.
Signed-off-by: Richard Cochran
Signed-off-by: David S. Miller
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
22 Mar, 2014
3 commits
-
This patch updates the many PTP Hardware Clock drivers with the
newly introduced field that advertises the number of programmable
pins. Some of these devices do have programmable pins, but the
implementation will have to wait for follow on patches.Signed-off-by: Richard Cochran
Acked-by: Jeff Kirsher
Signed-off-by: David S. Miller -
This patch adds the sysfs hooks needed in order to get and set the
programmable pin settings.Signed-off-by: Richard Cochran
Signed-off-by: David S. Miller -
This patch adds a pair of new ioctls to the PTP Hardware Clock device
interface. Using the ioctls, user space programs can query each pin to
find out its current function and also reprogram a different function
if desired.Signed-off-by: Richard Cochran
Signed-off-by: David S. Miller
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
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
27 Jul, 2013
1 commit
-
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead. This converts the ptp class code to use the
correct field.Acked-by: Richard Cochran
Signed-off-by: Greg Kroah-Hartman
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
26 May, 2013
1 commit
-
Fix to release resources when ptp_clock_register() fail instead
of return error code directly.Signed-off-by: Wei Yongjun
Signed-off-by: David S. Miller
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
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
27 Mar, 2013
1 commit
-
Signed-off-by: Jiri Benc
Signed-off-by: David S. Miller
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
...
29 Nov, 2012
2 commits
-
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.Signed-off-by: Bill Pemberton
Acked-by: Richard Cochran
Signed-off-by: Greg Kroah-Hartman -
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.Signed-off-by: Bill Pemberton
Acked-by: Richard Cochran
Signed-off-by: Greg Kroah-Hartman
27 Nov, 2012
2 commits
-
This patch removes the large buffer from the stack of the system
offset ioctl and replaces it with a kmalloced buffer.Signed-off-by: Richard Cochran
Signed-off-by: David S. Miller -
This patch removes the large buffer from the stack of the read file
operation and replaces it with a kmalloced buffer.Signed-off-by: Richard Cochran
Signed-off-by: David S. Miller
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
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 -
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 separatelySigned-off-by: Ben Hutchings
Signed-off-by: David S. Miller -
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 -
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
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 -
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 -
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
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
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()
...
17 May, 2012
2 commits
-
drivers/ptp/ptp_pch.c: In function 'pch_remove':
drivers/ptp/ptp_pch.c:576:2: error: implicit declaration of function 'kfree' [-Werror=implicit-function-declaration]
drivers/ptp/ptp_pch.c: In function 'pch_probe':
drivers/ptp/ptp_pch.c:587:2: error: implicit declaration of function 'kzalloc' [-Werror=implicit-function-declaration]Signed-off-by: Geert Uytterhoeven
Acked-by: Richard Cochran
Signed-off-by: David S. Miller
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 -
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 -
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 -
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
16 Apr, 2012
1 commit
-
Correct spelling typo in various Kconfig file.
Signed-off-by: Masanari Iida
Signed-off-by: Jiri Kosina