aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2012-10-30 10:59:42 +0000
committerAlexander Motin <mav@FreeBSD.org>2012-10-30 10:59:42 +0000
commited228e403f62e529a73a45a4e4c194057fdf90b9 (patch)
treed8b8c9c37ea01d632a78fd63f46c96432b8f8210 /sys
parent969ed8f744a1591079961b6da8a064d199716664 (diff)
downloadsrc-ed228e403f62e529a73a45a4e4c194057fdf90b9.tar.gz
src-ed228e403f62e529a73a45a4e4c194057fdf90b9.zip
Print card and subsystem IDs in verbose logs to help to identify system.
Hide some less iseful messages under debug.
Notes
Notes: svn path=/head/; revision=242352
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pci/hda/hdaa.c4
-rw-r--r--sys/dev/sound/pci/hda/hdaa.h2
-rw-r--r--sys/dev/sound/pci/hda/hdaa_patches.c6
-rw-r--r--sys/dev/sound/pci/hda/hdac.c2
-rw-r--r--sys/dev/sound/pci/hda/hdac.h1
-rw-r--r--sys/dev/sound/pci/hda/hdacc.c6
6 files changed, 16 insertions, 5 deletions
diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c
index 0be77c3d47f2..001744b822f6 100644
--- a/sys/dev/sound/pci/hda/hdaa.c
+++ b/sys/dev/sound/pci/hda/hdaa.c
@@ -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,
diff --git a/sys/dev/sound/pci/hda/hdaa.h b/sys/dev/sound/pci/hda/hdaa.h
index 06ee87ede5a7..e24575d81048 100644
--- a/sys/dev/sound/pci/hda/hdaa.h
+++ b/sys/dev/sound/pci/hda/hdaa.h
@@ -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))
diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c
index 33aa44d7453e..949062006f72 100644
--- a/sys/dev/sound/pci/hda/hdaa_patches.c
+++ b/sys/dev/sound/pci/hda/hdaa_patches.c
@@ -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 *devinfo)
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:
diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c
index 8ae3c9c3ab4a..79c61490ffa7 100644
--- a/sys/dev/sound/pci/hda/hdac.c
+++ b/sys/dev/sound/pci/hda/hdac.c
@@ -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);
);
diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h
index 5f1da3f7c534..80ce3355f05e 100644
--- a/sys/dev/sound/pci/hda/hdac.h
+++ b/sys/dev/sound/pci/hda/hdac.h
@@ -666,6 +666,7 @@ HDA_ACCESSOR(revision_id, REVISION_ID, uint8_t);
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);
diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c
index 740b2c5480ba..cf34f2b7dcb8 100644
--- a/sys/dev/sound/pci/hda/hdacc.c
+++ b/sys/dev/sound/pci/hda/hdacc.c
@@ -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_t child)
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);