From patchwork Tue May 12 22:20:36 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geoff Levand X-Patchwork-Id: 27130 Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4CF60B7079 for ; Wed, 13 May 2009 08:20:52 +1000 (EST) Received: by ozlabs.org (Postfix) id 265C9DDFCD; Wed, 13 May 2009 08:20:52 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 235CDDDFCC for ; Wed, 13 May 2009 08:20:52 +1000 (EST) X-Original-To: cbe-oss-dev@ozlabs.org Delivered-To: cbe-oss-dev@ozlabs.org Received: from TX2EHSOBE009.bigfish.com (tx2ehsobe005.messaging.microsoft.com [65.55.88.15]) by ozlabs.org (Postfix) with ESMTP id 4F8B6DDFAC for ; Wed, 13 May 2009 08:20:48 +1000 (EST) Received: from mail33-tx2-R.bigfish.com (10.9.14.246) by TX2EHSOBE009.bigfish.com (10.9.40.29) with Microsoft SMTP Server id 8.1.340.0; Tue, 12 May 2009 22:20:45 +0000 Received: from mail33-tx2 (localhost.localdomain [127.0.0.1]) by mail33-tx2-R.bigfish.com (Postfix) with ESMTP id F0F8519B0083; Tue, 12 May 2009 22:20:44 +0000 (UTC) X-BigFish: VPS-42(zz1432R98dR936eQ1805M9371Pzz1202hzzz2fh6bh) Received: by mail33-tx2 (MessageSwitch) id 1242166840452361_18868; Tue, 12 May 2009 22:20:40 +0000 (UCT) Received: from mail8.fw-sd.sony.com (mail8.fw-sd.sony.com [160.33.66.75]) by mail33-tx2.bigfish.com (Postfix) with ESMTP id 4EFE7C8805A; Tue, 12 May 2009 22:20:40 +0000 (UTC) Received: from mail1.bc.in.sel.sony.com (mail1.bc.in.sel.sony.com [43.144.65.111]) by mail8.fw-sd.sony.com (8.14.2/8.14.2) with ESMTP id n4CMKdYT029296; Tue, 12 May 2009 22:20:39 GMT Received: from USBMAXIM01.am.sony.com (us-east-xims.am.sony.com [43.145.108.25]) by mail1.bc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id n4CMKdSh013096; Tue, 12 May 2009 22:20:39 GMT Received: from USBMAXRG02.am.sony.com ([43.145.108.24]) by USBMAXIM01.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 12 May 2009 18:20:39 -0400 Received: from USSDIXRG02.am.sony.com ([43.130.140.32]) by USBMAXRG02.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 12 May 2009 18:20:38 -0400 Received: from ussdixms03.am.sony.com ([43.130.140.23]) by USSDIXRG02.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 12 May 2009 15:20:36 -0700 Received: from [192.168.1.10] ([43.135.148.226]) by ussdixms03.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 12 May 2009 15:20:36 -0700 Message-ID: <4A09F634.4070708@am.sony.com> Date: Tue, 12 May 2009 15:20:36 -0700 From: Geoff Levand User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090324 Fedora/3.0-2.1.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: Benjamin Rose References: <7A405387-2DFD-4669-8C22-709DE0A687D8@vt.edu> <49FC7FFB.8080308@am.sony.com> In-Reply-To: <49FC7FFB.8080308@am.sony.com> X-OriginalArrivalTime: 12 May 2009 22:20:36.0558 (UTC) FILETIME=[DFB136E0:01C9D34F] X-SEL-encryption-scan: scanned Cc: Cell Broadband Engine OSS Development Subject: Re: [Cbe-oss-dev] Adjusting PS3's Ethernet Link Speed X-BeenThere: cbe-oss-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Discussion about Open Source Software for the Cell Broadband Engine List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: cbe-oss-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org 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,