Message ID | 4A09F634.4070708@am.sony.com |
---|---|
State | New |
Headers | show |
On Tue, 12 May 2009, Geoff Levand wrote: > 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 > @@ -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; > +}; > + Similar definitions already exist in enum gelic_lv1_ether_port_status, to be used with the GELIC_LV1_GET_ETH_PORT_STATUS command. > @@ -176,6 +176,10 @@ enum gelic_descr_rx_dma_status { > */ > }; > > +enum gelic_lv1_phy { > + GELIC_LV1_PHY_ETHERNET_0 = 0x0000000000000002L, > +}; > + From looking at the symmetry between GELIC_LV1_SET_NEGOTIATION_MODE and GELIC_LV1_GET_ETH_PORT_STATUS, you can just use the existing GELIC_LV1_VLAN_TX_ETHERNET definition. So you don't need any new definitions at all, just the knowledge you can use GELIC_LV1_SET_NEGOTIATION_MODE to set what GELIC_LV1_GET_ETH_PORT_STATUS returns? With kind regards, Geert Uytterhoeven Software Architect Techsoft Centre Technology and Software Centre Europe The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: Geert.Uytterhoeven@sonycom.com Internet: http://www.sony-europe.com/ A division of Sony Europe (Belgium) N.V. VAT BE 0413.825.160 · RPR Brussels Fortis · BIC GEBABEBB · IBAN BE41293037680010
--- 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,