HID: intel-ish-hid: loader: Add PRODUCT_FAMILY-based firmware matching
This patch was previously backported to fedora-6.18 kernel, to support the X1 2-in-1 G11 (!4315 (merged)) but I missed adding it to the fedora-6.19 kernel. Sorry!
It turns out having it missing causes a regression on the X1 2-in-1 G10 as well
Upstream Status: hid/hid.git (cherry picked from commit 043251b2) (it's in Linus's tree as well now)
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2428677
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2448048
Tested-by: Taylor Rhodes offrhode92@gmail.com
Signed-off-by: Mark Pearson mpearson-lenovo@squebb.ca
Add support for firmware filenames that include the CRC32 checksum of the DMI product_family field. Several OEMs ship ISH firmware variants shared across a product family while product_name or product_sku may differ. This intermediate matching granularity reduces duplication and improves firmware selection for vendor-customized platforms.
The newly supported filename forms are checked before existing patterns:
ish_{gen}_{vendor}{family}_{name}{sku}.bin ish_{gen}{vendor}_{family}{sku}.bin ish_{gen}{vendor}_{family}{name}.bin ish_{gen}_{vendor}_{family}.bin
The legacy product_name/product_sku rules remain unchanged and continue to provide fallback matching.
ISH_FW_FILENAME_LEN_MAX is changed to 72 to accommodate the product_family.
Tested with X9 series and X1 series.
Reviewed-by: Mark Pearson mpearson-lenovo@squebb.ca Tested-by: Richie Roy Jayme rjayme.jp@gmail.com Signed-off-by: Vishnu Sankar vishnuocv@gmail.com Acked-by: Srinivas Pandruvada srinivas.pandruvada@linux.intel.com Signed-off-by: Jiri Kosina jkosina@suse.com