[Cbe-oss-dev] Adjusting PS3's Ethernet Link Speed
Geoff Levand
geoffrey.levand at am.sony.com
Wed May 13 08:20:36 EST 2009
On 05/02/2009 10:16 AM, Geoff Levand wrote:
> On 04/28/2009 06:52 AM, Benjamin Rose wrote:
>> For educational reasons, I've been trying to adjust the link speed of
>> the ethernet connection on the PS3 from 1Gbps to 100Mbps. Using the
>> ethtool results in a "Cannot set new settings: Operation not
>> supported" for any variation from just ethtool -s eth0 speed 100 to
>> ethtool -s eth0 speed 100 duplex full autoneg off.
>>
>> I am using the latest stable 2.6.29 kernel found on kernel.org.
>
> The current kernel driver just uses the auto negotiated speed.
> It does not support a manual setting.
>
>> As a more extreme tactic, I've edited the drivers/net/ps3_gelic_net.c
>> source file to force the adapter to use 100Mbps. The patch can be
>> found attached to this e-mail. They're very simple changes.
>>
>> With those changes ethtool eth0 now shows the speed as 100Mbps and as
>> auto negotiation as off, however I am still getting 1Gbps speeds. Is
>> the PS3's hypervisor to blame or was this too naive of a change?
>
> It seems all your patch does is change the value that reports what the
> driver can support, without actually adding any additional support.
>
>> Any help at all is greatly appreciated!!
>
> I have no plan to support this kind control in ps3_gelic_net. If you
> want to use your PS3 for this work you can use an external USB Ethernet
> adapter.
The following patch adds the definitions needed to set the
the PS3's Ethernet link speed. I have not tested this, and
will not support it until I have a chance to do so.
This is FOR EXPERTS ONLY.
-Geoff
---
drivers/net/ps3_gelic_net.h | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
--- a/drivers/net/ps3_gelic_net.h
+++ b/drivers/net/ps3_gelic_net.h
@@ -176,6 +176,10 @@ enum gelic_descr_rx_dma_status {
*/
};
+enum gelic_lv1_phy {
+ GELIC_LV1_PHY_ETHERNET_0 = 0x0000000000000002L,
+};
+
/* for lv1_net_control */
enum gelic_lv1_net_control_code {
GELIC_LV1_GET_MAC_ADDRESS = 1,
@@ -189,6 +193,20 @@ enum gelic_lv1_net_control_code {
GELIC_LV1_GET_WLAN_EVENT = 11
};
+/*
+ * for GELIC_LV1_SET_NEGOTIATION_MODE
+ * lv1_net_control(bus, dev, GELIC_LV1_SET_NEGOTIATION_MODE,
+ GELIC_LV1_PHY_ETHERNET_0, flags, 0, &v1, &v2)
+ * Hardware does not support half_duplex with 1G.
+ */
+enum {
+ GELIC_LV1_NEGOTIATION_FULL_DUPLEX = 0x02;
+ GELIC_LV1_NEGOTIATION_AUTO_NEGOTIATION = 0x04;
+ GELIC_LV1_NEGOTIATION_LINE_SPEED_10M = 0x10;
+ GELIC_LV1_NEGOTIATION_LINE_SPEED_100M = 0x20;
+ GELIC_LV1_NEGOTIATION_LINE_SPEED_1G = 0x40;
+};
+
/* for GELIC_LV1_SET_WOL */
enum gelic_lv1_wol_command {
GELIC_LV1_WOL_MAGIC_PACKET = 1,
More information about the cbe-oss-dev
mailing list