04 Mar, 2020

1 commit

  • 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode
    bitmap") was a bit over-eager and also removed the second phy driver's
    name, resulting in a nasty OOPS on registration:

    [ 1.319854] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 804dd50c, ra == 804dd4f0
    [ 1.330859] Oops[#1]:
    [ 1.333138] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.22 #0
    [ 1.339217] $ 0 : 00000000 00000001 87ca7f00 805c1874
    [ 1.344590] $ 4 : 00000000 00000047 00585000 8701f800
    [ 1.349965] $ 8 : 8701f800 804f4a5c 00000003 64726976
    [ 1.355341] $12 : 00000001 00000000 00000000 00000114
    [ 1.360718] $16 : 87ca7f80 00000000 00000000 80639fe4
    [ 1.366093] $20 : 00000002 00000000 806441d0 80b90000
    [ 1.371470] $24 : 00000000 00000000
    [ 1.376847] $28 : 87c1e000 87c1fda0 80b90000 804dd4f0
    [ 1.382224] Hi : d1c8f8da
    [ 1.385180] Lo : 5518a480
    [ 1.388182] epc : 804dd50c kset_find_obj+0x3c/0x114
    [ 1.393345] ra : 804dd4f0 kset_find_obj+0x20/0x114
    [ 1.398530] Status: 10008703 KERNEL EXL IE
    [ 1.402833] Cause : 00800008 (ExcCode 02)
    [ 1.406952] BadVA : 00000000
    [ 1.409913] PrId : 0002a075 (Broadcom BMIPS4350)
    [ 1.414745] Modules linked in:
    [ 1.417895] Process swapper/0 (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
    [ 1.426214] Stack : 87cec000 80630000 80639370 80640658 80640000 80049af4 80639fe4 8063a0d8
    [ 1.434816] 8063a0d8 802ef078 00000002 00000000 806441d0 80b90000 8063a0d8 802ef114
    [ 1.443417] 87cea0de 87c1fde0 00000000 804de488 87cea000 8063a0d8 8063a0d8 80334e48
    [ 1.452018] 80640000 8063984c 80639bf4 00000000 8065de48 00000001 8063a0d8 80334ed0
    [ 1.460620] 806441d0 80b90000 80b90000 802ef164 8065dd70 80620000 80b90000 8065de58
    [ 1.469222] ...
    [ 1.471734] Call Trace:
    [ 1.474255] [] kset_find_obj+0x3c/0x114
    [ 1.479141] [] driver_find+0x1c/0x44
    [ 1.483665] [] driver_register+0x74/0x148
    [ 1.488719] [] phy_driver_register+0x9c/0xd0
    [ 1.493968] [] phy_drivers_register+0x54/0xe8
    [ 1.499345] [] do_one_initcall+0x7c/0x1f4
    [ 1.504374] [] kernel_init_freeable+0x1d4/0x2b4
    [ 1.509940] [] kernel_init+0x10/0xf8
    [ 1.514502] [] ret_from_kernel_thread+0x14/0x1c
    [ 1.520040] Code: 1060000c 02202025 90650000 24630001 14250004 24840001 14a0fffb 90650000
    [ 1.530061]
    [ 1.531698] ---[ end trace d52f1717cd29bdc8 ]---

    Fix it by readding the name.

    Fixes: 719655a14971 ("net: phy: Replace phy driver features u32 with link_mode bitmap")
    Signed-off-by: Jonas Gorski
    Acked-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Jonas Gorski
     

16 Apr, 2019

1 commit

  • Recently genphy_read_abilities() has been added that dynamically detects
    clause 22 PHY abilities. I *think* this detection should work with all
    supported PHY's, at least for the ones with basic features sets, i.e.
    PHY_BASIC_FEATURES and PHY_GBIT_FEATURES. So let's remove setting these
    features explicitly and rely on phylib feature detection.

    I don't have access to most of these PHY's, therefore I'd appreciate
    regression testing.

    v2:
    - make the feature constant a comment so that readers know which
    features are supported by the respective PHY

    Signed-off-by: Heiner Kallweit
    Tested-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Heiner Kallweit
     

23 Jan, 2019

1 commit


12 Nov, 2018

2 commits

  • There are a few MAC/PHYs combinations which now support > 1Gbps. These
    may need to make use of link modes with bits > 31. Thus their
    supported PHY features or advertised features cannot be implemented
    using the current bitmap in a u32. Convert to using a linkmode bitmap,
    which can support all the currently devices link modes, and is future
    proof as more modes are added.

    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     
  • Now that flag PHY_HAS_INTERRUPT has been replaced with a check for
    callbacks config_intr and ack_interrupt, we can remove setting this
    flag from all driver configs.
    Last but not least remove flag PHY_HAS_INTERRUPT completely.

    Signed-off-by: Heiner Kallweit
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Heiner Kallweit
     

02 Oct, 2018

1 commit

  • This is one step in allowing phylib to make use of link_mode bitmaps,
    instead of u32 for supported and advertised features. Convert the phy
    drivers to use bitmaps to indicates the features they support.

    Build bitmap equivalents of the u32 values at runtime, and have the
    drivers point to the appropriate bitmap. These bitmaps are shared, and
    we don't want a driver to modify them. So mark them __ro_after_init.

    Within phylib, the features bitmap is currently turned back into a
    u32. This will be removed once the whole of phylib, and the drivers
    are converted to use bitmaps.

    Signed-off-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Andrew Lunn
     

02 Dec, 2017

1 commit


19 Jan, 2017

1 commit

  • Commit a1cba5613edf ("net: phy: Add Broadcom phy library for common
    interfaces") make the BCM63xx PHY driver utilize bcm_phy_config_intr()
    which would appear to do the right thing, except that it does not write
    to the MII_BCM63XX_IR register but to MII_BCM54XX_ECR which is
    different.

    This would be causing invalid link parameters and events from being
    generated by the PHY interrupt.

    Fixes: a1cba5613edf ("net: phy: Add Broadcom phy library for common interfaces")
    Signed-off-by: Daniel Gonzalez Cabanelas
    Signed-off-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Daniel Gonzalez Cabanelas
     

08 Jan, 2016

1 commit


08 Oct, 2015

1 commit


13 Nov, 2014

1 commit


28 May, 2013

1 commit


09 Jul, 2012

1 commit

  • If registering of one of them fails, all already registered drivers
    of this module will be unregistered.

    Use the new register/unregister functions in all drivers
    registering more than one driver.

    amd.c, realtek.c: Simplify: directly return registration result.

    Tested with broadcom.c
    All others compile-tested.

    Signed-off-by: Christian Hohnstaedt
    Signed-off-by: David S. Miller

    Christian Hohnstaedt
     

04 Apr, 2012

1 commit

  • Compile tested.
    remove unnecessary code that matches this coccinelle pattern

    ret = phy_write(x, y , z)
    if (ret < 0)
    return ret;
    return 0;

    As phy_write returns error code, we dont need to do not need extra check
    before returning.

    Signed-off-by: Srinivas Kandagatla
    Signed-off-by: David S. Miller

    Srinivas Kandagatla
     

05 Oct, 2010

1 commit

  • MODULE_DEVICE_TABLE only expands to something if it's compiled
    for a module. So when building-in support for the phys, the
    mdio_device_id tables are unused. Marking them with __maybe_unused
    fixes the following warnings:

    drivers/net/phy/bcm63xx.c:134: warning: 'bcm63xx_tbl' defined but not used
    drivers/net/phy/broadcom.c:933: warning: 'broadcom_tbl' defined but not used
    drivers/net/phy/cicada.c:162: warning: 'cicada_tbl' defined but not used
    drivers/net/phy/davicom.c:222: warning: 'davicom_tbl' defined but not used
    drivers/net/phy/et1011c.c:114: warning: 'et1011c_tbl' defined but not used
    drivers/net/phy/icplus.c:137: warning: 'icplus_tbl' defined but not used
    drivers/net/phy/lxt.c:226: warning: 'lxt_tbl' defined but not used
    drivers/net/phy/marvell.c:724: warning: 'marvell_tbl' defined but not used
    drivers/net/phy/micrel.c:234: warning: 'micrel_tbl' defined but not used
    drivers/net/phy/national.c:154: warning: 'ns_tbl' defined but not used
    drivers/net/phy/qsemi.c:141: warning: 'qs6612_tbl' defined but not used
    drivers/net/phy/realtek.c:82: warning: 'realtek_tbl' defined but not used
    drivers/net/phy/smsc.c:257: warning: 'smsc_tbl' defined but not used
    drivers/net/phy/ste10Xp.c:135: warning: 'ste10Xp_tbl' defined but not used
    drivers/net/phy/vitesse.c:195: warning: 'vitesse_tbl' defined but not used

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: David S. Miller

    Uwe Kleine-König
     

13 Apr, 2010

1 commit


03 Apr, 2010

1 commit


08 Jul, 2009

1 commit