#
f35cb547 |
| 18-Jan-2023 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: rename gpio_of_names[]
There's nothing DT specific about the gpio_of_names array, let's drop the _of infix.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by
net: sfp: rename gpio_of_names[]
There's nothing DT specific about the gpio_of_names array, let's drop the _of infix.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
b71dda81 |
| 18-Jan-2023 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: use device_get_match_data()
Rather than using of_match_node() to get the matching of_device_id to then retrieve the match data, use device_get_match_data() instead to avoid firmware specif
net: sfp: use device_get_match_data()
Rather than using of_match_node() to get the matching of_device_id to then retrieve the match data, use device_get_match_data() instead to avoid firmware specific functions, and free the driver from having firmware specific code.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
ff31a0c4 |
| 18-Jan-2023 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: use i2c_get_adapter_by_fwnode()
Use the newly introduced i2c_get_adapter_by_fwnode() API, so that we can retrieve the I2C adapter in a firmware independent manner once we have the fwnode h
net: sfp: use i2c_get_adapter_by_fwnode()
Use the newly introduced i2c_get_adapter_by_fwnode() API, so that we can retrieve the I2C adapter in a firmware independent manner once we have the fwnode handle for the adapter.
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
Revision tags: v6.1.6, v6.1.5, v6.0.19, v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12 |
|
#
15309fb2 |
| 03-Dec-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: clean up i2c-bus property parsing
We currently have some complicated code in sfp_probe() which gets the I2C bus depending on whether the sfp node is DT or ACPI, and we use completely separ
net: sfp: clean up i2c-bus property parsing
We currently have some complicated code in sfp_probe() which gets the I2C bus depending on whether the sfp node is DT or ACPI, and we use completely separate lookup functions.
This could do with being in a separate function to make the code more readable, so move it to a new function, sfp_i2c_get(). We can also use fwnode_find_reference() to lookup the I2C bus fwnode before then decending into fwnode-type specific parsing.
A future cleanup would be to move the fwnode-type specific parsing into the i2c layer, which is where it really should be.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://lore.kernel.org/r/E1p1WGJ-0098wS-4w@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
Revision tags: v6.0.11, v6.0.10, v5.15.80, v6.0.9, v5.15.79, v6.0.8, v5.15.78, v6.0.7, v5.15.77, v5.15.76, v6.0.6, v6.0.5, v5.15.75, v6.0.4 |
|
#
bd1432f6 |
| 21-Oct-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: get rid of DM7052 hack when enabling high power
Since we no longer mis-detect high-power mode with the DM7052 module, we no longer need the hack in sfp_module_enable_high_power(), and can
net: sfp: get rid of DM7052 hack when enabling high power
Since we no longer mis-detect high-power mode with the DM7052 module, we no longer need the hack in sfp_module_enable_high_power(), and can now switch this to use sfp_modify_u8().
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
a3c536fc |
| 21-Oct-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: add sfp_modify_u8() helper
Add a helper to modify bits in a single byte in memory space, and use it when updating the soft tx-disable flag in the module.
Signed-off-by: Russell King (Orac
net: sfp: add sfp_modify_u8() helper
Add a helper to modify bits in a single byte in memory space, and use it when updating the soft tx-disable flag in the module.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
39890049 |
| 21-Oct-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: provide a definition for the power level select bit
Provide a named definition for the power level select bit in the extended status register, rather than using BIT(0) in the code.
Signed
net: sfp: provide a definition for the power level select bit
Provide a named definition for the power level select bit in the extended status register, rather than using BIT(0) in the code.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
f8810ca7 |
| 21-Oct-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: ignore power level 3 prior to SFF-8472 Rev 11.4
Power level 3 was included in SFF-8472 revision 11.9, but this does not have a compliance code. Use revision 11.4 as the minimum compliance
net: sfp: ignore power level 3 prior to SFF-8472 Rev 11.4
Power level 3 was included in SFF-8472 revision 11.9, but this does not have a compliance code. Use revision 11.4 as the minimum compliance level instead.
This should avoid any spurious indication of 2W modules.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
18cc659e |
| 21-Oct-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: ignore power level 2 prior to SFF-8472 Rev 10.2
Power level 2 was introduced by SFF-8472 revision 10.2. Ignore the power declaration bit for modules that are not compliant with at least th
net: sfp: ignore power level 2 prior to SFF-8472 Rev 10.2
Power level 2 was introduced by SFF-8472 revision 10.2. Ignore the power declaration bit for modules that are not compliant with at least this revision.
This should remove any spurious indication of 1.5W modules.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
02eaf5a7 |
| 21-Oct-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: check firmware provided max power
Check that the firmware provided maximum power is at least 1W, which is the minimum power level for any SFP module.
Now that we enforce the minimum of 1W
net: sfp: check firmware provided max power
Check that the firmware provided maximum power is at least 1W, which is the minimum power level for any SFP module.
Now that we enforce the minimum of 1W, we can exit early from sfp_module_parse_power() if the module power is 1W or less.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
Revision tags: v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1, v5.15.72, v6.0 |
|
#
324e88cb |
| 30-Sep-2022 |
Marek Behún <kabel@kernel.org> |
net: sfp: add support for multigig RollBall transceivers
This adds support for multigig copper SFP modules from RollBall/Hilink. These modules have a specific way to access clause 45 registers of th
net: sfp: add support for multigig RollBall transceivers
This adds support for multigig copper SFP modules from RollBall/Hilink. These modules have a specific way to access clause 45 registers of the internal PHY.
We also need to wait at least 22 seconds after deasserting TX disable before accessing the PHY. The code waits for 25 seconds just to be sure.
Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
09bbedac |
| 30-Sep-2022 |
Marek Behún <kabel@kernel.org> |
net: phy: mdio-i2c: support I2C MDIO protocol for RollBall SFP modules
Some multigig SFPs from RollBall and Hilink do not expose functional MDIO access to the internal PHY of the SFP via I2C address
net: phy: mdio-i2c: support I2C MDIO protocol for RollBall SFP modules
Some multigig SFPs from RollBall and Hilink do not expose functional MDIO access to the internal PHY of the SFP via I2C address 0x56 (although there seems to be read-only clause 22 access on this address).
Instead these SFPs PHY can be accessed via I2C via the SFP Enhanced Digital Diagnostic Interface - I2C address 0x51. The SFP_PAGE has to be selected to 3 and the password must be filled with 0xff bytes for this PHY communication to work.
This extends the mdio-i2c driver to support this protocol by adding a special parameter to mdio_i2c_alloc function via which this RollBall protocol can be selected.
Signed-off-by: Marek Behún <kabel@kernel.org> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
e85b1347 |
| 30-Sep-2022 |
Marek Behún <kabel@kernel.org> |
net: sfp: create/destroy I2C mdiobus before PHY probe/after PHY release
Instead of configuring the I2C mdiobus when SFP driver is probed, create/destroy the mdiobus before the PHY is probed for/afte
net: sfp: create/destroy I2C mdiobus before PHY probe/after PHY release
Instead of configuring the I2C mdiobus when SFP driver is probed, create/destroy the mdiobus before the PHY is probed for/after it is released.
This way we can tell the mdio-i2c code which protocol to use for each SFP transceiver.
Move the code that determines MDIO I2C protocol from sfp_sm_probe_for_phy() to sfp_sm_mod_probe(), where most of the SFP ID parsing is done. Don't allocate I2C bus if no PHY is expected.
Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
13c8adcf |
| 30-Sep-2022 |
Marek Behún <kabel@kernel.org> |
net: sfp: Add and use macros for SFP quirks definitions
Add macros SFP_QUIRK(), SFP_QUIRK_M() and SFP_QUIRK_F() for defining SFP quirk table entries. Use them to deduplicate the code a little bit.
net: sfp: Add and use macros for SFP quirks definitions
Add macros SFP_QUIRK(), SFP_QUIRK_M() and SFP_QUIRK_F() for defining SFP quirk table entries. Use them to deduplicate the code a little bit.
Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
#
fd580c98 |
| 30-Sep-2022 |
Russell King <rmk+kernel@armlinux.org.uk> |
net: sfp: augment SFP parsing with phy_interface_t bitmap
We currently parse the SFP EEPROM to a bitmap of ethtool link modes, and then attempt to convert the link modes to a PHY interface mode. Whi
net: sfp: augment SFP parsing with phy_interface_t bitmap
We currently parse the SFP EEPROM to a bitmap of ethtool link modes, and then attempt to convert the link modes to a PHY interface mode. While this works at present, there are cases where this is sub-optimal. For example, where a module can operate with several different PHY interface modes.
To start addressing this, arrange for the SFP EEPROM parsing to also provide a bitmap of the possible PHY interface modes.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|
Revision tags: v5.15.71, v5.15.70, v5.15.69, v5.15.68 |
|
#
73472c83 |
| 13-Sep-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: add support for HALNy GPON SFP
Add a quirk for the HALNy HL-GSFP module, which appears to have an inverted RX_LOS signal, and maybe uses TX_FAULT as a serial port transmit pin. Rather than
net: sfp: add support for HALNy GPON SFP
Add a quirk for the HALNy HL-GSFP module, which appears to have an inverted RX_LOS signal, and maybe uses TX_FAULT as a serial port transmit pin. Rather than use these hardware signals, switch to using software polling for these status signals.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
5029be76 |
| 13-Sep-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: move Huawei MA5671A fixup
Move this module over to the new fixup mechanism.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.or
net: sfp: move Huawei MA5671A fixup
Move this module over to the new fixup mechanism.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
27541675 |
| 13-Sep-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: move Alcatel Lucent 3FE46541AA fixup
Add a new fixup mechanism to the SFP quirks, and use it for this module.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-
net: sfp: move Alcatel Lucent 3FE46541AA fixup
Add a new fixup mechanism to the SFP quirks, and use it for this module.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
23571c7b |
| 13-Sep-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: move quirk handling into sfp.c
We need to handle more quirks than just those which affect the link modes of the module. Move the quirk lookup into sfp.c, and pass the quirk to sfp-bus.c
S
net: sfp: move quirk handling into sfp.c
We need to handle more quirks than just those which affect the link modes of the module. Move the quirk lookup into sfp.c, and pass the quirk to sfp-bus.c
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
#
8475c4b7 |
| 13-Sep-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: re-implement soft state polling setup
Re-implement the decision making for soft state polling. Instead of generating the soft state mask in sfp_soft_start_poll() by looking at which GPIOs
net: sfp: re-implement soft state polling setup
Re-implement the decision making for soft state polling. Instead of generating the soft state mask in sfp_soft_start_poll() by looking at which GPIOs are available, record their availability in sfp_sm_mod_probe() in sfp->state_hw_mask.
This will then allow us to clear bits in sfp->state_hw_mask in module specific quirks when the hardware signals should not be used, thereby allowing us to switch to using the software state polling.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
Revision tags: v5.15.67, v5.15.66, v5.15.65, v5.15.64, v5.15.63, v5.15.62, v5.15.61 |
|
#
815f5f57 |
| 13-Aug-2022 |
Beniamin Sandu <beniaminsandu@gmail.com> |
net: sfp: use simplified HWMON_CHANNEL_INFO macro
This makes the code look cleaner and easier to read.
Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com> Link: https://lore.kernel.org/r/202208
net: sfp: use simplified HWMON_CHANNEL_INFO macro
This makes the code look cleaner and easier to read.
Signed-off-by: Beniamin Sandu <beniaminsandu@gmail.com> Link: https://lore.kernel.org/r/20220813204658.848372-1-beniaminsandu@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
Revision tags: v5.15.60, v5.15.59, v5.19, v5.15.58, v5.15.57, v5.15.56, v5.15.55, v5.15.54, v5.15.53, v5.15.52 |
|
#
0a18d802 |
| 29-Jun-2022 |
Jianglei Nie <niejianglei2021@163.com> |
net: sfp: fix memory leak in sfp_probe()
sfp_probe() allocates a memory chunk from sfp with sfp_alloc(). When devm_add_action() fails, sfp is not freed, which leads to a memory leak.
We should use
net: sfp: fix memory leak in sfp_probe()
sfp_probe() allocates a memory chunk from sfp with sfp_alloc(). When devm_add_action() fails, sfp is not freed, which leads to a memory leak.
We should use devm_add_action_or_reset() instead of devm_add_action().
Signed-off-by: Jianglei Nie <niejianglei2021@163.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://lore.kernel.org/r/20220629075550.2152003-1-niejianglei2021@163.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
show more ...
|
Revision tags: v5.15.51, v5.15.50 |
|
#
3f118c44 |
| 22-Jun-2022 |
Michael Walle <michael@walle.cc> |
net: sfp: use hwmon_sanitize_name()
Instead of open-coding the bad characters replacement in the hwmon name, use the new hwmon_sanitize_name().
Signed-off-by: Michael Walle <michael@walle.cc> Acked
net: sfp: use hwmon_sanitize_name()
Instead of open-coding the bad characters replacement in the hwmon name, use the new hwmon_sanitize_name().
Signed-off-by: Michael Walle <michael@walle.cc> Acked-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
Revision tags: v5.15.49, v5.15.48, v5.15.47, v5.15.46, v5.15.45, v5.15.44, v5.15.43, v5.15.42, v5.18, v5.15.41, v5.15.40, v5.15.39, v5.15.38 |
|
#
2069624d |
| 02-May-2022 |
Matthew Hagan <mnhagan88@gmail.com> |
net: sfp: Add tx-fault workaround for Huawei MA5671A SFP ONT
As noted elsewhere, various GPON SFP modules exhibit non-standard TX-fault behaviour. In the tested case, the Huawei MA5671A, when used i
net: sfp: Add tx-fault workaround for Huawei MA5671A SFP ONT
As noted elsewhere, various GPON SFP modules exhibit non-standard TX-fault behaviour. In the tested case, the Huawei MA5671A, when used in combination with a Marvell mv88e6085 switch, was found to persistently assert TX-fault, resulting in the module being disabled.
This patch adds a quirk to ignore the SFP_F_TX_FAULT state, allowing the module to function.
Change from v1: removal of erroneous return statment (Andrew Lunn)
Signed-off-by: Matthew Hagan <mnhagan88@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20220502223315.1973376-1-mnhagan88@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
Revision tags: v5.15.37, v5.15.36, v5.15.35, v5.15.34, v5.15.33, v5.15.32, v5.15.31, v5.17, v5.15.30, v5.15.29, v5.15.28, v5.15.27, v5.15.26 |
|
#
9ae1ef4b |
| 01-Mar-2022 |
Russell King (Oracle) <rmk+kernel@armlinux.org.uk> |
net: sfp: use %pe for printing errors
Convert sfp to use %pe for printing error codes, which can print them as errno symbols rather than numbers.
Signed-off-by: Russell King (Oracle) <rmk+kernel@ar
net: sfp: use %pe for printing errors
Convert sfp to use %pe for printing error codes, which can print them as errno symbols rather than numbers.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/E1nOyEN-00BuuE-OB@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|