1 |
commit: b453e452f9934fbe71320268575c40dc196880f8 |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 28 09:18:45 2022 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 28 09:18:45 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=b453e452 |
7 |
|
8 |
Linux patch 4.14.295 |
9 |
|
10 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
11 |
|
12 |
0000_README | 4 + |
13 |
1294_linux-4.14.295.patch | 848 ++++++++++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 852 insertions(+) |
15 |
|
16 |
diff --git a/0000_README b/0000_README |
17 |
index d63522c9..59ed2344 100644 |
18 |
--- a/0000_README |
19 |
+++ b/0000_README |
20 |
@@ -1223,6 +1223,10 @@ Patch: 1293_linux-4.14.294.patch |
21 |
From: https://www.kernel.org |
22 |
Desc: Linux 4.14.294 |
23 |
|
24 |
+Patch: 1294_linux-4.14.295.patch |
25 |
+From: https://www.kernel.org |
26 |
+Desc: Linux 4.14.295 |
27 |
+ |
28 |
Patch: 1500_XATTR_USER_PREFIX.patch |
29 |
From: https://bugs.gentoo.org/show_bug.cgi?id=470644 |
30 |
Desc: Support for namespace user.pax.* on tmpfs. |
31 |
|
32 |
diff --git a/1294_linux-4.14.295.patch b/1294_linux-4.14.295.patch |
33 |
new file mode 100644 |
34 |
index 00000000..fe602725 |
35 |
--- /dev/null |
36 |
+++ b/1294_linux-4.14.295.patch |
37 |
@@ -0,0 +1,848 @@ |
38 |
+diff --git a/Makefile b/Makefile |
39 |
+index 2224682414142..74c0d3f172932 100644 |
40 |
+--- a/Makefile |
41 |
++++ b/Makefile |
42 |
+@@ -1,7 +1,7 @@ |
43 |
+ # SPDX-License-Identifier: GPL-2.0 |
44 |
+ VERSION = 4 |
45 |
+ PATCHLEVEL = 14 |
46 |
+-SUBLEVEL = 294 |
47 |
++SUBLEVEL = 295 |
48 |
+ EXTRAVERSION = |
49 |
+ NAME = Petit Gorille |
50 |
+ |
51 |
+diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi |
52 |
+index 70fe6013d17c6..c5981b99f9582 100644 |
53 |
+--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi |
54 |
++++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi |
55 |
+@@ -139,7 +139,6 @@ |
56 |
+ vcc5v0_host: vcc5v0-host-regulator { |
57 |
+ compatible = "regulator-fixed"; |
58 |
+ gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>; |
59 |
+- enable-active-low; |
60 |
+ pinctrl-names = "default"; |
61 |
+ pinctrl-0 = <&vcc5v0_host_en>; |
62 |
+ regulator-name = "vcc5v0_host"; |
63 |
+diff --git a/arch/mips/cavium-octeon/octeon-irq.c b/arch/mips/cavium-octeon/octeon-irq.c |
64 |
+index a27b3d70393f7..657e626cc41eb 100644 |
65 |
+--- a/arch/mips/cavium-octeon/octeon-irq.c |
66 |
++++ b/arch/mips/cavium-octeon/octeon-irq.c |
67 |
+@@ -127,6 +127,16 @@ static void octeon_irq_free_cd(struct irq_domain *d, unsigned int irq) |
68 |
+ static int octeon_irq_force_ciu_mapping(struct irq_domain *domain, |
69 |
+ int irq, int line, int bit) |
70 |
+ { |
71 |
++ struct device_node *of_node; |
72 |
++ int ret; |
73 |
++ |
74 |
++ of_node = irq_domain_get_of_node(domain); |
75 |
++ if (!of_node) |
76 |
++ return -EINVAL; |
77 |
++ ret = irq_alloc_desc_at(irq, of_node_to_nid(of_node)); |
78 |
++ if (ret < 0) |
79 |
++ return ret; |
80 |
++ |
81 |
+ return irq_domain_associate(domain, irq, line << 6 | bit); |
82 |
+ } |
83 |
+ |
84 |
+diff --git a/arch/mips/lantiq/clk.c b/arch/mips/lantiq/clk.c |
85 |
+index f5fab99d1751c..851f6bf925a63 100644 |
86 |
+--- a/arch/mips/lantiq/clk.c |
87 |
++++ b/arch/mips/lantiq/clk.c |
88 |
+@@ -52,6 +52,7 @@ struct clk *clk_get_io(void) |
89 |
+ { |
90 |
+ return &cpu_clk_generic[2]; |
91 |
+ } |
92 |
++EXPORT_SYMBOL_GPL(clk_get_io); |
93 |
+ |
94 |
+ struct clk *clk_get_ppe(void) |
95 |
+ { |
96 |
+diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c |
97 |
+index d5f735ce0dd4c..1b213c49ec0f6 100644 |
98 |
+--- a/drivers/gpio/gpio-mpc8xxx.c |
99 |
++++ b/drivers/gpio/gpio-mpc8xxx.c |
100 |
+@@ -157,6 +157,7 @@ static int mpc8xxx_irq_set_type(struct irq_data *d, unsigned int flow_type) |
101 |
+ |
102 |
+ switch (flow_type) { |
103 |
+ case IRQ_TYPE_EDGE_FALLING: |
104 |
++ case IRQ_TYPE_LEVEL_LOW: |
105 |
+ raw_spin_lock_irqsave(&mpc8xxx_gc->lock, flags); |
106 |
+ gc->write_reg(mpc8xxx_gc->regs + GPIO_ICR, |
107 |
+ gc->read_reg(mpc8xxx_gc->regs + GPIO_ICR) |
108 |
+diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/meson_plane.c |
109 |
+index 85fa39e2be344..75132d0c5c280 100644 |
110 |
+--- a/drivers/gpu/drm/meson/meson_plane.c |
111 |
++++ b/drivers/gpu/drm/meson/meson_plane.c |
112 |
+@@ -105,7 +105,7 @@ static void meson_plane_atomic_update(struct drm_plane *plane, |
113 |
+ |
114 |
+ /* Enable OSD and BLK0, set max global alpha */ |
115 |
+ priv->viu.osd1_ctrl_stat = OSD_ENABLE | |
116 |
+- (0xFF << OSD_GLOBAL_ALPHA_SHIFT) | |
117 |
++ (0x100 << OSD_GLOBAL_ALPHA_SHIFT) | |
118 |
+ OSD_BLK0_ENABLE; |
119 |
+ |
120 |
+ /* Set up BLK0 to point to the right canvas */ |
121 |
+diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c |
122 |
+index cdf7d39362fd0..1c09b1a787f6f 100644 |
123 |
+--- a/drivers/hv/vmbus_drv.c |
124 |
++++ b/drivers/hv/vmbus_drv.c |
125 |
+@@ -1426,7 +1426,7 @@ int vmbus_allocate_mmio(struct resource **new, struct hv_device *device_obj, |
126 |
+ bool fb_overlap_ok) |
127 |
+ { |
128 |
+ struct resource *iter, *shadow; |
129 |
+- resource_size_t range_min, range_max, start; |
130 |
++ resource_size_t range_min, range_max, start, end; |
131 |
+ const char *dev_n = dev_name(&device_obj->device); |
132 |
+ int retval; |
133 |
+ |
134 |
+@@ -1461,6 +1461,14 @@ int vmbus_allocate_mmio(struct resource **new, struct hv_device *device_obj, |
135 |
+ range_max = iter->end; |
136 |
+ start = (range_min + align - 1) & ~(align - 1); |
137 |
+ for (; start + size - 1 <= range_max; start += align) { |
138 |
++ end = start + size - 1; |
139 |
++ |
140 |
++ /* Skip the whole fb_mmio region if not fb_overlap_ok */ |
141 |
++ if (!fb_overlap_ok && fb_mmio && |
142 |
++ (((start >= fb_mmio->start) && (start <= fb_mmio->end)) || |
143 |
++ ((end >= fb_mmio->start) && (end <= fb_mmio->end)))) |
144 |
++ continue; |
145 |
++ |
146 |
+ shadow = __request_region(iter, start, size, NULL, |
147 |
+ IORESOURCE_BUSY); |
148 |
+ if (!shadow) |
149 |
+diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c |
150 |
+index b736c027a0bd0..23a9fe8d9d1ef 100644 |
151 |
+--- a/drivers/media/usb/em28xx/em28xx-cards.c |
152 |
++++ b/drivers/media/usb/em28xx/em28xx-cards.c |
153 |
+@@ -3644,6 +3644,8 @@ static int em28xx_usb_probe(struct usb_interface *interface, |
154 |
+ goto err_free; |
155 |
+ } |
156 |
+ |
157 |
++ kref_init(&dev->ref); |
158 |
++ |
159 |
+ dev->devno = nr; |
160 |
+ dev->model = id->driver_info; |
161 |
+ dev->alt = -1; |
162 |
+@@ -3730,8 +3732,6 @@ static int em28xx_usb_probe(struct usb_interface *interface, |
163 |
+ dev->dvb_xfer_bulk ? "bulk" : "isoc"); |
164 |
+ } |
165 |
+ |
166 |
+- kref_init(&dev->ref); |
167 |
+- |
168 |
+ request_modules(dev); |
169 |
+ |
170 |
+ /* |
171 |
+diff --git a/drivers/net/can/usb/gs_usb.c b/drivers/net/can/usb/gs_usb.c |
172 |
+index 31c1dc0aa5cf8..5e21486baa224 100644 |
173 |
+--- a/drivers/net/can/usb/gs_usb.c |
174 |
++++ b/drivers/net/can/usb/gs_usb.c |
175 |
+@@ -686,6 +686,7 @@ static int gs_can_open(struct net_device *netdev) |
176 |
+ flags |= GS_CAN_MODE_TRIPLE_SAMPLE; |
177 |
+ |
178 |
+ /* finally start device */ |
179 |
++ dev->can.state = CAN_STATE_ERROR_ACTIVE; |
180 |
+ dm->mode = cpu_to_le32(GS_CAN_MODE_START); |
181 |
+ dm->flags = cpu_to_le32(flags); |
182 |
+ rc = usb_control_msg(interface_to_usbdev(dev->iface), |
183 |
+@@ -702,13 +703,12 @@ static int gs_can_open(struct net_device *netdev) |
184 |
+ if (rc < 0) { |
185 |
+ netdev_err(netdev, "Couldn't start device (err=%d)\n", rc); |
186 |
+ kfree(dm); |
187 |
++ dev->can.state = CAN_STATE_STOPPED; |
188 |
+ return rc; |
189 |
+ } |
190 |
+ |
191 |
+ kfree(dm); |
192 |
+ |
193 |
+- dev->can.state = CAN_STATE_ERROR_ACTIVE; |
194 |
+- |
195 |
+ parent->active_channels++; |
196 |
+ if (!(dev->can.ctrlmode & CAN_CTRLMODE_LISTENONLY)) |
197 |
+ netif_start_queue(netdev); |
198 |
+diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c |
199 |
+index 4afdabbe95e8f..d74a307da8f18 100644 |
200 |
+--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c |
201 |
++++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c |
202 |
+@@ -138,8 +138,11 @@ u32 i40evf_get_tx_pending(struct i40e_ring *ring, bool in_sw) |
203 |
+ { |
204 |
+ u32 head, tail; |
205 |
+ |
206 |
++ /* underlying hardware might not allow access and/or always return |
207 |
++ * 0 for the head/tail registers so just use the cached values |
208 |
++ */ |
209 |
+ head = ring->next_to_clean; |
210 |
+- tail = readl(ring->tail); |
211 |
++ tail = ring->next_to_use; |
212 |
+ |
213 |
+ if (head != tail) |
214 |
+ return (head < tail) ? |
215 |
+diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c |
216 |
+index 7522f277e9120..bfa8c04249139 100644 |
217 |
+--- a/drivers/net/ethernet/sun/sunhme.c |
218 |
++++ b/drivers/net/ethernet/sun/sunhme.c |
219 |
+@@ -2065,9 +2065,9 @@ static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev) |
220 |
+ |
221 |
+ skb_reserve(copy_skb, 2); |
222 |
+ skb_put(copy_skb, len); |
223 |
+- dma_sync_single_for_cpu(hp->dma_dev, dma_addr, len, DMA_FROM_DEVICE); |
224 |
++ dma_sync_single_for_cpu(hp->dma_dev, dma_addr, len + 2, DMA_FROM_DEVICE); |
225 |
+ skb_copy_from_linear_data(skb, copy_skb->data, len); |
226 |
+- dma_sync_single_for_device(hp->dma_dev, dma_addr, len, DMA_FROM_DEVICE); |
227 |
++ dma_sync_single_for_device(hp->dma_dev, dma_addr, len + 2, DMA_FROM_DEVICE); |
228 |
+ /* Reuse original ring buffer. */ |
229 |
+ hme_write_rxd(hp, this, |
230 |
+ (RXFLAG_OWN|((RX_BUF_ALLOC_SIZE-RX_OFFSET)<<16)), |
231 |
+diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c |
232 |
+index baf8aab59f82a..71fd45137ee44 100644 |
233 |
+--- a/drivers/net/ipvlan/ipvlan_core.c |
234 |
++++ b/drivers/net/ipvlan/ipvlan_core.c |
235 |
+@@ -446,7 +446,6 @@ out: |
236 |
+ |
237 |
+ static int ipvlan_process_outbound(struct sk_buff *skb) |
238 |
+ { |
239 |
+- struct ethhdr *ethh = eth_hdr(skb); |
240 |
+ int ret = NET_XMIT_DROP; |
241 |
+ |
242 |
+ /* The ipvlan is a pseudo-L2 device, so the packets that we receive |
243 |
+@@ -456,6 +455,8 @@ static int ipvlan_process_outbound(struct sk_buff *skb) |
244 |
+ if (skb_mac_header_was_set(skb)) { |
245 |
+ /* In this mode we dont care about |
246 |
+ * multicast and broadcast traffic */ |
247 |
++ struct ethhdr *ethh = eth_hdr(skb); |
248 |
++ |
249 |
+ if (is_multicast_ether_addr(ethh->h_dest)) { |
250 |
+ pr_debug_ratelimited( |
251 |
+ "Dropped {multi|broad}cast of type=[%x]\n", |
252 |
+@@ -534,7 +535,7 @@ out: |
253 |
+ static int ipvlan_xmit_mode_l2(struct sk_buff *skb, struct net_device *dev) |
254 |
+ { |
255 |
+ const struct ipvl_dev *ipvlan = netdev_priv(dev); |
256 |
+- struct ethhdr *eth = eth_hdr(skb); |
257 |
++ struct ethhdr *eth = skb_eth_hdr(skb); |
258 |
+ struct ipvl_addr *addr; |
259 |
+ void *lyr3h; |
260 |
+ int addr_type; |
261 |
+@@ -558,6 +559,7 @@ static int ipvlan_xmit_mode_l2(struct sk_buff *skb, struct net_device *dev) |
262 |
+ return dev_forward_skb(ipvlan->phy_dev, skb); |
263 |
+ |
264 |
+ } else if (is_multicast_ether_addr(eth->h_dest)) { |
265 |
++ skb_reset_mac_header(skb); |
266 |
+ ipvlan_skb_crossing_ns(skb, NULL); |
267 |
+ ipvlan_multicast_enqueue(ipvlan->port, skb, true); |
268 |
+ return NET_XMIT_SUCCESS; |
269 |
+diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c |
270 |
+index eb2360b64aad3..c7c1ff419d75d 100644 |
271 |
+--- a/drivers/net/team/team.c |
272 |
++++ b/drivers/net/team/team.c |
273 |
+@@ -1274,10 +1274,12 @@ static int team_port_add(struct team *team, struct net_device *port_dev) |
274 |
+ } |
275 |
+ } |
276 |
+ |
277 |
+- netif_addr_lock_bh(dev); |
278 |
+- dev_uc_sync_multiple(port_dev, dev); |
279 |
+- dev_mc_sync_multiple(port_dev, dev); |
280 |
+- netif_addr_unlock_bh(dev); |
281 |
++ if (dev->flags & IFF_UP) { |
282 |
++ netif_addr_lock_bh(dev); |
283 |
++ dev_uc_sync_multiple(port_dev, dev); |
284 |
++ dev_mc_sync_multiple(port_dev, dev); |
285 |
++ netif_addr_unlock_bh(dev); |
286 |
++ } |
287 |
+ |
288 |
+ port->index = -1; |
289 |
+ list_add_tail_rcu(&port->list, &team->port_list); |
290 |
+@@ -1348,8 +1350,10 @@ static int team_port_del(struct team *team, struct net_device *port_dev) |
291 |
+ netdev_rx_handler_unregister(port_dev); |
292 |
+ team_port_disable_netpoll(port); |
293 |
+ vlan_vids_del_by_dev(port_dev, dev); |
294 |
+- dev_uc_unsync(port_dev, dev); |
295 |
+- dev_mc_unsync(port_dev, dev); |
296 |
++ if (dev->flags & IFF_UP) { |
297 |
++ dev_uc_unsync(port_dev, dev); |
298 |
++ dev_mc_unsync(port_dev, dev); |
299 |
++ } |
300 |
+ dev_close(port_dev); |
301 |
+ team_port_leave(team, port); |
302 |
+ |
303 |
+@@ -1697,6 +1701,14 @@ static int team_open(struct net_device *dev) |
304 |
+ |
305 |
+ static int team_close(struct net_device *dev) |
306 |
+ { |
307 |
++ struct team *team = netdev_priv(dev); |
308 |
++ struct team_port *port; |
309 |
++ |
310 |
++ list_for_each_entry(port, &team->port_list, list) { |
311 |
++ dev_uc_unsync(port->dev, dev); |
312 |
++ dev_mc_unsync(port->dev, dev); |
313 |
++ } |
314 |
++ |
315 |
+ return 0; |
316 |
+ } |
317 |
+ |
318 |
+diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c |
319 |
+index 0c3129c9ac087..75c09ba6a45fd 100644 |
320 |
+--- a/drivers/net/usb/qmi_wwan.c |
321 |
++++ b/drivers/net/usb/qmi_wwan.c |
322 |
+@@ -1049,6 +1049,7 @@ static const struct usb_device_id products[] = { |
323 |
+ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0512)}, /* Quectel EG12/EM12 */ |
324 |
+ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0620)}, /* Quectel EM160R-GL */ |
325 |
+ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0800)}, /* Quectel RM500Q-GL */ |
326 |
++ {QMI_MATCH_FF_FF_FF(0x2c7c, 0x0801)}, /* Quectel RM520N */ |
327 |
+ |
328 |
+ /* 3. Combined interface devices matching on interface number */ |
329 |
+ {QMI_FIXED_INTF(0x0408, 0xea42, 4)}, /* Yota / Megafon M100-1 */ |
330 |
+diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c |
331 |
+index 512d3a8439c98..cc9b8c699da4a 100644 |
332 |
+--- a/drivers/of/fdt.c |
333 |
++++ b/drivers/of/fdt.c |
334 |
+@@ -425,7 +425,7 @@ static int unflatten_dt_nodes(const void *blob, |
335 |
+ for (offset = 0; |
336 |
+ offset >= 0 && depth >= initial_depth; |
337 |
+ offset = fdt_next_node(blob, offset, &depth)) { |
338 |
+- if (WARN_ON_ONCE(depth >= FDT_MAX_DEPTH)) |
339 |
++ if (WARN_ON_ONCE(depth >= FDT_MAX_DEPTH - 1)) |
340 |
+ continue; |
341 |
+ |
342 |
+ fpsizes[depth+1] = populate_node(blob, offset, &mem, |
343 |
+diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c |
344 |
+index 8b7d3e64b8cab..41a23db21392b 100644 |
345 |
+--- a/drivers/of/of_mdio.c |
346 |
++++ b/drivers/of/of_mdio.c |
347 |
+@@ -272,6 +272,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) |
348 |
+ return 0; |
349 |
+ |
350 |
+ unregister: |
351 |
++ of_node_put(child); |
352 |
+ mdiobus_unregister(mdio); |
353 |
+ return rc; |
354 |
+ } |
355 |
+diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c |
356 |
+index cc23b30337c16..afae74a99df10 100644 |
357 |
+--- a/drivers/parisc/ccio-dma.c |
358 |
++++ b/drivers/parisc/ccio-dma.c |
359 |
+@@ -1581,6 +1581,7 @@ static int __init ccio_probe(struct parisc_device *dev) |
360 |
+ } |
361 |
+ ccio_ioc_init(ioc); |
362 |
+ if (ccio_init_resources(ioc)) { |
363 |
++ iounmap(ioc->ioc_regs); |
364 |
+ kfree(ioc); |
365 |
+ return -ENOMEM; |
366 |
+ } |
367 |
+diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c |
368 |
+index 587a6bf9037b7..6b9c29d6825d4 100644 |
369 |
+--- a/drivers/regulator/pfuze100-regulator.c |
370 |
++++ b/drivers/regulator/pfuze100-regulator.c |
371 |
+@@ -614,7 +614,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client, |
372 |
+ ((pfuze_chip->chip_id == PFUZE200) ? "200" : "3000")); |
373 |
+ |
374 |
+ memcpy(pfuze_chip->regulator_descs, pfuze_chip->pfuze_regulators, |
375 |
+- sizeof(pfuze_chip->regulator_descs)); |
376 |
++ regulator_num * sizeof(struct pfuze_regulator)); |
377 |
+ |
378 |
+ ret = pfuze_parse_regulators_dt(pfuze_chip); |
379 |
+ if (ret) |
380 |
+diff --git a/drivers/s390/block/dasd_alias.c b/drivers/s390/block/dasd_alias.c |
381 |
+index 0f70cae1c01e3..a5c60211edbf8 100644 |
382 |
+--- a/drivers/s390/block/dasd_alias.c |
383 |
++++ b/drivers/s390/block/dasd_alias.c |
384 |
+@@ -675,12 +675,12 @@ int dasd_alias_remove_device(struct dasd_device *device) |
385 |
+ struct dasd_device *dasd_alias_get_start_dev(struct dasd_device *base_device) |
386 |
+ { |
387 |
+ struct dasd_eckd_private *alias_priv, *private = base_device->private; |
388 |
+- struct alias_pav_group *group = private->pavgroup; |
389 |
+ struct alias_lcu *lcu = private->lcu; |
390 |
+ struct dasd_device *alias_device; |
391 |
++ struct alias_pav_group *group; |
392 |
+ unsigned long flags; |
393 |
+ |
394 |
+- if (!group || !lcu) |
395 |
++ if (!lcu) |
396 |
+ return NULL; |
397 |
+ if (lcu->pav == NO_PAV || |
398 |
+ lcu->flags & (NEED_UAC_UPDATE | UPDATE_PENDING)) |
399 |
+@@ -697,6 +697,11 @@ struct dasd_device *dasd_alias_get_start_dev(struct dasd_device *base_device) |
400 |
+ } |
401 |
+ |
402 |
+ spin_lock_irqsave(&lcu->lock, flags); |
403 |
++ group = private->pavgroup; |
404 |
++ if (!group) { |
405 |
++ spin_unlock_irqrestore(&lcu->lock, flags); |
406 |
++ return NULL; |
407 |
++ } |
408 |
+ alias_device = group->next; |
409 |
+ if (!alias_device) { |
410 |
+ if (list_empty(&group->aliaslist)) { |
411 |
+diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c |
412 |
+index cf9b736f26f88..a13d6d4674bcc 100644 |
413 |
+--- a/drivers/tty/serial/serial-tegra.c |
414 |
++++ b/drivers/tty/serial/serial-tegra.c |
415 |
+@@ -409,7 +409,7 @@ static void tegra_uart_tx_dma_complete(void *args) |
416 |
+ count = tup->tx_bytes_requested - state.residue; |
417 |
+ async_tx_ack(tup->tx_dma_desc); |
418 |
+ spin_lock_irqsave(&tup->uport.lock, flags); |
419 |
+- xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1); |
420 |
++ uart_xmit_advance(&tup->uport, count); |
421 |
+ tup->tx_in_progress = 0; |
422 |
+ if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) |
423 |
+ uart_write_wakeup(&tup->uport); |
424 |
+@@ -493,7 +493,6 @@ static unsigned int tegra_uart_tx_empty(struct uart_port *u) |
425 |
+ static void tegra_uart_stop_tx(struct uart_port *u) |
426 |
+ { |
427 |
+ struct tegra_uart_port *tup = to_tegra_uport(u); |
428 |
+- struct circ_buf *xmit = &tup->uport.state->xmit; |
429 |
+ struct dma_tx_state state; |
430 |
+ unsigned int count; |
431 |
+ |
432 |
+@@ -504,7 +503,7 @@ static void tegra_uart_stop_tx(struct uart_port *u) |
433 |
+ dmaengine_tx_status(tup->tx_dma_chan, tup->tx_cookie, &state); |
434 |
+ count = tup->tx_bytes_requested - state.residue; |
435 |
+ async_tx_ack(tup->tx_dma_desc); |
436 |
+- xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1); |
437 |
++ uart_xmit_advance(&tup->uport, count); |
438 |
+ tup->tx_in_progress = 0; |
439 |
+ } |
440 |
+ |
441 |
+diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c |
442 |
+index 93f1a234be4f9..54fa401219c66 100644 |
443 |
+--- a/drivers/usb/core/hub.c |
444 |
++++ b/drivers/usb/core/hub.c |
445 |
+@@ -5738,7 +5738,7 @@ re_enumerate_no_bos: |
446 |
+ * |
447 |
+ * Return: The same as for usb_reset_and_verify_device(). |
448 |
+ * However, if a reset is already in progress (for instance, if a |
449 |
+- * driver doesn't have pre_ or post_reset() callbacks, and while |
450 |
++ * driver doesn't have pre_reset() or post_reset() callbacks, and while |
451 |
+ * being unbound or re-bound during the ongoing reset its disconnect() |
452 |
+ * or probe() routine tries to perform a second, nested reset), the |
453 |
+ * routine returns -EINPROGRESS. |
454 |
+diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c |
455 |
+index f0c0a4a445e7e..736a2906a15da 100644 |
456 |
+--- a/drivers/usb/serial/option.c |
457 |
++++ b/drivers/usb/serial/option.c |
458 |
+@@ -259,6 +259,7 @@ static void option_instat_callback(struct urb *urb); |
459 |
+ #define QUECTEL_PRODUCT_EM060K 0x030b |
460 |
+ #define QUECTEL_PRODUCT_EM12 0x0512 |
461 |
+ #define QUECTEL_PRODUCT_RM500Q 0x0800 |
462 |
++#define QUECTEL_PRODUCT_RM520N 0x0801 |
463 |
+ #define QUECTEL_PRODUCT_EC200S_CN 0x6002 |
464 |
+ #define QUECTEL_PRODUCT_EC200T 0x6026 |
465 |
+ #define QUECTEL_PRODUCT_RM500K 0x7001 |
466 |
+@@ -1141,6 +1142,8 @@ static const struct usb_device_id option_ids[] = { |
467 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0xff, 0xff), |
468 |
+ .driver_info = NUMEP2 }, |
469 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EG95, 0xff, 0, 0) }, |
470 |
++ { USB_DEVICE_INTERFACE_CLASS(QUECTEL_VENDOR_ID, 0x0203, 0xff), /* BG95-M3 */ |
471 |
++ .driver_info = ZLP }, |
472 |
+ { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), |
473 |
+ .driver_info = RSVD(4) }, |
474 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EP06, 0xff, 0xff, 0xff), |
475 |
+@@ -1162,6 +1165,9 @@ static const struct usb_device_id option_ids[] = { |
476 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0, 0) }, |
477 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500Q, 0xff, 0xff, 0x10), |
478 |
+ .driver_info = ZLP }, |
479 |
++ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0xff, 0x30) }, |
480 |
++ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0x40) }, |
481 |
++ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM520N, 0xff, 0, 0) }, |
482 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200S_CN, 0xff, 0, 0) }, |
483 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC200T, 0xff, 0, 0) }, |
484 |
+ { USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_RM500K, 0xff, 0x00, 0x00) }, |
485 |
+diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-gcu.c |
486 |
+index 4febbe21b9b5c..db861bb391501 100644 |
487 |
+--- a/drivers/video/fbdev/pxa3xx-gcu.c |
488 |
++++ b/drivers/video/fbdev/pxa3xx-gcu.c |
489 |
+@@ -391,7 +391,7 @@ pxa3xx_gcu_write(struct file *file, const char *buff, |
490 |
+ struct pxa3xx_gcu_batch *buffer; |
491 |
+ struct pxa3xx_gcu_priv *priv = to_pxa3xx_gcu_priv(file); |
492 |
+ |
493 |
+- int words = count / 4; |
494 |
++ size_t words = count / 4; |
495 |
+ |
496 |
+ /* Does not need to be atomic. There's a lock in user space, |
497 |
+ * but anyhow, this is just for statistics. */ |
498 |
+diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c |
499 |
+index ffc8757e5a3c3..c7c62bec9f273 100644 |
500 |
+--- a/fs/cifs/transport.c |
501 |
++++ b/fs/cifs/transport.c |
502 |
+@@ -153,8 +153,8 @@ smb_send_kvec(struct TCP_Server_Info *server, struct msghdr *smb_msg, |
503 |
+ |
504 |
+ *sent = 0; |
505 |
+ |
506 |
+- smb_msg->msg_name = (struct sockaddr *) &server->dstaddr; |
507 |
+- smb_msg->msg_namelen = sizeof(struct sockaddr); |
508 |
++ smb_msg->msg_name = NULL; |
509 |
++ smb_msg->msg_namelen = 0; |
510 |
+ smb_msg->msg_control = NULL; |
511 |
+ smb_msg->msg_controllen = 0; |
512 |
+ if (server->noblocksnd) |
513 |
+diff --git a/fs/ext4/ialloc.c b/fs/ext4/ialloc.c |
514 |
+index e6520627a84a4..e45398c323ee7 100644 |
515 |
+--- a/fs/ext4/ialloc.c |
516 |
++++ b/fs/ext4/ialloc.c |
517 |
+@@ -513,7 +513,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent, |
518 |
+ goto fallback; |
519 |
+ } |
520 |
+ |
521 |
+- max_dirs = ndirs / ngroups + inodes_per_group / 16; |
522 |
++ max_dirs = ndirs / ngroups + inodes_per_group*flex_size / 16; |
523 |
+ min_inodes = avefreei - inodes_per_group*flex_size / 4; |
524 |
+ if (min_inodes < 1) |
525 |
+ min_inodes = 1; |
526 |
+diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h |
527 |
+index b2a7b7c15451b..95d1ffede87fb 100644 |
528 |
+--- a/include/linux/serial_core.h |
529 |
++++ b/include/linux/serial_core.h |
530 |
+@@ -298,6 +298,23 @@ struct uart_state { |
531 |
+ /* number of characters left in xmit buffer before we ask for more */ |
532 |
+ #define WAKEUP_CHARS 256 |
533 |
+ |
534 |
++/** |
535 |
++ * uart_xmit_advance - Advance xmit buffer and account Tx'ed chars |
536 |
++ * @up: uart_port structure describing the port |
537 |
++ * @chars: number of characters sent |
538 |
++ * |
539 |
++ * This function advances the tail of circular xmit buffer by the number of |
540 |
++ * @chars transmitted and handles accounting of transmitted bytes (into |
541 |
++ * @up's icount.tx). |
542 |
++ */ |
543 |
++static inline void uart_xmit_advance(struct uart_port *up, unsigned int chars) |
544 |
++{ |
545 |
++ struct circ_buf *xmit = &up->state->xmit; |
546 |
++ |
547 |
++ xmit->tail = (xmit->tail + chars) & (UART_XMIT_SIZE - 1); |
548 |
++ up->icount.tx += chars; |
549 |
++} |
550 |
++ |
551 |
+ struct module; |
552 |
+ struct tty_driver; |
553 |
+ |
554 |
+diff --git a/mm/slub.c b/mm/slub.c |
555 |
+index 0120ce3867b74..1a0c92ee8b993 100644 |
556 |
+--- a/mm/slub.c |
557 |
++++ b/mm/slub.c |
558 |
+@@ -5672,7 +5672,8 @@ static char *create_unique_id(struct kmem_cache *s) |
559 |
+ char *name = kmalloc(ID_STR_LENGTH, GFP_KERNEL); |
560 |
+ char *p = name; |
561 |
+ |
562 |
+- BUG_ON(!name); |
563 |
++ if (!name) |
564 |
++ return ERR_PTR(-ENOMEM); |
565 |
+ |
566 |
+ *p++ = ':'; |
567 |
+ /* |
568 |
+@@ -5752,6 +5753,8 @@ static int sysfs_slab_add(struct kmem_cache *s) |
569 |
+ * for the symlinks. |
570 |
+ */ |
571 |
+ name = create_unique_id(s); |
572 |
++ if (IS_ERR(name)) |
573 |
++ return PTR_ERR(name); |
574 |
+ } |
575 |
+ |
576 |
+ s->kobj.kset = kset; |
577 |
+diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c |
578 |
+index a54149f10f7ef..84d4b4a0b0536 100644 |
579 |
+--- a/net/bridge/netfilter/ebtables.c |
580 |
++++ b/net/bridge/netfilter/ebtables.c |
581 |
+@@ -991,8 +991,10 @@ static int do_replace_finish(struct net *net, struct ebt_replace *repl, |
582 |
+ goto free_iterate; |
583 |
+ } |
584 |
+ |
585 |
+- if (repl->valid_hooks != t->valid_hooks) |
586 |
++ if (repl->valid_hooks != t->valid_hooks) { |
587 |
++ ret = -EINVAL; |
588 |
+ goto free_unlock; |
589 |
++ } |
590 |
+ |
591 |
+ if (repl->num_counters && repl->num_counters != t->private->nentries) { |
592 |
+ ret = -EINVAL; |
593 |
+diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c |
594 |
+index dd9d7c4b7f2d1..5df8f393c119b 100644 |
595 |
+--- a/net/mac80211/scan.c |
596 |
++++ b/net/mac80211/scan.c |
597 |
+@@ -385,10 +385,6 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) |
598 |
+ scan_req = rcu_dereference_protected(local->scan_req, |
599 |
+ lockdep_is_held(&local->mtx)); |
600 |
+ |
601 |
+- if (scan_req != local->int_scan_req) { |
602 |
+- local->scan_info.aborted = aborted; |
603 |
+- cfg80211_scan_done(scan_req, &local->scan_info); |
604 |
+- } |
605 |
+ RCU_INIT_POINTER(local->scan_req, NULL); |
606 |
+ |
607 |
+ scan_sdata = rcu_dereference_protected(local->scan_sdata, |
608 |
+@@ -398,6 +394,13 @@ static void __ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) |
609 |
+ local->scanning = 0; |
610 |
+ local->scan_chandef.chan = NULL; |
611 |
+ |
612 |
++ synchronize_rcu(); |
613 |
++ |
614 |
++ if (scan_req != local->int_scan_req) { |
615 |
++ local->scan_info.aborted = aborted; |
616 |
++ cfg80211_scan_done(scan_req, &local->scan_info); |
617 |
++ } |
618 |
++ |
619 |
+ /* Set power back to normal operating levels. */ |
620 |
+ ieee80211_hw_config(local, 0); |
621 |
+ |
622 |
+diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_irc.c |
623 |
+index 814220f7be676..27e2f9785e5f4 100644 |
624 |
+--- a/net/netfilter/nf_conntrack_irc.c |
625 |
++++ b/net/netfilter/nf_conntrack_irc.c |
626 |
+@@ -150,15 +150,37 @@ static int help(struct sk_buff *skb, unsigned int protoff, |
627 |
+ data = ib_ptr; |
628 |
+ data_limit = ib_ptr + skb->len - dataoff; |
629 |
+ |
630 |
+- /* strlen("\1DCC SENT t AAAAAAAA P\1\n")=24 |
631 |
+- * 5+MINMATCHLEN+strlen("t AAAAAAAA P\1\n")=14 */ |
632 |
+- while (data < data_limit - (19 + MINMATCHLEN)) { |
633 |
+- if (memcmp(data, "\1DCC ", 5)) { |
634 |
++ /* Skip any whitespace */ |
635 |
++ while (data < data_limit - 10) { |
636 |
++ if (*data == ' ' || *data == '\r' || *data == '\n') |
637 |
++ data++; |
638 |
++ else |
639 |
++ break; |
640 |
++ } |
641 |
++ |
642 |
++ /* strlen("PRIVMSG x ")=10 */ |
643 |
++ if (data < data_limit - 10) { |
644 |
++ if (strncasecmp("PRIVMSG ", data, 8)) |
645 |
++ goto out; |
646 |
++ data += 8; |
647 |
++ } |
648 |
++ |
649 |
++ /* strlen(" :\1DCC SENT t AAAAAAAA P\1\n")=26 |
650 |
++ * 7+MINMATCHLEN+strlen("t AAAAAAAA P\1\n")=26 |
651 |
++ */ |
652 |
++ while (data < data_limit - (21 + MINMATCHLEN)) { |
653 |
++ /* Find first " :", the start of message */ |
654 |
++ if (memcmp(data, " :", 2)) { |
655 |
+ data++; |
656 |
+ continue; |
657 |
+ } |
658 |
++ data += 2; |
659 |
++ |
660 |
++ /* then check that place only for the DCC command */ |
661 |
++ if (memcmp(data, "\1DCC ", 5)) |
662 |
++ goto out; |
663 |
+ data += 5; |
664 |
+- /* we have at least (19+MINMATCHLEN)-5 bytes valid data left */ |
665 |
++ /* we have at least (21+MINMATCHLEN)-(2+5) bytes valid data left */ |
666 |
+ |
667 |
+ iph = ip_hdr(skb); |
668 |
+ pr_debug("DCC found in master %pI4:%u %pI4:%u\n", |
669 |
+@@ -174,7 +196,7 @@ static int help(struct sk_buff *skb, unsigned int protoff, |
670 |
+ pr_debug("DCC %s detected\n", dccprotos[i]); |
671 |
+ |
672 |
+ /* we have at least |
673 |
+- * (19+MINMATCHLEN)-5-dccprotos[i].matchlen bytes valid |
674 |
++ * (21+MINMATCHLEN)-7-dccprotos[i].matchlen bytes valid |
675 |
+ * data left (== 14/13 bytes) */ |
676 |
+ if (parse_dcc(data, data_limit, &dcc_ip, |
677 |
+ &dcc_port, &addr_beg_p, &addr_end_p)) { |
678 |
+diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c |
679 |
+index 4dbb5bad4363b..3b4c9407d6f26 100644 |
680 |
+--- a/net/netfilter/nf_conntrack_sip.c |
681 |
++++ b/net/netfilter/nf_conntrack_sip.c |
682 |
+@@ -471,7 +471,7 @@ static int ct_sip_walk_headers(const struct nf_conn *ct, const char *dptr, |
683 |
+ return ret; |
684 |
+ if (ret == 0) |
685 |
+ break; |
686 |
+- dataoff += *matchoff; |
687 |
++ dataoff = *matchoff; |
688 |
+ } |
689 |
+ *in_header = 0; |
690 |
+ } |
691 |
+@@ -483,7 +483,7 @@ static int ct_sip_walk_headers(const struct nf_conn *ct, const char *dptr, |
692 |
+ break; |
693 |
+ if (ret == 0) |
694 |
+ return ret; |
695 |
+- dataoff += *matchoff; |
696 |
++ dataoff = *matchoff; |
697 |
+ } |
698 |
+ |
699 |
+ if (in_header) |
700 |
+diff --git a/scripts/mksysmap b/scripts/mksysmap |
701 |
+index 9aa23d15862a0..ad8bbc52267d0 100755 |
702 |
+--- a/scripts/mksysmap |
703 |
++++ b/scripts/mksysmap |
704 |
+@@ -41,4 +41,4 @@ |
705 |
+ # so we just ignore them to let readprofile continue to work. |
706 |
+ # (At least sparc64 has __crc_ in the middle). |
707 |
+ |
708 |
+-$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)' > $2 |
709 |
++$NM -n $1 | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)\|\( \.L\)\|\( L0\)' > $2 |
710 |
+diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c |
711 |
+index 2a3090ab80cfe..8bab422bc1416 100644 |
712 |
+--- a/sound/pci/hda/hda_intel.c |
713 |
++++ b/sound/pci/hda/hda_intel.c |
714 |
+@@ -2567,6 +2567,8 @@ static const struct pci_device_id azx_ids[] = { |
715 |
+ /* 5 Series/3400 */ |
716 |
+ { PCI_DEVICE(0x8086, 0x3b56), |
717 |
+ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM }, |
718 |
++ { PCI_DEVICE(0x8086, 0x3b57), |
719 |
++ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM }, |
720 |
+ /* Poulsbo */ |
721 |
+ { PCI_DEVICE(0x8086, 0x811b), |
722 |
+ .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_BASE }, |
723 |
+diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c |
724 |
+index f7b5f980455af..d89c0a9982d16 100644 |
725 |
+--- a/sound/pci/hda/patch_hdmi.c |
726 |
++++ b/sound/pci/hda/patch_hdmi.c |
727 |
+@@ -3422,6 +3422,7 @@ static int patch_tegra_hdmi(struct hda_codec *codec) |
728 |
+ if (err) |
729 |
+ return err; |
730 |
+ |
731 |
++ codec->depop_delay = 10; |
732 |
+ codec->patch_ops.build_pcms = tegra_hdmi_build_pcms; |
733 |
+ spec = codec->spec; |
734 |
+ spec->chmap.ops.chmap_cea_alloc_validate_get_type = |
735 |
+diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c |
736 |
+index f7896a9ae3d65..79049c5f42fd2 100644 |
737 |
+--- a/sound/pci/hda/patch_sigmatel.c |
738 |
++++ b/sound/pci/hda/patch_sigmatel.c |
739 |
+@@ -222,6 +222,7 @@ struct sigmatel_spec { |
740 |
+ |
741 |
+ /* beep widgets */ |
742 |
+ hda_nid_t anabeep_nid; |
743 |
++ bool beep_power_on; |
744 |
+ |
745 |
+ /* SPDIF-out mux */ |
746 |
+ const char * const *spdif_labels; |
747 |
+@@ -4481,6 +4482,28 @@ static int stac_suspend(struct hda_codec *codec) |
748 |
+ stac_shutup(codec); |
749 |
+ return 0; |
750 |
+ } |
751 |
++ |
752 |
++static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid) |
753 |
++{ |
754 |
++#ifdef CONFIG_SND_HDA_INPUT_BEEP |
755 |
++ struct sigmatel_spec *spec = codec->spec; |
756 |
++#endif |
757 |
++ int ret = snd_hda_gen_check_power_status(codec, nid); |
758 |
++ |
759 |
++#ifdef CONFIG_SND_HDA_INPUT_BEEP |
760 |
++ if (nid == spec->gen.beep_nid && codec->beep) { |
761 |
++ if (codec->beep->enabled != spec->beep_power_on) { |
762 |
++ spec->beep_power_on = codec->beep->enabled; |
763 |
++ if (spec->beep_power_on) |
764 |
++ snd_hda_power_up_pm(codec); |
765 |
++ else |
766 |
++ snd_hda_power_down_pm(codec); |
767 |
++ } |
768 |
++ ret |= spec->beep_power_on; |
769 |
++ } |
770 |
++#endif |
771 |
++ return ret; |
772 |
++} |
773 |
+ #else |
774 |
+ #define stac_suspend NULL |
775 |
+ #endif /* CONFIG_PM */ |
776 |
+@@ -4493,6 +4516,7 @@ static const struct hda_codec_ops stac_patch_ops = { |
777 |
+ .unsol_event = snd_hda_jack_unsol_event, |
778 |
+ #ifdef CONFIG_PM |
779 |
+ .suspend = stac_suspend, |
780 |
++ .check_power_status = stac_check_power_status, |
781 |
+ #endif |
782 |
+ .reboot_notify = stac_shutup, |
783 |
+ }; |
784 |
+diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c |
785 |
+index e8ea51247b179..cc745374b8288 100644 |
786 |
+--- a/sound/soc/codecs/nau8824.c |
787 |
++++ b/sound/soc/codecs/nau8824.c |
788 |
+@@ -1015,6 +1015,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream, |
789 |
+ struct snd_soc_codec *codec = dai->codec; |
790 |
+ struct nau8824 *nau8824 = snd_soc_codec_get_drvdata(codec); |
791 |
+ unsigned int val_len = 0, osr, ctrl_val, bclk_fs, bclk_div; |
792 |
++ int err = -EINVAL; |
793 |
+ |
794 |
+ nau8824_sema_acquire(nau8824, HZ); |
795 |
+ |
796 |
+@@ -1031,7 +1032,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream, |
797 |
+ osr &= NAU8824_DAC_OVERSAMPLE_MASK; |
798 |
+ if (nau8824_clock_check(nau8824, substream->stream, |
799 |
+ nau8824->fs, osr)) |
800 |
+- return -EINVAL; |
801 |
++ goto error; |
802 |
+ regmap_update_bits(nau8824->regmap, NAU8824_REG_CLK_DIVIDER, |
803 |
+ NAU8824_CLK_DAC_SRC_MASK, |
804 |
+ osr_dac_sel[osr].clk_src << NAU8824_CLK_DAC_SRC_SFT); |
805 |
+@@ -1041,7 +1042,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream, |
806 |
+ osr &= NAU8824_ADC_SYNC_DOWN_MASK; |
807 |
+ if (nau8824_clock_check(nau8824, substream->stream, |
808 |
+ nau8824->fs, osr)) |
809 |
+- return -EINVAL; |
810 |
++ goto error; |
811 |
+ regmap_update_bits(nau8824->regmap, NAU8824_REG_CLK_DIVIDER, |
812 |
+ NAU8824_CLK_ADC_SRC_MASK, |
813 |
+ osr_adc_sel[osr].clk_src << NAU8824_CLK_ADC_SRC_SFT); |
814 |
+@@ -1062,7 +1063,7 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream, |
815 |
+ else if (bclk_fs <= 256) |
816 |
+ bclk_div = 0; |
817 |
+ else |
818 |
+- return -EINVAL; |
819 |
++ goto error; |
820 |
+ regmap_update_bits(nau8824->regmap, |
821 |
+ NAU8824_REG_PORT0_I2S_PCM_CTRL_2, |
822 |
+ NAU8824_I2S_LRC_DIV_MASK | NAU8824_I2S_BLK_DIV_MASK, |
823 |
+@@ -1083,15 +1084,17 @@ static int nau8824_hw_params(struct snd_pcm_substream *substream, |
824 |
+ val_len |= NAU8824_I2S_DL_32; |
825 |
+ break; |
826 |
+ default: |
827 |
+- return -EINVAL; |
828 |
++ goto error; |
829 |
+ } |
830 |
+ |
831 |
+ regmap_update_bits(nau8824->regmap, NAU8824_REG_PORT0_I2S_PCM_CTRL_1, |
832 |
+ NAU8824_I2S_DL_MASK, val_len); |
833 |
++ err = 0; |
834 |
+ |
835 |
++ error: |
836 |
+ nau8824_sema_release(nau8824); |
837 |
+ |
838 |
+- return 0; |
839 |
++ return err; |
840 |
+ } |
841 |
+ |
842 |
+ static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) |
843 |
+@@ -1100,8 +1103,6 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) |
844 |
+ struct nau8824 *nau8824 = snd_soc_codec_get_drvdata(codec); |
845 |
+ unsigned int ctrl1_val = 0, ctrl2_val = 0; |
846 |
+ |
847 |
+- nau8824_sema_acquire(nau8824, HZ); |
848 |
+- |
849 |
+ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { |
850 |
+ case SND_SOC_DAIFMT_CBM_CFM: |
851 |
+ ctrl2_val |= NAU8824_I2S_MS_MASTER; |
852 |
+@@ -1143,6 +1144,8 @@ static int nau8824_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) |
853 |
+ return -EINVAL; |
854 |
+ } |
855 |
+ |
856 |
++ nau8824_sema_acquire(nau8824, HZ); |
857 |
++ |
858 |
+ regmap_update_bits(nau8824->regmap, NAU8824_REG_PORT0_I2S_PCM_CTRL_1, |
859 |
+ NAU8824_I2S_DF_MASK | NAU8824_I2S_BP_MASK | |
860 |
+ NAU8824_I2S_PCMB_EN, ctrl1_val); |
861 |
+diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c |
862 |
+index a0a4afa7e6781..866a61d662510 100644 |
863 |
+--- a/tools/perf/util/symbol-elf.c |
864 |
++++ b/tools/perf/util/symbol-elf.c |
865 |
+@@ -1693,8 +1693,8 @@ static int kcore_copy__compare_file(const char *from_dir, const char *to_dir, |
866 |
+ * unusual. One significant peculiarity is that the mapping (start -> pgoff) |
867 |
+ * is not the same for the kernel map and the modules map. That happens because |
868 |
+ * the data is copied adjacently whereas the original kcore has gaps. Finally, |
869 |
+- * kallsyms and modules files are compared with their copies to check that |
870 |
+- * modules have not been loaded or unloaded while the copies were taking place. |
871 |
++ * kallsyms file is compared with its copy to check that modules have not been |
872 |
++ * loaded or unloaded while the copies were taking place. |
873 |
+ * |
874 |
+ * Return: %0 on success, %-1 on failure. |
875 |
+ */ |
876 |
+@@ -1757,9 +1757,6 @@ int kcore_copy(const char *from_dir, const char *to_dir) |
877 |
+ kci.modules_map.len)) |
878 |
+ goto out_extract_close; |
879 |
+ |
880 |
+- if (kcore_copy__compare_file(from_dir, to_dir, "modules")) |
881 |
+- goto out_extract_close; |
882 |
+- |
883 |
+ if (kcore_copy__compare_file(from_dir, to_dir, "kallsyms")) |
884 |
+ goto out_extract_close; |
885 |
+ |