Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp239335rdb; Tue, 19 Dec 2023 15:26:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeKlYO+eDBZH3cL0ymWvuX0Qa9wxvyKdkZQajfSpW9zFufB6wQMu1Q8WXHd9pnK3d6Lvx3 X-Received: by 2002:a17:907:7e86:b0:a26:86af:f1bc with SMTP id qb6-20020a1709077e8600b00a2686aff1bcmr632374ejc.18.1703028371959; Tue, 19 Dec 2023 15:26:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703028371; cv=none; d=google.com; s=arc-20160816; b=WZ7glLBq9YTSiWS/c4LY7kbsRpV5x0DPaOV1NVz5bw3uvYheGbGzpX9pAIkTyMoZcd LOlOFWBN4aGmfOOHBmGepqTQSn6bPomSqfayBk87ZH+l9EzsFjubXqJbWRdfrIfxBN9n jza3WQmitMQ5AscW6pOj2oMSvvldg3R/vv8mLfaupHSoMh2hG2t4yqHNGNdIAAiIhWMh 4xqGQjiKToDHIh/MRmJKdPyiQ+g07xrCrsjq+g5YByG17VxohXzYuFbR+sNWLo6f9lN5 eHmbBTHRMGytbHXcC54tc1SeGs9NXLFZCio3srIZThsLMZde7Gi+blIhh9V2vSpdWGs3 Vk5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=naZ4uMi790EFZrPqxgBl4T+4PPnrRSn0penDYmzHk9o=; fh=ZJkMIcXjtN5GrCfcQmGDV2AEkurS2TOCe8C00DvBBwE=; b=SJhYTQIhH3SgDwRpr1gQFdiv0iPjV+Los21iccttuna5Q0RtliljGu6e9VcdDqTuqp H+OTZvBncoN232cLXEdW+DxeTOuWmOx5f2oUN3jqMyCvs4B9vaq8UzgLZz4Us7zJ/TVt 4tZVPUJVnF01eKT5b1/1m2jnc7F+7FwV88f3kFreSVxRgGmOA+pnCcHOnH92YaTpJvBh 5N9KSXDo5cb+T0kNe/ed8Q2ngmVrmBNnoAcV0BeixgWDwvxblYbjvuZl5jaZWLWlhTgW JTS47aEVEtHkN3i/RPpmd+Wmhg+pKCwqeS+mLXMaz+4vELUESVbaEtbEe+EEbKRIhyW2 naJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=GdwvhUAb; spf=pass (google.com: domain of linux-kernel+bounces-6087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r15-20020a1709067fcf00b00a2688f2ea1esi404478ejs.887.2023.12.19.15.26.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 15:26:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=GdwvhUAb; spf=pass (google.com: domain of linux-kernel+bounces-6087-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6087-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4B5631F26FDD for ; Tue, 19 Dec 2023 23:20:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 934683D3B7; Tue, 19 Dec 2023 23:19:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="GdwvhUAb" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 94CA63D0BD for ; Tue, 19 Dec 2023 23:19:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1d3e6c86868so6649385ad.1 for ; Tue, 19 Dec 2023 15:19:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1703027991; x=1703632791; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=naZ4uMi790EFZrPqxgBl4T+4PPnrRSn0penDYmzHk9o=; b=GdwvhUAbftyTZR4/QO015ijWX+BLu6ra0U9I4P0TIMAIlY8Mr7m3AYdFWCfmeQzl8T Zgv+Scl9uUKYR+drw7hcpJqo3EQB1WW7Z+fWxR+ggY2pEMIxjdWe1QWDJMMdO7IQMKk1 1qC5T4GNWzHTUwxuSho132MSjSyLnkt5NCuVowEFWoO6ZWW9DKMyzHw2ULBL2Xvwfv73 70zW9a6vFElwq6Y8Z7iY46oWs2zTkGxFh4IIWaWMzpLlV7kPrJaqILuL06YOEq9H8ESN 4yW1MMYfCYMs7a/diL8hFUTwIEf2L7UY0YHhYxFwGBU03Mqcx20Xdu0ZRv4QfUYbczaB 97rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703027991; x=1703632791; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=naZ4uMi790EFZrPqxgBl4T+4PPnrRSn0penDYmzHk9o=; b=uFmvdET+3ECa9d/cG8fP65zUgJINkHEO8e3mLAqTFb0QBkJFmJFu0BiPrPurwbG4o1 9j0JiXXy/EB2c/BH33hLey7D9rVUI6Cd5PceCxcP3DQ+xa3xbuEkHI/gwb0SXBPEnxXD IpcRhnPBNxOjBWZMg1k13Ty3tW7Tg7HIE1zASBNtlKiOaB3z7/j6x0/queDI+nlhXv7y cx8f7kscjJXBUVgrboLlBLJw+nPNDQ0I/FHkE9xHevK6vxbit0eAfdyDCbMwXD7Fa7hn HvJR331la5LGyoKSyx51eD/JxBqERXSAtnE7+Muk9YESGdvAz8iDeP46Wt/lMVhx0ijC QfYA== X-Gm-Message-State: AOJu0YycK/IVYb7MPDwheUVZN6nmMby/bGLauhkNJCDMlvdHL6BY4Z1u V6fvYmZYOp/WQfPmlG36WQvNJP1MxTczH4EYEmFhqA== X-Received: by 2002:a17:902:7d8a:b0:1d0:9471:808d with SMTP id a10-20020a1709027d8a00b001d09471808dmr16814587plm.93.1703027990701; Tue, 19 Dec 2023 15:19:50 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231219-thunderbolt-pci-patch-4-v2-1-ec2d7af45a9b@chromium.org> In-Reply-To: From: Esther Shimanovich Date: Tue, 19 Dec 2023 18:19:39 -0500 Message-ID: Subject: Re: [PATCH v2] PCI: Relabel JHL6540 on Lenovo X1 Carbon 7,8 To: Dmitry Torokhov Cc: Esther Shimanovich , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Rajat Jain Content-Type: text/plain; charset="UTF-8" > Maybe use PCI_VENDOR_ID_LENOVO and move the check first - it is cheaper > than string comparison. In general, symbolic constants are preferred to > magic numbers. That makes sense! Will do. > Actually, do we really need to check DMI given the checks below? I was advised by Rajat Jain to check DMI. This is the reasoning he gave me: "I'm not certain if you can use subsystem vendor alone because, subsystem vendor & ID are defined by the PCI device vendor I think (Intel here). What if Intel sold the same bridges to another company and has the same subsystem vendor / ID." To me it seems like each company in practice has a different subsystem ID, but I don't know enough to confirm this 100%. If you are confident that the subsystem IDs are sufficient, let me know and I'm happy to switch them. I'd appreciate some more insight on this before I remove the DMI checks! > > > + > > + /* Not all 0x15d3 components are external facing */ > > + if (dev->device == 0x15d3 && > > Again, maybe PCI_DEVICE_ID_INTEL_ALPINE_RIDGE_C_4C_BRIDGE? Oh! I missed that. Will use, thanks!