aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-08-05 13:55:14 +0000
committerJonas Gorski <jogo@openwrt.org>2015-08-05 13:55:14 +0000
commitcaa73eb95c490e850d517cb558e4161c2f06d86f (patch)
tree615a1a64e1cfaaf0220f5c9ae49d465ee8566168 /target/linux/brcm2708
parent0b15f91ed6d556aafcd56ffabb9da7ba83b317f5 (diff)
downloadupstream-caa73eb95c490e850d517cb558e4161c2f06d86f.tar.gz
upstream-caa73eb95c490e850d517cb558e4161c2f06d86f.tar.bz2
upstream-caa73eb95c490e850d517cb558e4161c2f06d86f.zip
kernel: update 4.1 to 4.1.4
Changelog: * https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.1.4 Signed-off-by: Daniel Golle <daniel@makrotopia.org> [jogo: fix brcm2708 patches, refresh target patches] Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 46560
Diffstat (limited to 'target/linux/brcm2708')
-rw-r--r--target/linux/brcm2708/patches-4.1/0004-Add-dwc_otg-driver.patch2
-rw-r--r--target/linux/brcm2708/patches-4.1/0066-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch2
-rw-r--r--target/linux/brcm2708/patches-4.1/0119-Merge-pull-request-1059-from-pelwell-rpi-4.0.y.patch130
3 files changed, 13 insertions, 121 deletions
diff --git a/target/linux/brcm2708/patches-4.1/0004-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.1/0004-Add-dwc_otg-driver.patch
index 378d33b945..8af34f2239 100644
--- a/target/linux/brcm2708/patches-4.1/0004-Add-dwc_otg-driver.patch
+++ b/target/linux/brcm2708/patches-4.1/0004-Add-dwc_otg-driver.patch
@@ -894,7 +894,7 @@ dwc_otg: Fix crash when fiq_enable=0
}
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
-@@ -4922,7 +4922,7 @@ static void port_event(struct usb_hub *h
+@@ -4906,7 +4906,7 @@ static void port_event(struct usb_hub *h
if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
u16 status = 0, unused;
diff --git a/target/linux/brcm2708/patches-4.1/0066-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch b/target/linux/brcm2708/patches-4.1/0066-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch
index 6d6aa92c55..8ac90ce4bb 100644
--- a/target/linux/brcm2708/patches-4.1/0066-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch
+++ b/target/linux/brcm2708/patches-4.1/0066-Add-blk_pos-parameter-to-mmc-multi_io_quirk-callback.patch
@@ -13,7 +13,7 @@ Subject: [PATCH 066/121] Add blk_pos parameter to mmc multi_io_quirk callback
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
-@@ -1413,6 +1413,7 @@ static void mmc_blk_rw_rq_prep(struct mm
+@@ -1415,6 +1415,7 @@ static void mmc_blk_rw_rq_prep(struct mm
brq->data.blocks = card->host->ops->multi_io_quirk(card,
(rq_data_dir(req) == READ) ?
MMC_DATA_READ : MMC_DATA_WRITE,
diff --git a/target/linux/brcm2708/patches-4.1/0119-Merge-pull-request-1059-from-pelwell-rpi-4.0.y.patch b/target/linux/brcm2708/patches-4.1/0119-Merge-pull-request-1059-from-pelwell-rpi-4.0.y.patch
index 6280f75a48..ddb70dfa0e 100644
--- a/target/linux/brcm2708/patches-4.1/0119-Merge-pull-request-1059-from-pelwell-rpi-4.0.y.patch
+++ b/target/linux/brcm2708/patches-4.1/0119-Merge-pull-request-1059-from-pelwell-rpi-4.0.y.patch
@@ -51,41 +51,7 @@ w1_therm: Back-port locking improvements from 4.2-rc1
+representing the device index in the bus starting at 0.
--- a/drivers/w1/slaves/w1_therm.c
+++ b/drivers/w1/slaves/w1_therm.c
-@@ -59,16 +59,32 @@ MODULE_ALIAS("w1-family-" __stringify(W1
- static int w1_strong_pullup = 1;
- module_param_named(strong_pullup, w1_strong_pullup, int, 0);
-
-+struct w1_therm_family_data {
-+ uint8_t rom[9];
-+ atomic_t refcnt;
-+};
-+
-+/* return the address of the refcnt in the family data */
-+#define THERM_REFCNT(family_data) \
-+ (&((struct w1_therm_family_data*)family_data)->refcnt)
-+
- static int w1_therm_add_slave(struct w1_slave *sl)
- {
-- sl->family_data = kzalloc(9, GFP_KERNEL);
-+ sl->family_data = kzalloc(sizeof(struct w1_therm_family_data),
-+ GFP_KERNEL);
- if (!sl->family_data)
- return -ENOMEM;
-+ atomic_set(THERM_REFCNT(sl->family_data), 1);
- return 0;
- }
-
- static void w1_therm_remove_slave(struct w1_slave *sl)
- {
-+ int refcnt = atomic_sub_return(1, THERM_REFCNT(sl->family_data));
-+ while(refcnt) {
-+ msleep(1000);
-+ refcnt = atomic_read(THERM_REFCNT(sl->family_data));
-+ }
- kfree(sl->family_data);
- sl->family_data = NULL;
- }
-@@ -76,13 +92,24 @@ static void w1_therm_remove_slave(struct
+@@ -92,13 +92,24 @@ static void w1_therm_remove_slave(struct
static ssize_t w1_slave_show(struct device *device,
struct device_attribute *attr, char *buf);
@@ -110,7 +76,7 @@ w1_therm: Back-port locking improvements from 4.2-rc1
static struct w1_family_ops w1_therm_fops = {
.add_slave = w1_therm_add_slave,
-@@ -90,6 +117,12 @@ static struct w1_family_ops w1_therm_fop
+@@ -106,6 +117,12 @@ static struct w1_family_ops w1_therm_fop
.groups = w1_therm_groups,
};
@@ -123,7 +89,7 @@ w1_therm: Back-port locking improvements from 4.2-rc1
static struct w1_family w1_therm_family_DS18S20 = {
.fid = W1_THERM_DS18S20,
.fops = &w1_therm_fops,
-@@ -107,7 +140,7 @@ static struct w1_family w1_therm_family_
+@@ -123,7 +140,7 @@ static struct w1_family w1_therm_family_
static struct w1_family w1_therm_family_DS28EA00 = {
.fid = W1_THERM_DS28EA00,
@@ -132,86 +98,10 @@ w1_therm: Back-port locking improvements from 4.2-rc1
};
static struct w1_family w1_therm_family_DS1825 = {
-@@ -194,13 +227,22 @@ static ssize_t w1_slave_show(struct devi
- struct w1_slave *sl = dev_to_w1_slave(device);
- struct w1_master *dev = sl->master;
- u8 rom[9], crc, verdict, external_power;
-- int i, max_trying = 10;
-+ int i, ret, max_trying = 10;
- ssize_t c = PAGE_SIZE;
-+ u8 *family_data = sl->family_data;
-
-- i = mutex_lock_interruptible(&dev->bus_mutex);
-- if (i != 0)
-- return i;
-+ ret = mutex_lock_interruptible(&dev->bus_mutex);
-+ if (ret != 0)
-+ goto post_unlock;
-+
-+ if(!sl->family_data)
-+ {
-+ ret = -ENODEV;
-+ goto pre_unlock;
-+ }
-
-+ /* prevent the slave from going away in sleep */
-+ atomic_inc(THERM_REFCNT(family_data));
- memset(rom, 0, sizeof(rom));
-
- while (max_trying--) {
-@@ -230,17 +272,19 @@ static ssize_t w1_slave_show(struct devi
- mutex_unlock(&dev->bus_mutex);
-
- sleep_rem = msleep_interruptible(tm);
-- if (sleep_rem != 0)
-- return -EINTR;
-+ if (sleep_rem != 0) {
-+ ret = -EINTR;
-+ goto post_unlock;
-+ }
-
-- i = mutex_lock_interruptible(&dev->bus_mutex);
-- if (i != 0)
-- return i;
-+ ret = mutex_lock_interruptible(&dev->bus_mutex);
-+ if (ret != 0)
-+ goto post_unlock;
- } else if (!w1_strong_pullup) {
- sleep_rem = msleep_interruptible(tm);
- if (sleep_rem != 0) {
-- mutex_unlock(&dev->bus_mutex);
-- return -EINTR;
-+ ret = -EINTR;
-+ goto pre_unlock;
- }
- }
-
-@@ -269,19 +313,107 @@ static ssize_t w1_slave_show(struct devi
- c -= snprintf(buf + PAGE_SIZE - c, c, ": crc=%02x %s\n",
- crc, (verdict) ? "YES" : "NO");
- if (verdict)
-- memcpy(sl->family_data, rom, sizeof(rom));
-+ memcpy(family_data, rom, sizeof(rom));
- else
- dev_warn(device, "Read failed CRC check\n");
-
- for (i = 0; i < 9; ++i)
- c -= snprintf(buf + PAGE_SIZE - c, c, "%02x ",
-- ((u8 *)sl->family_data)[i]);
-+ ((u8 *)family_data)[i]);
-
- c -= snprintf(buf + PAGE_SIZE - c, c, "t=%d\n",
- w1_convert_temp(rom, sl->family->fid));
-+ ret = PAGE_SIZE - c;
-+
-+pre_unlock:
- mutex_unlock(&dev->bus_mutex);
+@@ -316,6 +333,89 @@ post_unlock:
+ return ret;
+ }
-+post_unlock:
-+ atomic_dec(THERM_REFCNT(family_data));
-+ return ret;
-+}
-+
+#define W1_42_CHAIN 0x99
+#define W1_42_CHAIN_OFF 0x3C
+#define W1_42_CHAIN_OFF_INV 0xC3
@@ -289,10 +179,12 @@ w1_therm: Back-port locking improvements from 4.2-rc1
+ mutex_unlock(&sl->master->bus_mutex);
+
+ c -= snprintf(buf + PAGE_SIZE - c, c, "%d\n", seq);
- return PAGE_SIZE - c;
++ return PAGE_SIZE - c;
+error:
+ mutex_unlock(&sl->master->bus_mutex);
+ return -EIO;
- }
-
++}
++
static int __init w1_therm_init(void)
+ {
+ int err, i;