svn commit: r257608 - in stable/10/sys: dev/re pci

Pyun YongHyeon yongari at FreeBSD.org
Mon Nov 4 05:43:33 UTC 2013


Author: yongari
Date: Mon Nov  4 05:43:32 2013
New Revision: 257608
URL: http://svnweb.freebsd.org/changeset/base/257608

Log:
  r256827:
    Correct MAC revision bits. Previously it always cleared bit 20 and
    bit 21.
  Approved by:	re (delphij)

Modified:
  stable/10/sys/dev/re/if_re.c
  stable/10/sys/pci/if_rlreg.h
Directory Properties:
  stable/10/sys/   (props changed)

Modified: stable/10/sys/dev/re/if_re.c
==============================================================================
--- stable/10/sys/dev/re/if_re.c	Mon Nov  4 05:40:19 2013	(r257607)
+++ stable/10/sys/dev/re/if_re.c	Mon Nov  4 05:43:32 2013	(r257608)
@@ -1367,10 +1367,11 @@ re_attach(device_t dev)
 		break;
 	default:
 		device_printf(dev, "Chip rev. 0x%08x\n", hwrev & 0x7c800000);
+		sc->rl_macrev = hwrev & 0x00700000;
 		hwrev &= RL_TXCFG_HWREV;
 		break;
 	}
-	device_printf(dev, "MAC rev. 0x%08x\n", hwrev & 0x00700000);
+	device_printf(dev, "MAC rev. 0x%08x\n", sc->rl_macrev);
 	while (hw_rev->rl_desc != NULL) {
 		if (hw_rev->rl_rev == hwrev) {
 			sc->rl_type = hw_rev->rl_type;
@@ -1429,7 +1430,7 @@ re_attach(device_t dev)
 		sc->rl_flags |= RL_FLAG_MACSLEEP;
 		/* FALLTHROUGH */
 	case RL_HWREV_8168C:
-		if ((hwrev & 0x00700000) == 0x00200000)
+		if (sc->rl_macrev == 0x00200000)
 			sc->rl_flags |= RL_FLAG_MACSLEEP;
 		/* FALLTHROUGH */
 	case RL_HWREV_8168CP:

Modified: stable/10/sys/pci/if_rlreg.h
==============================================================================
--- stable/10/sys/pci/if_rlreg.h	Mon Nov  4 05:40:19 2013	(r257607)
+++ stable/10/sys/pci/if_rlreg.h	Mon Nov  4 05:43:32 2013	(r257608)
@@ -877,6 +877,7 @@ struct rl_softc {
 	bus_dma_tag_t		rl_parent_tag;
 	uint8_t			rl_type;
 	const struct rl_hwrev	*rl_hwrev;
+	uint32_t		rl_macrev;
 	int			rl_eecmd_read;
 	int			rl_eewidth;
 	int			rl_expcap;


More information about the svn-src-all mailing list