summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
Diffstat (limited to 'patches')
-rw-r--r--patches/collateral-evolutions/network/0025-usb-sg/usbnet.patch12
-rw-r--r--patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch12
-rw-r--r--patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch81
-rw-r--r--patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_bcm.patch4
-rw-r--r--patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_intel.patch42
5 files changed, 28 insertions, 123 deletions
diff --git a/patches/collateral-evolutions/network/0025-usb-sg/usbnet.patch b/patches/collateral-evolutions/network/0025-usb-sg/usbnet.patch
index 3618f9c7..6d9a01e6 100644
--- a/patches/collateral-evolutions/network/0025-usb-sg/usbnet.patch
+++ b/patches/collateral-evolutions/network/0025-usb-sg/usbnet.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
-@@ -1249,6 +1249,7 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
+@@ -1266,6 +1266,7 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
/*-------------------------------------------------------------------------*/
@@ -8,7 +8,7 @@
static int build_dma_sg(const struct sk_buff *skb, struct urb *urb)
{
unsigned num_sgs, total_len = 0;
-@@ -1281,6 +1282,12 @@ static int build_dma_sg(const struct sk_
+@@ -1298,6 +1299,12 @@ static int build_dma_sg(const struct sk_
return 1;
}
@@ -21,7 +21,7 @@
netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
struct net_device *net)
-@@ -1337,12 +1344,19 @@ netdev_tx_t usbnet_start_xmit (struct sk
+@@ -1354,12 +1361,19 @@ netdev_tx_t usbnet_start_xmit (struct sk
if (!(info->flags & FLAG_SEND_ZLP)) {
if (!(info->flags & FLAG_MULTI_PACKET)) {
length++;
@@ -41,7 +41,7 @@
}
} else
urb->transfer_flags |= URB_ZERO_PACKET;
-@@ -1409,7 +1423,9 @@ not_drop:
+@@ -1426,7 +1440,9 @@ not_drop:
if (skb)
dev_kfree_skb_any (skb);
if (urb) {
@@ -51,7 +51,7 @@
usb_free_urb(urb);
}
} else
-@@ -1462,7 +1478,9 @@ static void usbnet_bh (unsigned long par
+@@ -1479,7 +1495,9 @@ static void usbnet_bh (unsigned long par
rx_process (dev, skb);
continue;
case tx_done:
@@ -61,7 +61,7 @@
case rx_cleanup:
usb_free_urb (entry->urb);
dev_kfree_skb (skb);
-@@ -1818,7 +1836,9 @@ int usbnet_resume (struct usb_interface
+@@ -1835,7 +1853,9 @@ int usbnet_resume (struct usb_interface
retval = usb_submit_urb(res, GFP_ATOMIC);
if (retval < 0) {
dev_kfree_skb_any(skb);
diff --git a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch
index 59a8694d..10b3da6a 100644
--- a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch
+++ b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/btusb.patch
@@ -1,6 +1,6 @@
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
-@@ -1764,8 +1764,12 @@ static void btusb_intel_bootup(struct bt
+@@ -1762,8 +1762,12 @@ static void btusb_intel_bootup(struct bt
return;
if (test_and_clear_bit(BTUSB_BOOTING, &data->flags)) {
@@ -13,7 +13,7 @@
}
}
-@@ -1782,8 +1786,12 @@ static void btusb_intel_secure_send_resu
+@@ -1780,8 +1784,12 @@ static void btusb_intel_secure_send_resu
if (test_and_clear_bit(BTUSB_DOWNLOADING, &data->flags) &&
test_bit(BTUSB_FIRMWARE_LOADED, &data->flags)) {
@@ -26,7 +26,7 @@
}
}
-@@ -2138,6 +2146,7 @@ static int btusb_setup_intel_new(struct
+@@ -2136,6 +2144,7 @@ static int btusb_setup_intel_new(struct
* and thus just timeout if that happens and fail the setup
* of this device.
*/
@@ -34,7 +34,7 @@
err = wait_on_bit_timeout(&data->flags, BTUSB_DOWNLOADING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(5000));
-@@ -2152,6 +2161,31 @@ static int btusb_setup_intel_new(struct
+@@ -2150,6 +2159,31 @@ static int btusb_setup_intel_new(struct
err = -ETIMEDOUT;
goto done;
}
@@ -66,7 +66,7 @@
if (test_bit(BTUSB_FIRMWARE_FAILED, &data->flags)) {
BT_ERR("%s: Firmware loading failed", hdev->name);
-@@ -2191,6 +2225,7 @@ done:
+@@ -2189,6 +2223,7 @@ done:
*/
BT_INFO("%s: Waiting for device to boot", hdev->name);
@@ -74,7 +74,7 @@
err = wait_on_bit_timeout(&data->flags, BTUSB_BOOTING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(1000));
-@@ -2204,6 +2239,33 @@ done:
+@@ -2202,6 +2237,33 @@ done:
BT_ERR("%s: Device boot timeout", hdev->name);
return -ETIMEDOUT;
}
diff --git a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch
index 89e42d14..54d7bdf0 100644
--- a/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch
+++ b/patches/collateral-evolutions/network/0053-remove_wait_on_bit_timeout/hci_intel.patch
@@ -1,6 +1,6 @@
--- a/drivers/bluetooth/hci_intel.c
+++ b/drivers/bluetooth/hci_intel.c
-@@ -122,8 +122,9 @@ static u8 intel_convert_speed(unsigned i
+@@ -94,8 +94,9 @@ static u8 intel_convert_speed(unsigned i
static int intel_wait_booting(struct hci_uart *hu)
{
struct intel_data *intel = hu->priv;
@@ -11,8 +11,8 @@
err = wait_on_bit_timeout(&intel->flags, STATE_BOOTING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(1000));
-@@ -137,6 +138,33 @@ static int intel_wait_booting(struct hci
- bt_dev_err(hu->hdev, "Device boot timeout");
+@@ -109,6 +110,33 @@ static int intel_wait_booting(struct hci
+ BT_ERR("%s: Device boot timeout", hu->hdev->name);
return -ETIMEDOUT;
}
+#else
@@ -45,48 +45,7 @@
return err;
}
-@@ -144,8 +172,9 @@ static int intel_wait_booting(struct hci
- static int intel_wait_lpm_transaction(struct hci_uart *hu)
- {
- struct intel_data *intel = hu->priv;
-- int err;
-+ int err = 0;
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
- err = wait_on_bit_timeout(&intel->flags, STATE_LPM_TRANSACTION,
- TASK_INTERRUPTIBLE,
- msecs_to_jiffies(1000));
-@@ -159,6 +188,29 @@ static int intel_wait_lpm_transaction(st
- bt_dev_err(hu->hdev, "LPM transaction timeout");
- return -ETIMEDOUT;
- }
-+#else
-+ if (test_bit(STATE_LPM_TRANSACTION, &intel->flags)) {
-+ DECLARE_WAITQUEUE(wait, current);
-+ signed long timeout;
-+
-+ add_wait_queue(&hu->hdev->req_wait_q, &wait);
-+ set_current_state(TASK_INTERRUPTIBLE);
-+
-+ timeout = schedule_timeout(msecs_to_jiffies(1000));
-+
-+ remove_wait_queue(&hu->hdev->req_wait_q, &wait);
-+
-+ if (signal_pending(current)) {
-+ BT_ERR("%s: LPM transaction interrupted", hu->hdev->name);
-+ return -EINTR;
-+ }
-+
-+ if (!timeout) {
-+ BT_ERR("%s: LPM transaction timeout", hu->hdev->name);
-+ return -ETIMEDOUT;
-+ }
-+ }
-+#endif
-
- return err;
- }
-@@ -826,6 +878,7 @@ static int intel_setup(struct hci_uart *
+@@ -576,6 +604,7 @@ static int intel_setup(struct hci_uart *
* and thus just timeout if that happens and fail the setup
* of this device.
*/
@@ -94,7 +53,7 @@
err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING,
TASK_INTERRUPTIBLE,
msecs_to_jiffies(5000));
-@@ -840,6 +893,33 @@ static int intel_setup(struct hci_uart *
+@@ -590,6 +619,33 @@ static int intel_setup(struct hci_uart *
err = -ETIMEDOUT;
goto done;
}
@@ -127,8 +86,8 @@
+#endif
if (test_bit(STATE_FIRMWARE_FAILED, &intel->flags)) {
- bt_dev_err(hdev, "Firmware loading failed");
-@@ -968,8 +1048,12 @@ static int intel_recv_event(struct hci_d
+ BT_ERR("%s: Firmware loading failed", hdev->name);
+@@ -689,8 +745,12 @@ static int intel_recv_event(struct hci_d
if (test_and_clear_bit(STATE_DOWNLOADING, &intel->flags) &&
test_bit(STATE_FIRMWARE_LOADED, &intel->flags)) {
@@ -141,7 +100,7 @@
}
/* When switching to the operational firmware the device
-@@ -979,8 +1063,12 @@ static int intel_recv_event(struct hci_d
+@@ -700,8 +760,12 @@ static int intel_recv_event(struct hci_d
} else if (skb->len == 9 && hdr->evt == 0xff && hdr->plen == 0x07 &&
skb->data[2] == 0x02) {
if (test_and_clear_bit(STATE_BOOTING, &intel->flags)) {
@@ -154,27 +113,3 @@
}
}
recv:
-@@ -1019,15 +1107,23 @@ static int intel_recv_lpm(struct hci_dev
- case LPM_OP_SUSPEND_ACK:
- set_bit(STATE_SUSPENDED, &intel->flags);
- if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
- smp_mb__after_atomic();
- wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION);
-+#else
-+ wake_up_interruptible(&hu->hdev->req_wait_q);
-+#endif
- }
- break;
- case LPM_OP_RESUME_ACK:
- clear_bit(STATE_SUSPENDED, &intel->flags);
- if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
- smp_mb__after_atomic();
- wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION);
-+#else
-+ wake_up_interruptible(&hu->hdev->req_wait_q);
-+#endif
- }
- break;
- default:
diff --git a/patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_bcm.patch b/patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_bcm.patch
index 76e90f08..1d24e478 100644
--- a/patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_bcm.patch
+++ b/patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_bcm.patch
@@ -28,7 +28,7 @@
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
gpiod_set_value(bdev->device_wakeup, false);
+#endif
- bt_dev_dbg(bdev, "suspend, delaying 15 ms");
+ BT_DBG("suspend, delaying 15 ms");
mdelay(15);
}
@@ -376,7 +382,9 @@ static int bcm_resume(struct device *dev
@@ -38,7 +38,7 @@
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
gpiod_set_value(bdev->device_wakeup, true);
+#endif
- bt_dev_dbg(bdev, "resume, delaying 15 ms");
+ BT_DBG("resume, delaying 15 ms");
mdelay(15);
}
@@ -395,6 +403,7 @@ unlock:
diff --git a/patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_intel.patch b/patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_intel.patch
index a6a7d0f4..505d1025 100644
--- a/patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_intel.patch
+++ b/patches/collateral-evolutions/network/0062-acpi-gpio-remove/hci_intel.patch
@@ -8,19 +8,19 @@
#include <linux/gpio/consumer.h>
+#endif
#include <linux/acpi.h>
- #include <linux/interrupt.h>
- #include <linux/pm_runtime.h>
-@@ -374,7 +376,9 @@ static int intel_set_power(struct hci_ua
+
+ #include <net/bluetooth/bluetooth.h>
+@@ -166,7 +168,9 @@ static int intel_set_power(struct hci_ua
BT_INFO("hu %p, Switching compatible pm device (%s) to %u",
hu, dev_name(&idev->pdev->dev), powered);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
gpiod_set_value(idev->reset, powered);
+#endif
+ }
- /* Provide to idev a hu reference which is used to run LPM
- * transactions (lpm suspend/resume) from PM callbacks.
-@@ -1322,14 +1326,17 @@ static int intel_probe(struct platform_d
+ spin_unlock(&intel_device_list_lock);
+@@ -895,12 +899,14 @@ static int intel_probe(struct platform_d
return -ENODEV;
}
@@ -33,35 +33,5 @@
}
+#endif
- idev->irq = platform_get_irq(pdev, 0);
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
- if (idev->irq < 0) {
- struct gpio_desc *host_wake;
-
-@@ -1348,12 +1355,15 @@ static int intel_probe(struct platform_d
- goto no_irq;
- }
- }
-+#endif
-
- /* Only enable wake-up/irq when controller is powered */
- device_set_wakeup_capable(&pdev->dev, true);
- device_wakeup_disable(&pdev->dev);
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
- no_irq:
-+#endif
platform_set_drvdata(pdev, idev);
- /* Place this instance on the device list */
-@@ -1361,8 +1371,10 @@ no_irq:
- list_add_tail(&idev->list, &intel_device_list);
- mutex_unlock(&intel_device_list_lock);
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0)
- dev_info(&pdev->dev, "registered, gpio(%d)/irq(%d).\n",
- desc_to_gpio(idev->reset), idev->irq);
-+#endif
-
- return 0;
- }