All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Émeric Vigier" <emeric.vigier@savoirfairelinux.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: Steve Glendinning <steve@shawell.net>,
	netdev@vger.kernel.org, Nancy Lin <nancy.lin@smsc.com>
Subject: Re: [PATCH] smsc95xx: support ethtool get_regs
Date: Sat, 7 Jul 2012 10:13:42 -0400 (EDT)	[thread overview]
Message-ID: <2060381397.2115.1341670422805.JavaMail.root@mail.savoirfairelinux.com> (raw)
In-Reply-To: <20120706221102.GA14276@electric-eye.fr.zoreil.com>



----- Mail original -----
> Émeric Vigier <emeric.vigier@savoirfairelinux.com> :
> [...]
> > Yes, there are 16 bits wide according to smsc95xx.h.
> > But other smsc drivers define 32bit wide PHY regs. I made myself
> > believe
> > that smsc would use the same PHY for each ethernet chip.
> 
> SMSC people would surely answer before I find the relevant datasheet.
> 
> Anyway the PHY registers are accessed indirectly through the
> MII_{ADDR, DATA}
> registers and MII_DATA r/w mask is limited to the lower 16 bits.
> 
> > So would something like s/32 * sizeof(u32)/PHY_SPECIAL *
> > sizeof(u16)/ solve the issue here?
> 
> You would have to pack data[] as well. Or use u16 *.

I will check this out next week.

> 
> > Concerning the ioctl, I found ethtool much easier to use. And I
> > believe
> > smsc9514 is a very popular chipset, so this could help others
> > debugging it.
> 
> # mii-tool -vv e1000
> Using SIOCGMIIPHY=0x8947
> e1000: no autonegotiation, 10baseT-HD, link ok
>   registers for MII PHY 0:
>     1140 796d 0141 0c30 0de1 0021 0004 0000
>     0000 0200 0000 0000 0000 0000 0000 3000
>     0000 0000 0000 0000 0174 0000 0000 0000
>     4100 0000 000d 000f 0000 0000 0000 0000
>   product info: vendor 00:50:43, model 3 rev 0
>   basic mode:   autonegotiation enabled
>   basic status: autonegotiation complete, link ok
>   capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD
>   10baseT-HD
>   advertising:  1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD
>   10baseT-HD flow-control
>   link partner: 10baseT-HD
> 
> It is not that bad for the first 32 PHY registers.

I didn't know about mii-tool. Thanks.

> 
> [...]
> > Do you mean LTT? I am not familiar with it, I should have a look.
> 
> Documentation/trace/ftrace.txt

ok

> 
> [...]
> > I should change that in previous "for" loop as well I suppose?
> 
> You may.

Thanks for your patience.

> 
> --
> Ueimor
> 

-- 
Emeric

  reply	other threads:[~2012-07-07 14:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1291035348.223127.1341596173191.JavaMail.root@mail.savoirfairelinux.com>
2012-07-06 18:15 ` [PATCH] smsc95xx: support ethtool get_regs Émeric Vigier
2012-07-06 20:01   ` Francois Romieu
2012-07-06 21:26     ` Émeric Vigier
2012-07-06 22:11       ` Francois Romieu
2012-07-07 14:13         ` Émeric Vigier [this message]
2012-07-07  0:24   ` Ben Hutchings
2012-07-07 13:58     ` Émeric Vigier
2012-07-07 19:55       ` Ben Hutchings
2012-07-09 13:44         ` Émeric Vigier

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=2060381397.2115.1341670422805.JavaMail.root@mail.savoirfairelinux.com \
    --to=emeric.vigier@savoirfairelinux.com \
    --cc=nancy.lin@smsc.com \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    --cc=steve@shawell.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.