Page MenuHomeFreeBSD

Add RTL8366SR support at etherswitch driver
ClosedPublic

Authored by yamori813_yahoo.co.jp on Jun 10 2016, 2:35 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 20 2024, 6:13 PM
Unknown Object (File)
Dec 20 2023, 12:06 AM
Unknown Object (File)
Nov 22 2023, 2:54 PM
Unknown Object (File)
Nov 19 2023, 11:10 PM
Unknown Object (File)
Nov 14 2023, 9:46 AM
Unknown Object (File)
Nov 11 2023, 9:42 AM
Unknown Object (File)
Nov 10 2023, 6:26 PM
Unknown Object (File)
Nov 10 2023, 1:33 PM

Details

Summary

Add RTL8366SR support at etherswitch driver

Test Plan

RTL8366RB and RTL8366SR

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4640
Build 4694: arc lint + arc unit

Event Timeline

yamori813_yahoo.co.jp retitled this revision from to Add RTL8366SR support at etherswitch driver.
yamori813_yahoo.co.jp updated this object.
yamori813_yahoo.co.jp edited the test plan for this revision. (Show Details)

it looks good! Let's just move chipid into the driver softc and then we're ready to commit it to -HEAD!

sys/dev/etherswitch/rtl8366/rtl8366rb.c
399

Ideally chipid would be a flag in the softc, rather than a global. I know, it's highly unlikely that someone'll put more than one of these on a board. It's just the "better" way to do it.

ray requested changes to this revision.Jun 10 2016, 6:53 AM
ray added a reviewer: ray.
ray added a subscriber: ray.
ray added inline comments.
sys/dev/etherswitch/rtl8366/rtl8366rbvar.h
73

As guy who worked with number of switch chips, I have to ask:
What will be here, when code will support 5 similar Ethernet switches?
(==1)?(1):(==2)?(2):(==3)?(3):(==4)?(4):(5)
IMO, better to name different registers with model prefix and cache registers address in softc, or even make submodules, which override default methods of driver, based on chip id.

This revision now requires changes to proceed.Jun 10 2016, 6:53 AM
yamori813_yahoo.co.jp edited edge metadata.
  • fixed non initialize soft use and softc initialze is first in function.
yamori813_yahoo.co.jp edited edge metadata.
  • modify by style(9) formant

hi,

the current diff isn't against head, it looks like it's against a previous diff :) can you upload a fresh diff against head?

that way I can see what needs to be tidied up before it's commited.

Thanks!

-adrian

Hi,

The latest diff is /still/ not against an un-modified freebsd-head tree. :-)

Sorry! Would you please diff your directory against the latest freebsd-head rather than your local repo and send up a diff?

Thanks!

-a

mizhka added a reviewer: mizhka.
mizhka added a subscriber: mizhka.

(*) Small improvements are welcome (@ray, @adrian comments)
(+) Patch is fine against current -HEAD
(+) Build has been compiled via freebsd-wifi-build/tl-wr1043nd

sys/dev/etherswitch/rtl8366/rtl8366rb.c
475โ€“476

Please use /* */ comments

sys/dev/etherswitch/rtl8366/rtl8366rbvar.h
164โ€“173

As @ray mentioned, could you please move condition to SC/HAL layer.

adrian added a reviewer: adrian.

This looks fine to me. :)

Would someone be able to land this to -HEAD?

This revision was automatically updated to reflect the committed changes.