Netdev List
 help / color / mirror / Atom feed
From: hayeswang <hayeswang@realtek.com>
To: 'Francois Romieu' <romieu@fr.zoreil.com>
Cc: <davem@davemloft.net>, <netdev@vger.kernel.org>,
	'Ben Hutchings' <benh@debian.org>
Subject: RE: [net-next-2.6 08/08] r8169: more 8168dp support.
Date: Tue, 4 Jan 2011 10:43:43 +0800	[thread overview]
Message-ID: <FFFEF1293F9B4E3B81D3777F91F21B01@realtek.com.tw> (raw)
In-Reply-To: <20110104002606.GA5934@electric-eye.fr.zoreil.com>

> From: Francois Romieu [mailto:romieu@fr.zoreil.com] 
> Sent: Tuesday, January 04, 2011 8:26 AM
> To: Hayeswang
> Cc: davem@davemloft.net; netdev@vger.kernel.org; 'Ben Hutchings'
> Subject: Re: [net-next-2.6 08/08] r8169: more 8168dp support.
> 
> hayeswang <hayeswang@realtek.com> :
> [...]
> > > +static void rtl8169_hw_reset(struct rtl8169_private *tp)
> > >  {
> > > +	void __iomem *ioaddr = tp->mmio_addr;
> > > +
> > >  	/* Disable interrupts */
> > >  	rtl8169_irq_mask_and_ack(ioaddr);
> > >  
> > > +	if (tp->mac_version == RTL_GIGA_MAC_VER_28) {
> > 
> > This check should include RTL_GIGA_MAC_VER_27.
> 
> Sure. I have a different (yet untested) patch for it. See below.
> 
> > > +		while (RTL_R8(TxPoll) & NPQ)
> > > +			udelay(20);
> > > +
> > > +	}
> > > +
> > >  	/* Reset the chipset */
> > >  	RTL_W8(ChipCmd, CmdReset);
> > >  
> > 
> > After the reset, there are something to do for RTL_GIGA_MAC_VER_27. 
> > You may check the soure code of realtek. Find "rtl8168_nic_reset".
> 
> Ok. Any comment about the patch below ? I wish it was more 
> expressive, especially the "mutex" magic.
> 

The chip of 8111DP has an embedded system inside. Thus, sometime the nic has to
told the embedded system what the nic is doing now. For this reason, you can
find the function "OOB_notify" in source code of realtek. Furthermore, we do a
software mutex to avoid the driver and system from accessing the same register.
When doing reset, the nic has to notify the embedded system and wait a response.
However, maybe the system accesses the same register at the same time, so the
embedded system and the driver implement the same method of software mutex to
prevent this situation.

 
Best Regards,
Hayes


  reply	other threads:[~2011-01-04  2:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-02 23:37 [net-next-2.6 08/08] r8169: more 8168dp support Francois Romieu
2011-01-03 12:50 ` hayeswang
2011-01-04  0:26   ` Francois Romieu
2011-01-04  2:43     ` hayeswang [this message]
2011-01-04 23:53       ` Francois Romieu

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=FFFEF1293F9B4E3B81D3777F91F21B01@realtek.com.tw \
    --to=hayeswang@realtek.com \
    --cc=benh@debian.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.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