Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Oct 2012 10:59:42 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r242352 - head/sys/dev/sound/pci/hda
Message-ID:  <201210301059.q9UAxgIr075317@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Oct 30 10:59:42 2012
New Revision: 242352
URL: http://svn.freebsd.org/changeset/base/242352

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

Modified:
  head/sys/dev/sound/pci/hda/hdaa.c
  head/sys/dev/sound/pci/hda/hdaa.h
  head/sys/dev/sound/pci/hda/hdaa_patches.c
  head/sys/dev/sound/pci/hda/hdac.c
  head/sys/dev/sound/pci/hda/hdac.h
  head/sys/dev/sound/pci/hda/hdacc.c

Modified: head/sys/dev/sound/pci/hda/hdaa.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdaa.c	Tue Oct 30 10:52:35 2012	(r242351)
+++ head/sys/dev/sound/pci/hda/hdaa.c	Tue Oct 30 10:59:42 2012	(r242352)
@@ -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: head/sys/dev/sound/pci/hda/hdaa.h
==============================================================================
--- head/sys/dev/sound/pci/hda/hdaa.h	Tue Oct 30 10:52:35 2012	(r242351)
+++ head/sys/dev/sound/pci/hda/hdaa.h	Tue Oct 30 10:59:42 2012	(r242352)
@@ -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: head/sys/dev/sound/pci/hda/hdaa_patches.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdaa_patches.c	Tue Oct 30 10:52:35 2012	(r242351)
+++ head/sys/dev/sound/pci/hda/hdaa_patches.c	Tue Oct 30 10:59:42 2012	(r242352)
@@ -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: head/sys/dev/sound/pci/hda/hdac.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdac.c	Tue Oct 30 10:52:35 2012	(r242351)
+++ head/sys/dev/sound/pci/hda/hdac.c	Tue Oct 30 10:59:42 2012	(r242352)
@@ -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: head/sys/dev/sound/pci/hda/hdac.h
==============================================================================
--- head/sys/dev/sound/pci/hda/hdac.h	Tue Oct 30 10:52:35 2012	(r242351)
+++ head/sys/dev/sound/pci/hda/hdac.h	Tue Oct 30 10:59:42 2012	(r242352)
@@ -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: head/sys/dev/sound/pci/hda/hdacc.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdacc.c	Tue Oct 30 10:52:35 2012	(r242351)
+++ head/sys/dev/sound/pci/hda/hdacc.c	Tue Oct 30 10:59:42 2012	(r242352)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210301059.q9UAxgIr075317>