linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jens Osterkamp <jens@de.ibm.com>
To: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
Cc: jim@jklewis.com, linuxppc-dev@ozlabs.org, jgarzik@pobox.com,
	netdev@vger.kernel.org
Subject: Re: [Cbe-oss-dev] spidernet: dynamic phy setup code
Date: Thu, 1 Feb 2007 12:04:30 +0100	[thread overview]
Message-ID: <200702011204.30526.jens@de.ibm.com> (raw)
In-Reply-To: <200702010805.l11853LX014768@toshiba.co.jp>


Ishizaki-san,

> This patch partially works on celleb but remains 
> following several problems.
> 1. It doesn't recover once an ethernet cable which is
>    connected to a spider_net card is unpluged. 

My understanding is that you are using the LINK interrupt to detect this.
For the blade this is not connected but reenabling it wont hurt, I hope.

> 2. It doesn't work when the spider_net card is connected to 
>    a 100Mbps ethernet switch.
> 
> To solve these problems, we need to restore some codes
> you removed from your patch.
> 
> (1)
> >- if (card->aneg_count > 10) {
> >-  /* timeout */
> >-  card->aneg_count = 0;
> >-  is1000 = !is1000;
> >-  goto re_setup;
> 
> >- if (phy->speed == 1000 && !is1000) {
> >-  is1000 = 1;
> >-  goto re_setup;
> >- } else if(phy->speed != 1000 && is1000) {
> >-  is1000 = 0;
> >-  goto re_setup;
> >- }
> 
> We need to use different auto-neg initial settings between
> for 10/100Mbps ethernet switches and for Gbps ethernet switches.
> Driver don't know which type of network switch is connected to
> network card, so we try both settings alternately in auto negtiation
> sequences by using a variable "is1000".

I still dont see why you need different settings for different speed switches.
This is getting to a point where access to some hardware would be handy.
What exact phy are using anyway ?

> Furthermore, we have a problem that poll_link() may succeed even when
> the auto-neg initial setting is for different network switch type,
> and the network card does not work on this case. We retry auto-neg
> with the another initial setting on this case.

See above, could you give some more details why this is the case. Or maybe Ben
knows more about this ?

> #We are commented that "is1000" should be in spider_net_card.
> #We fixed it in another patch. Please refer the following.
> #http://ozlabs.org/pipermail/linuxppc-dev/2007-January/030203.html
> 
> But we don't think this is the best solution, and we are still
> developing 
> our spidernet driver. If you have a good alternative idea, please tell
> us.
> 
> (2)
> >- spider_net_write_reg(card, SPIDER_NET_GMACST,
> >-        spider_net_read_reg(card, SPIDER_NET_GMACST));
> >- spider_net_write_reg(card, SPIDER_NET_GMACINTEN, 0x4);
> 
> These codes are enabling LINK status interrupt which is disabled
> at the beginning of auto-neg.
> Without this operation, auto negotiation works only when a connection
> detected for the first time, and auto negotiation will not work 
> when an ethernet cable is unpluged or pluged.

I will reenable it and see wether it affects us. The pin is not connected so
we should never enter this part of the code.

> (3)
> >- mii_phy_probe(phy, phy->mii_id);
> It seems that PHY reset is necessary before auto negotiation,
> after a link once went down.
> We can't call directly reset routine from driver, so we call
> mii_phy_probe().
> We are still developping the patch as we noted, and we are considering
> to call mii_phy_probe() from spider_net_setup_aneg(), or to call
> reset_one_mii_phy() from bcm54xx_setup_aneg().

IMHO using mii_phy_probe is the right way to do this.

> We think these (1)-(3) are necessary, but we are afraid that you removed
> them
> by a reason that they causes some trouble in Cell Blade. If so please
> tell us.

I'll do some investigations and let you know of the results.

Jens

  reply	other threads:[~2007-02-01 11:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-26 13:09 spidernet: dynamic phy setup code Jens Osterkamp
2007-01-26 17:58 ` Linas Vepstas
     [not found]   ` <200701262150.52882.jens@de.ibm.com>
2007-01-26 22:15     ` Linas Vepstas
2007-01-26 22:30       ` Jens Osterkamp
2007-01-26 20:21 ` Benjamin Herrenschmidt
2007-02-01 10:50   ` Jens Osterkamp
2007-02-01  8:05 ` [Cbe-oss-dev] " Ishizaki Kou
2007-02-01 11:04   ` Jens Osterkamp [this message]
2007-02-02 10:20     ` Ishizaki Kou
2007-02-05  0:08       ` Benjamin Herrenschmidt
2007-02-02 10:29     ` [RFC/PATCH 2.6.20-rc6 1/4] spidernet: autoneg support for Celleb Ishizaki Kou
2007-02-02 10:30     ` [RFC/PATCH 2.6.20-rc6 2/4] spidernet: load firmaware when open Ishizaki Kou
2007-02-02 10:31     ` [RFC/PATCH 2.6.20-rc6 3/4] spidernet: add support for Celleb Ishizaki Kou
2007-02-02 10:33     ` [RFC/PATCH 2.6.20-rc6 4/4] spidernet: remove txram full logging Ishizaki Kou
2007-02-04 23:44     ` [Cbe-oss-dev] spidernet: dynamic phy setup code Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200702011204.30526.jens@de.ibm.com \
    --to=jens@de.ibm.com \
    --cc=jgarzik@pobox.com \
    --cc=jim@jklewis.com \
    --cc=kou.ishizaki@toshiba.co.jp \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).