From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 DD5331BEF71; Wed, 19 Feb 2025 09:02:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739955756; cv=none; b=pQk5x54HysUgGsvNDp/xeVn49s54fmu8dV4PzT86n5GgGk0W+lIUG8tXRh+bqiSYZtUR+lJvT8TcZyoMveZPox/Vl8SAwiBQIEdff1rz0xBPrN1agaLJqK8J83w5gV/Cx1Uz7Df7T5uAZZTgko/6hFcg5aTjV8MQQdXYK3yvQ6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739955756; c=relaxed/simple; bh=YffarnCP/R3Km7CWnr6xvNvgK41jgJEZGGPOhpNTMgI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=j3bIveL8lxeGe7a3d7vt7gmRqIdjkybJ6PR5eTz1Eb0xxF7JpBjNv/X8nalEVJ/hZHc4r7AdSCZDeZRssFj63Wb3HlY7chHa3GZw5L1ZAZrlF/2iElnxFRycnK7r9JcVe1lojUeVq1oiufRMXY8tI/Rv50JylLb751GwyNk9cxc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=m1030s2l; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="m1030s2l" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5BA03C4CEE6; Wed, 19 Feb 2025 09:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739955755; bh=YffarnCP/R3Km7CWnr6xvNvgK41jgJEZGGPOhpNTMgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m1030s2lWotQQ7ySJtyUImcAvMjKwyFTb+q4f0Iwnp/RBVMwGmCKqnXLWzowHucS7 kcSQ46OhpFpWEw/AVGV4qA5mle+mN3fmnGqzkjkEFoJO5lZRZSbWyZf+5oyMP5afqb v4hNs/f0KcK+2mDoA0k4FuZU3Y4qVXaqW5Gmx06g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, stable , Baoqi Zhang , Huacai Chen Subject: [PATCH 6.6 061/152] USB: pci-quirks: Fix HCCPARAMS register error for LS7A EHCI Date: Wed, 19 Feb 2025 09:27:54 +0100 Message-ID: <20250219082552.459228307@linuxfoundation.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250219082550.014812078@linuxfoundation.org> References: <20250219082550.014812078@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Huacai Chen commit e71f7f42e3c874ac3314b8f250e8416a706165af upstream. LS7A EHCI controller doesn't have extended capabilities, so the EECP (EHCI Extended Capabilities Pointer) field of HCCPARAMS register should be 0x0, but it reads as 0xa0 now. This is a hardware flaw and will be fixed in future, now just clear the EECP field to avoid error messages on boot: ...... [ 0.581675] pci 0000:00:04.1: EHCI: unrecognized capability ff [ 0.581699] pci 0000:00:04.1: EHCI: unrecognized capability ff [ 0.581716] pci 0000:00:04.1: EHCI: unrecognized capability ff [ 0.581851] pci 0000:00:04.1: EHCI: unrecognized capability ff ...... [ 0.581916] pci 0000:00:05.1: EHCI: unrecognized capability ff [ 0.581951] pci 0000:00:05.1: EHCI: unrecognized capability ff [ 0.582704] pci 0000:00:05.1: EHCI: unrecognized capability ff [ 0.582799] pci 0000:00:05.1: EHCI: unrecognized capability ff ...... Cc: stable Signed-off-by: Baoqi Zhang Signed-off-by: Huacai Chen Link: https://lore.kernel.org/r/20250202124935.480500-1-chenhuacai@loongson.cn Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/pci-quirks.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c @@ -946,6 +946,15 @@ static void quirk_usb_disable_ehci(struc * booting from USB disk or using a usb keyboard */ hcc_params = readl(base + EHCI_HCC_PARAMS); + + /* LS7A EHCI controller doesn't have extended capabilities, the + * EECP (EHCI Extended Capabilities Pointer) field of HCCPARAMS + * register should be 0x0 but it reads as 0xa0. So clear it to + * avoid error messages on boot. + */ + if (pdev->vendor == PCI_VENDOR_ID_LOONGSON && pdev->device == 0x7a14) + hcc_params &= ~(0xffL << 8); + offset = (hcc_params >> 8) & 0xff; while (offset && --count) { pci_read_config_dword(pdev, offset, &cap);