License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 17:07:57 +03:00
# SPDX-License-Identifier: GPL-2.0
2020-08-27 05:00:31 +03:00
# Makefile for Linux PHY drivers
2005-07-31 03:31:23 +04:00
2020-02-15 18:49:27 +03:00
libphy-y := phy.o phy-c45.o phy-core.o phy_device.o \
linkmode.o
2020-06-29 15:03:45 +03:00
mdio-bus-y += mdio_bus.o mdio_device.o
2017-03-28 22:57:09 +03:00
i f d e f C O N F I G _ M D I O _ D E V I C E
obj-y += mdio-boardinfo.o
e n d i f
2017-03-23 20:01:19 +03:00
# PHYLIB implies MDIO_DEVICE, in that case, we have a bunch of circular
# dependencies that does not make it possible to split mdio-bus objects into a
# dedicated loadable module, so we bundle them all together into libphy.ko
i f d e f C O N F I G _ P H Y L I B
libphy-y += $( mdio-bus-y)
2023-08-01 17:28:23 +03:00
# the stubs are built-in whenever PHYLIB is built-in or module
obj-y += stubs.o
2017-03-23 20:01:19 +03:00
e l s e
obj-$(CONFIG_MDIO_DEVICE) += mdio-bus.o
e n d i f
2020-07-05 12:55:47 +03:00
obj-$(CONFIG_MDIO_DEVRES) += mdio_devres.o
2016-06-23 16:50:05 +03:00
libphy-$(CONFIG_SWPHY) += swphy.o
2016-10-17 18:49:55 +03:00
libphy-$(CONFIG_LED_TRIGGER_PHY) += phy_led_triggers.o
2005-07-31 03:31:23 +04:00
phylink: add phylink infrastructure
The link between the ethernet MAC and its PHY has become more complex
as the interface evolves. This is especially true with serdes links,
where the part of the PHY is effectively integrated into the MAC.
Serdes links can be connected to a variety of devices, including SFF
modules soldered down onto the board with the MAC, a SFP cage with
a hotpluggable SFP module which may contain a PHY or directly modulate
the serdes signals onto optical media with or without a PHY, or even
a classical PHY connection.
Moreover, the negotiation information on serdes links comes in two
varieties - SGMII mode, where the PHY provides its speed/duplex/flow
control information to the MAC, and 1000base-X mode where both ends
exchange their abilities and each resolve the link capabilities.
This means we need a more flexible means to support these arrangements,
particularly with the hotpluggable nature of SFP, where the PHY can
be attached or detached after the network device has been brought up.
Ethtool information can come from multiple sources:
- we may have a PHY operating in either SGMII or 1000base-X mode, in
which case we take ethtool/mii data directly from the PHY.
- we may have a optical SFP module without a PHY, with the MAC
operating in 1000base-X mode - the ethtool/mii data needs to come
from the MAC.
- we may have a copper SFP module with a PHY whic can't be accessed,
which means we need to take ethtool/mii data from the MAC.
Phylink aims to solve this by providing an intermediary between the
MAC and PHY, providing a safe way for PHYs to be hotplugged, and
allowing a SFP driver to reconfigure the serdes connection.
Phylink also takes over support of fixed link connections, where the
speed/duplex/flow control are fixed, but link status may be controlled
by a GPIO signal. By avoiding the fixed-phy implementation, phylink
can provide a faster response to link events: fixed-phy has to wait for
phylib to operate its state machine, which can take several seconds.
In comparison, phylink takes milliseconds.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
- remove sync status
- rework supported and advertisment handling
- add 1000base-x speed for fixed links
- use functionality exported from phy-core, reworking
__phylink_ethtool_ksettings_set for it
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-25 17:03:13 +03:00
obj-$(CONFIG_PHYLINK) += phylink.o
2005-08-25 03:46:21 +04:00
obj-$(CONFIG_PHYLIB) += libphy.o
2016-08-19 00:56:05 +03:00
2019-12-26 05:16:16 +03:00
obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += mii_timestamper.o
2017-07-25 17:03:39 +03:00
obj-$(CONFIG_SFP) += sfp.o
2017-07-25 17:03:18 +03:00
sfp-obj-$(CONFIG_SFP) += sfp-bus.o
obj-y += $( sfp-obj-y) $( sfp-obj-m)
2019-08-16 16:09:59 +03:00
obj-$(CONFIG_ADIN_PHY) += adin.o
2022-04-29 18:34:35 +03:00
obj-$(CONFIG_ADIN1100_PHY) += adin1100.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_AMD_PHY) += amd.o
2019-02-25 21:53:04 +03:00
aquantia-objs += aquantia_main.o
2019-02-25 21:56:38 +03:00
i f d e f C O N F I G _ H W M O N
aquantia-objs += aquantia_hwmon.o
e n d i f
2015-07-31 11:58:42 +03:00
obj-$(CONFIG_AQUANTIA_PHY) += aquantia.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_AT803X_PHY) += at803x.o
2020-08-27 05:00:32 +03:00
obj-$(CONFIG_AX88796B_PHY) += ax88796b.o
obj-$(CONFIG_BCM54140_PHY) += bcm54140.o
2009-07-01 05:29:36 +04:00
obj-$(CONFIG_BCM63XX_PHY) += bcm63xx.o
2014-02-14 04:08:45 +04:00
obj-$(CONFIG_BCM7XXX_PHY) += bcm7xxx.o
2020-08-27 05:00:32 +03:00
obj-$(CONFIG_BCM84881_PHY) += bcm84881.o
2012-06-27 11:33:38 +04:00
obj-$(CONFIG_BCM87XX_PHY) += bcm87xx.o
2015-10-06 22:25:49 +03:00
obj-$(CONFIG_BCM_CYGNUS_PHY) += bcm-cygnus.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_BCM_NET_PHYLIB) += bcm-phy-lib.o
2022-06-22 08:04:53 +03:00
obj-$(CONFIG_BCM_NET_PHYPTP) += bcm-phy-ptp.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_BROADCOM_PHY) += broadcom.o
obj-$(CONFIG_CICADA_PHY) += cicada.o
2017-05-29 12:11:30 +03:00
obj-$(CONFIG_CORTINA_PHY) += cortina.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_DAVICOM_PHY) += davicom.o
2011-04-22 14:04:55 +04:00
obj-$(CONFIG_DP83640_PHY) += dp83640.o
2017-10-10 20:42:55 +03:00
obj-$(CONFIG_DP83822_PHY) += dp83822.o
2015-10-21 00:28:57 +03:00
obj-$(CONFIG_DP83848_PHY) += dp83848.o
2015-06-02 17:34:37 +03:00
obj-$(CONFIG_DP83867_PHY) += dp83867.o
2019-11-13 19:42:26 +03:00
obj-$(CONFIG_DP83869_PHY) += dp83869.o
2020-08-27 05:00:32 +03:00
obj-$(CONFIG_DP83TC811_PHY) += dp83tc811.o
2022-05-06 07:23:57 +03:00
obj-$(CONFIG_DP83TD510_PHY) += dp83td510.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_FIXED_PHY) += fixed_phy.o
obj-$(CONFIG_ICPLUS_PHY) += icplus.o
obj-$(CONFIG_INTEL_XWAY_PHY) += intel-xway.o
obj-$(CONFIG_LSI_ET1011C_PHY) += et1011c.o
obj-$(CONFIG_LXT_PHY) += lxt.o
2017-06-05 14:23:16 +03:00
obj-$(CONFIG_MARVELL_10G_PHY) += marvell10g.o
2020-08-27 05:00:32 +03:00
obj-$(CONFIG_MARVELL_PHY) += marvell.o
2023-07-19 09:42:58 +03:00
obj-$(CONFIG_MARVELL_88Q2XXX_PHY) += marvell-88q2xxx.o
2021-03-15 17:19:26 +03:00
obj-$(CONFIG_MARVELL_88X2222_PHY) += marvell-88x2222.o
2021-07-19 08:32:12 +03:00
obj-$(CONFIG_MAXLINEAR_GPHY) += mxl-gpy.o
2021-05-19 06:31:59 +03:00
obj-$(CONFIG_MEDIATEK_GE_PHY) += mediatek-ge.o
2023-06-11 02:48:10 +03:00
obj-$(CONFIG_MEDIATEK_GE_SOC_PHY) += mediatek-ge-soc.o
2016-11-04 18:51:23 +03:00
obj-$(CONFIG_MESON_GXL_PHY) += meson-gxl.o
2011-12-18 11:33:41 +04:00
obj-$(CONFIG_MICREL_KS8995MA) += spi_ks8995.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_MICREL_PHY) += micrel.o
2015-09-09 23:49:53 +03:00
obj-$(CONFIG_MICROCHIP_PHY) += microchip.o
2018-05-02 18:39:17 +03:00
obj-$(CONFIG_MICROCHIP_T1_PHY) += microchip_t1.o
2023-04-21 19:38:54 +03:00
obj-$(CONFIG_MICROCHIP_T1S_PHY) += microchip_t1s.o
2020-03-13 12:48:00 +03:00
obj-$(CONFIG_MICROSEMI_PHY) += mscc/
2021-05-20 19:32:30 +03:00
obj-$(CONFIG_MOTORCOMM_PHY) += motorcomm.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_NATIONAL_PHY) += national.o
2023-01-09 20:00:38 +03:00
obj-$(CONFIG_NCN26000_PHY) += ncn26000.o
2021-04-19 19:14:00 +03:00
obj-$(CONFIG_NXP_C45_TJA11XX_PHY) += nxp-c45-tja11xx.o
net: phy: add basic driver for NXP CBTX PHY
The CBTX PHY is a Fast Ethernet PHY integrated into the SJA1110 A/B/C
automotive Ethernet switches.
It was hoped it would work with the Generic PHY driver, but alas, it
doesn't. The most important reason why is that the PHY is powered down
by default, and it needs a vendor register to power it on.
It has a linear memory map that is accessed over SPI by the SJA1110
switch driver, which exposes a fake MDIO controller. It has the
following (and only the following) standard clause 22 registers:
0x0: MII_BMCR
0x1: MII_BMSR
0x2: MII_PHYSID1
0x3: MII_PHYSID2
0x4: MII_ADVERTISE
0x5: MII_LPA
0x6: MII_EXPANSION
0x7: the missing MII_NPAGE for Next Page Transmit Register
Every other register is vendor-defined.
The register map expands the standard clause 22 5-bit address space of
0x20 registers, however the driver does not need to access the extra
registers for now (and hopefully never). If it ever needs to do that, it
is possible to implement a fake (software) page switching mechanism
between the PHY driver and the SJA1110 MDIO controller driver.
Also, Auto-MDIX is turned off by default in hardware, the driver turns
it on by default and reports the current status. I've tested this with a
VSC8514 link partner and a crossover cable, by forcing the mode on the
link partner, and seeing that the CBTX PHY always sees the reverse of
the mode forced on the VSC8514 (and that traffic works). The link
doesn't come up (as expected) if MDI modes are forced on both ends in
the same way (with the cross-over cable, that is).
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20230418190141.1040562-1-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-04-18 22:01:41 +03:00
obj-$(CONFIG_NXP_CBTX_PHY) += nxp-cbtx.o
2019-05-24 17:22:28 +03:00
obj-$(CONFIG_NXP_TJA11XX_PHY) += nxp-tja11xx.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_QSEMI_PHY) += qsemi.o
obj-$(CONFIG_REALTEK_PHY) += realtek.o
2017-10-08 16:40:08 +03:00
obj-$(CONFIG_RENESAS_PHY) += uPD60620.o
2017-08-10 16:56:40 +03:00
obj-$(CONFIG_ROCKCHIP_PHY) += rockchip.o
2016-08-19 00:56:05 +03:00
obj-$(CONFIG_SMSC_PHY) += smsc.o
obj-$(CONFIG_STE10XP) += ste10Xp.o
obj-$(CONFIG_TERANETICS_PHY) += teranetics.o
obj-$(CONFIG_VITESSE_PHY) += vitesse.o
2016-08-10 08:50:08 +03:00
obj-$(CONFIG_XILINX_GMII2RGMII) += xilinx_gmii2rgmii.o