mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 01:51:53 +00:00
3bb35261c7
This patch is the result of work by both Jon Nettleton and Russell King. Jon wrote the original patch, adding support for SFP modules which require a power level greater than '1'. Russell's changes: - Fix the power levels for big-endian, and make the code flow better. - Convert to use device_property_read_u8() - Warn for power levels exceeding host level SFF-8431 says: "To avoid exceeding system power supply limits and cooling capacity, all modules at power up by default shall operate with up to 1.0 W. Hosts supporting Power Level II or III operation may enable a Power Level II or III module through the 2-wire interface. Power Level II or III modules shall assert the power level declaration bit of SFF-8472." Print a warning for modules that exceed the host power level, and leave them operating in power level 1. - Fix i2c write The first byte of any write after the bus address is always the device address. In order to write a value to device D, address I, value V, we need to generate on the bus: S DDDDDDDD A IIIIIIII A VVVVVVVV A P where S = start, R = restart, A = ack, P = stop. Splitting this as two: S DDDDDDDD A IIIIIIII A R DDDDDDDD A VVVVVVVV A P results in the device's address register being written first by I and then by V - the addressed register within the device is not written. - Avoid power mode switching if 0xa2 is not implemented Some modules indicate that they support power level II or power level III, but do not implement address 0xa2, meaning that the bit to set them to high power mode is not accessible. These modules appear to have the sff8472_compliance field set to zero, and also do not implement diagnostics. Detect this, but also ensure that the module does not require the address switching mode, which we do not implement. - Use mW for power level rather than power level number. - Fix high power mode transition We must not switch to SFP_MOD_PRESENT state until we have finished initialising, because the remaining state machines check for that state. Add SFP_MOD_HPOWER as an intermediate state. - Use definition for I2C register address rather than constant. Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net> |
||
---|---|---|
.. | ||
amd.c | ||
aquantia.c | ||
at803x.c | ||
bcm7xxx.c | ||
bcm63xx.c | ||
bcm87xx.c | ||
bcm-cygnus.c | ||
bcm-phy-lib.c | ||
bcm-phy-lib.h | ||
broadcom.c | ||
cicada.c | ||
cortina.c | ||
davicom.c | ||
dp83640_reg.h | ||
dp83640.c | ||
dp83822.c | ||
dp83848.c | ||
dp83867.c | ||
et1011c.c | ||
fixed_phy.c | ||
icplus.c | ||
intel-xway.c | ||
Kconfig | ||
lxt.c | ||
Makefile | ||
marvell10g.c | ||
marvell.c | ||
mdio_bus.c | ||
mdio_device.c | ||
mdio-bcm-iproc.c | ||
mdio-bcm-unimac.c | ||
mdio-bitbang.c | ||
mdio-boardinfo.c | ||
mdio-boardinfo.h | ||
mdio-cavium.c | ||
mdio-cavium.h | ||
mdio-gpio.c | ||
mdio-hisi-femac.c | ||
mdio-i2c.c | ||
mdio-i2c.h | ||
mdio-moxart.c | ||
mdio-mux-bcm-iproc.c | ||
mdio-mux-gpio.c | ||
mdio-mux-mmioreg.c | ||
mdio-mux.c | ||
mdio-octeon.c | ||
mdio-sun4i.c | ||
mdio-thunder.c | ||
mdio-xgene.c | ||
mdio-xgene.h | ||
meson-gxl.c | ||
micrel.c | ||
microchip.c | ||
mscc.c | ||
national.c | ||
phy_device.c | ||
phy_led_triggers.c | ||
phy-c45.c | ||
phy-core.c | ||
phy.c | ||
phylink.c | ||
qsemi.c | ||
realtek.c | ||
rockchip.c | ||
sfp-bus.c | ||
sfp.c | ||
sfp.h | ||
smsc.c | ||
spi_ks8995.c | ||
ste10Xp.c | ||
swphy.c | ||
swphy.h | ||
teranetics.c | ||
uPD60620.c | ||
vitesse.c | ||
xilinx_gmii2rgmii.c |