From patchwork Thu Aug 15 18:15:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 11096237 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AAD2056FF for ; Thu, 15 Aug 2019 18:16:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B2BB28837 for ; Thu, 15 Aug 2019 18:16:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F3E028872; Thu, 15 Aug 2019 18:16:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E66542886E for ; Thu, 15 Aug 2019 18:16:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E6F2C6E452; Thu, 15 Aug 2019 18:16:08 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 478086E452 for ; Thu, 15 Aug 2019 18:16:07 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 18155397-1500050 for multiple; Thu, 15 Aug 2019 19:15:53 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Thu, 15 Aug 2019 19:15:51 +0100 Message-Id: <20190815181551.28571-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.23.0.rc1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] Revert "ALSA: hda - Drop unsol event handler for Intel HDMI codecs" X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Takashi Iwai Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP In the recent snd merge of ddf7cb83b0f4 ALSA: hda: Unexport a few more stuff 53eff75e5f4d ALSA: hda: Drop export of snd_hdac_bus_add/remove_device() ee5f85d9290f ALSA: hda: Add codec on bus address table lately f2dbe87c5ac1 ALSA: hda - Drop unsol event handler for Intel HDMI codecs module unload dies on all a couple of machines with <1> [281.912684] BUG: kernel NULL pointer dereference, address: 0000000000000000 <1> [281.912697] #PF: supervisor read access in kernel mode <1> [281.912703] #PF: error_code(0x0000) - not-present page <6> [281.912709] PGD 0 P4D 0 <4> [281.912714] Oops: 0000 [#1] PREEMPT SMP PTI <4> [281.912721] CPU: 3 PID: 2842 Comm: i915_module_loa Tainted: G U 5.3.0-rc4-CI-CI_DRM_6712+ #1 <4> [281.912730] Hardware name: Hewlett-Packard HP EliteBook 8440p/172A, BIOS 68CCU Ver. F.24 09/13/2013 <4> [281.912744] RIP: 0010:__list_del_entry_valid+0x25/0x90 <4> [281.912751] Code: c3 0f 1f 40 00 48 8b 07 48 b9 00 01 00 00 00 00 ad de 48 8b 57 08 48 39 c8 74 26 48 b9 22 01 00 00 00 00 ad de 48 39 ca 74 2e <48> 8b 32 48 39 fe 75 3a 48 8b 50 08 48 39 f2 75 48 b8 01 00 00 00 <4> [281.912767] RSP: 0018:ffffc9000072bca8 EFLAGS: 00010217 <4> [281.912774] RAX: 0000000000000000 RBX: ffff88812f8933f8 RCX: dead000000000122 <4> [281.912782] RDX: 0000000000000000 RSI: ffff88812f8933f8 RDI: ffff88812f8938a8 <4> [281.912789] RBP: ffff88812e7ce7e8 R08: 0000000000000000 R09: 0000000000000000 <4> [281.912796] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88812f8938a8 <4> [281.912803] R13: ffff88812c8722a8 R14: ffffc9000072bf08 R15: ffff888129761df8 <4> [281.912811] FS: 00007fb4913a9e40(0000) GS:ffff888133b80000(0000) knlGS:0000000000000000 <4> [281.912819] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 <4> [281.912826] CR2: 0000000000000000 CR3: 000000012867a000 CR4: 00000000000006e0 <4> [281.912833] Call Trace: <4> [281.912844] snd_hdac_bus_remove_device+0x2e/0xb0 [snd_hda_core] <4> [281.912854] snd_hdac_device_exit+0x31/0x60 [snd_hda_core] <4> [281.912866] snd_hda_codec_dev_release+0x24/0x50 [snd_hda_codec] <4> [281.912876] device_release+0x22/0x80 <4> [281.912883] kobject_put+0x86/0x1b0 <4> [281.912891] snd_hda_codec_dev_free+0x5c/0x60 [snd_hda_codec] <4> [281.912899] __snd_device_free+0x4a/0x80 <4> [281.912904] snd_device_free_all+0x36/0x90 <4> [281.912911] release_card_device+0x14/0x60 <4> [281.912917] device_release+0x22/0x80 <4> [281.912923] kobject_put+0x86/0x1b0 <4> [281.912928] snd_card_free+0x60/0x90 <4> [281.912939] pci_device_remove+0x36/0xb0 <4> [281.912946] device_release_driver_internal+0xd3/0x1b0 <4> [281.912953] unbind_store+0xc3/0x120 <4> [281.912962] kernfs_fop_write+0x104/0x190 <4> [281.912971] vfs_write+0xbd/0x1d0 <4> [281.912977] ksys_write+0x8f/0xe0 <4> [281.912984] do_syscall_64+0x55/0x1c0 Cc: Takashi Iwai --- sound/pci/hda/patch_hdmi.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 933c7bf47ef6..2096993eaf28 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -2760,8 +2760,6 @@ static void i915_pin_cvt_fixup(struct hda_codec *codec, /* precondition and allocation for Intel codecs */ static int alloc_intel_hdmi(struct hda_codec *codec) { - int err; - /* requires i915 binding */ if (!codec->bus->core.audio_component) { codec_info(codec, "No i915 binding for Intel HDMI/DP codec\n"); @@ -2770,12 +2768,7 @@ static int alloc_intel_hdmi(struct hda_codec *codec) return -ENODEV; } - err = alloc_generic_hdmi(codec); - if (err < 0) - return err; - /* no need to handle unsol events */ - codec->patch_ops.unsol_event = NULL; - return 0; + return alloc_generic_hdmi(codec); } /* parse and post-process for Intel codecs */