From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F5FF1BBBC4 for ; Wed, 23 Oct 2024 13:50:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729691418; cv=none; b=fs9QVHqAbFLR32brx6DFhQ5mHoz1s3X2YRXQrsmL1+yiCsxV+eaMK/sgTfeYp6Fv9lPYJQ39ekyy0oXzog2irguJY9k7uZDg+5vyx9ySdBpTtrBiqRED2QhFxKrsFwExzDZTmQjVpv0QTZ2r1jrOtxEERpe40PvKI3IKi5/woto= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729691418; c=relaxed/simple; bh=1CTS0Ugnf9jJBC1ruM/WIiADBY5GmrMIo6GSJ3E70PI=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=E9FQN0pdyd6D3/DFFkqfeeDryNdAlIqaDWhZs7kOfyoWwLQNMff5onl1ckh3Nrr4mxmVrF2+yE6gV84TNtZC3/PEFpI3Az3B6V7Wnn1T2cBihrFmMPUNWYMloXhgIxlWRKIbgfXwdXXnUIDY79/C0PxZk2SOEKQLGCRj10w+vIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=MV4LdYs8; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="MV4LdYs8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729691415; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oO7/c3KxFQ4pCLrpHRIQyFFVX9SeNU/L27HBNV7OVps=; b=MV4LdYs89IhkXEdpv48Wa/IRPAgOsxnBIdhdluTma/rKfhu6MZwNZ0DBm+54r9KDPEe2/x XK8Xp9+usPt9nWroXU7YtvsXX1QwrpjHKzYtNjLbygm2GmR9wsO49ElgCnRQb12DODV9aO 1JYtXZTu2jsOUe/IZzCTtzQGod6SGXY= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-52-YhIO_yJyNXmxeLRC_g9f_Q-1; Wed, 23 Oct 2024 09:50:13 -0400 X-MC-Unique: YhIO_yJyNXmxeLRC_g9f_Q-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4315afcae6cso5554575e9.0 for ; Wed, 23 Oct 2024 06:50:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729691412; x=1730296212; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=oO7/c3KxFQ4pCLrpHRIQyFFVX9SeNU/L27HBNV7OVps=; b=ZP5S0W0icT4gVen57GkPSWbMzPzAyu2uyH+wQqV8udTAt8J183CqJ/0cKdIWP8s9mc U1Qhe8jhN/WH/AAuS7TajGGmAlvs3LL+eUqwO4EtxSHE7xuDowfwgxe1XSEjd+6T3p6z 3s0CZ+WqgDdWafPakUY6A5h4SXj4cpXxp0hSC4w1jR+c/N1RbWwr4fvJ9DBHHzy1KbLR jVJFVoMOJzsA3WmqZ3khtEIoOw/+93rTHI0eq1Zst/kKw/PaX/kKBjRePFLnAjvWtiA7 yvgSSCQ1xEMb2NxFkuYab0tHW17qTuv0B89opwoR+twRddoRsYiYLtXoLq8o6+p6aXjV h+xg== X-Forwarded-Encrypted: i=1; AJvYcCVdOeaPdgOugsQ8S4PZXmxdUnQ7fpfnvW/lAYzz6SMp1XUIhzyIZdlcXJA6/Yirj9RrTdHlW+Ur1VZoqg==@vger.kernel.org X-Gm-Message-State: AOJu0YzXMu5XfYBYGDgzGczUW5SgSksWqb/oGK0tiP3iUIW4BGsoHz0q uILISGwwqM6a85DRDiXyIG0B814XuIs56bD6ZXneNPSeM2Pjn+NVUdPLM7QupJh8IYXSTGKhkwr qPlljpF8A7BIskmlYfPAXYG10Wb+sKgD4R5l6NnkoFBRDaoolUrq7Yh5uebV8 X-Received: by 2002:a05:600c:4f43:b0:42f:84ec:3e0 with SMTP id 5b1f17b1804b1-4317bd88469mr48316695e9.9.1729691412231; Wed, 23 Oct 2024 06:50:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHVbS2v+nb51IE57ofZXQEpzrUukFuey0NWkF8DOXs6/K2mGsAvF2UpvyCTTgP3Onw94z3R5g== X-Received: by 2002:a05:600c:4f43:b0:42f:84ec:3e0 with SMTP id 5b1f17b1804b1-4317bd88469mr48316115e9.9.1729691411741; Wed, 23 Oct 2024 06:50:11 -0700 (PDT) Received: from eisenberg.fritz.box ([2001:16b8:3dac:2f00:8834:dd3a:39b8:e43b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186be7605sm16955265e9.19.2024.10.23.06.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 06:50:11 -0700 (PDT) Message-ID: <6f3db65fe9a5dcd1a7a8d9bd5352ecb248ef57b1.camel@redhat.com> Subject: Re: [PATCH 02/13] ALSA: hda_intel: Use always-managed version of pcim_intx() From: Philipp Stanner To: Takashi Iwai Cc: Damien Le Moal , Niklas Cassel , Sergey Shtylyov , Basavaraj Natikar , Jiri Kosina , Benjamin Tissoires , Arnd Bergmann , Greg Kroah-Hartman , Alex Dubov , Sudarsana Kalluru , Manish Chopra , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rasesh Mody , GR-Linux-NIC-Dev@marvell.com, Igor Mitsyanko , Sergey Matyukevich , Kalle Valo , Sanjay R Mehta , Shyam Sundar S K , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Alex Williamson , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Jaroslav Kysela , Takashi Iwai , Chen Ni , Mario Limonciello , Ricky Wu , Al Viro , Breno Leitao , Kevin Tian , Thomas Gleixner , Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , Andy Shevchenko , Mostafa Saleh , Jason Gunthorpe , Yi Liu , Christian Brauner , Ankit Agrawal , Eric Auger , Reinette Chatre , Ye Bin , Marek =?ISO-8859-1?Q?Marczykowski-G=F3recki?= , Pierre-Louis Bossart , Peter Ujfalusi , Maarten Lankhorst , Kai Vehmanen , Rui Salvaterra , linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, linux-sound@vger.kernel.org Date: Wed, 23 Oct 2024 15:50:09 +0200 In-Reply-To: <87v7xk2ps5.wl-tiwai@suse.de> References: <20241015185124.64726-1-pstanner@redhat.com> <20241015185124.64726-3-pstanner@redhat.com> <87v7xk2ps5.wl-tiwai@suse.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.4 (3.52.4-1.fc40) Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Tue, 2024-10-22 at 16:08 +0200, Takashi Iwai wrote: > On Tue, 15 Oct 2024 20:51:12 +0200, > Philipp Stanner wrote: > >=20 > > pci_intx() is a hybrid function which can sometimes be managed > > through > > devres. To remove this hybrid nature from pci_intx(), it is > > necessary to > > port users to either an always-managed or a never-managed version. > >=20 > > hda_intel enables its PCI-Device with pcim_enable_device(). Thus, > > it needs > > the always-managed version. > >=20 > > Replace pci_intx() with pcim_intx(). > >=20 > > Signed-off-by: Philipp Stanner > > --- > > =C2=A0sound/pci/hda/hda_intel.c | 2 +- > > =C2=A01 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c > > index b4540c5cd2a6..b44ca7b6e54f 100644 > > --- a/sound/pci/hda/hda_intel.c > > +++ b/sound/pci/hda/hda_intel.c > > @@ -786,7 +786,7 @@ static int azx_acquire_irq(struct azx *chip, > > int do_disconnect) > > =C2=A0 } > > =C2=A0 bus->irq =3D chip->pci->irq; > > =C2=A0 chip->card->sync_irq =3D bus->irq; > > - pci_intx(chip->pci, !chip->msi); > > + pcim_intx(chip->pci, !chip->msi); > > =C2=A0 return 0; > > =C2=A0} > > =C2=A0 >=20 > Hm, it's OK-ish to do this as it's practically same as what > pci_intx() > currently does.=C2=A0 But, the current code can be a bit inconsistent > about > the original intx value.=C2=A0 pcim_intx() always stores !enable to > res->orig_intx unconditionally, and it means that the orig_intx value > gets overridden at each time pcim_intx() gets called. Yes. >=20 > Meanwhile, HD-audio driver does release and re-acquire the interrupt > after disabling MSI when something goes wrong, and pci_intx() call > above is a part of that procedure.=C2=A0 So, it can rewrite the > res->orig_intx to another value by retry without MSI.=C2=A0 And after the > driver removal, it'll lead to another state. I'm not sure that I understand this paragraph completely. Still, could a solution for the driver on the long-term just be to use pci_intx()? >=20 > In anyway, as it doesn't change the current behavior, feel free to > take my ack for now: >=20 > Acked-by: Takashi Iwai Thank you, P. >=20 >=20 > thanks, >=20 > Takashi >=20