Re: [PATCH v2] usb: core: new quirk to handle devices with zero configurations
From: Jie Deng
Date: Fri Feb 27 2026 - 03:45:18 EST
在 2026/2/27 14:06, Greg Kroah-Hartman 写道:
On Fri, Feb 27, 2026 at 02:04:00PM +0800, Jie Deng wrote:
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.cDo not break a string like this, make it all one line please.
index 1cd5fa61dc76..832717549515 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -927,7 +927,12 @@ int usb_get_configuration(struct usb_device *dev)
dev->descriptor.bNumConfigurations = ncfg = USB_MAXCONFIG;
}
- if (ncfg < 1) {
+ if (ncfg < 1 && dev->quirks & USB_QUIRK_FORCE_ONE_CONFIG) {
+ dev_info(ddev, "Device claims zero configurations, "
+ "forcing to 1\n");
checkpatch should have warned you about this?
thanks,
greg k-h
Thank you for your reply. I will make the necessary revisions and submit the updated patch.
Jie Deng