netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jim Baxter <jim_baxter@mentor.com>
To: Chris Healy <cphealy@gmail.com>
Cc: Duan Fugang-B38611 <B38611@freescale.com>,
	"David S. Miller" <davem@davemloft.net>,
	Estevam Fabio-R49496 <r49496@freescale.com>,
	Li Frank-B20596 <B20596@freescale.com>,
	Joe Perches <joe@perches.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH RFC net-next v1 1/1] net: fec: Fix RMON registers on imx6
Date: Mon, 1 Jul 2013 11:16:31 +0100	[thread overview]
Message-ID: <51D156FF.9000503@mentor.com> (raw)
In-Reply-To: <CAFXsbZoBQ3ODUnFg-VumP+YAfCJ2-d=nL_=Gk2LKXm7PadHUuQ@mail.gmail.com>

On 30/06/13 04:55, Chris Healy wrote:
> On the i.MX28, I tested just setting bit 31 to 0 and not doing any of
> the clearing work and it performed correctly.  I'd suggest we just turn
> on the MIB logic in fec_restart regardless of which i.MX platform it
> is.  (Still need to not do anything if it is one of the coldfire
> platforms though.  Jim, would you like to do this our would you like me to?
> 
> Chris
> 
> 
> On Sat, Jun 29, 2013 at 3:00 PM, Chris Healy <cphealy@gmail.com
> <mailto:cphealy@gmail.com>> wrote:
> 
>     I took a look at what was going on in the various use cases with and
>     without the i.MX6x.
> 
>     The i.MX6x AND i.MX28 both have bit 29 which clears all the RMON
>     regs to zero when written to.  I was not aware of bit 29 with the
>     i.MX28 as I originally did this function for the i.MX51 and i.MX53
>     which do not have bit 29.
> 
>     Regardless, according to Andy, clearing the RMON registers in
>     fec_restart is moot as fec_restart restarts the MAC.  This being
>     true, we could probably just enable the MIB by setting bit 31 of
>     FEC_MIB_CTRLSTAT and be done.
> 
>     I have not tested this yet though.
> 
>     Chris
> 
> 
>     On Fri, Jun 28, 2013 at 10:58 PM, Duan Fugang-B38611
>     <B38611@freescale.com <mailto:B38611@freescale.com>> wrote:
> 
>         On 06/28/13 23:08, Jim Baxter wrote:
> 
>         > commit 38ae92d "fec: Add support for reading RMON registers"
>         causes the imx6Q to crash.
>         >
>         > This fixes it and clears it using the MIB Control Register's
>         MIB_CLEAR bit.
>         >
>         > Signed-off-by: Jim Baxter <jim_baxter@mentor.com
>         <mailto:jim_baxter@mentor.com>>
>         > ---
>         >  drivers/net/ethernet/freescale/fec_main.c |    8 ++++++--
>         >  1 file changed, 6 insertions(+), 2 deletions(-)
>         >
>         > diff --git a/drivers/net/ethernet/freescale/fec_main.c
>         b/drivers/net/ethernet/freescale/fec_main.c
>         > index ed6180e..a1f0413 100644
>         > --- a/drivers/net/ethernet/freescale/fec_main.c
>         > +++ b/drivers/net/ethernet/freescale/fec_main.c
>         > @@ -607,8 +607,12 @@ fec_restart(struct net_device *ndev, int
>         duplex)  #ifndef CONFIG_M5272
>         >       /* Disable, clear, and enable the MIB */
>         >       writel(1 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
>         > -     for (i = RMON_T_DROP; i < IEEE_R_OCTETS_OK; i++)
>         > -             writel(0, fep->hwp + i);
>         > +     if (strcmp(id_entry->name, "imx6q-fec") == 0) {
>         > +             writel(1 << 29, fep->hwp + FEC_MIB_CTRLSTAT);
>         > +     } else {
>         > +             for (i = RMON_T_DROP; i < IEEE_R_OCTETS_OK; i++)
>         > +                     writel(0, fep->hwp + i);
>         > +     }
>         >       writel(0, fep->hwp + FEC_MIB_CTRLSTAT);  #endif
>         >
>         > --
>         > 1.7.10.4
> 
>         It is not necessary to clear MIB since fec_restart() will reset
>         MAC which cause all MAC register auto reset to  zero.
> 
> 
>         Thanks,
>         Andy
> 
> 
> 
Hi Chris,

I have submitted another patch, please check if that is what you meant?

Thank you,
Jim

  parent reply	other threads:[~2013-07-01 10:16 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Jim Baxter <jim_baxter@mentor.com>
2013-04-17 20:07 ` [PATCH net-next v3 1/1] net: fec: Enable imx6 enet checksum acceleration Jim Baxter
2013-04-17 21:37   ` Eric Dumazet
2013-04-18 12:49     ` Jim Baxter
2013-04-18 16:16       ` Ben Hutchings
2013-04-18 17:07         ` Ben Hutchings
2013-04-18 17:08         ` Jim Baxter
2013-04-18 17:12           ` Ben Hutchings
2013-04-18 17:21             ` Jim Baxter
2013-04-18 21:27               ` Jim Baxter
2013-04-18 22:03                 ` Ben Hutchings
2013-04-17 22:45   ` Francois Romieu
2013-04-18 10:18     ` Jim Baxter
2013-04-18 11:31       ` Fabio Estevam
2013-04-18 21:54       ` Francois Romieu
2013-04-19  8:45         ` Jim Baxter
2013-04-19 15:10 ` [PATCH net-next v4 " Jim Baxter
2013-04-19 15:29   ` Eric Dumazet
2013-04-19 15:55     ` Jim Baxter
2013-04-19 15:56       ` Ben Hutchings
2013-04-19 15:59       ` Eric Dumazet
2013-04-19 15:34   ` Ben Hutchings
2013-04-19 16:16     ` Jim Baxter
2013-04-19 16:20       ` Ben Hutchings
2013-04-19 18:10 ` [PATCH net-next v5 " Jim Baxter
2013-04-19 18:50   ` Ben Hutchings
2013-04-25  7:59     ` David Miller
2013-06-25 23:55 ` [PATCH net-next v1 1/1] net: fec: Add VLAN receive HW support Jim Baxter
2013-06-26  2:22   ` Duan Fugang-B38611
2013-06-26  2:31   ` Duan Fugang-B38611
2013-06-26  2:56     ` Shawn Guo
2013-06-26  3:13       ` Duan Fugang-B38611
2013-06-26  5:49     ` David Miller
2013-06-26 10:09     ` Jim Baxter
2013-06-26 11:18       ` Duan Fugang-B38611
2013-06-26 11:45         ` Jim Baxter
2013-06-27  1:41           ` Duan Fugang-B38611
2013-06-27  9:35             ` Jim Baxter
2013-06-27  9:44           ` Lucas Stach
2013-06-27 14:03             ` Jim Baxter
2013-06-27 18:25 ` [PATCH net v1 1/1] net: fec: Fix Transmitted bytes counter Jim Baxter
2013-06-28  2:11   ` Duan Fugang-B38611
2013-07-01 20:40     ` David Miller
2013-07-02  8:32       ` Jim Baxter
2013-07-02  8:46         ` David Miller
2013-06-28  9:51 ` [PATCH net v2 " Jim Baxter
2013-06-28 10:10   ` Duan Fugang-B38611
2013-06-28 14:08 ` [PATCH net-next v2 1/1] net: fec: Add VLAN receive HW support Jim Baxter
2013-06-29  5:34   ` Duan Fugang-B38611
2013-07-02  0:09   ` David Miller
2013-07-02  9:39     ` Jim Baxter
2013-06-28 15:07 ` [PATCH RFC net-next v1 1/1] net: fec: Fix RMON registers on imx6 Jim Baxter
2013-06-29  5:58   ` Duan Fugang-B38611
     [not found]     ` <CAFXsbZpgAqvkEy+S83iJNMH9-N7h68MDRuvARE9pmT7HbcpAOQ@mail.gmail.com>
     [not found]       ` <CAFXsbZoBQ3ODUnFg-VumP+YAfCJ2-d=nL_=Gk2LKXm7PadHUuQ@mail.gmail.com>
2013-07-01 10:16         ` Jim Baxter [this message]
2013-07-01 10:31 ` [PATCH " Jim Baxter
     [not found]   ` <CAFXsbZoDWn4KgAVEpUtajo+PwfnrJoO0eTw9g6+MdQ8b666=EQ@mail.gmail.com>
2013-07-01 13:52     ` Jim Baxter
2013-07-02 19:41   ` David Miller
2013-07-01 13:57 ` [PATCH net-next v3 " Jim Baxter
2013-07-02 21:52 ` [PATCH net-next v3 1/1] net: fec: Add VLAN receive HW support Jim Baxter
2013-07-03 23:45   ` David Miller
2014-05-29 17:12 ` [PATCH v1 0/3] usb: gadget: NCM: Fixes and Multi-frame for TX Jim Baxter
2014-05-29 17:12   ` [PATCH v1 1/3] usb: gadget: NCM: RX function support multiple NDPs Jim Baxter
2014-05-29 18:55     ` Bjørn Mork
2014-05-30 11:45       ` Jim Baxter
2014-05-29 17:12   ` [PATCH v1 2/3] usb: gadget: NCM: Add transmit multi-frame Jim Baxter
2014-05-29 17:12   ` [PATCH v1 3/3] usb: gadget: NCM: Stop RX TCP Bursts getting dropped Jim Baxter
2014-05-29 19:04     ` Eric Dumazet
2014-05-30 11:25       ` Jim Baxter
2014-06-12  9:38         ` Jim Baxter
2014-06-12  9:42           ` David Laight
2014-07-07 17:33 ` [PATCH v2 0/3] usb: gadget: NCM: Fixes and Multi-frame for TX Jim Baxter
2014-07-07 17:33   ` [PATCH v2 1/3] usb: gadget: NCM: RX function support multiple NDPs Jim Baxter
2014-07-07 17:33   ` [PATCH v2 2/3] usb: gadget: NCM: Add transmit multi-frame Jim Baxter
2014-07-07 17:33   ` [PATCH v2 3/3] usb: gadget: NCM: Stop RX TCP Bursts getting dropped Jim Baxter

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=51D156FF.9000503@mentor.com \
    --to=jim_baxter@mentor.com \
    --cc=B20596@freescale.com \
    --cc=B38611@freescale.com \
    --cc=cphealy@gmail.com \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    --cc=r49496@freescale.com \
    /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).