Magellan Linux

Contents of /trunk/kernel-magellan/patches-3.13/0100-3.13.1-all-fixes.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2406 - (show annotations) (download)
Wed Feb 12 09:25:27 2014 UTC (10 years, 2 months ago) by niro
File size: 8164 byte(s)
-linux-3.13.1
1 diff --git a/Makefile b/Makefile
2 index b8b7f74696b4..de4cda986be2 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,6 +1,6 @@
6 VERSION = 3
7 PATCHLEVEL = 13
8 -SUBLEVEL = 0
9 +SUBLEVEL = 1
10 EXTRAVERSION =
11 NAME = One Giant Leap for Frogkind
12
13 diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c
14 index 7e0dff58e494..4736a9c57efa 100644
15 --- a/drivers/extcon/extcon-gpio.c
16 +++ b/drivers/extcon/extcon-gpio.c
17 @@ -105,6 +105,12 @@ static int gpio_extcon_probe(struct platform_device *pdev)
18 extcon_data->state_off = pdata->state_off;
19 if (pdata->state_on && pdata->state_off)
20 extcon_data->edev.print_state = extcon_gpio_print_state;
21 +
22 + ret = devm_gpio_request_one(&pdev->dev, extcon_data->gpio, GPIOF_DIR_IN,
23 + pdev->name);
24 + if (ret < 0)
25 + return ret;
26 +
27 if (pdata->debounce) {
28 ret = gpio_set_debounce(extcon_data->gpio,
29 pdata->debounce * 1000);
30 @@ -117,11 +123,6 @@ static int gpio_extcon_probe(struct platform_device *pdev)
31 if (ret < 0)
32 return ret;
33
34 - ret = devm_gpio_request_one(&pdev->dev, extcon_data->gpio, GPIOF_DIR_IN,
35 - pdev->name);
36 - if (ret < 0)
37 - goto err;
38 -
39 INIT_DELAYED_WORK(&extcon_data->work, gpio_extcon_work);
40
41 extcon_data->irq = gpio_to_irq(extcon_data->gpio);
42 diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
43 index cbb15716a5db..03f82ab87d9e 100644
44 --- a/drivers/md/raid5.c
45 +++ b/drivers/md/raid5.c
46 @@ -675,8 +675,10 @@ get_active_stripe(struct r5conf *conf, sector_t sector,
47 || !conf->inactive_blocked),
48 *(conf->hash_locks + hash));
49 conf->inactive_blocked = 0;
50 - } else
51 + } else {
52 init_stripe(sh, sector, previous);
53 + atomic_inc(&sh->count);
54 + }
55 } else {
56 spin_lock(&conf->device_lock);
57 if (atomic_read(&sh->count)) {
58 @@ -695,13 +697,11 @@ get_active_stripe(struct r5conf *conf, sector_t sector,
59 sh->group = NULL;
60 }
61 }
62 + atomic_inc(&sh->count);
63 spin_unlock(&conf->device_lock);
64 }
65 } while (sh == NULL);
66
67 - if (sh)
68 - atomic_inc(&sh->count);
69 -
70 spin_unlock_irq(conf->hash_locks + hash);
71 return sh;
72 }
73 @@ -2111,6 +2111,7 @@ static void raid5_end_write_request(struct bio *bi, int error)
74 set_bit(R5_MadeGoodRepl, &sh->dev[i].flags);
75 } else {
76 if (!uptodate) {
77 + set_bit(STRIPE_DEGRADED, &sh->state);
78 set_bit(WriteErrorSeen, &rdev->flags);
79 set_bit(R5_WriteError, &sh->dev[i].flags);
80 if (!test_and_set_bit(WantReplacement, &rdev->flags))
81 diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
82 index f3d59e2a1152..341decfb81d1 100644
83 --- a/drivers/staging/comedi/comedi_fops.c
84 +++ b/drivers/staging/comedi/comedi_fops.c
85 @@ -1425,6 +1425,7 @@ static int do_cmd_ioctl(struct comedi_device *dev,
86 async->cmd.chanlist_len * sizeof(int));
87 if (IS_ERR(async->cmd.chanlist)) {
88 ret = PTR_ERR(async->cmd.chanlist);
89 + async->cmd.chanlist = NULL;
90 DPRINTK("memdup_user failed with code %d\n", ret);
91 goto cleanup;
92 }
93 @@ -1547,6 +1548,7 @@ static int do_cmdtest_ioctl(struct comedi_device *dev,
94 cmd.chanlist_len * sizeof(int));
95 if (IS_ERR(chanlist)) {
96 ret = PTR_ERR(chanlist);
97 + chanlist = NULL;
98 DPRINTK("memdup_user exited with code %d", ret);
99 goto cleanup;
100 }
101 diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c
102 index 34ab0679e992..b95a8b3395ae 100644
103 --- a/drivers/staging/comedi/drivers/addi_apci_1032.c
104 +++ b/drivers/staging/comedi/drivers/addi_apci_1032.c
105 @@ -325,8 +325,8 @@ static int apci1032_auto_attach(struct comedi_device *dev,
106 s = &dev->subdevices[1];
107 if (dev->irq) {
108 dev->read_subdev = s;
109 - s->type = COMEDI_SUBD_DI | SDF_CMD_READ;
110 - s->subdev_flags = SDF_READABLE;
111 + s->type = COMEDI_SUBD_DI;
112 + s->subdev_flags = SDF_READABLE | SDF_CMD_READ;
113 s->n_chan = 1;
114 s->maxdata = 1;
115 s->range_table = &range_digital;
116 diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c
117 index eab8da2c3d66..a270a86a45ba 100644
118 --- a/drivers/staging/comedi/drivers/adl_pci9111.c
119 +++ b/drivers/staging/comedi/drivers/adl_pci9111.c
120 @@ -859,7 +859,7 @@ static int pci9111_auto_attach(struct comedi_device *dev,
121 pci9111_reset(dev);
122
123 if (pcidev->irq > 0) {
124 - ret = request_irq(dev->irq, pci9111_interrupt,
125 + ret = request_irq(pcidev->irq, pci9111_interrupt,
126 IRQF_SHARED, dev->board_name, dev);
127 if (ret)
128 return ret;
129 diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
130 index 7203864992a5..a0dfb86f9880 100644
131 --- a/drivers/tty/serial/amba-pl011.c
132 +++ b/drivers/tty/serial/amba-pl011.c
133 @@ -1537,6 +1537,8 @@ static int pl011_startup(struct uart_port *port)
134 /*
135 * Provoke TX FIFO interrupt into asserting.
136 */
137 + spin_lock_irq(&uap->port.lock);
138 +
139 cr = UART01x_CR_UARTEN | UART011_CR_TXE | UART011_CR_LBE;
140 writew(cr, uap->port.membase + UART011_CR);
141 writew(0, uap->port.membase + UART011_FBRD);
142 @@ -1561,6 +1563,8 @@ static int pl011_startup(struct uart_port *port)
143 cr |= UART01x_CR_UARTEN | UART011_CR_RXE | UART011_CR_TXE;
144 writew(cr, uap->port.membase + UART011_CR);
145
146 + spin_unlock_irq(&uap->port.lock);
147 +
148 /*
149 * initialise the old status of the modem signals
150 */
151 @@ -1629,11 +1633,13 @@ static void pl011_shutdown(struct uart_port *port)
152 * it during startup().
153 */
154 uap->autorts = false;
155 + spin_lock_irq(&uap->port.lock);
156 cr = readw(uap->port.membase + UART011_CR);
157 uap->old_cr = cr;
158 cr &= UART011_CR_RTS | UART011_CR_DTR;
159 cr |= UART01x_CR_UARTEN | UART011_CR_TXE;
160 writew(cr, uap->port.membase + UART011_CR);
161 + spin_unlock_irq(&uap->port.lock);
162
163 /*
164 * disable break condition and fifos
165 diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
166 index 7119504159f1..87bc2290a400 100644
167 --- a/fs/gfs2/inode.c
168 +++ b/fs/gfs2/inode.c
169 @@ -1607,10 +1607,22 @@ static int setattr_chown(struct inode *inode, struct iattr *attr)
170 if (!(attr->ia_valid & ATTR_GID) || gid_eq(ogid, ngid))
171 ogid = ngid = NO_GID_QUOTA_CHANGE;
172
173 - error = gfs2_quota_lock(ip, nuid, ngid);
174 + error = get_write_access(inode);
175 if (error)
176 return error;
177
178 + error = gfs2_rs_alloc(ip);
179 + if (error)
180 + goto out;
181 +
182 + error = gfs2_rindex_update(sdp);
183 + if (error)
184 + goto out;
185 +
186 + error = gfs2_quota_lock(ip, nuid, ngid);
187 + if (error)
188 + goto out;
189 +
190 if (!uid_eq(ouid, NO_UID_QUOTA_CHANGE) ||
191 !gid_eq(ogid, NO_GID_QUOTA_CHANGE)) {
192 error = gfs2_quota_check(ip, nuid, ngid);
193 @@ -1637,6 +1649,8 @@ out_end_trans:
194 gfs2_trans_end(sdp);
195 out_gunlock_q:
196 gfs2_quota_unlock(ip);
197 +out:
198 + put_write_access(inode);
199 return error;
200 }
201
202 diff --git a/include/linux/mm.h b/include/linux/mm.h
203 index 35527173cf50..9fac6dd69b11 100644
204 --- a/include/linux/mm.h
205 +++ b/include/linux/mm.h
206 @@ -846,11 +846,14 @@ static __always_inline void *lowmem_page_address(const struct page *page)
207 #endif
208
209 #if defined(WANT_PAGE_VIRTUAL)
210 -#define page_address(page) ((page)->virtual)
211 -#define set_page_address(page, address) \
212 - do { \
213 - (page)->virtual = (address); \
214 - } while(0)
215 +static inline void *page_address(const struct page *page)
216 +{
217 + return page->virtual;
218 +}
219 +static inline void set_page_address(struct page *page, void *address)
220 +{
221 + page->virtual = address;
222 +}
223 #define page_address_init() do { } while(0)
224 #endif
225
226 diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
227 index f281c8068557..314b77eb1216 100644
228 --- a/sound/pci/hda/patch_hdmi.c
229 +++ b/sound/pci/hda/patch_hdmi.c
230 @@ -1496,11 +1496,14 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
231 * specification worked this way. Hence, we just ignore the data in
232 * the unsolicited response to avoid custom WARs.
233 */
234 - int present = snd_hda_pin_sense(codec, pin_nid);
235 + int present;
236 bool update_eld = false;
237 bool eld_changed = false;
238 bool ret;
239
240 + snd_hda_power_up(codec);
241 + present = snd_hda_pin_sense(codec, pin_nid);
242 +
243 mutex_lock(&per_pin->lock);
244 pin_eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE);
245 if (pin_eld->monitor_present)
246 @@ -1573,6 +1576,7 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
247 jack->block_report = !ret;
248
249 mutex_unlock(&per_pin->lock);
250 + snd_hda_power_down(codec);
251 return ret;
252 }
253