lkml.org 
[lkml]   [2018]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6] usb: core: Add "quirks" parameter for usbcore
On Tue, Mar 13, 2018 at 03:26:19PM +0800, Kai-Heng Feng wrote:
> + usbcore.quirks=
> + [USB] A list of quirks entries to supplement or
> + override the built-in usb core quirk list. List
> + entries are separated by commas. Each entry has
> + the form VID:PID:Flags where VID and PID are Vendor
> + and Product ID values (4-digit hex numbers) and
> + Flags is a set of characters, each corresponding
> + to a common usb core quirk flag as follows:

This doesn't really tell me that the specified quirks will be XORed with
the built-in quirks. Maybe something like ...

[USB] A list of quirk entries to augment the
built-in usb core quirk list. List entries are
separated by commas. Each entry has the form
VendorID:ProductID:Flags. The IDs are 4-digit hex
numbers and Flags is a set of letters. Each letter
will change the built-in quirk; setting it if it is
clear and clearing it if it is set. The letters
have the following meanings:

> + /* Each entry consists of VID:PID:flags */
> + field = strsep(&p, ":");
> + if (!field)
> + break;
> +
> + if (kstrtou16(field, 16, &vid))
> + break;
> +
> + field = strsep(&p, ":");
> + if (!field)
> + break;
> +
> + if (kstrtou16(field, 16, &pid))
> + break;

Is there a reason to not use sscanf here like hid-quirks.c does?

\
 
 \ /
  Last update: 2018-03-13 12:37    [W:0.035 / U:0.468 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site