svn commit: r243060 - stable/9/sys/dev/sound/pci/hda

Alexander Motin mav at FreeBSD.org
Thu Nov 15 05:54:18 UTC 2012


Author: mav
Date: Thu Nov 15 05:54:18 2012
New Revision: 243060
URL: http://svnweb.freebsd.org/changeset/base/243060

Log:
  MFC r242352:
  Print card and subsystem IDs in verbose logs to help to identify system.
  Hide some less iseful messages under debug.

Modified:
  stable/9/sys/dev/sound/pci/hda/hdaa.c
  stable/9/sys/dev/sound/pci/hda/hdaa.h
  stable/9/sys/dev/sound/pci/hda/hdaa_patches.c
  stable/9/sys/dev/sound/pci/hda/hdac.c
  stable/9/sys/dev/sound/pci/hda/hdac.h
  stable/9/sys/dev/sound/pci/hda/hdacc.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/sound/pci/hda/hdaa.c
==============================================================================
--- stable/9/sys/dev/sound/pci/hda/hdaa.c	Thu Nov 15 05:46:02 2012	(r243059)
+++ stable/9/sys/dev/sound/pci/hda/hdaa.c	Thu Nov 15 05:54:18 2012	(r243060)
@@ -6243,6 +6243,10 @@ hdaa_attach(device_t dev)
 	devinfo->endnode = devinfo->startnode + devinfo->nodecnt;
 
 	HDA_BOOTVERBOSE(
+		device_printf(dev, "Subsystem ID: 0x%08x\n",
+		    hda_get_subsystem_id(dev));
+	);
+	HDA_BOOTHVERBOSE(
 		device_printf(dev,
 		    "Audio Function Group at nid=%d: %d subnodes %d-%d\n",
 		    nid, devinfo->nodecnt,

Modified: stable/9/sys/dev/sound/pci/hda/hdaa.h
==============================================================================
--- stable/9/sys/dev/sound/pci/hda/hdaa.h	Thu Nov 15 05:46:02 2012	(r243059)
+++ stable/9/sys/dev/sound/pci/hda/hdaa.h	Thu Nov 15 05:54:18 2012	(r243060)
@@ -260,7 +260,7 @@ struct hdaa_chan {
 		(((uint32_t)hda_get_vendor_id(devinfo->dev) << 16) +	\
 		hda_get_device_id(devinfo->dev))
 
-#define hdaa_subvendor_id(devinfo)					\
+#define hdaa_card_id(devinfo)					\
 		(((uint32_t)hda_get_subdevice_id(devinfo->dev) << 16) +	\
 		hda_get_subvendor_id(devinfo->dev))
 

Modified: stable/9/sys/dev/sound/pci/hda/hdaa_patches.c
==============================================================================
--- stable/9/sys/dev/sound/pci/hda/hdaa_patches.c	Thu Nov 15 05:46:02 2012	(r243059)
+++ stable/9/sys/dev/sound/pci/hda/hdaa_patches.c	Thu Nov 15 05:54:18 2012	(r243060)
@@ -139,7 +139,7 @@ hdac_pin_patch(struct hdaa_widget *w)
 
 	config = orig = w->wclass.pin.config;
 	id = hdaa_codec_id(w->devinfo);
-	subid = hdaa_subvendor_id(w->devinfo);
+	subid = hdaa_card_id(w->devinfo);
 
 	/* XXX: Old patches require complete review.
 	 * Now they may create more problem then solve due to
@@ -392,7 +392,7 @@ hdaa_patch(struct hdaa_devinfo *devinfo)
 	int i;
 
 	id = hdaa_codec_id(devinfo);
-	subid = hdaa_subvendor_id(devinfo);
+	subid = hdaa_card_id(devinfo);
 
 	/*
 	 * Quirks
@@ -594,7 +594,7 @@ hdaa_patch_direct(struct hdaa_devinfo *d
 	uint32_t id, subid, val;
 
 	id = hdaa_codec_id(devinfo);
-	subid = hdaa_subvendor_id(devinfo);
+	subid = hdaa_card_id(devinfo);
 
 	switch (id) {
 	case HDA_CODEC_VT1708S_0:

Modified: stable/9/sys/dev/sound/pci/hda/hdac.c
==============================================================================
--- stable/9/sys/dev/sound/pci/hda/hdac.c	Thu Nov 15 05:46:02 2012	(r243059)
+++ stable/9/sys/dev/sound/pci/hda/hdac.c	Thu Nov 15 05:54:18 2012	(r243060)
@@ -1074,6 +1074,8 @@ hdac_attach(device_t dev)
 
 	sc = device_get_softc(dev);
 	HDA_BOOTVERBOSE(
+		device_printf(dev, "PCI card vendor: 0x%04x, device: 0x%04x\n",
+		    pci_get_subvendor(dev), pci_get_subdevice(dev));
 		device_printf(dev, "HDA Driver Revision: %s\n",
 		    HDA_DRV_TEST_REV);
 	);

Modified: stable/9/sys/dev/sound/pci/hda/hdac.h
==============================================================================
--- stable/9/sys/dev/sound/pci/hda/hdac.h	Thu Nov 15 05:46:02 2012	(r243059)
+++ stable/9/sys/dev/sound/pci/hda/hdac.h	Thu Nov 15 05:54:18 2012	(r243060)
@@ -666,6 +666,7 @@ HDA_ACCESSOR(revision_id,	REVISION_ID,	u
 HDA_ACCESSOR(stepping_id,	STEPPING_ID,	uint8_t);
 HDA_ACCESSOR(subvendor_id,	SUBVENDOR_ID,	uint16_t);
 HDA_ACCESSOR(subdevice_id,	SUBDEVICE_ID,	uint16_t);
+HDA_ACCESSOR(subsystem_id,	SUBSYSTEM_ID,	uint32_t);
 HDA_ACCESSOR(node_type,		NODE_TYPE,	uint8_t);
 HDA_ACCESSOR(dma_nocache,	DMA_NOCACHE,	uint8_t);
 

Modified: stable/9/sys/dev/sound/pci/hda/hdacc.c
==============================================================================
--- stable/9/sys/dev/sound/pci/hda/hdacc.c	Thu Nov 15 05:46:02 2012	(r243059)
+++ stable/9/sys/dev/sound/pci/hda/hdacc.c	Thu Nov 15 05:54:18 2012	(r243060)
@@ -422,7 +422,7 @@ hdacc_attach(device_t dev)
 	startnode = HDA_PARAM_SUB_NODE_COUNT_START(subnode);
 	endnode = startnode + codec->fgcnt;
 
-	HDA_BOOTVERBOSE(
+	HDA_BOOTHVERBOSE(
 		device_printf(dev,
 		    "Root Node at nid=0: %d subnodes %d-%d\n",
 		    HDA_PARAM_SUB_NODE_COUNT_TOTAL(subnode),
@@ -506,6 +506,10 @@ hdacc_probe_nomatch(device_t dev, device
 	    fg->type == HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO ? "Audio" :
 	    (fg->type == HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_MODEM ? "Modem" :
 	    "Unknown"), fg->nid, device_get_nameunit(dev));
+	HDA_BOOTVERBOSE(
+		device_printf(dev, "Subsystem ID: 0x%08x\n",
+		    hda_get_subsystem_id(dev));
+	);
 	HDA_BOOTHVERBOSE(
 		device_printf(dev, "Power down FG nid=%d to the D3 state...\n",
 		    fg->nid);


More information about the svn-src-stable-9 mailing list