mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
linux: remove kernel 3.18 support
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
7e9502a831
commit
8d3ff63cd2
@ -26,10 +26,6 @@ case "$LINUX" in
|
||||
PKG_VERSION="cuboxi-3.14-dc5edb8"
|
||||
PKG_URL="$DISTRO_SRC/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
;;
|
||||
3.18)
|
||||
PKG_VERSION="3.18.6"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/kernel/v3.x/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
;;
|
||||
*)
|
||||
PKG_VERSION="3.19"
|
||||
PKG_URL="http://www.kernel.org/pub/linux/kernel/v3.x/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff --git a/init/main.c b/init/main.c
|
||||
index 9484f4b..db55edd 100644
|
||||
--- a/init/main.c
|
||||
+++ b/init/main.c
|
||||
@@ -880,8 +880,14 @@ static noinline void __init kernel_init_freeable(void)
|
||||
do_basic_setup();
|
||||
|
||||
/* Open the /dev/console on the rootfs, this should never fail */
|
||||
- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0)
|
||||
- pr_err("Warning: unable to open an initial console.\n");
|
||||
+ char *console = "/dev_console";
|
||||
+
|
||||
+ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) {
|
||||
+ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1);
|
||||
+ if (sys_open(console, O_RDWR, 0) < 0)
|
||||
+ printk(KERN_WARNING "Warning: unable to open an initial console.\n");
|
||||
+ sys_unlink(console);
|
||||
+ }
|
||||
|
||||
(void) sys_dup(0);
|
||||
(void) sys_dup(0);
|
File diff suppressed because it is too large
Load Diff
@ -1,161 +0,0 @@
|
||||
diff -Naur linux-3.9/drivers/hid/hid-core.c linux-3.9.patch/drivers/hid/hid-core.c
|
||||
--- linux-3.9/drivers/hid/hid-core.c 2013-04-29 02:36:01.000000000 +0200
|
||||
+++ linux-3.9.patch/drivers/hid/hid-core.c 2013-04-29 17:08:40.528324010 +0200
|
||||
@@ -1681,6 +1681,9 @@
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) },
|
||||
#if IS_ENABLED(CONFIG_HID_ROCCAT)
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
|
||||
diff -Naur linux-3.9/drivers/hid/hid-ids.h linux-3.9.patch/drivers/hid/hid-ids.h
|
||||
--- linux-3.9/drivers/hid/hid-ids.h 2013-04-29 02:36:01.000000000 +0200
|
||||
+++ linux-3.9.patch/drivers/hid/hid-ids.h 2013-04-29 17:08:40.537323981 +0200
|
||||
@@ -663,6 +663,9 @@
|
||||
|
||||
#define USB_VENDOR_ID_PHILIPS 0x0471
|
||||
#define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1 0x206c
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2 0x20cc
|
||||
+#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3 0x0613
|
||||
|
||||
#define USB_VENDOR_ID_PI_ENGINEERING 0x05f3
|
||||
#define USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL 0xff
|
||||
diff -Naur linux-3.9/drivers/hid/hid-spinelplus.c linux-3.9.patch/drivers/hid/hid-spinelplus.c
|
||||
--- linux-3.9/drivers/hid/hid-spinelplus.c 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ linux-3.9.patch/drivers/hid/hid-spinelplus.c 2013-04-29 17:08:40.537323981 +0200
|
||||
@@ -0,0 +1,104 @@
|
||||
+/*
|
||||
+ * HID driver for "PHILIPS MCE USB IR Receiver- Spinel plus" remotes
|
||||
+ *
|
||||
+ * Copyright (c) 2010 Panagiotis Skintzos
|
||||
+ *
|
||||
+ * Renamed to Spinel, cleanup and modified to also support
|
||||
+ * Spinel Plus 0471:20CC by Stephan Raue 2012.
|
||||
+ */
|
||||
+
|
||||
+/*
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms of the GNU General Public License as published by the Free
|
||||
+ * Software Foundation; either version 2 of the License, or (at your option)
|
||||
+ * any later version.
|
||||
+ */
|
||||
+
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/input.h>
|
||||
+#include <linux/hid.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+#include "hid-ids.h"
|
||||
+
|
||||
+#define spinelplus_map_key(c) set_bit(EV_REP, hi->input->evbit); \
|
||||
+ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c))
|
||||
+
|
||||
+static int spinelplus_input_mapping(struct hid_device *hdev,
|
||||
+ struct hid_input *hi, struct hid_field *field, struct hid_usage *usage,
|
||||
+ unsigned long **bit, int *max)
|
||||
+{
|
||||
+ switch (usage->hid) {
|
||||
+ case 0xffbc000d: spinelplus_map_key(KEY_MEDIA); break;
|
||||
+ case 0xffbc0024: spinelplus_map_key(KEY_MEDIA); break;
|
||||
+ case 0xffbc0027: spinelplus_map_key(KEY_ZOOM); break;
|
||||
+ case 0xffbc0033: spinelplus_map_key(KEY_HOME); break;
|
||||
+ case 0xffbc0035: spinelplus_map_key(KEY_CAMERA); break;
|
||||
+ case 0xffbc0036: spinelplus_map_key(KEY_EPG); break;
|
||||
+ case 0xffbc0037: spinelplus_map_key(KEY_DVD); break;
|
||||
+ case 0xffbc0038: spinelplus_map_key(KEY_HOME); break;
|
||||
+ case 0xffbc0039: spinelplus_map_key(KEY_MP3); break;
|
||||
+ case 0xffbc003a: spinelplus_map_key(KEY_VIDEO); break;
|
||||
+ case 0xffbc005a: spinelplus_map_key(KEY_TEXT); break;
|
||||
+ case 0xffbc005b: spinelplus_map_key(KEY_RED); break;
|
||||
+ case 0xffbc005c: spinelplus_map_key(KEY_GREEN); break;
|
||||
+ case 0xffbc005d: spinelplus_map_key(KEY_YELLOW); break;
|
||||
+ case 0xffbc005e: spinelplus_map_key(KEY_BLUE); break;
|
||||
+ default:
|
||||
+ return 0;
|
||||
+ }
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+static int spinelplus_probe(struct hid_device *hdev,
|
||||
+ const struct hid_device_id *id)
|
||||
+{
|
||||
+ int ret;
|
||||
+ /* Connect only to hid input (not hiddev & hidraw)*/
|
||||
+ unsigned int cmask = HID_CONNECT_HIDINPUT;
|
||||
+
|
||||
+ ret = hid_parse(hdev);
|
||||
+ if (ret) {
|
||||
+ dev_err(&hdev->dev, "parse failed\n");
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ ret = hid_hw_start(hdev, cmask);
|
||||
+ if (ret) {
|
||||
+ dev_err(&hdev->dev, "hw start failed\n");
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+err_free:
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static const struct hid_device_id spinelplus_devices[] = {
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2) },
|
||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3) },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(hid, spinelplus_devices);
|
||||
+
|
||||
+static struct hid_driver spinelplus_driver = {
|
||||
+ .name = "SpinelPlus",
|
||||
+ .id_table = spinelplus_devices,
|
||||
+ .input_mapping = spinelplus_input_mapping,
|
||||
+ .probe = spinelplus_probe,
|
||||
+};
|
||||
+
|
||||
+static int __init spinelplus_init(void)
|
||||
+{
|
||||
+ return hid_register_driver(&spinelplus_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit spinelplus_exit(void)
|
||||
+{
|
||||
+ hid_unregister_driver(&spinelplus_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(spinelplus_init);
|
||||
+module_exit(spinelplus_exit);
|
||||
+MODULE_LICENSE("GPL");
|
||||
diff -Naur linux-3.9/drivers/hid/Kconfig linux-3.9.patch/drivers/hid/Kconfig
|
||||
--- linux-3.9/drivers/hid/Kconfig 2013-04-29 02:36:01.000000000 +0200
|
||||
+++ linux-3.9.patch/drivers/hid/Kconfig 2013-04-29 17:08:40.538323977 +0200
|
||||
@@ -602,6 +602,12 @@
|
||||
---help---
|
||||
Support for Steelseries SRW-S1 steering wheel
|
||||
|
||||
+config HID_SPINELPLUS
|
||||
+ tristate "Spinel Plus remote control"
|
||||
+ depends on USB_HID
|
||||
+ ---help---
|
||||
+ Say Y here if you have a Spinel Plus (0471:206c/20cc/0613) remote
|
||||
+
|
||||
config HID_SUNPLUS
|
||||
tristate "Sunplus wireless desktop"
|
||||
depends on USB_HID
|
||||
diff -Naur linux-3.9/drivers/hid/Makefile linux-3.9.patch/drivers/hid/Makefile
|
||||
--- linux-3.9/drivers/hid/Makefile 2013-04-29 02:36:01.000000000 +0200
|
||||
+++ linux-3.9.patch/drivers/hid/Makefile 2013-04-29 17:09:26.744173841 +0200
|
||||
@@ -101,6 +101,7 @@
|
||||
obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o
|
||||
obj-$(CONFIG_HID_SONY) += hid-sony.o
|
||||
obj-$(CONFIG_HID_SPEEDLINK) += hid-speedlink.o
|
||||
+obj-$(CONFIG_HID_SPINELPLUS) += hid-spinelplus.o
|
||||
obj-$(CONFIG_HID_STEELSERIES) += hid-steelseries.o
|
||||
obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o
|
||||
obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o
|
@ -1,12 +0,0 @@
|
||||
diff -Naur linux-3.0/drivers/media/rc/nuvoton-cir.c linux-3.0.patch/drivers/media/rc/nuvoton-cir.c
|
||||
--- linux-3.0/drivers/media/rc/nuvoton-cir.c 2011-07-22 04:17:23.000000000 +0200
|
||||
+++ linux-3.0.patch/drivers/media/rc/nuvoton-cir.c 2011-07-22 21:30:48.374591146 +0200
|
||||
@@ -1110,7 +1110,7 @@
|
||||
rdev->dev.parent = &pdev->dev;
|
||||
rdev->driver_name = NVT_DRIVER_NAME;
|
||||
rdev->map_name = RC_MAP_RC6_MCE;
|
||||
- rdev->timeout = MS_TO_NS(100);
|
||||
+ rdev->timeout = US_TO_NS(1000);
|
||||
/* rx resolution is hardwired to 50us atm, 1, 25, 100 also possible */
|
||||
rdev->rx_resolution = US_TO_NS(CIR_SAMPLE_PERIOD);
|
||||
#if 0
|
@ -1,11 +0,0 @@
|
||||
--- linux-3.2.2.orig/drivers/media/rc/mceusb.c 2012-01-30 23:37:12.374473509 +0100
|
||||
+++ linux-3.2.2/drivers/media/rc/mceusb.c 2012-01-30 23:40:57.989652931 +0100
|
||||
@@ -350,6 +350,8 @@
|
||||
{ USB_DEVICE(VENDOR_FORMOSA, 0xe015) },
|
||||
/* Formosa21 / eHome Infrared Receiver */
|
||||
{ USB_DEVICE(VENDOR_FORMOSA, 0xe016) },
|
||||
+ /* Formosa21 / eHome Infrared Receiver */
|
||||
+ { USB_DEVICE(VENDOR_FORMOSA, 0xe042) },
|
||||
/* Formosa aim / Trust MCE Infrared Receiver */
|
||||
{ USB_DEVICE(VENDOR_FORMOSA, 0xe017),
|
||||
.driver_info = MCE_GEN2_NO_TX },
|
@ -1,21 +0,0 @@
|
||||
diff -Naur linux-3.17.1/drivers/media/rc/mceusb.c linux-3.17.1.patch/drivers/media/rc/mceusb.c
|
||||
--- linux-3.17.1/drivers/media/rc/mceusb.c 2014-10-15 12:29:30.000000000 +0200
|
||||
+++ linux-3.17.1.patch/drivers/media/rc/mceusb.c 2014-10-16 11:45:57.480176874 +0200
|
||||
@@ -188,6 +188,8 @@
|
||||
#define VENDOR_TWISTEDMELON 0x2596
|
||||
#define VENDOR_HAUPPAUGE 0x2040
|
||||
#define VENDOR_PCTV 0x2013
|
||||
+#define VENDOR_ADAPTEC 0x03f3
|
||||
+
|
||||
|
||||
enum mceusb_model_type {
|
||||
MCE_GEN2 = 0, /* Most boards */
|
||||
@@ -401,6 +403,8 @@
|
||||
.driver_info = HAUPPAUGE_CX_HYBRID_TV },
|
||||
{ USB_DEVICE(VENDOR_PCTV, 0x025e),
|
||||
.driver_info = HAUPPAUGE_CX_HYBRID_TV },
|
||||
+ /* Adaptec / HP eHome Receiver */
|
||||
+ { USB_DEVICE(VENDOR_ADAPTEC, 0x0094) },
|
||||
|
||||
/* Terminating entry */
|
||||
{ }
|
@ -1,28 +0,0 @@
|
||||
--- linux/drivers/media/rc/ir-rc6-decoder.c 2012-11-25 22:08:13.148418669 -0800
|
||||
+++ linux.patch/drivers/media/rc/ir-rc6-decoder.c 2012-11-25 22:07:48.864417975 -0800
|
||||
@@ -39,7 +39,6 @@
|
||||
#define RC6_STARTBIT_MASK 0x08 /* for the header bits */
|
||||
#define RC6_6A_MCE_TOGGLE_MASK 0x8000 /* for the body bits */
|
||||
#define RC6_6A_LCC_MASK 0xffff0000 /* RC6-6A-32 long customer code mask */
|
||||
-#define RC6_6A_MCE_CC 0x800f0000 /* MCE customer code */
|
||||
#ifndef CHAR_BIT
|
||||
#define CHAR_BIT 8 /* Normally in <limits.h> */
|
||||
#endif
|
||||
@@ -257,14 +256,9 @@ again:
|
||||
toggle = 0;
|
||||
break;
|
||||
case 32:
|
||||
- if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
|
||||
- protocol = RC_TYPE_RC6_MCE;
|
||||
- toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
|
||||
- scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
|
||||
- } else {
|
||||
- protocol = RC_BIT_RC6_6A_32;
|
||||
- toggle = 0;
|
||||
- }
|
||||
+ protocol = RC_TYPE_RC6_MCE;
|
||||
+ toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
|
||||
+ scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
|
||||
break;
|
||||
default:
|
||||
IR_dprintk(1, "RC6(6A) unsupported length\n");
|
@ -1,13 +0,0 @@
|
||||
diff -Naur linux-3.9.4/drivers/media/rc/mceusb.c linux-3.9.4.patch/drivers/media/rc/mceusb.c
|
||||
--- linux-3.9.4/drivers/media/rc/mceusb.c 2013-05-24 20:45:59.000000000 +0200
|
||||
+++ linux-3.9.4.patch/drivers/media/rc/mceusb.c 2013-05-27 12:28:12.811230633 +0200
|
||||
@@ -309,6 +309,9 @@
|
||||
/* SMK/I-O Data GV-MC7/RCKIT Receiver */
|
||||
{ USB_DEVICE(VENDOR_SMK, 0x0353),
|
||||
.driver_info = MCE_GEN2_NO_TX },
|
||||
+ /* SMK Manufacturing, Inc. Receiver */
|
||||
+ { USB_DEVICE(VENDOR_SMK, 0x0357),
|
||||
+ .driver_info = MCE_GEN2_NO_TX },
|
||||
/* Tatung eHome Infrared Transceiver */
|
||||
{ USB_DEVICE(VENDOR_TATUNG, 0x9150) },
|
||||
/* Shuttle eHome Infrared Transceiver */
|
@ -1,64 +0,0 @@
|
||||
From 7051422474e4c4e302ede3d07ffd8ef2682e07a2 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Tue, 22 Apr 2014 16:05:14 +0300
|
||||
Subject: [PATCH] [RFC] hid/sony: add autorepeat for PS3 remotes
|
||||
|
||||
adapted to 3.17
|
||||
|
||||
Betreff: [RFC] hid/sony: add autorepeat for PS3 remotes
|
||||
Von: David Dillow <dave@thedillows.org>
|
||||
Datum: 28.06.2013 04:28
|
||||
An: linux-input@vger.kernel.org
|
||||
Kopie (CC): Stephan Raue <stephan@openelec.tv>
|
||||
|
||||
Some applications using the PS3 remote would like to have autorepeat
|
||||
from the device. Use the input subsystem's software emulation to provide
|
||||
this capability, and enable those that don't need it to turn it off.
|
||||
---
|
||||
I'm not sure this is the correct approach, or if it is even appropriate
|
||||
for a remote to do autorepeat. However, the media/rc subsystem does do
|
||||
it by default, and it's been requested by users, so there is at least
|
||||
some demand.
|
||||
|
||||
This compiled against the hid-sony driver with the PS3 remote changes
|
||||
merged, but I have done no testing of it. If the approach seems
|
||||
reasonable, I'll try to test it when the MythTV is idle.
|
||||
---
|
||||
diff -Naur linux-3.17.1/drivers/hid/hid-sony.c linux-3.17.1.patch/drivers/hid/hid-sony.c
|
||||
--- linux-3.17.1/drivers/hid/hid-sony.c 2014-10-15 12:29:30.000000000 +0200
|
||||
+++ linux-3.17.1.patch/drivers/hid/hid-sony.c 2014-10-16 12:55:43.979181366 +0200
|
||||
@@ -875,6 +875,25 @@
|
||||
return 1;
|
||||
}
|
||||
|
||||
+static int ps3remote_setup_repeat(struct hid_device *hdev)
|
||||
+{
|
||||
+ struct hid_input *hidinput = list_first_entry(&hdev->inputs,
|
||||
+ struct hid_input, list);
|
||||
+ struct input_dev *input = hidinput->input;
|
||||
+
|
||||
+ /*
|
||||
+ * Set up autorepeat defaults per the remote control subsystem;
|
||||
+ * this must be done after hid_hw_start(), as having these non-zero
|
||||
+ * at the time of input_register_device() tells the input system that
|
||||
+ * the hardware does the autorepeat, and the PS3 remote does not.
|
||||
+ */
|
||||
+ set_bit(EV_REP, input->evbit);
|
||||
+ input->rep[REP_DELAY] = 500;
|
||||
+ input->rep[REP_PERIOD] = 125;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static __u8 *sony_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
unsigned int *rsize)
|
||||
{
|
||||
@@ -1932,6 +1951,8 @@
|
||||
goto err_stop;
|
||||
|
||||
sony_init_work(sc, dualshock4_state_worker);
|
||||
+ } else if (sc->quirks & PS3REMOTE) {
|
||||
+ ret = ps3remote_setup_repeat(hdev);
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
|
||||
index 61b604f..0ad4515 100644
|
||||
--- a/drivers/hid/hid-core.c
|
||||
+++ b/drivers/hid/hid-core.c
|
||||
@@ -1828,6 +1828,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
|
||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||
index 0af8e93..f14b038 100644
|
||||
--- a/drivers/hid/hid-ids.h
|
||||
+++ b/drivers/hid/hid-ids.h
|
||||
@@ -775,6 +775,7 @@
|
||||
#define USB_VENDOR_ID_SKYCABLE 0x1223
|
||||
#define USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER 0x3F07
|
||||
|
||||
+#define USB_VENDOR_ID_SMK 0x0609
|
||||
#define USB_VENDOR_ID_SONY 0x054c
|
||||
#define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE 0x024b
|
||||
#define USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE 0x0374
|
||||
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
|
||||
index 1235405..69e2bf6 100644
|
||||
--- a/drivers/hid/hid-sony.c
|
||||
+++ b/drivers/hid/hid-sony.c
|
||||
@@ -1153,6 +1153,9 @@ static const struct hid_device_id sony_devices[] = {
|
||||
.driver_data = DUALSHOCK4_CONTROLLER_USB },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS4_CONTROLLER),
|
||||
.driver_data = DUALSHOCK4_CONTROLLER_BT },
|
||||
+ /* SMK-Link Universal Remote Control VP3700 */
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SONY_PS3_BDREMOTE),
|
||||
+ .driver_data = PS3REMOTE },
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(hid, sony_devices);
|
@ -1,14 +0,0 @@
|
||||
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
|
||||
index 61d196e..ae87b9c 100644
|
||||
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
|
||||
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
|
||||
@@ -1497,6 +1497,9 @@ static const struct usb_device_id rtl28xxu_id_table[] = {
|
||||
&rtl2832u_props, "Leadtek WinFast DTV Dongle mini", NULL) },
|
||||
{ DVB_USB_DEVICE(USB_VID_GTEK, USB_PID_CPYTO_REDI_PC50A,
|
||||
&rtl2832u_props, "Crypto ReDi PC 50 A", NULL) },
|
||||
+ { DVB_USB_DEVICE(USB_VID_GTEK, 0xa803,
|
||||
+ &rtl2832u_props, "Realtek RTL2832U reference design", NULL) },
|
||||
+
|
||||
{ DVB_USB_DEVICE(USB_VID_KYE, 0x707f,
|
||||
&rtl2832u_props, "Genius TVGo DVB-T03", NULL) },
|
||||
|
@ -1,21 +0,0 @@
|
||||
diff -Naur linux-3.16.1/drivers/media/rc/imon.c linux-3.16.1.patch/drivers/media/rc/imon.c
|
||||
--- linux-3.16.1/drivers/media/rc/imon.c 2014-08-14 04:36:35.000000000 +0200
|
||||
+++ linux-3.16.1.patch/drivers/media/rc/imon.c 2014-08-15 13:57:16.587620642 +0200
|
||||
@@ -1344,6 +1344,17 @@
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
+ * For users without stabilized, just ignore any value getting
|
||||
+ * to close to the diagonal.
|
||||
+ */
|
||||
+ if ((abs(rel_y) < 2 && abs(rel_x) < 2) ||
|
||||
+ abs(abs(rel_y) - abs(rel_x)) < 2 ) {
|
||||
+ spin_lock_irqsave(&ictx->kc_lock, flags);
|
||||
+ ictx->kc = KEY_UNKNOWN;
|
||||
+ spin_unlock_irqrestore(&ictx->kc_lock, flags);
|
||||
+ return;
|
||||
+ }
|
||||
+ /*
|
||||
* Hack alert: instead of using keycodes, we have
|
||||
* to use hard-coded scancodes here...
|
||||
*/
|
@ -1,12 +0,0 @@
|
||||
diff -Naur linux-3.7.2/drivers/media/dvb-frontends/stb0899_drv.c linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_drv.c
|
||||
--- linux-3.7.2/drivers/media/dvb-frontends/stb0899_drv.c 2013-01-11 18:19:28.000000000 +0100
|
||||
+++ linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_drv.c 2013-01-16 10:25:43.479645317 +0100
|
||||
@@ -1581,7 +1581,7 @@
|
||||
.frequency_max = 2150000,
|
||||
.frequency_stepsize = 0,
|
||||
.frequency_tolerance = 0,
|
||||
- .symbol_rate_min = 5000000,
|
||||
+ .symbol_rate_min = 1000000,
|
||||
.symbol_rate_max = 45000000,
|
||||
|
||||
.caps = FE_CAN_INVERSION_AUTO |
|
5248
packages/linux/patches/3.18.6/linux-210-dvbsky.patch
vendored
5248
packages/linux/patches/3.18.6/linux-210-dvbsky.patch
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,138 +0,0 @@
|
||||
diff -Naur linux-3.7.2/drivers/media/dvb-frontends/stb0899_algo.c linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_algo.c
|
||||
--- linux-3.7.2/drivers/media/dvb-frontends/stb0899_algo.c 2013-01-11 18:19:28.000000000 +0100
|
||||
+++ linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_algo.c 2013-01-16 10:28:33.633409961 +0100
|
||||
@@ -206,7 +206,6 @@
|
||||
static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state)
|
||||
{
|
||||
struct stb0899_internal *internal = &state->internal;
|
||||
- struct stb0899_params *params = &state->params;
|
||||
|
||||
short int derot_step, derot_freq = 0, derot_limit, next_loop = 3;
|
||||
int index = 0;
|
||||
@@ -216,10 +215,9 @@
|
||||
|
||||
/* timing loop computation & symbol rate optimisation */
|
||||
derot_limit = (internal->sub_range / 2L) / internal->mclk;
|
||||
- derot_step = (params->srate / 2L) / internal->mclk;
|
||||
+ derot_step = internal->derot_step * 4; /* dertot_step = decreasing delta */
|
||||
|
||||
while ((stb0899_check_tmg(state) != TIMINGOK) && next_loop) {
|
||||
- index++;
|
||||
derot_freq += index * internal->direction * derot_step; /* next derot zig zag position */
|
||||
|
||||
if (abs(derot_freq) > derot_limit)
|
||||
@@ -230,6 +228,7 @@
|
||||
STB0899_SETFIELD_VAL(CFRL, cfr[1], LSB(state->config->inversion * derot_freq));
|
||||
stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */
|
||||
}
|
||||
+ index++;
|
||||
internal->direction = -internal->direction; /* Change zigzag direction */
|
||||
}
|
||||
|
||||
@@ -278,14 +277,18 @@
|
||||
{
|
||||
struct stb0899_internal *internal = &state->internal;
|
||||
|
||||
- short int derot_freq = 0, last_derot_freq = 0, derot_limit, next_loop = 3;
|
||||
+ short int derot_freq = 0, last_derot_freq = 0, derot_limit, derot_step, next_loop = 3;
|
||||
int index = 0;
|
||||
+ int base_freq;
|
||||
u8 cfr[2];
|
||||
u8 reg;
|
||||
|
||||
internal->status = NOCARRIER;
|
||||
derot_limit = (internal->sub_range / 2L) / internal->mclk;
|
||||
derot_freq = internal->derot_freq;
|
||||
+ derot_step = internal->derot_step * 2;
|
||||
+ last_derot_freq = internal->derot_freq;
|
||||
+ base_freq = internal->derot_freq;
|
||||
|
||||
reg = stb0899_read_reg(state, STB0899_CFD);
|
||||
STB0899_SETFIELD_VAL(CFD_ON, reg, 1);
|
||||
@@ -294,11 +297,10 @@
|
||||
do {
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "Derot Freq=%d, mclk=%d", derot_freq, internal->mclk);
|
||||
if (stb0899_check_carrier(state) == NOCARRIER) {
|
||||
- index++;
|
||||
last_derot_freq = derot_freq;
|
||||
- derot_freq += index * internal->direction * internal->derot_step; /* next zig zag derotator position */
|
||||
+ derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */
|
||||
|
||||
- if(abs(derot_freq) > derot_limit)
|
||||
+ if (derot_freq > base_freq + derot_limit || derot_freq < base_freq - derot_limit)
|
||||
next_loop--;
|
||||
|
||||
if (next_loop) {
|
||||
@@ -310,9 +312,10 @@
|
||||
STB0899_SETFIELD_VAL(CFRL, cfr[1], LSB(state->config->inversion * derot_freq));
|
||||
stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */
|
||||
}
|
||||
+ index++;
|
||||
+ internal->direction = -internal->direction; /* Change zigzag direction */
|
||||
}
|
||||
|
||||
- internal->direction = -internal->direction; /* Change zigzag direction */
|
||||
} while ((internal->status != CARRIEROK) && next_loop);
|
||||
|
||||
if (internal->status == CARRIEROK) {
|
||||
@@ -338,6 +341,7 @@
|
||||
int lock = 0, index = 0, dataTime = 500, loop;
|
||||
u8 reg;
|
||||
|
||||
+ msleep(1);
|
||||
internal->status = NODATA;
|
||||
|
||||
/* RESET FEC */
|
||||
@@ -348,6 +352,7 @@
|
||||
reg = stb0899_read_reg(state, STB0899_TSTRES);
|
||||
STB0899_SETFIELD_VAL(FRESACS, reg, 0);
|
||||
stb0899_write_reg(state, STB0899_TSTRES, reg);
|
||||
+ msleep(1);
|
||||
|
||||
if (params->srate <= 2000000)
|
||||
dataTime = 2000;
|
||||
@@ -363,6 +368,7 @@
|
||||
|
||||
stb0899_write_reg(state, STB0899_DSTATUS2, 0x00); /* force search loop */
|
||||
while (1) {
|
||||
+ msleep(1); // Alex: added 1 mSec
|
||||
/* WARNING! VIT LOCKED has to be tested before VIT_END_LOOOP */
|
||||
reg = stb0899_read_reg(state, STB0899_VSTATUS);
|
||||
lock = STB0899_GETFIELD(VSTATUS_LOCKEDVIT, reg);
|
||||
@@ -390,20 +396,21 @@
|
||||
short int derot_freq, derot_step, derot_limit, next_loop = 3;
|
||||
u8 cfr[2];
|
||||
u8 reg;
|
||||
- int index = 1;
|
||||
+ int index = 0;
|
||||
+ int base_freq;
|
||||
|
||||
struct stb0899_internal *internal = &state->internal;
|
||||
- struct stb0899_params *params = &state->params;
|
||||
|
||||
- derot_step = (params->srate / 4L) / internal->mclk;
|
||||
+ derot_step = internal->derot_step;
|
||||
derot_limit = (internal->sub_range / 2L) / internal->mclk;
|
||||
derot_freq = internal->derot_freq;
|
||||
+ base_freq = internal->derot_freq;
|
||||
|
||||
do {
|
||||
if ((internal->status != CARRIEROK) || (stb0899_check_data(state) != DATAOK)) {
|
||||
|
||||
derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */
|
||||
- if (abs(derot_freq) > derot_limit)
|
||||
+ if (derot_freq > base_freq + derot_limit || derot_freq < base_freq - derot_limit)
|
||||
next_loop--;
|
||||
|
||||
if (next_loop) {
|
||||
@@ -417,9 +424,9 @@
|
||||
stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */
|
||||
|
||||
stb0899_check_carrier(state);
|
||||
- index++;
|
||||
}
|
||||
}
|
||||
+ index++;
|
||||
internal->direction = -internal->direction; /* change zig zag direction */
|
||||
} while ((internal->status != DATAOK) && next_loop);
|
||||
|
34135
packages/linux/patches/3.18.6/linux-221-ngene-octopus.patch
vendored
34135
packages/linux/patches/3.18.6/linux-221-ngene-octopus.patch
vendored
File diff suppressed because it is too large
Load Diff
@ -1,62 +0,0 @@
|
||||
diff -Naur linux-3.7.2/drivers/media/dvb-frontends/stb0899_drv.c linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_drv.c
|
||||
--- linux-3.7.2/drivers/media/dvb-frontends/stb0899_drv.c 2013-01-11 18:19:28.000000000 +0100
|
||||
+++ linux-3.7.2.patch/drivers/media/dvb-frontends/stb0899_drv.c 2013-01-16 10:33:10.323380937 +0100
|
||||
@@ -971,6 +971,16 @@
|
||||
|
||||
*strength = stb0899_table_lookup(stb0899_dvbsrf_tab, ARRAY_SIZE(stb0899_dvbsrf_tab) - 1, val);
|
||||
*strength += 750;
|
||||
+
|
||||
+ const int MIN_STRENGTH_DVBS = 0;
|
||||
+ const int MAX_STRENGTH_DVBS = 680;
|
||||
+ if (*strength < MIN_STRENGTH_DVBS)
|
||||
+ *strength = 0;
|
||||
+ else if(*strength > MAX_STRENGTH_DVBS)
|
||||
+ *strength = 0xFFFF;
|
||||
+ else
|
||||
+ *strength = (*strength - MIN_STRENGTH_DVBS) * 0xFFFF / (MAX_STRENGTH_DVBS - MIN_STRENGTH_DVBS);
|
||||
+
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "AGCIQVALUE = 0x%02x, C = %d * 0.1 dBm",
|
||||
val & 0xff, *strength);
|
||||
}
|
||||
@@ -983,6 +993,7 @@
|
||||
|
||||
*strength = stb0899_table_lookup(stb0899_dvbs2rf_tab, ARRAY_SIZE(stb0899_dvbs2rf_tab) - 1, val);
|
||||
*strength += 950;
|
||||
+ *strength = *strength << 4;
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "IF_AGC_GAIN = 0x%04x, C = %d * 0.1 dBm",
|
||||
val & 0x3fff, *strength);
|
||||
}
|
||||
@@ -1016,6 +1027,16 @@
|
||||
val = MAKEWORD16(buf[0], buf[1]);
|
||||
|
||||
*snr = stb0899_table_lookup(stb0899_cn_tab, ARRAY_SIZE(stb0899_cn_tab) - 1, val);
|
||||
+
|
||||
+ const int MIN_SNR_DVBS = 0;
|
||||
+ const int MAX_SNR_DVBS = 200;
|
||||
+ if (*snr < MIN_SNR_DVBS)
|
||||
+ *snr = 0;
|
||||
+ else if(*snr > MAX_SNR_DVBS)
|
||||
+ *snr = 0xFFFF;
|
||||
+ else
|
||||
+ *snr = (*snr - MIN_SNR_DVBS) * 0xFFFF / (MAX_SNR_DVBS - MIN_SNR_DVBS);
|
||||
+
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "NIR = 0x%02x%02x = %u, C/N = %d * 0.1 dBm\n",
|
||||
buf[0], buf[1], val, *snr);
|
||||
}
|
||||
@@ -1040,6 +1061,16 @@
|
||||
val = (quantn - estn) / 10;
|
||||
}
|
||||
*snr = val;
|
||||
+
|
||||
+ const int MIN_SNR_DVBS2 = 10;
|
||||
+ const int MAX_SNR_DVBS2 = 70;
|
||||
+ if (*snr < MIN_SNR_DVBS2)
|
||||
+ *snr = 0;
|
||||
+ else if(*snr > MAX_SNR_DVBS2)
|
||||
+ *snr = 0xFFFF;
|
||||
+ else
|
||||
+ *snr = (*snr - MIN_SNR_DVBS2) * 0xFFFF / (MAX_SNR_DVBS2 - MIN_SNR_DVBS2);
|
||||
+
|
||||
dprintk(state->verbose, FE_DEBUG, 1, "Es/N0 quant = %d (%d) estimate = %u (%d), C/N = %d * 0.1 dBm",
|
||||
quant, quantn, est, estn, val);
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
diff -Naur linux-3.7.9/drivers/media/usb/dvb-usb/pctv452e.c linux-3.7.9.patch/drivers/media/usb/dvb-usb/pctv452e.c
|
||||
--- linux-3.7.9/drivers/media/usb/dvb-usb/pctv452e.c 2013-01-11 18:19:28.000000000 +0100
|
||||
+++ linux-3.7.9.patch/drivers/media/usb/dvb-usb/pctv452e.c 2013-01-16 10:35:01.131342123 +0100
|
||||
@@ -995,11 +995,11 @@
|
||||
/* parameter for the MPEG2-data transfer */
|
||||
.stream = {
|
||||
.type = USB_ISOC,
|
||||
- .count = 7,
|
||||
+ .count = 4,
|
||||
.endpoint = 0x02,
|
||||
.u = {
|
||||
.isoc = {
|
||||
- .framesperurb = 4,
|
||||
+ .framesperurb = 64,
|
||||
.framesize = 940,
|
||||
.interval = 1
|
||||
}
|
@ -1,267 +0,0 @@
|
||||
diff -urN a/drivers/media/dvb-core/dvb-usb-ids.h b/drivers/media/dvb-core/dvb-usb-ids.h
|
||||
--- a/drivers/media/dvb-core/dvb-usb-ids.h 2014-12-28 12:15:39.000000000 +0200
|
||||
+++ b/drivers/media/dvb-core/dvb-usb-ids.h 2014-12-28 12:28:28.609442863 +0200
|
||||
@@ -354,6 +354,7 @@
|
||||
#define USB_PID_TELESTAR_STARSTICK_2 0x8000
|
||||
#define USB_PID_MSI_DIGI_VOX_MINI_III 0x8807
|
||||
#define USB_PID_SONY_PLAYTV 0x0003
|
||||
+#define USB_PID_MYGICA_T230 0xc688
|
||||
#define USB_PID_MYGICA_D689 0xd811
|
||||
#define USB_PID_ELGATO_EYETV_DIVERSITY 0x0011
|
||||
#define USB_PID_ELGATO_EYETV_DTT 0x0021
|
||||
diff -urN a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
|
||||
--- a/drivers/media/dvb-frontends/si2168.c 2014-12-28 12:15:39.000000000 +0200
|
||||
+++ b/drivers/media/dvb-frontends/si2168.c 2014-12-28 12:38:43.013424611 +0200
|
||||
@@ -308,14 +308,16 @@
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
- memcpy(cmd.args, "\x14\x00\x09\x10\xe3\x18", 6);
|
||||
+ memcpy(cmd.args, "\x14\x00\x09\x10\xe3\x08", 6);
|
||||
+ cmd.args[5] |= s->ts_clock_inv ? 0x00 : 0x10;
|
||||
cmd.wlen = 6;
|
||||
cmd.rlen = 4;
|
||||
ret = si2168_cmd_execute(s, &cmd);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
- memcpy(cmd.args, "\x14\x00\x08\x10\xd7\x15", 6);
|
||||
+ memcpy(cmd.args, "\x14\x00\x08\x10\xd7\x05", 6);
|
||||
+ cmd.args[5] |= s->ts_clock_inv ? 0x00 : 0x10;
|
||||
cmd.wlen = 6;
|
||||
cmd.rlen = 4;
|
||||
ret = si2168_cmd_execute(s, &cmd);
|
||||
@@ -670,6 +672,7 @@
|
||||
*config->i2c_adapter = s->adapter;
|
||||
*config->fe = &s->fe;
|
||||
s->ts_mode = config->ts_mode;
|
||||
+ s->ts_clock_inv = config->ts_clock_inv;
|
||||
s->fw_loaded = false;
|
||||
|
||||
i2c_set_clientdata(client, s);
|
||||
diff -urN a/drivers/media/dvb-frontends/si2168.h b/drivers/media/dvb-frontends/si2168.h
|
||||
--- a/drivers/media/dvb-frontends/si2168.h 2014-12-28 12:15:39.000000000 +0200
|
||||
+++ b/drivers/media/dvb-frontends/si2168.h 2014-12-28 12:36:31.273428525 +0200
|
||||
@@ -37,6 +37,9 @@
|
||||
|
||||
/* TS mode */
|
||||
u8 ts_mode;
|
||||
+
|
||||
+ /* TS clock inverted */
|
||||
+ bool ts_clock_inv;
|
||||
};
|
||||
|
||||
#define SI2168_TS_PARALLEL 0x06
|
||||
diff -urN a/drivers/media/dvb-frontends/si2168_priv.h b/drivers/media/dvb-frontends/si2168_priv.h
|
||||
--- a/drivers/media/dvb-frontends/si2168_priv.h 2014-12-28 12:15:39.000000000 +0200
|
||||
+++ b/drivers/media/dvb-frontends/si2168_priv.h 2014-12-28 12:36:54.893427823 +0200
|
||||
@@ -38,6 +38,7 @@
|
||||
bool active;
|
||||
bool fw_loaded;
|
||||
u8 ts_mode;
|
||||
+ bool ts_clock_inv;
|
||||
};
|
||||
|
||||
/* firmare command struct */
|
||||
diff -urN a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
|
||||
--- a/drivers/media/tuners/si2157.c 2014-12-28 12:15:39.000000000 +0200
|
||||
+++ b/drivers/media/tuners/si2157.c 2014-12-28 12:35:42.933429961 +0200
|
||||
@@ -112,11 +112,13 @@
|
||||
cmd.args[4] << 0;
|
||||
|
||||
#define SI2158_A20 ('A' << 24 | 58 << 16 | '2' << 8 | '0' << 0)
|
||||
+ #define SI2148_A20 ('A' << 24 | 48 << 16 | '2' << 8 | '0' << 0)
|
||||
#define SI2157_A30 ('A' << 24 | 57 << 16 | '3' << 8 | '0' << 0)
|
||||
#define SI2147_A30 ('A' << 24 | 47 << 16 | '3' << 8 | '0' << 0)
|
||||
|
||||
switch (chip_id) {
|
||||
case SI2158_A20:
|
||||
+ case SI2148_A20:
|
||||
fw_file = SI2158_A20_FIRMWARE;
|
||||
break;
|
||||
case SI2157_A30:
|
||||
diff -urN a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.c
|
||||
--- a/drivers/media/usb/dvb-usb/cxusb.c 2014-12-28 12:15:39.000000000 +0200
|
||||
+++ b/drivers/media/usb/dvb-usb/cxusb.c 2014-12-28 12:40:24.637421592 +0200
|
||||
@@ -1408,6 +1408,77 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int cxusb_mygica_t230_frontend_attach(struct dvb_usb_adapter *adap)
|
||||
+{
|
||||
+ struct dvb_usb_device *d = adap->dev;
|
||||
+ struct cxusb_state *st = d->priv;
|
||||
+ struct i2c_adapter *adapter;
|
||||
+ struct i2c_client *client_demod;
|
||||
+ struct i2c_client *client_tuner;
|
||||
+ struct i2c_board_info info;
|
||||
+ struct si2168_config si2168_config;
|
||||
+ struct si2157_config si2157_config;
|
||||
+
|
||||
+ /* Select required USB configuration */
|
||||
+ if (usb_set_interface(d->udev, 0, 0) < 0)
|
||||
+ err("set interface failed");
|
||||
+
|
||||
+ /* Unblock all USB pipes */
|
||||
+ usb_clear_halt(d->udev,
|
||||
+ usb_sndbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint));
|
||||
+ usb_clear_halt(d->udev,
|
||||
+ usb_rcvbulkpipe(d->udev, d->props.generic_bulk_ctrl_endpoint));
|
||||
+ usb_clear_halt(d->udev,
|
||||
+ usb_rcvbulkpipe(d->udev, d->props.adapter[0].fe[0].stream.endpoint));
|
||||
+
|
||||
+ /* attach frontend */
|
||||
+ memset(&si2168_config, 0, sizeof(si2168_config));
|
||||
+ si2168_config.i2c_adapter = &adapter;
|
||||
+ si2168_config.fe = &adap->fe_adap[0].fe;
|
||||
+ si2168_config.ts_mode = SI2168_TS_PARALLEL;
|
||||
+ si2168_config.ts_clock_inv = 1;
|
||||
+ memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
+ strlcpy(info.type, "si2168", I2C_NAME_SIZE);
|
||||
+ info.addr = 0x64;
|
||||
+ info.platform_data = &si2168_config;
|
||||
+ request_module(info.type);
|
||||
+ client_demod = i2c_new_device(&d->i2c_adap, &info);
|
||||
+ if (client_demod == NULL || client_demod->dev.driver == NULL)
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ if (!try_module_get(client_demod->dev.driver->owner)) {
|
||||
+ i2c_unregister_device(client_demod);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ st->i2c_client_demod = client_demod;
|
||||
+
|
||||
+ /* attach tuner */
|
||||
+ memset(&si2157_config, 0, sizeof(si2157_config));
|
||||
+ si2157_config.fe = adap->fe_adap[0].fe;
|
||||
+ memset(&info, 0, sizeof(struct i2c_board_info));
|
||||
+ strlcpy(info.type, "si2157", I2C_NAME_SIZE);
|
||||
+ info.addr = 0x60;
|
||||
+ info.platform_data = &si2157_config;
|
||||
+ request_module(info.type);
|
||||
+ client_tuner = i2c_new_device(adapter, &info);
|
||||
+ if (client_tuner == NULL || client_tuner->dev.driver == NULL) {
|
||||
+ module_put(client_demod->dev.driver->owner);
|
||||
+ i2c_unregister_device(client_demod);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+ if (!try_module_get(client_tuner->dev.driver->owner)) {
|
||||
+ i2c_unregister_device(client_tuner);
|
||||
+ module_put(client_demod->dev.driver->owner);
|
||||
+ i2c_unregister_device(client_demod);
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
+ st->i2c_client_tuner = client_tuner;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int cxusb_tt_ct2_4400_attach(struct dvb_usb_adapter *adap)
|
||||
{
|
||||
struct dvb_usb_device *d = adap->dev;
|
||||
@@ -1435,6 +1506,7 @@
|
||||
msleep(100);
|
||||
|
||||
/* attach frontend */
|
||||
+ memset(&si2168_config, 0, sizeof(si2168_config));
|
||||
si2168_config.i2c_adapter = &adapter;
|
||||
si2168_config.fe = &adap->fe_adap[0].fe;
|
||||
si2168_config.ts_mode = SI2168_TS_PARALLEL;
|
||||
@@ -1609,6 +1681,7 @@
|
||||
static struct dvb_usb_device_properties cxusb_aver_a868r_properties;
|
||||
static struct dvb_usb_device_properties cxusb_d680_dmb_properties;
|
||||
static struct dvb_usb_device_properties cxusb_mygica_d689_properties;
|
||||
+static struct dvb_usb_device_properties cxusb_mygica_t230_properties;
|
||||
static struct dvb_usb_device_properties cxusb_tt_ct2_4400_properties;
|
||||
|
||||
static int cxusb_probe(struct usb_interface *intf,
|
||||
@@ -1640,6 +1713,8 @@
|
||||
THIS_MODULE, NULL, adapter_nr) ||
|
||||
0 == dvb_usb_device_init(intf, &cxusb_mygica_d689_properties,
|
||||
THIS_MODULE, NULL, adapter_nr) ||
|
||||
+ 0 == dvb_usb_device_init(intf, &cxusb_mygica_t230_properties,
|
||||
+ THIS_MODULE, NULL, adapter_nr) ||
|
||||
0 == dvb_usb_device_init(intf, &cxusb_tt_ct2_4400_properties,
|
||||
THIS_MODULE, NULL, adapter_nr) ||
|
||||
0)
|
||||
@@ -1701,6 +1776,7 @@
|
||||
{ USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_D689) },
|
||||
{ USB_DEVICE(USB_VID_TECHNOTREND, USB_PID_TECHNOTREND_TVSTICK_CT2_4400) },
|
||||
{ USB_DEVICE(USB_VID_TECHNOTREND, USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI) },
|
||||
+ { USB_DEVICE(USB_VID_CONEXANT, USB_PID_MYGICA_T230) },
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
MODULE_DEVICE_TABLE (usb, cxusb_table);
|
||||
@@ -2406,6 +2482,59 @@
|
||||
},
|
||||
}
|
||||
};
|
||||
+
|
||||
+static struct dvb_usb_device_properties cxusb_mygica_t230_properties = {
|
||||
+ .caps = DVB_USB_IS_AN_I2C_ADAPTER,
|
||||
+
|
||||
+ .usb_ctrl = CYPRESS_FX2,
|
||||
+
|
||||
+ .size_of_priv = sizeof(struct cxusb_state),
|
||||
+
|
||||
+ .num_adapters = 1,
|
||||
+ .adapter = {
|
||||
+ {
|
||||
+ .num_frontends = 1,
|
||||
+ .fe = {{
|
||||
+ .streaming_ctrl = cxusb_streaming_ctrl,
|
||||
+ .frontend_attach = cxusb_mygica_t230_frontend_attach,
|
||||
+
|
||||
+ /* parameter for the MPEG2-data transfer */
|
||||
+ .stream = {
|
||||
+ .type = USB_BULK,
|
||||
+ .count = 5,
|
||||
+ .endpoint = 0x02,
|
||||
+ .u = {
|
||||
+ .bulk = {
|
||||
+ .buffersize = 8192,
|
||||
+ }
|
||||
+ }
|
||||
+ },
|
||||
+ } },
|
||||
+ },
|
||||
+ },
|
||||
+
|
||||
+ .power_ctrl = cxusb_d680_dmb_power_ctrl,
|
||||
+
|
||||
+ .i2c_algo = &cxusb_i2c_algo,
|
||||
+
|
||||
+ .generic_bulk_ctrl_endpoint = 0x01,
|
||||
+
|
||||
+ .rc.legacy = {
|
||||
+ .rc_interval = 100,
|
||||
+ .rc_map_table = rc_map_d680_dmb_table,
|
||||
+ .rc_map_size = ARRAY_SIZE(rc_map_d680_dmb_table),
|
||||
+ .rc_query = cxusb_d680_dmb_rc_query,
|
||||
+ },
|
||||
+
|
||||
+ .num_device_descs = 1,
|
||||
+ .devices = {
|
||||
+ {
|
||||
+ "Mygica T230 DVB-T/T2/C",
|
||||
+ { NULL },
|
||||
+ { &cxusb_table[22], NULL },
|
||||
+ },
|
||||
+ }
|
||||
+};
|
||||
|
||||
static struct usb_driver cxusb_driver = {
|
||||
.name = "dvb_usb_cxusb",
|
||||
diff -urN a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
|
||||
--- a/drivers/media/usb/em28xx/em28xx-dvb.c 2014-12-28 12:15:39.000000000 +0200
|
||||
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c 2014-12-28 12:41:05.041420392 +0200
|
||||
@@ -1531,6 +1531,7 @@
|
||||
struct si2157_config si2157_config;
|
||||
|
||||
/* attach demod */
|
||||
+ memset(&si2168_config, 0, sizeof(si2168_config));
|
||||
si2168_config.i2c_adapter = &adapter;
|
||||
si2168_config.fe = &dvb->fe[0];
|
||||
si2168_config.ts_mode = SI2168_TS_PARALLEL;
|
@ -1,18 +0,0 @@
|
||||
diff -rupN a/drivers/media/dvb-frontends/ds3000.c b/drivers/media/dvb-frontends/ds3000.c
|
||||
--- a/drivers/media/dvb-frontends/ds3000.c 2015-01-28 23:24:59.000000000 +0100
|
||||
+++ b/drivers/media/dvb-frontends/ds3000.c 2015-01-29 21:57:56.000000000 +0100
|
||||
@@ -958,6 +958,14 @@ static int ds3000_set_frontend(struct dv
|
||||
/* enable ac coupling */
|
||||
ds3000_writereg(state, 0x25, 0x8a);
|
||||
|
||||
+ dprintk("%s() frequency:%u symbol_rate:%u\n", __func__, c->frequency, c->symbol_rate);
|
||||
+
|
||||
+ if (c->symbol_rate < ds3000_ops.info.symbol_rate_min || c->symbol_rate > ds3000_ops.info.symbol_rate_max ) {
|
||||
+ dprintk("%s() symbol_rate %u out of range (%u ... %u)\n", __func__, c->symbol_rate,
|
||||
+ ds3000_ops.info.symbol_rate_min, ds3000_ops.info.symbol_rate_max);
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
/* enhance symbol rate performance */
|
||||
if ((c->symbol_rate / 1000) <= 5000) {
|
||||
value = 29777 / (c->symbol_rate / 1000) + 1;
|
@ -1,11 +0,0 @@
|
||||
--- linux-3.9.2/drivers/net/ethernet/broadcom/tg3.c 2013-05-11 18:19:28.000000000 +0400
|
||||
+++ linux-3.9.2/drivers/net/ethernet/broadcom/tg3.c 2013-05-25 20:55:00.282972605 +0400
|
||||
@@ -333,6 +333,8 @@
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5720)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57762)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57766)},
|
||||
+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57782)},
|
||||
+ {PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_57786)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5762)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5725)},
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, TG3PCI_DEVICE_TIGON3_5727)},
|
@ -1,10 +0,0 @@
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800usb.c 2013-10-08 15:14:44.844047190 +0200
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c 2013-10-08 15:15:00.279904575 +0200
|
||||
@@ -976,6 +976,7 @@
|
||||
{ USB_DEVICE(0x0411, 0x015d) },
|
||||
{ USB_DEVICE(0x0411, 0x016f) },
|
||||
{ USB_DEVICE(0x0411, 0x01a2) },
|
||||
+ { USB_DEVICE(0x0411, 0x01a8) },
|
||||
{ USB_DEVICE(0x0411, 0x01ee) },
|
||||
/* Corega */
|
||||
{ USB_DEVICE(0x07aa, 0x002f) },
|
@ -1,11 +0,0 @@
|
||||
diff -Naur linux-3.10.16/drivers/staging/rtl8712/usb_intf.c linux-3.10.16.patch/drivers/staging/rtl8712/usb_intf.c
|
||||
--- linux-3.10.16/drivers/staging/rtl8712/usb_intf.c 2013-10-14 01:08:56.000000000 +0200
|
||||
+++ linux-3.10.16.patch/drivers/staging/rtl8712/usb_intf.c 2013-10-16 13:27:44.032951265 +0200
|
||||
@@ -92,6 +92,7 @@
|
||||
{USB_DEVICE(0x0DF6, 0x005B)},
|
||||
{USB_DEVICE(0x0DF6, 0x005D)},
|
||||
{USB_DEVICE(0x0DF6, 0x0063)},
|
||||
+ {USB_DEVICE(0x0DF6, 0x006C)},
|
||||
/* Sweex */
|
||||
{USB_DEVICE(0x177F, 0x0154)},
|
||||
/* Thinkware */
|
File diff suppressed because it is too large
Load Diff
@ -1,83 +0,0 @@
|
||||
From 56ca3555ed8e0f5fd741477fd23497f5455c3f53 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Tue, 22 Apr 2014 15:58:50 +0300
|
||||
Subject: [PATCH] ALSA: hda - Avoid outputting HDMI audio before prepare() and after close()
|
||||
|
||||
adapted to 3.15
|
||||
|
||||
From a6024295fd3290a8c9c5519a03316081ee82378a Mon Sep 17 00:00:00 2001
|
||||
From: Anssi Hannula <anssi.hannula@iki.fi>
|
||||
Date: Sat, 16 Feb 2013 17:42:46 +0200
|
||||
Subject: [PATCH] ALSA: hda - Avoid outputting HDMI audio before prepare() and
|
||||
after close()
|
||||
|
||||
Some HDMI codecs (at least NVIDIA 0x10de000b:0x10de0101:0x100100) start
|
||||
transmitting an empty audio stream as soon as PIN_OUT and AC_DIG1_ENABLE
|
||||
are enabled.
|
||||
|
||||
Since commit 6169b673618bf0b2518ce413b54925782a603f06 ("ALSA: hda -
|
||||
Always turn on pins for HDMI/DP") this happens at first open() time, and
|
||||
will continue even after close().
|
||||
|
||||
Additionally, some codecs (at least Intel PantherPoint HDMI) currently
|
||||
continue transmitting HDMI audio even after close() in case some actual
|
||||
audio was output after open() (this happens regardless of PIN_OUT).
|
||||
|
||||
Empty HDMI audio transmission when not intended has the effect that a
|
||||
possible HDMI audio sink/receiver may prefer the empty HDMI audio stream
|
||||
over an actual audio stream on its S/PDIF inputs.
|
||||
|
||||
To avoid the issue before first prepare(), set stream format to 0 on
|
||||
codec initialization. 0 is not a valid format value for HDMI and will
|
||||
prevent the audio stream from being output.
|
||||
|
||||
Additionally, at close() time, make sure that the stream is cleaned up.
|
||||
This will ensure that the format is reset to 0 at that time, preventing
|
||||
audio from being output in that case.
|
||||
|
||||
Thanks to OpenELEC developers and users for their help in investigating
|
||||
this issue on the affected NVIDIA "ION2" hardware. Testing of the final
|
||||
version on NVIDIA ION2 was done by OpenELEC user "MrXIII". Testing on
|
||||
Intel PantherPoint was done by myself.
|
||||
|
||||
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
|
||||
Cc: stable@vger.kernel.org
|
||||
---
|
||||
sound/pci/hda/patch_hdmi.c | 14 ++++++++++++++
|
||||
1 files changed, 14 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
|
||||
index 0cb5b89..e92f24f 100644
|
||||
--- a/sound/pci/hda/patch_hdmi.c
|
||||
+++ b/sound/pci/hda/patch_hdmi.c
|
||||
@@ -1698,6 +1698,14 @@ static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t cvt_nid)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
+ /*
|
||||
+ * Some HDMI codecs (at least NVIDIA 0x10de000b:0x10de0101:0x100100)
|
||||
+ * start transmitting an empty audio stream as soon as PIN_OUT and
|
||||
+ * AC_DIG1_ENABLE are enabled, which happens at open() time.
|
||||
+ * To avoid that, set format to 0, which is not valid for HDMI.
|
||||
+ */
|
||||
+ snd_hda_codec_write(codec, cvt_nid, 0, AC_VERB_SET_STREAM_FORMAT, 0);
|
||||
+
|
||||
if (spec->num_cvts < ARRAY_SIZE(spec->cvt_nids))
|
||||
spec->cvt_nids[spec->num_cvts] = cvt_nid;
|
||||
spec->num_cvts++;
|
||||
@@ -1823,6 +1831,12 @@ static int hdmi_pcm_close(struct hda_pcm_stream *hinfo,
|
||||
int pinctl;
|
||||
|
||||
if (hinfo->nid) {
|
||||
+ /*
|
||||
+ * Make sure no empty audio is output after this point by
|
||||
+ * setting stream format to 0, which is not valid for HDMI.
|
||||
+ */
|
||||
+ __snd_hda_codec_cleanup_stream(codec, hinfo->nid, 1);
|
||||
+
|
||||
cvt_idx = cvt_nid_to_cvt_index(codec, hinfo->nid);
|
||||
if (snd_BUG_ON(cvt_idx < 0))
|
||||
return -EINVAL;
|
||||
--
|
||||
1.7.2.5
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@
|
||||
From c314d9af9d774c052bea324e1a140ccdba0ca070 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Tue, 8 Apr 2014 14:02:53 +0300
|
||||
Subject: [PATCH] pm: disable async suspend/resume by default
|
||||
|
||||
---
|
||||
kernel/power/main.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/kernel/power/main.c b/kernel/power/main.c
|
||||
index 1d1bf63..361db93 100644
|
||||
--- a/kernel/power/main.c
|
||||
+++ b/kernel/power/main.c
|
||||
@@ -46,7 +46,7 @@ int pm_notifier_call_chain(unsigned long val)
|
||||
}
|
||||
|
||||
/* If set, devices may be suspended and resumed asynchronously. */
|
||||
-int pm_async_enabled = 1;
|
||||
+int pm_async_enabled = 0;
|
||||
|
||||
static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr,
|
||||
char *buf)
|
||||
--
|
||||
1.7.2.5
|
||||
|
@ -1,43 +0,0 @@
|
||||
From b6d7efd33fd2843fbafe2b2d4b8119b217779a6a Mon Sep 17 00:00:00 2001
|
||||
From: fritsch <Peter.Fruehberger@gmail.com>
|
||||
Date: Sat, 3 May 2014 00:08:24 +0200
|
||||
Subject: [PATCH] Revert "Revert "xhci: Set scatter-gather limit to avoid
|
||||
failed block writes.""
|
||||
|
||||
This reverts commit 47f467ac740ebf0475a5176ddb1741acba6aad4e.
|
||||
---
|
||||
drivers/usb/host/xhci.c | 4 ++--
|
||||
drivers/usb/host/xhci.h | 2 +-
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
|
||||
index 5a646a6..cfa5995 100644
|
||||
--- a/drivers/usb/host/xhci.c
|
||||
+++ b/drivers/usb/host/xhci.c
|
||||
@@ -4716,8 +4716,8 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
|
||||
struct device *dev = hcd->self.controller;
|
||||
int retval;
|
||||
|
||||
- /* Accept arbitrarily long scatter-gather lists */
|
||||
- hcd->self.sg_tablesize = ~0;
|
||||
+ /* Limit the block layer scatter-gather lists to half a segment. */
|
||||
+ hcd->self.sg_tablesize = TRBS_PER_SEGMENT / 2;
|
||||
|
||||
/* support to build packet from discontinuous buffers */
|
||||
hcd->self.no_sg_constraint = 1;
|
||||
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
|
||||
index 03c74b7..c283cf1 100644
|
||||
--- a/drivers/usb/host/xhci.h
|
||||
+++ b/drivers/usb/host/xhci.h
|
||||
@@ -1260,7 +1260,7 @@ union xhci_trb {
|
||||
* since the command ring is 64-byte aligned.
|
||||
* It must also be greater than 16.
|
||||
*/
|
||||
-#define TRBS_PER_SEGMENT 64
|
||||
+#define TRBS_PER_SEGMENT 256
|
||||
/* Allow two commands + a link TRB, along with any reserved command TRBs */
|
||||
#define MAX_RSVD_CMD_TRBS (TRBS_PER_SEGMENT - 3)
|
||||
#define TRB_SEGMENT_SIZE (TRBS_PER_SEGMENT*16)
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,152 +0,0 @@
|
||||
commit 0da5fe8cc74e6aec119ea0cc56f3e2cc92caccec
|
||||
Author: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Date: Tue Dec 16 10:02:27 2014 +0000
|
||||
|
||||
drm/i915: Disable PSMI sleep messages on all rings around context switches
|
||||
|
||||
There exists a current workaround to prevent a hang on context switch
|
||||
should the ring go to sleep in the middle of the restore,
|
||||
WaProgramMiArbOnOffAroundMiSetContext (applicable to all gen7+). In
|
||||
spite of disabling arbitration (which prevents the ring from powering
|
||||
down during the critical section) we were still hitting hangs that had
|
||||
the hallmarks of the known erratum. That is we are still seeing hangs
|
||||
"on the last instruction in the context restore". By comparing -nightly
|
||||
(broken) with requests (working), we were able to deduce that it was the
|
||||
semaphore LRI cross-talk that reproduced the original failure. The key
|
||||
was that requests implemented deferred semaphore signalling, and
|
||||
disabling that, i.e. emitting the semaphore signal to every other ring
|
||||
after every batch restored the frequent hang. Explicitly disabling PSMI
|
||||
sleep on the RCS ring was insufficient, all the rings had to be awake to
|
||||
prevent the hangs. Fortunately, we can reduce the wakelock to the
|
||||
MI_SET_CONTEXT operation itself, and so should be able to limit the extra
|
||||
power implications.
|
||||
|
||||
Since the MI_ARB_ON_OFF workaround is listed for all gen7 and above
|
||||
products, we should apply this extra hammer for all of the same
|
||||
platforms despite so far that we have only been able to reproduce the
|
||||
hang on certain ivb and hsw models. The last question is whether we want
|
||||
to always use the extra hammer or only when we know semaphores are in
|
||||
operation. At the moment, we only use LRI on non-RCS rings for
|
||||
semaphores, but that may change in the future with the possibility of
|
||||
reintroducing this bug under subtle conditions.
|
||||
|
||||
v2: Make it explicit that the PSMI LRI are an extension to the original
|
||||
workaround for the other rings.
|
||||
v3: Bikeshedding variable names and whitespacing
|
||||
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80660
|
||||
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83677
|
||||
Cc: Simon Farnsworth <simon@farnz.org.uk>
|
||||
Cc: Daniel Vetter <daniel@ffwll.ch>
|
||||
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
||||
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
||||
Tested-by: Peter Frühberger <fritsch@xbmc.org>
|
||||
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
|
||||
|
||||
Backported to 3.17:
|
||||
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
|
||||
|
||||
Conflicts:
|
||||
drivers/gpu/drm/i915/i915_gem_context.c
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
|
||||
index 3b99390..7f76ea2 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_gem_context.c
|
||||
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
|
||||
@@ -563,7 +563,12 @@ mi_set_context(struct intel_engine_cs *ring,
|
||||
struct intel_context *new_context,
|
||||
u32 hw_flags)
|
||||
{
|
||||
- int ret;
|
||||
+ const int num_rings =
|
||||
+ /* Use an extended w/a on ivb+ if signalling from other rings */
|
||||
+ i915_semaphore_is_enabled(ring->dev) ?
|
||||
+ hweight32(INTEL_INFO(ring->dev)->ring_mask) - 1 :
|
||||
+ 0;
|
||||
+ int len, i, ret;
|
||||
|
||||
/* w/a: If Flush TLB Invalidation Mode is enabled, driver must do a TLB
|
||||
* invalidation prior to MI_SET_CONTEXT. On GEN6 we don't set the value
|
||||
@@ -576,15 +581,30 @@ mi_set_context(struct intel_engine_cs *ring,
|
||||
return ret;
|
||||
}
|
||||
|
||||
- ret = intel_ring_begin(ring, 6);
|
||||
+ len = 4;
|
||||
+ if (INTEL_INFO(ring->dev)->gen >= 7)
|
||||
+ len += 2 + (num_rings ? 4*num_rings + 2 : 0);
|
||||
+
|
||||
+ ret = intel_ring_begin(ring, len);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* WaProgramMiArbOnOffAroundMiSetContext:ivb,vlv,hsw,bdw,chv */
|
||||
- if (INTEL_INFO(ring->dev)->gen >= 7)
|
||||
+ if (INTEL_INFO(ring->dev)->gen >= 7) {
|
||||
intel_ring_emit(ring, MI_ARB_ON_OFF | MI_ARB_DISABLE);
|
||||
- else
|
||||
- intel_ring_emit(ring, MI_NOOP);
|
||||
+ if (num_rings) {
|
||||
+ struct intel_engine_cs *signaller;
|
||||
+
|
||||
+ intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(num_rings));
|
||||
+ for_each_ring(signaller, to_i915(ring->dev), i) {
|
||||
+ if (signaller == ring)
|
||||
+ continue;
|
||||
+
|
||||
+ intel_ring_emit(ring, RING_PSMI_CTL(signaller->mmio_base));
|
||||
+ intel_ring_emit(ring, _MASKED_BIT_ENABLE(GEN6_PSMI_SLEEP_MSG_DISABLE));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
intel_ring_emit(ring, MI_NOOP);
|
||||
intel_ring_emit(ring, MI_SET_CONTEXT);
|
||||
@@ -599,10 +619,21 @@ mi_set_context(struct intel_engine_cs *ring,
|
||||
*/
|
||||
intel_ring_emit(ring, MI_NOOP);
|
||||
|
||||
- if (INTEL_INFO(ring->dev)->gen >= 7)
|
||||
+ if (INTEL_INFO(ring->dev)->gen >= 7) {
|
||||
+ if (num_rings) {
|
||||
+ struct intel_engine_cs *signaller;
|
||||
+
|
||||
+ intel_ring_emit(ring, MI_LOAD_REGISTER_IMM(num_rings));
|
||||
+ for_each_ring(signaller, to_i915(ring->dev), i) {
|
||||
+ if (signaller == ring)
|
||||
+ continue;
|
||||
+
|
||||
+ intel_ring_emit(ring, RING_PSMI_CTL(signaller->mmio_base));
|
||||
+ intel_ring_emit(ring, _MASKED_BIT_DISABLE(GEN6_PSMI_SLEEP_MSG_DISABLE));
|
||||
+ }
|
||||
+ }
|
||||
intel_ring_emit(ring, MI_ARB_ON_OFF | MI_ARB_ENABLE);
|
||||
- else
|
||||
- intel_ring_emit(ring, MI_NOOP);
|
||||
+ }
|
||||
|
||||
intel_ring_advance(ring);
|
||||
|
||||
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
|
||||
index f29b44c..df02a15 100644
|
||||
--- a/drivers/gpu/drm/i915/i915_reg.h
|
||||
+++ b/drivers/gpu/drm/i915/i915_reg.h
|
||||
@@ -1029,6 +1029,7 @@ enum punit_power_well {
|
||||
#define GEN6_VERSYNC (RING_SYNC_1(VEBOX_RING_BASE))
|
||||
#define GEN6_VEVSYNC (RING_SYNC_2(VEBOX_RING_BASE))
|
||||
#define GEN6_NOSYNC 0
|
||||
+#define RING_PSMI_CTL(base) ((base)+0x50)
|
||||
#define RING_MAX_IDLE(base) ((base)+0x54)
|
||||
#define RING_HWS_PGA(base) ((base)+0x80)
|
||||
#define RING_HWS_PGA_GEN6(base) ((base)+0x2080)
|
||||
@@ -1354,6 +1355,7 @@ enum punit_power_well {
|
||||
#define GEN6_BLITTER_FBC_NOTIFY (1<<3)
|
||||
|
||||
#define GEN6_RC_SLEEP_PSMI_CONTROL 0x2050
|
||||
+#define GEN6_PSMI_SLEEP_MSG_DISABLE (1 << 0)
|
||||
#define GEN8_RC_SEMA_IDLE_MSG_DISABLE (1 << 12)
|
||||
#define GEN8_FF_DOP_CLOCK_GATE_DISABLE (1<<10)
|
||||
|
||||
|
@ -1,315 +0,0 @@
|
||||
diff -Naur linux-3.15-rc6.orig/drivers/hid/hid-core.c linux-3.15-rc6/drivers/hid/hid-core.c
|
||||
--- linux-3.15-rc6.orig/drivers/hid/hid-core.c 2014-06-06 13:46:49.711845049 -0700
|
||||
+++ linux-3.15-rc6/drivers/hid/hid-core.c 2014-06-06 13:50:33.019965538 -0700
|
||||
@@ -1848,6 +1848,7 @@
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS, USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2) },
|
||||
diff -Naur linux-3.15-rc6.orig/drivers/hid/hid-ids.h linux-3.15-rc6/drivers/hid/hid-ids.h
|
||||
--- linux-3.15-rc6.orig/drivers/hid/hid-ids.h 2014-06-06 13:46:49.711845049 -0700
|
||||
+++ linux-3.15-rc6/drivers/hid/hid-ids.h 2014-06-06 13:51:36.146564828 -0700
|
||||
@@ -700,6 +700,9 @@
|
||||
#define USB_DEVICE_ID_ORTEK_PKB1700 0x1700
|
||||
#define USB_DEVICE_ID_ORTEK_WKB2000 0x2000
|
||||
|
||||
+#define USB_VENDOR_ID_OUYA 0x2836
|
||||
+#define USB_DEVICE_ID_OUYA_CONTROLLER 0x0001
|
||||
+
|
||||
#define USB_VENDOR_ID_PANASONIC 0x04da
|
||||
#define USB_DEVICE_ID_PANABOARD_UBT780 0x1044
|
||||
#define USB_DEVICE_ID_PANABOARD_UBT880 0x104d
|
||||
diff -Naur linux-3.15-rc6.orig/drivers/hid/hid-ouya.c linux-3.15-rc6/drivers/hid/hid-ouya.c
|
||||
--- linux-3.15-rc6.orig/drivers/hid/hid-ouya.c 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ linux-3.15-rc6/drivers/hid/hid-ouya.c 2014-06-06 13:52:22.785007560 -0700
|
||||
@@ -0,0 +1,260 @@
|
||||
+/*
|
||||
+ * HID driver for OUYA Game Controller(s)
|
||||
+ *
|
||||
+ * Copyright (c) 2013 OUYA
|
||||
+ */
|
||||
+
|
||||
+#include <linux/device.h>
|
||||
+#include <linux/input.h>
|
||||
+#include <linux/hid.h>
|
||||
+#include <linux/module.h>
|
||||
+
|
||||
+#include "hid-ids.h"
|
||||
+
|
||||
+#define OUYA_TOUCHPAD_FIXUP (1 << 0)
|
||||
+
|
||||
+struct ouya_sc {
|
||||
+ unsigned long quirks;
|
||||
+};
|
||||
+
|
||||
+/* Fixed report descriptor */
|
||||
+static __u8 ouya_rdesc_fixed[] = {
|
||||
+
|
||||
+ 0x05, 0x01, /* Usage Page (Desktop), */
|
||||
+ 0x09, 0x05, /* Usage (Game Pad), */
|
||||
+
|
||||
+ 0xA1, 0x01, /* Collection (Application), */
|
||||
+ 0x85, 0x07, /* Report ID (7), */
|
||||
+
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x09, 0x30, /* Usage (X), */
|
||||
+ 0x09, 0x31, /* Usage (Y), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x35, 0x00, /* Physical Minimum (0), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x95, 0x02, /* Report Count (2), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x09, 0x33, /* Usage (Rx), */
|
||||
+ 0x09, 0x34, /* Usage (Ry), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x35, 0x00, /* Physical Minimum (0), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x95, 0x02, /* Report Count (2), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x09, 0x32, /* Usage (Z), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x35, 0x00, /* Physical Minimum (0), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x95, 0x01, /* Report Count (1), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x09, 0x35, /* Usage (Rz), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x35, 0x00, /* Physical Minimum (0), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x95, 0x01, /* Report Count (1), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0x05, 0x09, /* Usage Page (Button), */
|
||||
+ 0x19, 0x01, /* Usage Minimum (01h), */
|
||||
+ 0x29, 0x10, /* Usage Maximum (10h), */
|
||||
+ 0x95, 0x10, /* Report Count (16), */
|
||||
+ 0x75, 0x01, /* Report Size (1), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+
|
||||
+ /* ORIGINAL REPORT DESCRIPTOR FOR TOUCHPAD INPUT */
|
||||
+ /* 06 00 ff a1 02 09 02 15 00 26 ff 00 35 00 46 ff 00 95 03 75 08 81 02 c0 */
|
||||
+
|
||||
+ 0x06, 0x00, 0xFF, /* Usage Page (Custom), */
|
||||
+ 0x09, 0x02, /* Usage (Mouse), */
|
||||
+ 0x09, 0x01, /* Usage (Pointer), */
|
||||
+ 0xA1, 0x00, /* Collection (Physical), */
|
||||
+ 0x05, 0x09, /* Usage Page (Button), */
|
||||
+ 0x19, 0x01, /* Usage Minimum (01h), */
|
||||
+ 0x29, 0x03, /* Usage Maximum (03h), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x25, 0x01, /* Logical Maximum (1), */
|
||||
+ 0x95, 0x03, /* Report Count (3), */
|
||||
+ 0x75, 0x01, /* Report Size (1), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0x95, 0x01, /* Report Count (1), */
|
||||
+ 0x75, 0x05, /* Report Size (5), */
|
||||
+ 0x81, 0x01, /* Input (Constant), */
|
||||
+ 0x05, 0x01, /* Usage Page (Desktop), */
|
||||
+ 0x09, 0x30, /* Usage (X), */
|
||||
+ 0x09, 0x31, /* Usage (Y), */
|
||||
+ 0x15, 0x81, /* Logical Minimum (-127), */
|
||||
+ 0x25, 0x7f, /* Logical Maximum (127), */
|
||||
+ 0x95, 0x02, /* Report Count (2), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x81, 0x06, /* Input (Relative), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0x06, 0x00, 0xFF, /* Usage Page (Custom), */
|
||||
+ 0xA1, 0x02, /* Collection (Logical), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x95, 0x07, /* Report Count (7), */
|
||||
+ 0x46, 0xFF, 0x00, /* Physical Maximum (255), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x09, 0x01, /* Usage (Pointer), */
|
||||
+ 0x91, 0x02, /* Output (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xC0, /* End Collection */
|
||||
+
|
||||
+
|
||||
+ 0x06, 0x00, 0xFF, /* Usage Page (Custom), */
|
||||
+ 0x05, 0x0C, /* Usage Page (Consumer), */
|
||||
+ 0x09, 0x01, /* Usage (Consumer Control), */
|
||||
+
|
||||
+ 0xA1, 0x01, /* Collection (Application), */
|
||||
+ 0x85, 0x03, /* Report ID (3), */
|
||||
+ 0x05, 0x01, /* Usage Page (Desktop), */
|
||||
+ 0x09, 0x06, /* Usage (Keyboard), */
|
||||
+ 0xA1, 0x02, /* Collection (Logical), */
|
||||
+ 0x05, 0x06, /* Usage Page (Generic), */
|
||||
+ 0x09, 0x20, /* Usage (Battery Strgth), */
|
||||
+ 0x15, 0x00, /* Logical Minimum (0), */
|
||||
+ 0x26, 0xFF, 0x00, /* Logical Maximum (255), */
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x95, 0x01, /* Report Count (1), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0x06, 0xBC, 0xFF, /* Usage Page (Custom), */
|
||||
+
|
||||
+ 0x0A, 0xAD, 0xBD, /* UNKNOWN */
|
||||
+
|
||||
+ 0x75, 0x08, /* Report Size (8), */
|
||||
+ 0x95, 0x06, /* Report Count (6), */
|
||||
+ 0x81, 0x02, /* Input (Variable), */
|
||||
+ 0xC0, /* End Collection, */
|
||||
+
|
||||
+ 0xC0, /* End Collection */
|
||||
+
|
||||
+ 0x00
|
||||
+};
|
||||
+
|
||||
+static __u8 *ouya_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
||||
+ unsigned int *rsize)
|
||||
+{
|
||||
+ struct ouya_sc *sc = hid_get_drvdata(hdev);
|
||||
+
|
||||
+ if (sc->quirks & OUYA_TOUCHPAD_FIXUP) {
|
||||
+ rdesc = ouya_rdesc_fixed;
|
||||
+ *rsize = sizeof(ouya_rdesc_fixed);
|
||||
+ }
|
||||
+ return rdesc;
|
||||
+}
|
||||
+
|
||||
+static int ouya_input_mapping(struct hid_device *hdev, struct hid_input *hi,
|
||||
+ struct hid_field *field, struct hid_usage *usage,
|
||||
+ unsigned long **bit, int *max)
|
||||
+{
|
||||
+ struct ouya_sc *sc = hid_get_drvdata(hdev);
|
||||
+
|
||||
+ if (!(sc->quirks & OUYA_TOUCHPAD_FIXUP)) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ if ((usage->hid & 0x90000) == 0x90000 &&
|
||||
+ (field->physical & 0xff000000) == 0xff000000 &&
|
||||
+ usage->collection_index == 5 &&
|
||||
+ field->report_count == 3) {
|
||||
+
|
||||
+ hid_map_usage(hi, usage, bit, max, EV_KEY, BTN_MOUSE + (usage->hid - 0x90001));
|
||||
+
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int ouya_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||
+{
|
||||
+ int ret;
|
||||
+ struct ouya_sc *sc;
|
||||
+
|
||||
+ sc = kzalloc(sizeof(*sc), GFP_KERNEL);
|
||||
+ if (sc == NULL) {
|
||||
+ hid_err(hdev, "can't alloc ouya descriptor\n");
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+
|
||||
+ if(((hdev->version & 0xff00) == 0x0100 && (hdev->version & 0xff) >= 0x04) ||
|
||||
+ ((hdev->version & 0xff00) == 0xe100 && (hdev->version & 0xff) >= 0x3a)) {
|
||||
+ hid_info(hdev, "ouya controller - new version\n");
|
||||
+ sc->quirks = OUYA_TOUCHPAD_FIXUP;
|
||||
+ } else {
|
||||
+ sc->quirks = 0;
|
||||
+ }
|
||||
+ hid_set_drvdata(hdev, sc);
|
||||
+
|
||||
+ ret = hid_parse(hdev);
|
||||
+ if (ret) {
|
||||
+ hid_err(hdev, "parse failed\n");
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT |
|
||||
+ HID_CONNECT_HIDDEV_FORCE);
|
||||
+ if (ret) {
|
||||
+ hid_err(hdev, "hw start failed\n");
|
||||
+ goto err_free;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+
|
||||
+err_free:
|
||||
+ kfree(sc);
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
+static void ouya_remove(struct hid_device *hdev)
|
||||
+{
|
||||
+ hid_hw_stop(hdev);
|
||||
+ kfree(hid_get_drvdata(hdev));
|
||||
+}
|
||||
+
|
||||
+static const struct hid_device_id ouya_devices[] = {
|
||||
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_OUYA, USB_DEVICE_ID_OUYA_CONTROLLER) },
|
||||
+ { }
|
||||
+};
|
||||
+MODULE_DEVICE_TABLE(hid, ouya_devices);
|
||||
+
|
||||
+static struct hid_driver ouya_driver = {
|
||||
+ .name = "ouya",
|
||||
+ .id_table = ouya_devices,
|
||||
+ .probe = ouya_probe,
|
||||
+ .remove = ouya_remove,
|
||||
+ .input_mapping = ouya_input_mapping,
|
||||
+ .report_fixup = ouya_report_fixup
|
||||
+};
|
||||
+
|
||||
+static int __init ouya_init(void)
|
||||
+{
|
||||
+ return hid_register_driver(&ouya_driver);
|
||||
+}
|
||||
+
|
||||
+static void __exit ouya_exit(void)
|
||||
+{
|
||||
+ hid_unregister_driver(&ouya_driver);
|
||||
+}
|
||||
+
|
||||
+module_init(ouya_init);
|
||||
+module_exit(ouya_exit);
|
||||
diff -Naur linux-3.15-rc6.orig/drivers/hid/Kconfig linux-3.15-rc6/drivers/hid/Kconfig
|
||||
--- linux-3.15-rc6.orig/drivers/hid/Kconfig 2014-06-06 13:46:49.710845040 -0700
|
||||
+++ linux-3.15-rc6/drivers/hid/Kconfig 2014-06-06 13:48:41.674908325 -0700
|
||||
@@ -499,6 +499,12 @@
|
||||
- Ortek WKB-2000
|
||||
- Skycable wireless presenter
|
||||
|
||||
+config HID_OUYA
|
||||
+ tristate "OUYA Game Controller"
|
||||
+ depends on USB_HID
|
||||
+ ---help---
|
||||
+ Support for OUYA Game Controller.
|
||||
+
|
||||
config HID_PANTHERLORD
|
||||
tristate "Pantherlord/GreenAsia game controller"
|
||||
depends on HID
|
||||
diff -Naur linux-3.15-rc6.orig/drivers/hid/Makefile linux-3.15-rc6/drivers/hid/Makefile
|
||||
--- linux-3.15-rc6.orig/drivers/hid/Makefile 2014-06-06 13:46:49.710845040 -0700
|
||||
+++ linux-3.15-rc6/drivers/hid/Makefile 2014-06-06 13:49:23.951309760 -0700
|
||||
@@ -68,6 +68,7 @@
|
||||
obj-$(CONFIG_HID_MULTITOUCH) += hid-multitouch.o
|
||||
obj-$(CONFIG_HID_NTRIG) += hid-ntrig.o
|
||||
obj-$(CONFIG_HID_ORTEK) += hid-ortek.o
|
||||
+obj-$(CONFIG_HID_OUYA) += hid-ouya.o
|
||||
obj-$(CONFIG_HID_PRODIKEYS) += hid-prodikeys.o
|
||||
obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
|
||||
obj-$(CONFIG_HID_PETALYNX) += hid-petalynx.o
|
@ -1,11 +0,0 @@
|
||||
diff -Naur linux-3.8.4/drivers/input/joystick/xpad.c linux-3.8.4.patch/drivers/input/joystick/xpad.c
|
||||
--- linux-3.8.4/drivers/input/joystick/xpad.c 2013-03-20 21:11:19.000000000 +0100
|
||||
+++ linux-3.8.4.patch/drivers/input/joystick/xpad.c 2013-03-26 20:24:29.273978355 +0100
|
||||
@@ -174,7 +174,6 @@
|
||||
{ 0x1bad, 0xf901, "Gamestop Xbox 360 Controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x1bad, 0xf903, "Tron Xbox 360 controller", 0, XTYPE_XBOX360 },
|
||||
{ 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
|
||||
- { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN }
|
||||
};
|
||||
|
@ -1,469 +0,0 @@
|
||||
diff -Naur linux-3.15.6.orig/drivers/input/joystick/xpad.c linux-3.15.6/drivers/input/joystick/xpad.c
|
||||
--- linux-3.15.6.orig/drivers/input/joystick/xpad.c 2014-08-01 20:37:09.039708016 -0700
|
||||
+++ linux-3.15.6/drivers/input/joystick/xpad.c 2014-08-01 19:44:20.521111000 -0700
|
||||
@@ -281,17 +281,21 @@
|
||||
struct urb *irq_out; /* urb for interrupt out report */
|
||||
unsigned char *odata; /* output data */
|
||||
dma_addr_t odata_dma;
|
||||
- struct mutex odata_mutex;
|
||||
+ spinlock_t odata_lock;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_JOYSTICK_XPAD_LEDS)
|
||||
struct xpad_led *led;
|
||||
#endif
|
||||
+
|
||||
+ int joydev_id;
|
||||
|
||||
char phys[64]; /* physical device path */
|
||||
|
||||
int mapping; /* map d-pad to buttons or to axes */
|
||||
int xtype; /* type of xbox device */
|
||||
+
|
||||
+ const char *name;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -435,6 +439,109 @@
|
||||
|
||||
input_sync(dev);
|
||||
}
|
||||
+static void xpad_send_led_command(struct usb_xpad *xpad, int command);
|
||||
+static int xpad_open(struct input_dev *dev);
|
||||
+static void xpad_close(struct input_dev *dev);
|
||||
+static void xpad_set_up_abs(struct input_dev *input_dev, signed short abs);
|
||||
+static int xpad_init_ff(struct usb_xpad *xpad);
|
||||
+static int xpad_find_joydev(struct device *dev, void *data)
|
||||
+{
|
||||
+ if (strstr(dev_name(dev), "js"))
|
||||
+ return 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static struct workqueue_struct *my_wq;
|
||||
+
|
||||
+typedef struct {
|
||||
+ struct work_struct my_work;
|
||||
+ struct usb_xpad *xpad;
|
||||
+} my_work_t;
|
||||
+
|
||||
+static void my_wq_function( struct work_struct *work)
|
||||
+{
|
||||
+ my_work_t *my_work = (my_work_t *)work;
|
||||
+
|
||||
+ struct usb_xpad *xpad = my_work->xpad;
|
||||
+
|
||||
+ if (xpad->pad_present) {
|
||||
+
|
||||
+ struct input_dev *input_dev;
|
||||
+ int i;
|
||||
+
|
||||
+ input_dev = input_allocate_device();
|
||||
+
|
||||
+ xpad->dev = input_dev;
|
||||
+ input_dev->name = xpad->name;
|
||||
+ input_dev->phys = xpad->phys;
|
||||
+ usb_to_input_id(xpad->udev, &input_dev->id);
|
||||
+ input_dev->dev.parent = &xpad->intf->dev;
|
||||
+
|
||||
+ input_set_drvdata(input_dev, xpad);
|
||||
+
|
||||
+ input_dev->open = xpad_open;
|
||||
+ input_dev->close = xpad_close;
|
||||
+
|
||||
+ input_dev->evbit[0] = BIT_MASK(EV_KEY);
|
||||
+
|
||||
+ if (!(xpad->mapping & MAP_STICKS_TO_NULL)) {
|
||||
+ input_dev->evbit[0] |= BIT_MASK(EV_ABS);
|
||||
+ /* set up axes */
|
||||
+ for (i = 0; xpad_abs[i] >= 0; i++)
|
||||
+ xpad_set_up_abs(input_dev, xpad_abs[i]);
|
||||
+ }
|
||||
+
|
||||
+ /* set up standard buttons */
|
||||
+ for (i = 0; xpad_common_btn[i] >= 0; i++)
|
||||
+ __set_bit(xpad_common_btn[i], input_dev->keybit);
|
||||
+
|
||||
+ /* set up model-specific ones */
|
||||
+ if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX360W) {
|
||||
+ for (i = 0; xpad360_btn[i] >= 0; i++)
|
||||
+ __set_bit(xpad360_btn[i], input_dev->keybit);
|
||||
+ } else {
|
||||
+ for (i = 0; xpad_btn[i] >= 0; i++)
|
||||
+ __set_bit(xpad_btn[i], input_dev->keybit);
|
||||
+ }
|
||||
+
|
||||
+ if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
|
||||
+ for (i = 0; xpad_btn_pad[i] >= 0; i++)
|
||||
+ __set_bit(xpad_btn_pad[i], input_dev->keybit);
|
||||
+ } else {
|
||||
+ for (i = 0; xpad_abs_pad[i] >= 0; i++)
|
||||
+ xpad_set_up_abs(input_dev, xpad_abs_pad[i]);
|
||||
+ }
|
||||
+
|
||||
+ if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) {
|
||||
+ for (i = 0; xpad_btn_triggers[i] >= 0; i++)
|
||||
+ __set_bit(xpad_btn_triggers[i], input_dev->keybit);
|
||||
+ } else {
|
||||
+ for (i = 0; xpad_abs_triggers[i] >= 0; i++)
|
||||
+ xpad_set_up_abs(input_dev, xpad_abs_triggers[i]);
|
||||
+ }
|
||||
+
|
||||
+ input_register_device(xpad->dev);
|
||||
+
|
||||
+ {
|
||||
+ struct device* joydev_dev = device_find_child(&xpad->dev->dev, NULL, xpad_find_joydev);
|
||||
+
|
||||
+ if (joydev_dev) {
|
||||
+// printk("found joydev child with minor %i\n", MINOR(joydev_dev->devt));
|
||||
+ xpad->joydev_id = MINOR(joydev_dev->devt);
|
||||
+ xpad_send_led_command(xpad, (xpad->joydev_id % 4) + 2);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ xpad_init_ff(xpad);
|
||||
+ } else {
|
||||
+ input_unregister_device(xpad->dev);
|
||||
+ }
|
||||
+
|
||||
+ kfree( (void *)work );
|
||||
+
|
||||
+ return;
|
||||
+}
|
||||
|
||||
/*
|
||||
* xpad360w_process_packet
|
||||
@@ -456,11 +563,35 @@
|
||||
/* Presence change */
|
||||
if (data[0] & 0x08) {
|
||||
if (data[1] & 0x80) {
|
||||
- xpad->pad_present = 1;
|
||||
- usb_submit_urb(xpad->bulk_out, GFP_ATOMIC);
|
||||
- } else
|
||||
- xpad->pad_present = 0;
|
||||
+
|
||||
+ if (!xpad->pad_present)
|
||||
+ {
|
||||
+ my_work_t * work;
|
||||
+ xpad->pad_present = 1;
|
||||
+ usb_submit_urb(xpad->bulk_out, GFP_ATOMIC);
|
||||
+
|
||||
+ work = (my_work_t *)kmalloc(sizeof(my_work_t), GFP_KERNEL);
|
||||
+ INIT_WORK( (struct work_struct *)work, my_wq_function );
|
||||
+ work->xpad = xpad;
|
||||
+ queue_work( my_wq, (struct work_struct *)work );
|
||||
+ }
|
||||
+
|
||||
+ } else {
|
||||
+ if (xpad->pad_present)
|
||||
+ {
|
||||
+ my_work_t * work;
|
||||
+ xpad->pad_present = 0;
|
||||
+
|
||||
+ work = (my_work_t *)kmalloc(sizeof(my_work_t), GFP_KERNEL);
|
||||
+ INIT_WORK( (struct work_struct *)work, my_wq_function );
|
||||
+ work->xpad = xpad;
|
||||
+ queue_work( my_wq, (struct work_struct *)work );
|
||||
+ }
|
||||
+// printk("got kill packet for id %i\n", xpad->joydev_id);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+// printk("xpad packet %hhX %hhX %hhX %hhX %hhX %hhX\n", data[0], data[1], data[2], data[3], data[4], data[5]);
|
||||
|
||||
/* Valid pad data */
|
||||
if (!(data[1] & 0x1))
|
||||
@@ -476,6 +607,8 @@
|
||||
int retval, status;
|
||||
|
||||
status = urb->status;
|
||||
+
|
||||
+// printk("xpad_irq_in %i\n", status);
|
||||
|
||||
switch (status) {
|
||||
case 0:
|
||||
@@ -584,8 +717,6 @@
|
||||
goto fail1;
|
||||
}
|
||||
|
||||
- mutex_init(&xpad->odata_mutex);
|
||||
-
|
||||
xpad->irq_out = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (!xpad->irq_out) {
|
||||
error = -ENOMEM;
|
||||
@@ -714,15 +845,38 @@
|
||||
|
||||
static void xpad_send_led_command(struct usb_xpad *xpad, int command)
|
||||
{
|
||||
- if (command >= 0 && command < 14) {
|
||||
- mutex_lock(&xpad->odata_mutex);
|
||||
- xpad->odata[0] = 0x01;
|
||||
- xpad->odata[1] = 0x03;
|
||||
- xpad->odata[2] = command;
|
||||
- xpad->irq_out->transfer_buffer_length = 3;
|
||||
- usb_submit_urb(xpad->irq_out, GFP_KERNEL);
|
||||
- mutex_unlock(&xpad->odata_mutex);
|
||||
+ if ((unsigned)command > 15)
|
||||
+ return;
|
||||
+
|
||||
+ spin_lock(&xpad->odata_lock);
|
||||
+
|
||||
+ switch (xpad->xtype) {
|
||||
+
|
||||
+ case XTYPE_XBOX360:
|
||||
+ xpad->odata[0] = 0x01;
|
||||
+ xpad->odata[1] = 0x03;
|
||||
+ xpad->odata[2] = command;
|
||||
+ xpad->irq_out->transfer_buffer_length = 3;
|
||||
+ break;
|
||||
+ case XTYPE_XBOX360W:
|
||||
+ xpad->odata[0] = 0x00;
|
||||
+ xpad->odata[1] = 0x00;
|
||||
+ xpad->odata[2] = 0x08;
|
||||
+ xpad->odata[3] = 0x40 + (command % 0x0e);
|
||||
+ xpad->odata[4] = 0x00;
|
||||
+ xpad->odata[5] = 0x00;
|
||||
+ xpad->odata[6] = 0x00;
|
||||
+ xpad->odata[7] = 0x00;
|
||||
+ xpad->odata[8] = 0x00;
|
||||
+ xpad->odata[9] = 0x00;
|
||||
+ xpad->odata[10] = 0x00;
|
||||
+ xpad->odata[11] = 0x00;
|
||||
+ xpad->irq_out->transfer_buffer_length = 12;
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
+ usb_submit_urb(xpad->irq_out, GFP_KERNEL);
|
||||
+ spin_unlock(&xpad->odata_lock);
|
||||
}
|
||||
|
||||
static void xpad_led_set(struct led_classdev *led_cdev,
|
||||
@@ -741,8 +895,10 @@
|
||||
struct xpad_led *led;
|
||||
struct led_classdev *led_cdev;
|
||||
int error;
|
||||
+
|
||||
+// printk("xpad_led_probe\n");
|
||||
|
||||
- if (xpad->xtype != XTYPE_XBOX360)
|
||||
+ if (xpad->xtype != XTYPE_XBOX360 && xpad->xtype != XTYPE_XBOX360W)
|
||||
return 0;
|
||||
|
||||
xpad->led = led = kzalloc(sizeof(struct xpad_led), GFP_KERNEL);
|
||||
@@ -765,11 +921,6 @@
|
||||
return error;
|
||||
}
|
||||
|
||||
- /*
|
||||
- * Light up the segment corresponding to controller number
|
||||
- */
|
||||
- xpad_send_led_command(xpad, (led_no % 4) + 2);
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -791,6 +942,7 @@
|
||||
static int xpad_open(struct input_dev *dev)
|
||||
{
|
||||
struct usb_xpad *xpad = input_get_drvdata(dev);
|
||||
+// printk("xpad open driver data %x\n", (unsigned int)xpad);
|
||||
|
||||
/* URB was submitted in probe */
|
||||
if (xpad->xtype == XTYPE_XBOX360W)
|
||||
@@ -839,23 +991,24 @@
|
||||
{
|
||||
struct usb_device *udev = interface_to_usbdev(intf);
|
||||
struct usb_xpad *xpad;
|
||||
- struct input_dev *input_dev;
|
||||
struct usb_endpoint_descriptor *ep_irq_in;
|
||||
int i, error;
|
||||
+ struct input_dev *input_dev;
|
||||
+
|
||||
+ if (!my_wq) {
|
||||
+ my_wq = create_workqueue("xpad_queue");
|
||||
+ }
|
||||
|
||||
for (i = 0; xpad_device[i].idVendor; i++) {
|
||||
if ((le16_to_cpu(udev->descriptor.idVendor) == xpad_device[i].idVendor) &&
|
||||
(le16_to_cpu(udev->descriptor.idProduct) == xpad_device[i].idProduct))
|
||||
break;
|
||||
}
|
||||
-
|
||||
+
|
||||
xpad = kzalloc(sizeof(struct usb_xpad), GFP_KERNEL);
|
||||
- input_dev = input_allocate_device();
|
||||
- if (!xpad || !input_dev) {
|
||||
- error = -ENOMEM;
|
||||
- goto fail1;
|
||||
- }
|
||||
|
||||
+ xpad->name = xpad_device[i].name;
|
||||
+
|
||||
xpad->idata = usb_alloc_coherent(udev, XPAD_PKT_LEN,
|
||||
GFP_KERNEL, &xpad->idata_dma);
|
||||
if (!xpad->idata) {
|
||||
@@ -891,65 +1044,12 @@
|
||||
xpad->mapping |= MAP_STICKS_TO_NULL;
|
||||
}
|
||||
|
||||
- xpad->dev = input_dev;
|
||||
- usb_make_path(udev, xpad->phys, sizeof(xpad->phys));
|
||||
- strlcat(xpad->phys, "/input0", sizeof(xpad->phys));
|
||||
-
|
||||
- input_dev->name = xpad_device[i].name;
|
||||
- input_dev->phys = xpad->phys;
|
||||
- usb_to_input_id(udev, &input_dev->id);
|
||||
- input_dev->dev.parent = &intf->dev;
|
||||
-
|
||||
- input_set_drvdata(input_dev, xpad);
|
||||
-
|
||||
- input_dev->open = xpad_open;
|
||||
- input_dev->close = xpad_close;
|
||||
-
|
||||
- input_dev->evbit[0] = BIT_MASK(EV_KEY);
|
||||
-
|
||||
- if (!(xpad->mapping & MAP_STICKS_TO_NULL)) {
|
||||
- input_dev->evbit[0] |= BIT_MASK(EV_ABS);
|
||||
- /* set up axes */
|
||||
- for (i = 0; xpad_abs[i] >= 0; i++)
|
||||
- xpad_set_up_abs(input_dev, xpad_abs[i]);
|
||||
- }
|
||||
-
|
||||
- /* set up standard buttons */
|
||||
- for (i = 0; xpad_common_btn[i] >= 0; i++)
|
||||
- __set_bit(xpad_common_btn[i], input_dev->keybit);
|
||||
-
|
||||
- /* set up model-specific ones */
|
||||
- if (xpad->xtype == XTYPE_XBOX360 || xpad->xtype == XTYPE_XBOX360W) {
|
||||
- for (i = 0; xpad360_btn[i] >= 0; i++)
|
||||
- __set_bit(xpad360_btn[i], input_dev->keybit);
|
||||
- } else {
|
||||
- for (i = 0; xpad_btn[i] >= 0; i++)
|
||||
- __set_bit(xpad_btn[i], input_dev->keybit);
|
||||
- }
|
||||
-
|
||||
- if (xpad->mapping & MAP_DPAD_TO_BUTTONS) {
|
||||
- for (i = 0; xpad_btn_pad[i] >= 0; i++)
|
||||
- __set_bit(xpad_btn_pad[i], input_dev->keybit);
|
||||
- } else {
|
||||
- for (i = 0; xpad_abs_pad[i] >= 0; i++)
|
||||
- xpad_set_up_abs(input_dev, xpad_abs_pad[i]);
|
||||
- }
|
||||
-
|
||||
- if (xpad->mapping & MAP_TRIGGERS_TO_BUTTONS) {
|
||||
- for (i = 0; xpad_btn_triggers[i] >= 0; i++)
|
||||
- __set_bit(xpad_btn_triggers[i], input_dev->keybit);
|
||||
- } else {
|
||||
- for (i = 0; xpad_abs_triggers[i] >= 0; i++)
|
||||
- xpad_set_up_abs(input_dev, xpad_abs_triggers[i]);
|
||||
- }
|
||||
-
|
||||
error = xpad_init_output(intf, xpad);
|
||||
if (error)
|
||||
goto fail3;
|
||||
|
||||
- error = xpad_init_ff(xpad);
|
||||
- if (error)
|
||||
- goto fail4;
|
||||
+ usb_make_path(xpad->udev, xpad->phys, sizeof(xpad->phys));
|
||||
+ strlcat(xpad->phys, "/input0", sizeof(xpad->phys));
|
||||
|
||||
error = xpad_led_probe(xpad);
|
||||
if (error)
|
||||
@@ -963,10 +1063,6 @@
|
||||
xpad->irq_in->transfer_dma = xpad->idata_dma;
|
||||
xpad->irq_in->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
|
||||
|
||||
- error = input_register_device(xpad->dev);
|
||||
- if (error)
|
||||
- goto fail6;
|
||||
-
|
||||
usb_set_intfdata(intf, xpad);
|
||||
|
||||
if (xpad->xtype == XTYPE_XBOX360W) {
|
||||
@@ -974,6 +1070,7 @@
|
||||
* Setup the message to set the LEDs on the
|
||||
* controller when it shows up
|
||||
*/
|
||||
+ spin_lock(&xpad->odata_lock);
|
||||
xpad->bulk_out = usb_alloc_urb(0, GFP_KERNEL);
|
||||
if (!xpad->bulk_out) {
|
||||
error = -ENOMEM;
|
||||
@@ -1015,23 +1112,55 @@
|
||||
*/
|
||||
xpad->irq_in->dev = xpad->udev;
|
||||
error = usb_submit_urb(xpad->irq_in, GFP_KERNEL);
|
||||
+
|
||||
+ spin_unlock(&xpad->odata_lock);
|
||||
if (error)
|
||||
goto fail9;
|
||||
+
|
||||
+ // I don't know how to check controller state on driver load so just slam them
|
||||
+ // off so that people have to turn them on, triggering a state update
|
||||
+
|
||||
+ // got the power off packet from an OSX reverse-engineered driver:
|
||||
+ // http://tattiebogle.net/index.php/ProjectRoot/Xbox360Controller/OsxDriver#toc1
|
||||
+ spin_lock(&xpad->odata_lock);
|
||||
+ xpad->odata[0] = 0x00;
|
||||
+ xpad->odata[1] = 0x00;
|
||||
+ xpad->odata[2] = 0x08;
|
||||
+ xpad->odata[3] = 0xC0;
|
||||
+ xpad->odata[4] = 0x00;
|
||||
+ xpad->odata[5] = 0x00;
|
||||
+ xpad->odata[6] = 0x00;
|
||||
+ xpad->odata[7] = 0x00;
|
||||
+ xpad->odata[8] = 0x00;
|
||||
+ xpad->odata[9] = 0x00;
|
||||
+ xpad->odata[10] = 0x00;
|
||||
+ xpad->odata[11] = 0x00;
|
||||
+ xpad->irq_out->transfer_buffer_length = 12;
|
||||
+ usb_submit_urb(xpad->irq_out, GFP_KERNEL);
|
||||
+ spin_unlock(&xpad->odata_lock);
|
||||
+ } else {
|
||||
+ my_work_t *work;
|
||||
+ xpad->pad_present = 1;
|
||||
+
|
||||
+ work = (my_work_t *)kmalloc(sizeof(my_work_t), GFP_KERNEL);
|
||||
+ INIT_WORK( (struct work_struct *)work, my_wq_function );
|
||||
+ work->xpad = xpad;
|
||||
+ queue_work( my_wq, (struct work_struct *)work );
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail9: kfree(xpad->bdata);
|
||||
fail8: usb_free_urb(xpad->bulk_out);
|
||||
- fail7: input_unregister_device(input_dev);
|
||||
- input_dev = NULL;
|
||||
+ fail7: //input_unregister_device(input_dev);
|
||||
+ //input_dev = NULL;
|
||||
fail6: xpad_led_disconnect(xpad);
|
||||
- fail5: if (input_dev)
|
||||
- input_ff_destroy(input_dev);
|
||||
+ fail5: //if (input_dev)
|
||||
+ //input_ff_destroy(input_dev);
|
||||
fail4: xpad_deinit_output(xpad);
|
||||
fail3: usb_free_urb(xpad->irq_in);
|
||||
fail2: usb_free_coherent(udev, XPAD_PKT_LEN, xpad->idata, xpad->idata_dma);
|
||||
- fail1: input_free_device(input_dev);
|
||||
+ fail1: //input_free_device(input_dev);
|
||||
kfree(xpad);
|
||||
return error;
|
||||
|
||||
@@ -1041,8 +1170,14 @@
|
||||
{
|
||||
struct usb_xpad *xpad = usb_get_intfdata (intf);
|
||||
|
||||
+// printk("xpad_disconnect\n");
|
||||
xpad_led_disconnect(xpad);
|
||||
- input_unregister_device(xpad->dev);
|
||||
+
|
||||
+ if (xpad->pad_present)
|
||||
+ {
|
||||
+ xpad->pad_present = 0;
|
||||
+ input_unregister_device(xpad->dev);
|
||||
+ }
|
||||
xpad_deinit_output(xpad);
|
||||
|
||||
if (xpad->xtype == XTYPE_XBOX360W) {
|
@ -1,21 +0,0 @@
|
||||
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c 2013-07-21 16:06:37.443909481 +0200
|
||||
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c 2013-07-21 16:11:10.696335476 +0200
|
||||
@@ -1470,15 +1470,18 @@
|
||||
}
|
||||
|
||||
#define BRCMF_USB_VENDOR_ID_BROADCOM 0x0a5c
|
||||
+#define BRCMF_USB_VENDOR_ID_LINKSYS 0x13b1
|
||||
#define BRCMF_USB_DEVICE_ID_43143 0xbd1e
|
||||
#define BRCMF_USB_DEVICE_ID_43236 0xbd17
|
||||
#define BRCMF_USB_DEVICE_ID_43242 0xbd1f
|
||||
+#define BRCMF_USB_DEVICE_ID_AE2500 0x003a
|
||||
#define BRCMF_USB_DEVICE_ID_BCMFW 0x0bdc
|
||||
|
||||
static struct usb_device_id brcmf_usb_devid_table[] = {
|
||||
{ USB_DEVICE(BRCMF_USB_VENDOR_ID_BROADCOM, BRCMF_USB_DEVICE_ID_43143) },
|
||||
{ USB_DEVICE(BRCMF_USB_VENDOR_ID_BROADCOM, BRCMF_USB_DEVICE_ID_43236) },
|
||||
{ USB_DEVICE(BRCMF_USB_VENDOR_ID_BROADCOM, BRCMF_USB_DEVICE_ID_43242) },
|
||||
+ { USB_DEVICE(BRCMF_USB_VENDOR_ID_LINKSYS, BRCMF_USB_DEVICE_ID_AE2500) },
|
||||
/* special entry for device with firmware loaded and running */
|
||||
{ USB_DEVICE(BRCMF_USB_VENDOR_ID_BROADCOM, BRCMF_USB_DEVICE_ID_BCMFW) },
|
||||
{ }
|
Loading…
x
Reference in New Issue
Block a user