Skip to content

Commit 567a21d

Browse files
Sandeep Singhgregkh
authored andcommitted
usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume
commit e788787ef4f9c24aafefc480a8da5f92b914e5e6 upstream. Certain HP keyboards would keep inputting a character automatically which is the wake-up key after S3 resume On some AMD platforms USB host fails to respond (by holding resume-K) to USB device (an HP keyboard) resume request within 1ms (TURSM) and ensures that resume is signaled for at least 20 ms (TDRSMDN), which is defined in USB 2.0 spec. The result is that the keyboard is out of function. In SNPS USB design, the host responds to the resume request only after system gets back to S0 and the host gets to functional after the internal HW restore operation that is more than 1 second after the initial resume request from the USB device. As a workaround for specific keyboard ID(HP Keyboards), applying port reset after resume when the keyboard is plugged in. Signed-off-by: Sandeep Singh <Sandeep.Singh@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> cc: Nehal Shah <Nehal-bakulchandra.Shah@amd.com> Reviewed-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent dd3a2a0 commit 567a21d

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

drivers/usb/core/quirks.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = {
252252
{ USB_DEVICE(0x093a, 0x2500), .driver_info = USB_QUIRK_RESET_RESUME },
253253
{ USB_DEVICE(0x093a, 0x2510), .driver_info = USB_QUIRK_RESET_RESUME },
254254
{ USB_DEVICE(0x093a, 0x2521), .driver_info = USB_QUIRK_RESET_RESUME },
255+
{ USB_DEVICE(0x03f0, 0x2b4a), .driver_info = USB_QUIRK_RESET_RESUME },
255256

256257
/* Logitech Optical Mouse M90/M100 */
257258
{ USB_DEVICE(0x046d, 0xc05a), .driver_info = USB_QUIRK_RESET_RESUME },

drivers/usb/host/pci-quirks.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ enum amd_chipset_gen {
8989
AMD_CHIPSET_HUDSON2,
9090
AMD_CHIPSET_BOLTON,
9191
AMD_CHIPSET_YANGTZE,
92+
AMD_CHIPSET_TAISHAN,
9293
AMD_CHIPSET_UNKNOWN,
9394
};
9495

@@ -132,6 +133,11 @@ static int amd_chipset_sb_type_init(struct amd_chipset_info *pinfo)
132133
pinfo->sb_type.gen = AMD_CHIPSET_SB700;
133134
else if (rev >= 0x40 && rev <= 0x4f)
134135
pinfo->sb_type.gen = AMD_CHIPSET_SB800;
136+
}
137+
pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
138+
0x145c, NULL);
139+
if (pinfo->smbus_dev) {
140+
pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN;
135141
} else {
136142
pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
137143
PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL);
@@ -251,11 +257,12 @@ int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
251257
{
252258
/* Make sure amd chipset type has already been initialized */
253259
usb_amd_find_chipset_info();
254-
if (amd_chipset.sb_type.gen != AMD_CHIPSET_YANGTZE)
255-
return 0;
256-
257-
dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
258-
return 1;
260+
if (amd_chipset.sb_type.gen == AMD_CHIPSET_YANGTZE ||
261+
amd_chipset.sb_type.gen == AMD_CHIPSET_TAISHAN) {
262+
dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
263+
return 1;
264+
}
265+
return 0;
259266
}
260267
EXPORT_SYMBOL_GPL(usb_hcd_amd_remote_wakeup_quirk);
261268

0 commit comments

Comments
 (0)