Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e12c5e8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: auerswald possible memleak fix
  USB: ipaq: Add HTC Modem Support
  USB: Fixed outdated usb_get_device_descriptor() documentation
  usb-storage: Remove duplicated unusual_devs.h entries for Sony Ericsson P990i
  USB: hid-core: Add quirk for new Apple keyboard/trackpad
  USB Storage: unusual_devs.h entry for Sony Ericsson P990i
  USB: correct keymapping on Powerbook built-in USB ISO keyboards
  USB: OHCI: fix root-hub resume bug
  USB: Fix UCR-61S2B unusual_dev entry
  USB: ftdi driver pid for dmx-interfaces
  USB: ftdi_sio: adds vendor/product id for a RFID construction kit
  OHCI: disallow autostop when wakeup is not available
parents ccf9ff52 5a3fcf5c
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -828,10 +828,7 @@ char *usb_cache_string(struct usb_device *udev, int index)
 * Context: !in_interrupt ()
 *
 * Updates the copy of the device descriptor stored in the device structure,
 * which dedicates space for this purpose.  Note that several fields are
 * converted to the host CPU's byte order:  the USB version (bcdUSB), and
 * vendors product and version fields (idVendor, idProduct, and bcdDevice).
 * That lets device drivers compare against non-byteswapped constants.
 * which dedicates space for this purpose.
 *
 * Not exported, only for use by the core.  If drivers really want to read
 * the device descriptor directly, they can call usb_get_descriptor() with
+15 −10
Original line number Diff line number Diff line
@@ -715,13 +715,6 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
		return IRQ_NOTMINE;
	}

	if (ints & OHCI_INTR_RHSC) {
		ohci_vdbg (ohci, "rhsc\n");
		ohci->next_statechange = jiffies + STATECHANGE_DELAY;
		ohci_writel (ohci, OHCI_INTR_RHSC, &regs->intrstatus);
		usb_hcd_poll_rh_status(hcd);
	}

	if (ints & OHCI_INTR_UE) {
		disable (ohci);
		ohci_err (ohci, "OHCI Unrecoverable Error, disabled\n");
@@ -731,7 +724,19 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
		ohci_usb_reset (ohci);
	}

	if (ints & OHCI_INTR_RD) {
	if (ints & OHCI_INTR_RHSC) {
		ohci_vdbg(ohci, "rhsc\n");
		ohci->next_statechange = jiffies + STATECHANGE_DELAY;
		ohci_writel(ohci, OHCI_INTR_RD | OHCI_INTR_RHSC,
				&regs->intrstatus);
		usb_hcd_poll_rh_status(hcd);
	}

	/* For connect and disconnect events, we expect the controller
	 * to turn on RHSC along with RD.  But for remote wakeup events
	 * this might not happen.
	 */
	else if (ints & OHCI_INTR_RD) {
		ohci_vdbg(ohci, "resume detect\n");
		ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus);
		hcd->poll_rh = 1;
+4 −2
Original line number Diff line number Diff line
@@ -169,7 +169,8 @@ __acquires(ohci->lock)
		break;
	case OHCI_USB_RESUME:
		/* HCFS changes sometime after INTR_RD */
		ohci_info (ohci, "wakeup\n");
		ohci_info(ohci, "%swakeup\n",
				autostopped ? "auto-" : "");
		break;
	case OHCI_USB_OPER:
		/* this can happen after resuming a swsusp snapshot */
@@ -422,7 +423,8 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
				ohci->autostop = 0;
				ohci->next_statechange = jiffies +
						STATECHANGE_DELAY;
			} else if (time_after_eq (jiffies,
			} else if (device_may_wakeup(&hcd->self.root_hub->dev)
					&& time_after_eq(jiffies,
						ohci->next_statechange)
					&& !ohci->ed_rm_list
					&& !(ohci->hc_control &
+3 −2
Original line number Diff line number Diff line
@@ -1797,11 +1797,12 @@ static const struct hid_blacklist {
	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
	{ USB_VENDOR_ID_APPLE, 0x0216, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x0217, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
	{ USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x021B, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN },
	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN },

+17 −0
Original line number Diff line number Diff line
@@ -121,6 +121,12 @@ static struct hidinput_key_translation powerbook_numlock_keys[] = {
	{ }
};

static struct hidinput_key_translation powerbook_iso_keyboard[] = {
	{ KEY_GRAVE,    KEY_102ND },
	{ KEY_102ND,    KEY_GRAVE },
	{ }
};

static int usbhid_pb_fnmode = 1;
module_param_named(pb_fnmode, usbhid_pb_fnmode, int, 0644);
MODULE_PARM_DESC(pb_fnmode,
@@ -195,6 +201,14 @@ static int hidinput_pb_event(struct hid_device *hid, struct input_dev *input,
		}
	}

	if (hid->quirks & HID_QUIRK_POWERBOOK_ISO_KEYBOARD) {
		trans = find_translation(powerbook_iso_keyboard, usage->code);
		if (trans) {
			input_event(input, usage->type, trans->to, value);
			return 1;
		}
	}

	return 0;
}

@@ -210,6 +224,9 @@ static void hidinput_pb_setup(struct input_dev *input)

	for (trans = powerbook_numlock_keys; trans->from; trans++)
		set_bit(trans->to, input->keybit);

	for (trans = powerbook_iso_keyboard; trans->from; trans++)
		set_bit(trans->to, input->keybit);
}
#else
static inline int hidinput_pb_event(struct hid_device *hid, struct input_dev *input,
Loading