Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp896512pxb; Tue, 1 Feb 2022 12:41:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxUholohyVRM4gSyOmbj0cLByrk72tOM8XEZhGOllr9aAfwN19AI3ALuY5uUyBNQ3AVYniT X-Received: by 2002:a17:90a:8548:: with SMTP id a8mr4357119pjw.126.1643748069780; Tue, 01 Feb 2022 12:41:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643748069; cv=none; d=google.com; s=arc-20160816; b=e/oC3uEsEFqaghsn4EQ+AwtxnbnW1zfyIsOOE7KdxLP6nfCPfy6E1o4fvsCn2sBYk8 sb9eyqjdCPmVj+su52JJkbMlL7sG/vDxsnU5R7UnaBJZe3LG1ACs4rM0iKV3ul4X2RiU N9y6e04UFIbppX/e7bXCRo8zT2ciat0d2/ugMSwQRJ1BR1eODCQT8YJyvlRYoZbws+Ps oroXt29xPVAmD+JZtAXNrWmosBckkl3kYgF1uko6OlyvRTFuBHrlayIPUAdZDxbs7mzu sO9fpPuJk0RBWtyI2oqaRkzdKhgGRi09Nf8Mal2vWj4v/8h9nZjGj7DKTZm2loEvU0la FJ3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=oGbrB4jkSsv8ztmFHI1kkrhQ9Pcbl+Xj8CjWST+LroU=; b=ZxRhQvHYXoyu49Im7hWqpClSBWxJwOKinz1LcjRNPtTaeFqHVzA1FbI14tOhi2nx8z jRcXrjkoVDVYGCyMml7sbK6jm0gR3jle4K8C+1N2Bg1tEJuQ959c1GtZ4MfcoiBiJyUX FzTrcEwDJ677QKSvsn/ygbb5hyCF6wiDG49r7IIpS1MZ18oWFlTa+zva6uu+YZwsJjWQ 1k2cj7RjaBFhQPJNqtZaCS1Mdkp4tCZSTpKbj9GJrrzmYDeoqalbAL4l1FXuRc4cJcC3 RRAcmcGBeR/QkE0FQVYRVmtSPoLw4gL5i10x+ncaDjf2bH6knq207Vsxg8v/d5on6oCf vHuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=w3IaXZzw; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b4si16900266plz.351.2022.02.01.12.40.57; Tue, 01 Feb 2022 12:41:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=w3IaXZzw; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349162AbiAaO5I (ORCPT + 99 others); Mon, 31 Jan 2022 09:57:08 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:56258 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232149AbiAaO5G (ORCPT ); Mon, 31 Jan 2022 09:57:06 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 1C4D61F380; Mon, 31 Jan 2022 14:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1643641025; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oGbrB4jkSsv8ztmFHI1kkrhQ9Pcbl+Xj8CjWST+LroU=; b=w3IaXZzw3qmQ6aAR88iBgj2WH4L/+KEMADWdgR3bpKxJYAFPRVM9yt9py1+D86rOu9yTwU HYpxsU06OMbC7SRvQBB362VTOIntkwKsXHHnkdVrbA8J1yjDj9mTcooW587Ampb8pyxW8g B+5wNNxtHEmGnwSzCoPDEoV8fWCuan8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1643641025; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oGbrB4jkSsv8ztmFHI1kkrhQ9Pcbl+Xj8CjWST+LroU=; b=oRH6TwzDWmKnwD2uRG2sWCAH1Pilwr+RYro8ldfbAmW0tgMV//zyxFISND88ptcTOlFQrq FQqs6UmPWeUVkGAQ== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id CB527A3B8C; Mon, 31 Jan 2022 14:57:04 +0000 (UTC) Date: Mon, 31 Jan 2022 15:57:04 +0100 Message-ID: From: Takashi Iwai To: Alexander Sergeyev Cc: Jeremy Szu , tiwai@suse.com, "moderated list:SOUND" , Kailang Yang , open list , Huacai Chen , Jian-Hong Pan , Hui Wang , PeiSen Hou Subject: Re: [PATCH 1/4] ALSA: hda/realtek: fix mute/micmute LEDs for HP 855 G8 In-Reply-To: <20220130111020.44gzrm5ckrakjta2@localhost.localdomain> References: <20220114183720.n46wealclg6spxkp@localhost.localdomain> <20220115152215.kprws5nja2i43qax@localhost.localdomain> <20220119093249.eaxem33bjqjxcher@localhost.localdomain> <20220122190522.ycaygrqcen7d3hj2@localhost.localdomain> <20220122205637.7gzurdu7xl4sthxw@localhost.localdomain> <20220129144704.xlmeylllvy3b3fum@localhost.localdomain> <20220130111020.44gzrm5ckrakjta2@localhost.localdomain> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 30 Jan 2022 12:10:20 +0100, Alexander Sergeyev wrote: > > On Sat, Jan 29, 2022 at 05:47:07PM +0300, Alexander Sergeyev wrote: > > But unbind-bind problems with IO_PAGE_FAULT and "out of range cmd" are not > > eliminated. IO_PAGE_FAULT are often logged without accompanying "out of range > > cmd". And after adding debugging printk() I haven't managed to trigger "out > > of range cmd" yet. But IO_PAGE_FAULT are more easily triggered. > > IO_PAGE_FAULTs go away with CONFIG_IOMMU_DEFAULT_PASSTHROUGH enabled. As I > understand, this leads to reduced DMA device isolation which is generally not > desirable. I was initially thinking about races between some delayed code and > io-memory pages unmapping, but first IO_PAGE_FAULTs (running non-passthrough > iommu) happen during bind operations as well. That's logical, as IOMMU is bypassed for DMA with that option. I still don't get what really triggers it. This won't happen when you build modules and load/unload the driver instead of dynamic binding? And the out-of-range access is puzzling, too. I guess this comes from the update of a COEF, i.e. it reads a strange value and tries to update the value based on it. The problem is that it's no -1 but some random value. This might be tied with the IOMMU error, and it might reading unexpected address, which would be really bad. In anyway, we need to track down exactly which access triggers those errors... > What is also interesting, unbind & bind consistently fails on 31th bind: > > echo -n '0000:05:00.6' > /sys/bus/pci/drivers/snd_hda_intel/bind > -bash: echo: write error: No such device > > And does not recover from there until a reboot. This is intended behavior. The driver has a static device index that is incremented at each probe, so that the driver may probe multiple instances. It'll be tricky to reset this for dynamic binding, though. This problem is not only for HD-audio but for most of other drivers. But I leave this as is for now, since the dynamic binding is rarely used for PCI and other buses, so far. Takashi