lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <FFFEF1293F9B4E3B81D3777F91F21B01@realtek.com.tw>
Date:	Tue, 4 Jan 2011 10:43:43 +0800
From:	hayeswang <hayeswang@...ltek.com>
To:	'Francois Romieu' <romieu@...zoreil.com>
CC:	<davem@...emloft.net>, <netdev@...r.kernel.org>,
	'Ben Hutchings' <benh@...ian.org>
Subject: RE: [net-next-2.6 08/08] r8169: more 8168dp support.

> From: Francois Romieu [mailto:romieu@...zoreil.com] 
> Sent: Tuesday, January 04, 2011 8:26 AM
> To: Hayeswang
> Cc: davem@...emloft.net; netdev@...r.kernel.org; 'Ben Hutchings'
> Subject: Re: [net-next-2.6 08/08] r8169: more 8168dp support.
> 
> hayeswang <hayeswang@...ltek.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

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ