# HG changeset patch # User Zhao Edgar Liu - Sun Microsystems # Date 1254106709 -28800 # Node ID fd0d1bbdb9a00f701ac614beec2fc73b16861073 # Parent 789e162d8de6978f62c3743a0e782f204318329a 6881999 Lenovo T500: MSI registration failed warnings on every boot diff -r 789e162d8de6 -r fd0d1bbdb9a0 usr/src/uts/common/io/audio/drv/audiohd/audiohd.c --- a/usr/src/uts/common/io/audio/drv/audiohd/audiohd.c Mon Sep 28 10:21:13 2009 +0800 +++ b/usr/src/uts/common/io/audio/drv/audiohd/audiohd.c Mon Sep 28 10:58:29 2009 +0800 @@ -255,8 +255,7 @@ ret = ddi_intr_alloc(dip, statep->htable, intr_type, 0, count, &actual, DDI_INTR_ALLOC_NORMAL); if (ret != DDI_SUCCESS || actual == 0) { - audio_dev_warn(statep->adev, "ddi_intr_alloc() failed %d", - ret); + /* ddi_intr_alloc() failed */ kmem_free(statep->htable, intr_size); return (DDI_FAILURE); } @@ -451,24 +450,22 @@ */ if ((intr_types & DDI_INTR_TYPE_MSI) && statep->msi_enable) { - if (audiohd_add_intrs(statep, DDI_INTR_TYPE_MSI) != + if (audiohd_add_intrs(statep, DDI_INTR_TYPE_MSI) == DDI_SUCCESS) { - audio_dev_warn(statep->adev, "MSI registration failed, " - "trying FIXED interrupt type"); - } else { statep->intr_type = DDI_INTR_TYPE_MSI; statep->intr_added = B_TRUE; } } if (!(statep->intr_added) && (intr_types & DDI_INTR_TYPE_FIXED)) { + /* MSI registration failed, trying FIXED interrupt type */ if (audiohd_add_intrs(statep, DDI_INTR_TYPE_FIXED) != DDI_SUCCESS) { audio_dev_warn(statep->adev, "FIXED interrupt " "registration failed"); goto error; } - audio_dev_warn(statep->adev, "Using FIXED interrupt type"); + /* FIXED interrupt type is supported */ statep->intr_type = DDI_INTR_TYPE_FIXED; statep->intr_added = B_TRUE; } @@ -6243,7 +6240,7 @@ } audio_dev_warn(statep->adev, "timeout when get " - " response from codec: wid=%d, verb=0x%04x, param=0x%04x", + "response from codec: wid=%d, verb=0x%04x, param=0x%04x", wid, verb, param); return ((uint32_t)(-1));