Skip to content

Add 2 parameters for driver tg3 can support "short preamble" and "reset".#71

Merged
lguohan merged 3 commits intosonic-net:masterfrom
roylee123:driver_net_tg3_patch_short_preamble
Nov 30, 2018
Merged

Add 2 parameters for driver tg3 can support "short preamble" and "reset".#71
lguohan merged 3 commits intosonic-net:masterfrom
roylee123:driver_net_tg3_patch_short_preamble

Conversation

@roylee123
Copy link
Copy Markdown
Contributor

Add "short preamble" parameter for MAC can validate mdio access to some external PHY.
Add "reset" parameter for MAC to reset PHY at driver starting up.

Signed-off-by: roy_lee roy_lee@accton.com

Signed-off-by: roy_lee <roy_lee@accton.com>
tp->mi_mode &= ~MAC_MI_MODE_AUTO_POLL;
+
+ if(short_preamble) {
+ netdev_info(tp->dev, "Setting short preamble...");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should remove this, it is debug level info.

}

+ if (bcm5718s_reset && tp->phy_id == TG3_PHY_ID_BCM5718S) {
+ netdev_info(tp->dev, "BCM5718S reset...");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should remove this, it is debug level info.

Copy link
Copy Markdown
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unnecessary info

Signed-off-by: roy_lee <roy_lee@accton.com>
Signed-off-by: roy_lee <roy_lee@accton.com>
@roylee123
Copy link
Copy Markdown
Contributor Author

I've removed these 2 debug messages and verified.

@lguohan lguohan merged commit ad754bd into sonic-net:master Nov 30, 2018
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request Aug 2, 2024
Add parameter to enable *short preamble* for MAC, so MDIO access to some
external PHY, like BCM54616, can be validated.

Applies to the five platforms below, that have the ethernet controller
BCM5720:

as7116_54x, as7326_56x, as7716_32x-r0, as7716_32xb, and as7816_64x

Verified by mii-tool. (31 is the address of external phy).

    root@sonic:/home/admin# mii-tool -v eth0 -p 31
    using the specified MII index 31.
    eth0: negotiated, link ok
    product info: vendor 00:d8:97, model 17 rev 2
    basic mode: autonegotiation enabled
    basic status: autonegotiation complete, link ok
    capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
    advertising: flow-control
    link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

Note, this upstreams a patch to the SONiC Linux kernel added in 2018
[1][2][3].

[1]: sonic-net/sonic-linux-kernel#71
[2]: sonic-net/sonic-linux-kernel@ad754bd
[3]: sonic-net/sonic-buildimage#2318

Signed-off-by: Roy Lee <roy_lee@accton.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request Aug 2, 2024
Add parameter to enable *short preamble* for MAC, so MDIO access to some
external PHY, like BCM54616, can be validated.

Applies to the five platforms below, that have the ethernet controller
BCM5720:

as7116_54x, as7326_56x, as7716_32x-r0, as7716_32xb, and as7816_64x

Verified by mii-tool. (31 is the address of external phy).

    root@sonic:/home/admin# mii-tool -v eth0 -p 31
    using the specified MII index 31.
    eth0: negotiated, link ok
    product info: vendor 00:d8:97, model 17 rev 2
    basic mode: autonegotiation enabled
    basic status: autonegotiation complete, link ok
    capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
    advertising: flow-control
    link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

Note, this upstreams a patch to the SONiC Linux kernel added in 2018
[1][2][3].

[1]: sonic-net/sonic-linux-kernel#71
[2]: sonic-net/sonic-linux-kernel@ad754bd
[3]: sonic-net/sonic-buildimage#2318

Signed-off-by: Roy Lee <roy_lee@accton.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request Aug 2, 2024
Add parameter to enable *short preamble* for MAC, so MDIO access to some
external PHY, like BCM54616, can be validated.

Applies to the five platforms below, that have the ethernet controller
BCM5720:

as7116_54x, as7326_56x, as7716_32x-r0, as7716_32xb, and as7816_64x

Verified by mii-tool. (31 is the address of external phy).

    root@sonic:/home/admin# mii-tool -v eth0 -p 31
    using the specified MII index 31.
    eth0: negotiated, link ok
    product info: vendor 00:d8:97, model 17 rev 2
    basic mode: autonegotiation enabled
    basic status: autonegotiation complete, link ok
    capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
    advertising: flow-control
    link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

Note, this upstreams a patch to the SONiC Linux kernel added in 2018
[1][2][3].

[1]: sonic-net/sonic-linux-kernel#71
[2]: sonic-net/sonic-linux-kernel@ad754bd
[3]: sonic-net/sonic-buildimage#2318

Signed-off-by: Roy Lee <roy_lee@accton.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: NipaLocal <nipa@local>
kuba-moo pushed a commit to linux-netdev/testing that referenced this pull request Aug 2, 2024
Add parameter to enable *short preamble* for MAC, so MDIO access to some
external PHY, like BCM54616, can be validated.

Applies to the five platforms below, that have the ethernet controller
BCM5720:

as7116_54x, as7326_56x, as7716_32x-r0, as7716_32xb, and as7816_64x

Verified by mii-tool. (31 is the address of external phy).

    root@sonic:/home/admin# mii-tool -v eth0 -p 31
    using the specified MII index 31.
    eth0: negotiated, link ok
    product info: vendor 00:d8:97, model 17 rev 2
    basic mode: autonegotiation enabled
    basic status: autonegotiation complete, link ok
    capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
    advertising: flow-control
    link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

Note, this upstreams a patch to the SONiC Linux kernel added in 2018
[1][2][3].

[1]: sonic-net/sonic-linux-kernel#71
[2]: sonic-net/sonic-linux-kernel@ad754bd
[3]: sonic-net/sonic-buildimage#2318

Signed-off-by: Roy Lee <roy_lee@accton.com>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: NipaLocal <nipa@local>
dal00 pushed a commit to kamelnetworks/sonic-linux-kernel that referenced this pull request Jul 20, 2025
…aemon (sonic-net#71)

### Description

Move feature related config from hostcfgd into a new daemon

```
tests/featured/featured_test.py::TestFeatureHandler::test_feature_config_parsing PASSED [ 46%]
tests/featured/featured_test.py::TestFeatureHandler::test_feature_config_parsing_defaults PASSED [ 47%]
tests/featured/featured_test.py::TestFeatureHandler::test_feature_resync PASSED [ 48%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_00_DualTorCase <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 49%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_01_SingleToRCase <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 50%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_02_T1Case <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 50%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_03_SingleToRCase_DHCP_Relay_Enabled <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 51%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_04_DualTorCaseWithNoSystemCalls <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 52%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_05_Chassis_Supervisor_PACKET <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 53%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_06_Chassis_Supervisor_VOQ <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 54%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_07_Chassis_LineCard_VOQ <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 55%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_08_Chassis_LineCard_Packet <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 56%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_09_Chassis_Supervisor_PACKET_multinpu <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 56%]
tests/featured/featured_test.py::TestFeatureHandler::test_handler_10_Chassis_LineCard_VOQ_multinpu <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 57%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_00_DualTorCase <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 58%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_01_SingleToRCase <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 59%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_02_T1Case <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 60%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_03_SingleToRCase_DHCP_Relay_Enabled <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 61%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_04_DualTorCaseWithNoSystemCalls <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 62%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_05_Chassis_Supervisor_PACKET <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 62%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_06_Chassis_Supervisor_VOQ <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 63%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_07_Chassis_LineCard_VOQ <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 64%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_08_Chassis_LineCard_Packet <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 65%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_09_Chassis_Supervisor_PACKET_multinpu <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 66%]
tests/featured/featured_test.py::TestFeatureHandler::test_sync_state_field_10_Chassis_LineCard_VOQ_multinpu <- ../../../usr/local/lib/python3.9/dist-packages/pyfakefs/fake_filesystem_unittest.py PASSED [ 67%]
tests/featured/featured_test.py::TestFeatureDaemon::test_advanced_reboot PASSED [ 68%]
tests/featured/featured_test.py::TestFeatureDaemon::test_delayed_service PASSED [ 68%]
tests/featured/featured_test.py::TestFeatureDaemon::test_feature_events PASSED [ 69%]
tests/featured/featured_test.py::TestFeatureDaemon::test_portinit_timeout PASSED [ 70%]
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants