OpenWrt Forum Archive

Topic: how to force 10BaseT-FD for switchport on WR1043nd (rtl8366rb)

The content of this topic has been archived between 21 Apr 2018 and 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

That's a good idea. i'll do that.

Edit: Done.

regards,
Ralph

(Last edited by sagemol on 30 Jun 2011, 08:24)

sagemol,

Tell me please, do you use registers PAACR[x] for speed\duplex control?

No, I do not use PAACR, I just set the PHY's registers.
So if You want to set it on reboot, You have to put the swconfig in a startup script.

regards,
Ralph

Sorry, I just want to to understand smile

You are using register 0x0000 of RTL8366RB, which RTL8366RB_PHY_CONTROL_REG in your patch?

(Last edited by Zend on 17 Aug 2011, 11:08)

Nope, I don't write the register 0x0000 of RTL8366RB, I write into the PHY register.

The function to write the PHY register was already implemented before and I just use it:

rtl8366rb_write_phy_reg

If You go through the rtl8366rb.c source, You'll see, that the RTL8366RB registers are writable through
the rtl8366_smi_write_reg function, which is located in the generic smi source (rtl8366_smi.c and rtl8366_smi.h).

regards,
Ralph

From my experience, there is no "simply doesn't work" - patch normally outputs a pretty descent error message on what's not working. Besides that, it helps to look at the patch to figure out which source files it patches. Then you can look at the history of those source files in trunk to see which changes were applied since the time of patch creation - and finally work around them.  (simple task for an IT-Komplettlösung :-D )

Thanks for answering anyway, even if the answer doesn't help hmm

I CAN apply the patch, but I cannot set the speed/duplex with swconfig.
This IS described in my earlier post here: https://forum.openwrt.org/viewtopic.php?id=37104
Just as mentioned above.

And no, I'm no C programmer, and don't know how swconfig and drivers work together in detail.

So maybe I get an helpful comment now smile
Does this work for you? How?

laggflor wrote:

It simply doesn't work (using the CURRENT trunk).

Of course THAT is Your problem.
The patch was created for an older version of trunk, so You have to look for the changes in trunk since then,
and then probably patch the sources manually.

It's not a problem of understanding how swconfig and drivers work together,
it's a problem of understanding, how patch files work and what they do...

But that should be easy to figure out for an IT specialist,
as i am one myself and have almost no idea of C programming.

And that is what MBS pointed out already...

regards,
Ralph

(Last edited by sagemol on 28 May 2012, 20:10)

Thanks, now I got it smile
I didn't consider there are changes breaking the patch. But you guys are right.
Sry for being a bit rude ... but it doesn't help pointing to error messages of the patch if there aren't any (using the latest patch).

Think I found a problem comparing the different versions ... will try with old trunk versions now.
If I find some time I'll provide a new patch, hope it will be included as it's really a needed feature smile

laggflor wrote:

Thanks, now I got it smile
....
If I find some time I'll provide a new patch, hope it will be included as it's really a needed feature smile

You're welcome.

Obviously it was my fault not to put a comment to the patch, for what version of trunk it was made for.
But since i'm still a newbie regarding C and patches, one might excuse that mistake.
I'll make it better next time (if ever...).

Regarding Your hope:
Will take long time, all the patches were created long long time ago and didn't make it into trunk.
Seems like the developers have other priorities.

regards,
Ralph

sagemol wrote:

Obviously it was my fault not to put a comment to the patch, for what version of trunk it was made for.

No, it wasn't. Just found the version number 27302 in the rtl8366rb.forcephy.patch file.

Hope it works now, as I really want to use my 10MBit bandwith smile

Works @27302. Will review the current trunk later. Thank you guys!

laggflor wrote:

If I find some time I'll provide a new patch, hope it will be included as it's really a needed feature smile

Well, will need some more time since i bricked one of my devices with a kernel panic I think. USB-TTL-converter is ordered, will need it anyhow sooner or later. smile
Unpacking a new device now and start with configuration work tongue

The discussion might have continued from here.