NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/49259



The following reply was made to PR kern/49259; it has been noted by GNATS.

From: Julien Lorec <julien.lorec%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/49259
Date: Wed, 08 Oct 2014 23:04:10 +0200

 This is a multi-part message in MIME format.
 --------------030804080700080806090602
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
 Patch included against 6.1.5-RELEASE.
 Ported from OpenBSD source code.
 Tested OK on a Shuttle DS437 running NetBSD 6.1.5-RELEASE.
 
 --------------030804080700080806090602
 Content-Type: text/plain; charset=windows-1252;
  name="rtl8169.c.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="rtl8169.c.diff"
 
 --- /cygdrive/c/Users/Julien/Desktop/usr/src/sys/dev/ic/rtl8169.c	2012-03-05 21:31:49.000000000 +0100
 +++ /cygdrive/c/Users/Julien/Desktop/usr/src/sys/dev/ic/rtl8169.c.PATCHED	2014-10-08 22:51:29.800378700 +0200
 @@ -610,6 +610,15 @@
  			sc->sc_quirk |= RTKQ_DESCV2 | RTKQ_NOEECMD |
  			    RTKQ_MACSTAT | RTKQ_CMDSTOP | RTKQ_NOJUMBO;
  			break;
 +		case RTK_HWREV_8168G:
 +		case RTK_HWREV_8168G_SPIN1:
 +		case RTK_HWREV_8168G_SPIN2:
 +		case RTK_HWREV_8168G_SPIN4:
 +			sc->sc_quirk |= 
 + 		    RTKQ_NOEECMD | RTKQ_DESCV2 | 
 + 		    RTKQ_CMDSTOP | RTKQ_NOJUMBO | 
 +		    RTKQ_MACSTAT | RTKQ_RXDV_GATED;
 + 		break;
  		case RTK_HWREV_8100E:
  		case RTK_HWREV_8100E_SPIN2:
  		case RTK_HWREV_8101E:
 @@ -1807,6 +1816,9 @@
  	CSR_WRITE_4(sc, RTK_TXLIST_ADDR_LO,
  	    RE_ADDR_LO(sc->re_ldata.re_tx_list_map->dm_segs[0].ds_addr));
  
 +	if (sc->sc_quirk & RTKQ_RXDV_GATED)
 +		CSR_WRITE_4(sc, RTK_MISC, CSR_READ_4(sc, RTK_MISC) & ~0x00080000);
 +		
  	/*
  	 * Enable transmit and receive.
  	 */
 
 --------------030804080700080806090602
 Content-Type: text/plain; charset=windows-1252;
  name="rtl81x9var.h.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="rtl81x9var.h.diff"
 
 --- /cygdrive/c/Users/Julien/Desktop/usr/src/sys/dev/ic/rtl81x9var.h	2012-02-02 20:43:03.000000000 +0100
 +++ /cygdrive/c/Users/Julien/Desktop/usr/src/sys/dev/ic/rtl81x9var.h.PATCHED	2014-10-08 22:51:48.429195500 +0200
 @@ -192,6 +192,7 @@
  #define RTKQ_MACSTAT		0x00000100	/* set MACSTAT_DIS on init */
  #define RTKQ_CMDSTOP		0x00000200	/* set STOPREQ on stop */
  #define RTKQ_PHYWAKE_PM		0x00000400	/* wake PHY from power down */
 +#define	RTKQ_RXDV_GATED		0x00080000
  
  	bus_dma_tag_t		sc_dmat;
  
 
 --------------030804080700080806090602
 Content-Type: text/plain; charset=windows-1252;
  name="rtl81x9reg.h.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="rtl81x9reg.h.diff"
 
 --- /cygdrive/c/Users/Julien/Desktop/usr/src/sys/dev/ic/rtl81x9reg.h	2012-03-05 21:31:49.000000000 +0100
 +++ /cygdrive/c/Users/Julien/Desktop/usr/src/sys/dev/ic/rtl81x9reg.h.PATCHED	2014-10-08 22:52:01.280725500 +0200
 @@ -136,6 +136,7 @@
  #define RTK_DBG_REG		0x00D1
  #define RTK_MAXRXPKTLEN		0x00DA	/* 16 bits, chip multiplies by 8 */
  #define RTK_IM			0x00E2
 +#define RTK_MISC			0x00F0
  
  /*
   * TX config register bits
 @@ -165,6 +166,11 @@
  #define RTK_HWREV_8168E		0x2C000000
  #define RTK_HWREV_8168E_VL	0x2C800000
  #define RTK_HWREV_8168_SPIN1	0x30000000
 +#define RTK_HWREV_8168G		0x4c000000
 +#define RTK_HWREV_8168G_SPIN1	0x4c100000
 +#define RTK_HWREV_8168G_SPIN2	0x50900000
 +#define RTK_HWREV_8168G_SPIN4	0x5c800000
 +#define RTK_HWREV_8168GU		0x50800000
  #define RTK_HWREV_8100E		0x30800000
  #define RTK_HWREV_8101E		0x34000000
  #define RTK_HWREV_8102E		0x34800000
 @@ -264,7 +270,6 @@
  #define RTK_RXCFG_WRAP		0x00000080
  #define RTK_RXCFG_MAXDMA	0x00000700
  #define RTK_RXCFG_BUFSZ		0x00001800
 -#define RTK_RXCFG_FIFOTHRESH	0x0000E000
  #define RTK_RXCFG_EARLYTHRESH	0x07000000
  
  #define RTK_RXDMA_16BYTES	0x00000000
 
 --------------030804080700080806090602--
 



Home | Main Index | Thread Index | Old Index