linux/drivers/usb/core/quirks.c

// SPDX-License-Identifier: GPL-2.0
/*
 * USB device quirk handling logic and table
 *
 * Copyright (c) 2007 Oliver Neukum
 * Copyright (c) 2007 Greg Kroah-Hartman <[email protected]>
 */

#include <linux/moduleparam.h>
#include <linux/usb.h>
#include <linux/usb/quirks.h>
#include <linux/usb/hcd.h>
#include "usb.h"

struct quirk_entry {};

static DEFINE_MUTEX(quirk_mutex);

static struct quirk_entry *quirk_list;
static unsigned int quirk_count;

static char quirks_param[128];

static int quirks_param_set(const char *value, const struct kernel_param *kp)
{}

static const struct kernel_param_ops quirks_param_ops =;

static struct kparam_string quirks_param_string =;

device_param_cb();
MODULE_PARM_DESC();

/* Lists of quirky USB devices, split in device quirks and interface quirks.
 * Device quirks are applied at the very beginning of the enumeration process,
 * right after reading the device descriptor. They can thus only match on device
 * information.
 *
 * Interface quirks are applied after reading all the configuration descriptors.
 * They can match on both device and interface information.
 *
 * Note that the DELAY_INIT and HONOR_BNUMINTERFACES quirks do not make sense as
 * interface quirks, as they only influence the enumeration process which is run
 * before processing the interface quirks.
 *
 * Please keep the lists ordered by:
 * 	1) Vendor ID
 * 	2) Product ID
 * 	3) Class ID
 */
static const struct usb_device_id usb_quirk_list[] =;

static const struct usb_device_id usb_interface_quirk_list[] =;

static const struct usb_device_id usb_amd_resume_quirk_list[] =;

/*
 * Entries for endpoints that should be ignored when parsing configuration
 * descriptors.
 *
 * Matched for devices with USB_QUIRK_ENDPOINT_IGNORE.
 */
static const struct usb_device_id usb_endpoint_ignore[] =;

bool usb_endpoint_is_ignored(struct usb_device *udev,
			     struct usb_host_interface *intf,
			     struct usb_endpoint_descriptor *epd)
{}

static bool usb_match_any_interface(struct usb_device *udev,
				    const struct usb_device_id *id)
{}

static int usb_amd_resume_quirk(struct usb_device *udev)
{}

static u32 usb_detect_static_quirks(struct usb_device *udev,
				    const struct usb_device_id *id)
{}

static u32 usb_detect_dynamic_quirks(struct usb_device *udev)
{}

/*
 * Detect any quirks the device has, and do any housekeeping for it if needed.
 */
void usb_detect_quirks(struct usb_device *udev)
{}

void usb_detect_interface_quirks(struct usb_device *udev)
{}

void usb_release_quirk_list(void)
{}