1 |
Author: mpagano |
2 |
Date: 2009-02-02 19:55:54 +0000 (Mon, 02 Feb 2009) |
3 |
New Revision: 1490 |
4 |
|
5 |
Added: |
6 |
genpatches-2.6/trunk/2.6.27/1013_linux-2.6.27.14.patch |
7 |
Removed: |
8 |
genpatches-2.6/trunk/2.6.27/1725_alpha-srm-compile-failure.patch |
9 |
Modified: |
10 |
genpatches-2.6/trunk/2.6.27/0000_README |
11 |
Log: |
12 |
Linux patch 2.6.27.14 and removal of duplicate alpha gcc 4.3 compiling patch |
13 |
|
14 |
Modified: genpatches-2.6/trunk/2.6.27/0000_README |
15 |
=================================================================== |
16 |
--- genpatches-2.6/trunk/2.6.27/0000_README 2009-01-31 20:32:27 UTC (rev 1489) |
17 |
+++ genpatches-2.6/trunk/2.6.27/0000_README 2009-02-02 19:55:54 UTC (rev 1490) |
18 |
@@ -91,6 +91,10 @@ |
19 |
From: http://www.kernel.org |
20 |
Desc: Linux 2.6.27.13 |
21 |
|
22 |
+Patch: 1013_linux-2.6.27.14.patch |
23 |
+From: http://www.kernel.org |
24 |
+Desc: Linux 2.6.27.14 |
25 |
+ |
26 |
Patch: 1700_sparc-poweroff-hang.patch |
27 |
From: http://bugs.gentoo.org/229441 |
28 |
Desc: Fix shutdown hang on Sun Blade 100 |
29 |
|
30 |
Added: genpatches-2.6/trunk/2.6.27/1013_linux-2.6.27.14.patch |
31 |
=================================================================== |
32 |
--- genpatches-2.6/trunk/2.6.27/1013_linux-2.6.27.14.patch (rev 0) |
33 |
+++ genpatches-2.6/trunk/2.6.27/1013_linux-2.6.27.14.patch 2009-02-02 19:55:54 UTC (rev 1490) |
34 |
@@ -0,0 +1,1307 @@ |
35 |
+diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c |
36 |
+index 3221201..a03fbca 100644 |
37 |
+--- a/arch/alpha/kernel/irq_srm.c |
38 |
++++ b/arch/alpha/kernel/irq_srm.c |
39 |
+@@ -63,6 +63,8 @@ init_srm_irqs(long max, unsigned long ignore_mask) |
40 |
+ { |
41 |
+ long i; |
42 |
+ |
43 |
++ if (NR_IRQS <= 16) |
44 |
++ return; |
45 |
+ for (i = 16; i < max; ++i) { |
46 |
+ if (i < 64 && ((ignore_mask >> i) & 1)) |
47 |
+ continue; |
48 |
+diff --git a/crypto/authenc.c b/crypto/authenc.c |
49 |
+index fd9f06c..0861dc2 100644 |
50 |
+--- a/crypto/authenc.c |
51 |
++++ b/crypto/authenc.c |
52 |
+@@ -157,16 +157,19 @@ static int crypto_authenc_genicv(struct aead_request *req, u8 *iv, |
53 |
+ dstp = sg_page(dst); |
54 |
+ vdst = PageHighMem(dstp) ? NULL : page_address(dstp) + dst->offset; |
55 |
+ |
56 |
+- sg_init_table(cipher, 2); |
57 |
+- sg_set_buf(cipher, iv, ivsize); |
58 |
+- authenc_chain(cipher, dst, vdst == iv + ivsize); |
59 |
++ if (ivsize) { |
60 |
++ sg_init_table(cipher, 2); |
61 |
++ sg_set_buf(cipher, iv, ivsize); |
62 |
++ authenc_chain(cipher, dst, vdst == iv + ivsize); |
63 |
++ dst = cipher; |
64 |
++ } |
65 |
+ |
66 |
+ cryptlen = req->cryptlen + ivsize; |
67 |
+- hash = crypto_authenc_hash(req, flags, cipher, cryptlen); |
68 |
++ hash = crypto_authenc_hash(req, flags, dst, cryptlen); |
69 |
+ if (IS_ERR(hash)) |
70 |
+ return PTR_ERR(hash); |
71 |
+ |
72 |
+- scatterwalk_map_and_copy(hash, cipher, cryptlen, |
73 |
++ scatterwalk_map_and_copy(hash, dst, cryptlen, |
74 |
+ crypto_aead_authsize(authenc), 1); |
75 |
+ return 0; |
76 |
+ } |
77 |
+@@ -284,11 +287,14 @@ static int crypto_authenc_iverify(struct aead_request *req, u8 *iv, |
78 |
+ srcp = sg_page(src); |
79 |
+ vsrc = PageHighMem(srcp) ? NULL : page_address(srcp) + src->offset; |
80 |
+ |
81 |
+- sg_init_table(cipher, 2); |
82 |
+- sg_set_buf(cipher, iv, ivsize); |
83 |
+- authenc_chain(cipher, src, vsrc == iv + ivsize); |
84 |
++ if (ivsize) { |
85 |
++ sg_init_table(cipher, 2); |
86 |
++ sg_set_buf(cipher, iv, ivsize); |
87 |
++ authenc_chain(cipher, src, vsrc == iv + ivsize); |
88 |
++ src = cipher; |
89 |
++ } |
90 |
+ |
91 |
+- return crypto_authenc_verify(req, cipher, cryptlen + ivsize); |
92 |
++ return crypto_authenc_verify(req, src, cryptlen + ivsize); |
93 |
+ } |
94 |
+ |
95 |
+ static int crypto_authenc_decrypt(struct aead_request *req) |
96 |
+diff --git a/crypto/ccm.c b/crypto/ccm.c |
97 |
+index 7cf7e5a..c36d654 100644 |
98 |
+--- a/crypto/ccm.c |
99 |
++++ b/crypto/ccm.c |
100 |
+@@ -266,6 +266,8 @@ static int crypto_ccm_auth(struct aead_request *req, struct scatterlist *plain, |
101 |
+ if (assoclen) { |
102 |
+ pctx->ilen = format_adata(idata, assoclen); |
103 |
+ get_data_to_compute(cipher, pctx, req->assoc, req->assoclen); |
104 |
++ } else { |
105 |
++ pctx->ilen = 0; |
106 |
+ } |
107 |
+ |
108 |
+ /* compute plaintext into mac */ |
109 |
+diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c |
110 |
+index 8fdb2ce..c5be6a1 100644 |
111 |
+--- a/drivers/ata/pata_via.c |
112 |
++++ b/drivers/ata/pata_via.c |
113 |
+@@ -87,6 +87,10 @@ enum { |
114 |
+ VIA_SATA_PATA = 0x800, /* SATA/PATA combined configuration */ |
115 |
+ }; |
116 |
+ |
117 |
++enum { |
118 |
++ VIA_IDFLAG_SINGLE = (1 << 0), /* single channel controller) */ |
119 |
++}; |
120 |
++ |
121 |
+ /* |
122 |
+ * VIA SouthBridge chips. |
123 |
+ */ |
124 |
+@@ -98,8 +102,12 @@ static const struct via_isa_bridge { |
125 |
+ u8 rev_max; |
126 |
+ u16 flags; |
127 |
+ } via_isa_bridges[] = { |
128 |
++ { "vx855", PCI_DEVICE_ID_VIA_VX855, 0x00, 0x2f, |
129 |
++ VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA }, |
130 |
+ { "vx800", PCI_DEVICE_ID_VIA_VX800, 0x00, 0x2f, VIA_UDMA_133 | |
131 |
+ VIA_BAD_AST | VIA_SATA_PATA }, |
132 |
++ { "vt8261", PCI_DEVICE_ID_VIA_8261, 0x00, 0x2f, |
133 |
++ VIA_UDMA_133 | VIA_BAD_AST }, |
134 |
+ { "vt8237s", PCI_DEVICE_ID_VIA_8237S, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
135 |
+ { "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST }, |
136 |
+ { "cx700", PCI_DEVICE_ID_VIA_CX700, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST | VIA_SATA_PATA }, |
137 |
+@@ -123,6 +131,8 @@ static const struct via_isa_bridge { |
138 |
+ { "vt82c586", PCI_DEVICE_ID_VIA_82C586_0, 0x00, 0x0f, VIA_UDMA_NONE | VIA_SET_FIFO }, |
139 |
+ { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK }, |
140 |
+ { "vt82c576", PCI_DEVICE_ID_VIA_82C576, 0x00, 0x2f, VIA_UDMA_NONE | VIA_SET_FIFO | VIA_NO_UNMASK | VIA_BAD_ID }, |
141 |
++ { "vtxxxx", PCI_DEVICE_ID_VIA_ANON, 0x00, 0x2f, |
142 |
++ VIA_UDMA_133 | VIA_BAD_AST }, |
143 |
+ { NULL } |
144 |
+ }; |
145 |
+ |
146 |
+@@ -461,6 +471,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
147 |
+ static int printed_version; |
148 |
+ u8 enable; |
149 |
+ u32 timing; |
150 |
++ unsigned long flags = id->driver_data; |
151 |
+ int rc; |
152 |
+ |
153 |
+ if (!printed_version++) |
154 |
+@@ -470,9 +481,13 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
155 |
+ if (rc) |
156 |
+ return rc; |
157 |
+ |
158 |
++ if (flags & VIA_IDFLAG_SINGLE) |
159 |
++ ppi[1] = &ata_dummy_port_info; |
160 |
++ |
161 |
+ /* To find out how the IDE will behave and what features we |
162 |
+ actually have to look at the bridge not the IDE controller */ |
163 |
+- for (config = via_isa_bridges; config->id; config++) |
164 |
++ for (config = via_isa_bridges; config->id != PCI_DEVICE_ID_VIA_ANON; |
165 |
++ config++) |
166 |
+ if ((isa = pci_get_device(PCI_VENDOR_ID_VIA + |
167 |
+ !!(config->flags & VIA_BAD_ID), |
168 |
+ config->id, NULL))) { |
169 |
+@@ -483,10 +498,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
170 |
+ pci_dev_put(isa); |
171 |
+ } |
172 |
+ |
173 |
+- if (!config->id) { |
174 |
+- printk(KERN_WARNING "via: Unknown VIA SouthBridge, disabling.\n"); |
175 |
+- return -ENODEV; |
176 |
+- } |
177 |
+ pci_dev_put(isa); |
178 |
+ |
179 |
+ if (!(config->flags & VIA_NO_ENABLES)) { |
180 |
+@@ -588,6 +599,7 @@ static const struct pci_device_id via[] = { |
181 |
+ { PCI_VDEVICE(VIA, 0x1571), }, |
182 |
+ { PCI_VDEVICE(VIA, 0x3164), }, |
183 |
+ { PCI_VDEVICE(VIA, 0x5324), }, |
184 |
++ { PCI_VDEVICE(VIA, 0xC409), VIA_IDFLAG_SINGLE }, |
185 |
+ |
186 |
+ { }, |
187 |
+ }; |
188 |
+diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c |
189 |
+index 4a1508a..7e975eb 100644 |
190 |
+--- a/drivers/ide/pci/it821x.c |
191 |
++++ b/drivers/ide/pci/it821x.c |
192 |
+@@ -69,6 +69,8 @@ |
193 |
+ |
194 |
+ #define DRV_NAME "it821x" |
195 |
+ |
196 |
++#define QUIRK_VORTEX86 1 |
197 |
++ |
198 |
+ struct it821x_dev |
199 |
+ { |
200 |
+ unsigned int smart:1, /* Are we in smart raid mode */ |
201 |
+@@ -80,6 +82,7 @@ struct it821x_dev |
202 |
+ u16 pio[2]; /* Cached PIO values */ |
203 |
+ u16 mwdma[2]; /* Cached MWDMA values */ |
204 |
+ u16 udma[2]; /* Cached UDMA values (per drive) */ |
205 |
++ u16 quirks; |
206 |
+ }; |
207 |
+ |
208 |
+ #define ATA_66 0 |
209 |
+@@ -586,6 +589,12 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif) |
210 |
+ |
211 |
+ hwif->ultra_mask = ATA_UDMA6; |
212 |
+ hwif->mwdma_mask = ATA_MWDMA2; |
213 |
++ |
214 |
++ /* Vortex86SX quirk: prevent Ultra-DMA mode to fix BadCRC issue */ |
215 |
++ if (idev->quirks & QUIRK_VORTEX86) { |
216 |
++ if (dev->revision == 0x11) |
217 |
++ hwif->ultra_mask = 0; |
218 |
++ } |
219 |
+ } |
220 |
+ |
221 |
+ static void __devinit it8212_disable_raid(struct pci_dev *dev) |
222 |
+@@ -658,6 +667,8 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic |
223 |
+ return -ENOMEM; |
224 |
+ } |
225 |
+ |
226 |
++ itdevs->quirks = id->driver_data; |
227 |
++ |
228 |
+ rc = ide_pci_init_one(dev, &it821x_chipset, itdevs); |
229 |
+ if (rc) |
230 |
+ kfree(itdevs); |
231 |
+@@ -677,6 +688,7 @@ static void __devexit it821x_remove(struct pci_dev *dev) |
232 |
+ static const struct pci_device_id it821x_pci_tbl[] = { |
233 |
+ { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 }, |
234 |
+ { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 }, |
235 |
++ { PCI_VDEVICE(RDC, PCI_DEVICE_ID_RDC_D1010), QUIRK_VORTEX86 }, |
236 |
+ { 0, }, |
237 |
+ }; |
238 |
+ |
239 |
+diff --git a/drivers/misc/sgi-xp/xpc_sn2.c b/drivers/misc/sgi-xp/xpc_sn2.c |
240 |
+index d32c1ee..59ff816 100644 |
241 |
+--- a/drivers/misc/sgi-xp/xpc_sn2.c |
242 |
++++ b/drivers/misc/sgi-xp/xpc_sn2.c |
243 |
+@@ -1841,6 +1841,7 @@ xpc_process_msg_chctl_flags_sn2(struct xpc_partition *part, int ch_number) |
244 |
+ */ |
245 |
+ xpc_clear_remote_msgqueue_flags_sn2(ch); |
246 |
+ |
247 |
++ smp_wmb(); /* ensure flags have been cleared before bte_copy */ |
248 |
+ ch_sn2->w_remote_GP.put = ch_sn2->remote_GP.put; |
249 |
+ |
250 |
+ dev_dbg(xpc_chan, "w_remote_GP.put changed to %ld, partid=%d, " |
251 |
+@@ -1939,7 +1940,7 @@ xpc_get_deliverable_payload_sn2(struct xpc_channel *ch) |
252 |
+ break; |
253 |
+ |
254 |
+ get = ch_sn2->w_local_GP.get; |
255 |
+- rmb(); /* guarantee that .get loads before .put */ |
256 |
++ smp_rmb(); /* guarantee that .get loads before .put */ |
257 |
+ if (get == ch_sn2->w_remote_GP.put) |
258 |
+ break; |
259 |
+ |
260 |
+@@ -1961,11 +1962,13 @@ xpc_get_deliverable_payload_sn2(struct xpc_channel *ch) |
261 |
+ |
262 |
+ msg = xpc_pull_remote_msg_sn2(ch, get); |
263 |
+ |
264 |
+- DBUG_ON(msg != NULL && msg->number != get); |
265 |
+- DBUG_ON(msg != NULL && (msg->flags & XPC_M_SN2_DONE)); |
266 |
+- DBUG_ON(msg != NULL && !(msg->flags & XPC_M_SN2_READY)); |
267 |
++ if (msg != NULL) { |
268 |
++ DBUG_ON(msg->number != get); |
269 |
++ DBUG_ON(msg->flags & XPC_M_SN2_DONE); |
270 |
++ DBUG_ON(!(msg->flags & XPC_M_SN2_READY)); |
271 |
+ |
272 |
+- payload = &msg->payload; |
273 |
++ payload = &msg->payload; |
274 |
++ } |
275 |
+ break; |
276 |
+ } |
277 |
+ |
278 |
+@@ -2058,7 +2061,7 @@ xpc_allocate_msg_sn2(struct xpc_channel *ch, u32 flags, |
279 |
+ while (1) { |
280 |
+ |
281 |
+ put = ch_sn2->w_local_GP.put; |
282 |
+- rmb(); /* guarantee that .put loads before .get */ |
283 |
++ smp_rmb(); /* guarantee that .put loads before .get */ |
284 |
+ if (put - ch_sn2->w_remote_GP.get < ch->local_nentries) { |
285 |
+ |
286 |
+ /* There are available message entries. We need to try |
287 |
+@@ -2191,7 +2194,7 @@ xpc_send_payload_sn2(struct xpc_channel *ch, u32 flags, void *payload, |
288 |
+ * The preceding store of msg->flags must occur before the following |
289 |
+ * load of local_GP->put. |
290 |
+ */ |
291 |
+- mb(); |
292 |
++ smp_mb(); |
293 |
+ |
294 |
+ /* see if the message is next in line to be sent, if so send it */ |
295 |
+ |
296 |
+@@ -2292,7 +2295,7 @@ xpc_received_payload_sn2(struct xpc_channel *ch, void *payload) |
297 |
+ * The preceding store of msg->flags must occur before the following |
298 |
+ * load of local_GP->get. |
299 |
+ */ |
300 |
+- mb(); |
301 |
++ smp_mb(); |
302 |
+ |
303 |
+ /* |
304 |
+ * See if this message is next in line to be acknowledged as having |
305 |
+diff --git a/drivers/misc/sgi-xp/xpc_uv.c b/drivers/misc/sgi-xp/xpc_uv.c |
306 |
+index 1ac694c..b8f8d50 100644 |
307 |
+--- a/drivers/misc/sgi-xp/xpc_uv.c |
308 |
++++ b/drivers/misc/sgi-xp/xpc_uv.c |
309 |
+@@ -1238,7 +1238,7 @@ xpc_send_payload_uv(struct xpc_channel *ch, u32 flags, void *payload, |
310 |
+ atomic_inc(&ch->n_to_notify); |
311 |
+ |
312 |
+ msg_slot->key = key; |
313 |
+- wmb(); /* a non-NULL func must hit memory after the key */ |
314 |
++ smp_wmb(); /* a non-NULL func must hit memory after the key */ |
315 |
+ msg_slot->func = func; |
316 |
+ |
317 |
+ if (ch->flags & XPC_C_DISCONNECTING) { |
318 |
+diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c |
319 |
+index 53459db..8d44404 100644 |
320 |
+--- a/drivers/net/bnx2x_main.c |
321 |
++++ b/drivers/net/bnx2x_main.c |
322 |
+@@ -8078,6 +8078,9 @@ static int bnx2x_get_eeprom(struct net_device *dev, |
323 |
+ struct bnx2x *bp = netdev_priv(dev); |
324 |
+ int rc; |
325 |
+ |
326 |
++ if (!netif_running(dev)) |
327 |
++ return -EAGAIN; |
328 |
++ |
329 |
+ DP(BNX2X_MSG_NVM, "ethtool_eeprom: cmd %d\n" |
330 |
+ DP_LEVEL " magic 0x%x offset 0x%x (%d) len 0x%x (%d)\n", |
331 |
+ eeprom->cmd, eeprom->magic, eeprom->offset, eeprom->offset, |
332 |
+diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c |
333 |
+index 1640096..ef84732 100644 |
334 |
+--- a/drivers/net/wireless/rtl8187_dev.c |
335 |
++++ b/drivers/net/wireless/rtl8187_dev.c |
336 |
+@@ -263,6 +263,7 @@ static int rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb) |
337 |
+ |
338 |
+ usb_fill_bulk_urb(urb, priv->udev, usb_sndbulkpipe(priv->udev, ep), |
339 |
+ buf, skb->len, rtl8187_tx_cb, skb); |
340 |
++ urb->transfer_flags |= URB_ZERO_PACKET; |
341 |
+ rc = usb_submit_urb(urb, GFP_ATOMIC); |
342 |
+ if (rc < 0) { |
343 |
+ usb_free_urb(urb); |
344 |
+diff --git a/drivers/net/wireless/rtl8187_rtl8225.c b/drivers/net/wireless/rtl8187_rtl8225.c |
345 |
+index 1bae899..487593f 100644 |
346 |
+--- a/drivers/net/wireless/rtl8187_rtl8225.c |
347 |
++++ b/drivers/net/wireless/rtl8187_rtl8225.c |
348 |
+@@ -287,7 +287,10 @@ static void rtl8225_rf_set_tx_power(struct ieee80211_hw *dev, int channel) |
349 |
+ ofdm_power = priv->channels[channel - 1].hw_value >> 4; |
350 |
+ |
351 |
+ cck_power = min(cck_power, (u8)11); |
352 |
+- ofdm_power = min(ofdm_power, (u8)35); |
353 |
++ if (ofdm_power > (u8)15) |
354 |
++ ofdm_power = 25; |
355 |
++ else |
356 |
++ ofdm_power += 10; |
357 |
+ |
358 |
+ rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, |
359 |
+ rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1); |
360 |
+@@ -540,7 +543,10 @@ static void rtl8225z2_rf_set_tx_power(struct ieee80211_hw *dev, int channel) |
361 |
+ cck_power += priv->txpwr_base & 0xF; |
362 |
+ cck_power = min(cck_power, (u8)35); |
363 |
+ |
364 |
+- ofdm_power = min(ofdm_power, (u8)15); |
365 |
++ if (ofdm_power > (u8)15) |
366 |
++ ofdm_power = 25; |
367 |
++ else |
368 |
++ ofdm_power += 10; |
369 |
+ ofdm_power += priv->txpwr_base >> 4; |
370 |
+ ofdm_power = min(ofdm_power, (u8)35); |
371 |
+ |
372 |
+diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c |
373 |
+index 6e18736..6d9b074 100644 |
374 |
+--- a/drivers/pci/hotplug/pciehp_core.c |
375 |
++++ b/drivers/pci/hotplug/pciehp_core.c |
376 |
+@@ -126,8 +126,10 @@ static int set_lock_status(struct hotplug_slot *hotplug_slot, u8 status) |
377 |
+ mutex_lock(&slot->ctrl->crit_sect); |
378 |
+ |
379 |
+ /* has it been >1 sec since our last toggle? */ |
380 |
+- if ((get_seconds() - slot->last_emi_toggle) < 1) |
381 |
++ if ((get_seconds() - slot->last_emi_toggle) < 1) { |
382 |
++ mutex_unlock(&slot->ctrl->crit_sect); |
383 |
+ return -EINVAL; |
384 |
++ } |
385 |
+ |
386 |
+ /* see what our current state is */ |
387 |
+ retval = get_lock_status(hotplug_slot, &value); |
388 |
+diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c |
389 |
+index c2f2393..fd0695b 100644 |
390 |
+--- a/drivers/serial/8250_pci.c |
391 |
++++ b/drivers/serial/8250_pci.c |
392 |
+@@ -2190,6 +2190,9 @@ static struct pci_device_id serial_pci_tbl[] = { |
393 |
+ { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_COMM8, |
394 |
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
395 |
+ pbn_b2_8_115200 }, |
396 |
++ { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_7803, |
397 |
++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
398 |
++ pbn_b2_8_460800 }, |
399 |
+ { PCI_VENDOR_ID_SEALEVEL, PCI_DEVICE_ID_SEALEVEL_UCOMM8, |
400 |
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
401 |
+ pbn_b2_8_115200 }, |
402 |
+diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c |
403 |
+index 20290c5..e52e54e 100644 |
404 |
+--- a/drivers/usb/core/devio.c |
405 |
++++ b/drivers/usb/core/devio.c |
406 |
+@@ -1700,7 +1700,7 @@ const struct file_operations usbdev_file_operations = { |
407 |
+ .release = usbdev_release, |
408 |
+ }; |
409 |
+ |
410 |
+-void usb_fs_classdev_common_remove(struct usb_device *udev) |
411 |
++static void usbdev_remove(struct usb_device *udev) |
412 |
+ { |
413 |
+ struct dev_state *ps; |
414 |
+ struct siginfo sinfo; |
415 |
+@@ -1742,10 +1742,15 @@ static void usb_classdev_remove(struct usb_device *dev) |
416 |
+ { |
417 |
+ if (dev->usb_classdev) |
418 |
+ device_unregister(dev->usb_classdev); |
419 |
+- usb_fs_classdev_common_remove(dev); |
420 |
+ } |
421 |
+ |
422 |
+-static int usb_classdev_notify(struct notifier_block *self, |
423 |
++#else |
424 |
++#define usb_classdev_add(dev) 0 |
425 |
++#define usb_classdev_remove(dev) do {} while (0) |
426 |
++ |
427 |
++#endif |
428 |
++ |
429 |
++static int usbdev_notify(struct notifier_block *self, |
430 |
+ unsigned long action, void *dev) |
431 |
+ { |
432 |
+ switch (action) { |
433 |
+@@ -1755,15 +1760,15 @@ static int usb_classdev_notify(struct notifier_block *self, |
434 |
+ break; |
435 |
+ case USB_DEVICE_REMOVE: |
436 |
+ usb_classdev_remove(dev); |
437 |
++ usbdev_remove(dev); |
438 |
+ break; |
439 |
+ } |
440 |
+ return NOTIFY_OK; |
441 |
+ } |
442 |
+ |
443 |
+ static struct notifier_block usbdev_nb = { |
444 |
+- .notifier_call = usb_classdev_notify, |
445 |
++ .notifier_call = usbdev_notify, |
446 |
+ }; |
447 |
+-#endif |
448 |
+ |
449 |
+ static struct cdev usb_device_cdev; |
450 |
+ |
451 |
+@@ -1797,9 +1802,8 @@ int __init usb_devio_init(void) |
452 |
+ * to /sys/dev |
453 |
+ */ |
454 |
+ usb_classdev_class->dev_kobj = NULL; |
455 |
+- |
456 |
+- usb_register_notify(&usbdev_nb); |
457 |
+ #endif |
458 |
++ usb_register_notify(&usbdev_nb); |
459 |
+ out: |
460 |
+ return retval; |
461 |
+ |
462 |
+@@ -1810,8 +1814,8 @@ error_cdev: |
463 |
+ |
464 |
+ void usb_devio_cleanup(void) |
465 |
+ { |
466 |
+-#ifdef CONFIG_USB_DEVICE_CLASS |
467 |
+ usb_unregister_notify(&usbdev_nb); |
468 |
++#ifdef CONFIG_USB_DEVICE_CLASS |
469 |
+ class_destroy(usb_classdev_class); |
470 |
+ #endif |
471 |
+ cdev_del(&usb_device_cdev); |
472 |
+diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c |
473 |
+index db410e9..83887ff 100644 |
474 |
+--- a/drivers/usb/core/inode.c |
475 |
++++ b/drivers/usb/core/inode.c |
476 |
+@@ -716,7 +716,6 @@ static void usbfs_remove_device(struct usb_device *dev) |
477 |
+ fs_remove_file (dev->usbfs_dentry); |
478 |
+ dev->usbfs_dentry = NULL; |
479 |
+ } |
480 |
+- usb_fs_classdev_common_remove(dev); |
481 |
+ } |
482 |
+ |
483 |
+ static int usbfs_notify(struct notifier_block *self, unsigned long action, void *dev) |
484 |
+diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h |
485 |
+index 9a1a45a..a9a6397 100644 |
486 |
+--- a/drivers/usb/core/usb.h |
487 |
++++ b/drivers/usb/core/usb.h |
488 |
+@@ -145,7 +145,6 @@ extern struct usb_driver usbfs_driver; |
489 |
+ extern const struct file_operations usbfs_devices_fops; |
490 |
+ extern const struct file_operations usbdev_file_operations; |
491 |
+ extern void usbfs_conn_disc_event(void); |
492 |
+-extern void usb_fs_classdev_common_remove(struct usb_device *udev); |
493 |
+ |
494 |
+ extern int usb_devio_init(void); |
495 |
+ extern void usb_devio_cleanup(void); |
496 |
+diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c |
497 |
+index 0ada0fc..c542a98 100644 |
498 |
+--- a/drivers/usb/mon/mon_bin.c |
499 |
++++ b/drivers/usb/mon/mon_bin.c |
500 |
+@@ -37,6 +37,7 @@ |
501 |
+ #define MON_IOCX_GET _IOW(MON_IOC_MAGIC, 6, struct mon_bin_get) |
502 |
+ #define MON_IOCX_MFETCH _IOWR(MON_IOC_MAGIC, 7, struct mon_bin_mfetch) |
503 |
+ #define MON_IOCH_MFLUSH _IO(MON_IOC_MAGIC, 8) |
504 |
++ |
505 |
+ #ifdef CONFIG_COMPAT |
506 |
+ #define MON_IOCX_GET32 _IOW(MON_IOC_MAGIC, 6, struct mon_bin_get32) |
507 |
+ #define MON_IOCX_MFETCH32 _IOWR(MON_IOC_MAGIC, 7, struct mon_bin_mfetch32) |
508 |
+@@ -921,21 +922,6 @@ static int mon_bin_ioctl(struct inode *inode, struct file *file, |
509 |
+ } |
510 |
+ break; |
511 |
+ |
512 |
+-#ifdef CONFIG_COMPAT |
513 |
+- case MON_IOCX_GET32: { |
514 |
+- struct mon_bin_get32 getb; |
515 |
+- |
516 |
+- if (copy_from_user(&getb, (void __user *)arg, |
517 |
+- sizeof(struct mon_bin_get32))) |
518 |
+- return -EFAULT; |
519 |
+- |
520 |
+- ret = mon_bin_get_event(file, rp, |
521 |
+- compat_ptr(getb.hdr32), compat_ptr(getb.data32), |
522 |
+- getb.alloc32); |
523 |
+- } |
524 |
+- break; |
525 |
+-#endif |
526 |
+- |
527 |
+ case MON_IOCX_MFETCH: |
528 |
+ { |
529 |
+ struct mon_bin_mfetch mfetch; |
530 |
+@@ -962,7 +948,57 @@ static int mon_bin_ioctl(struct inode *inode, struct file *file, |
531 |
+ } |
532 |
+ break; |
533 |
+ |
534 |
++ case MON_IOCG_STATS: { |
535 |
++ struct mon_bin_stats __user *sp; |
536 |
++ unsigned int nevents; |
537 |
++ unsigned int ndropped; |
538 |
++ |
539 |
++ spin_lock_irqsave(&rp->b_lock, flags); |
540 |
++ ndropped = rp->cnt_lost; |
541 |
++ rp->cnt_lost = 0; |
542 |
++ spin_unlock_irqrestore(&rp->b_lock, flags); |
543 |
++ nevents = mon_bin_queued(rp); |
544 |
++ |
545 |
++ sp = (struct mon_bin_stats __user *)arg; |
546 |
++ if (put_user(rp->cnt_lost, &sp->dropped)) |
547 |
++ return -EFAULT; |
548 |
++ if (put_user(nevents, &sp->queued)) |
549 |
++ return -EFAULT; |
550 |
++ |
551 |
++ } |
552 |
++ break; |
553 |
++ |
554 |
++ default: |
555 |
++ return -ENOTTY; |
556 |
++ } |
557 |
++ |
558 |
++ return ret; |
559 |
++} |
560 |
++ |
561 |
+ #ifdef CONFIG_COMPAT |
562 |
++static long mon_bin_compat_ioctl(struct file *file, |
563 |
++ unsigned int cmd, unsigned long arg) |
564 |
++{ |
565 |
++ struct mon_reader_bin *rp = file->private_data; |
566 |
++ int ret; |
567 |
++ |
568 |
++ switch (cmd) { |
569 |
++ |
570 |
++ case MON_IOCX_GET32: { |
571 |
++ struct mon_bin_get32 getb; |
572 |
++ |
573 |
++ if (copy_from_user(&getb, (void __user *)arg, |
574 |
++ sizeof(struct mon_bin_get32))) |
575 |
++ return -EFAULT; |
576 |
++ |
577 |
++ ret = mon_bin_get_event(file, rp, |
578 |
++ compat_ptr(getb.hdr32), compat_ptr(getb.data32), |
579 |
++ getb.alloc32); |
580 |
++ if (ret < 0) |
581 |
++ return ret; |
582 |
++ } |
583 |
++ return 0; |
584 |
++ |
585 |
+ case MON_IOCX_MFETCH32: |
586 |
+ { |
587 |
+ struct mon_bin_mfetch32 mfetch; |
588 |
+@@ -986,37 +1022,25 @@ static int mon_bin_ioctl(struct inode *inode, struct file *file, |
589 |
+ return ret; |
590 |
+ if (put_user(ret, &uptr->nfetch32)) |
591 |
+ return -EFAULT; |
592 |
+- ret = 0; |
593 |
+ } |
594 |
+- break; |
595 |
+-#endif |
596 |
+- |
597 |
+- case MON_IOCG_STATS: { |
598 |
+- struct mon_bin_stats __user *sp; |
599 |
+- unsigned int nevents; |
600 |
+- unsigned int ndropped; |
601 |
+- |
602 |
+- spin_lock_irqsave(&rp->b_lock, flags); |
603 |
+- ndropped = rp->cnt_lost; |
604 |
+- rp->cnt_lost = 0; |
605 |
+- spin_unlock_irqrestore(&rp->b_lock, flags); |
606 |
+- nevents = mon_bin_queued(rp); |
607 |
++ return 0; |
608 |
+ |
609 |
+- sp = (struct mon_bin_stats __user *)arg; |
610 |
+- if (put_user(rp->cnt_lost, &sp->dropped)) |
611 |
+- return -EFAULT; |
612 |
+- if (put_user(nevents, &sp->queued)) |
613 |
+- return -EFAULT; |
614 |
++ case MON_IOCG_STATS: |
615 |
++ return mon_bin_ioctl(NULL, file, cmd, |
616 |
++ (unsigned long) compat_ptr(arg)); |
617 |
+ |
618 |
+- } |
619 |
+- break; |
620 |
++ case MON_IOCQ_URB_LEN: |
621 |
++ case MON_IOCQ_RING_SIZE: |
622 |
++ case MON_IOCT_RING_SIZE: |
623 |
++ case MON_IOCH_MFLUSH: |
624 |
++ return mon_bin_ioctl(NULL, file, cmd, arg); |
625 |
+ |
626 |
+ default: |
627 |
+- return -ENOTTY; |
628 |
++ ; |
629 |
+ } |
630 |
+- |
631 |
+- return ret; |
632 |
++ return -ENOTTY; |
633 |
+ } |
634 |
++#endif /* CONFIG_COMPAT */ |
635 |
+ |
636 |
+ static unsigned int |
637 |
+ mon_bin_poll(struct file *file, struct poll_table_struct *wait) |
638 |
+@@ -1094,6 +1118,9 @@ static const struct file_operations mon_fops_binary = { |
639 |
+ /* .write = mon_text_write, */ |
640 |
+ .poll = mon_bin_poll, |
641 |
+ .ioctl = mon_bin_ioctl, |
642 |
++#ifdef CONFIG_COMPAT |
643 |
++ .compat_ioctl = mon_bin_compat_ioctl, |
644 |
++#endif |
645 |
+ .release = mon_bin_release, |
646 |
+ .mmap = mon_bin_mmap, |
647 |
+ }; |
648 |
+diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h |
649 |
+index 6fcb6d1..aae786c 100644 |
650 |
+--- a/drivers/usb/storage/unusual_devs.h |
651 |
++++ b/drivers/usb/storage/unusual_devs.h |
652 |
+@@ -2047,6 +2047,12 @@ UNUSUAL_DEV( 0x19d2, 0x2000, 0x0000, 0x0000, |
653 |
+ US_SC_DEVICE, US_PR_DEVICE, NULL, |
654 |
+ US_FL_IGNORE_DEVICE), |
655 |
+ |
656 |
++UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001, |
657 |
++ "ST", |
658 |
++ "2A", |
659 |
++ US_SC_DEVICE, US_PR_DEVICE, NULL, |
660 |
++ US_FL_FIX_CAPACITY), |
661 |
++ |
662 |
+ /* patch submitted by Davide Perini <perini.davide@××××××××××.org> |
663 |
+ * and Renato Perini <rperini@×××××.it> |
664 |
+ */ |
665 |
+diff --git a/fs/eventpoll.c b/fs/eventpoll.c |
666 |
+index cb60f92..801de2c 100644 |
667 |
+--- a/fs/eventpoll.c |
668 |
++++ b/fs/eventpoll.c |
669 |
+@@ -234,8 +234,6 @@ struct ep_pqueue { |
670 |
+ /* |
671 |
+ * Configuration options available inside /proc/sys/fs/epoll/ |
672 |
+ */ |
673 |
+-/* Maximum number of epoll devices, per user */ |
674 |
+-static int max_user_instances __read_mostly; |
675 |
+ /* Maximum number of epoll watched descriptors, per user */ |
676 |
+ static int max_user_watches __read_mostly; |
677 |
+ |
678 |
+@@ -261,14 +259,6 @@ static int zero; |
679 |
+ |
680 |
+ ctl_table epoll_table[] = { |
681 |
+ { |
682 |
+- .procname = "max_user_instances", |
683 |
+- .data = &max_user_instances, |
684 |
+- .maxlen = sizeof(int), |
685 |
+- .mode = 0644, |
686 |
+- .proc_handler = &proc_dointvec_minmax, |
687 |
+- .extra1 = &zero, |
688 |
+- }, |
689 |
+- { |
690 |
+ .procname = "max_user_watches", |
691 |
+ .data = &max_user_watches, |
692 |
+ .maxlen = sizeof(int), |
693 |
+@@ -491,7 +481,6 @@ static void ep_free(struct eventpoll *ep) |
694 |
+ |
695 |
+ mutex_unlock(&epmutex); |
696 |
+ mutex_destroy(&ep->mtx); |
697 |
+- atomic_dec(&ep->user->epoll_devs); |
698 |
+ free_uid(ep->user); |
699 |
+ kfree(ep); |
700 |
+ } |
701 |
+@@ -581,10 +570,6 @@ static int ep_alloc(struct eventpoll **pep) |
702 |
+ struct eventpoll *ep; |
703 |
+ |
704 |
+ user = get_current_user(); |
705 |
+- error = -EMFILE; |
706 |
+- if (unlikely(atomic_read(&user->epoll_devs) >= |
707 |
+- max_user_instances)) |
708 |
+- goto free_uid; |
709 |
+ error = -ENOMEM; |
710 |
+ ep = kzalloc(sizeof(*ep), GFP_KERNEL); |
711 |
+ if (unlikely(!ep)) |
712 |
+@@ -1137,7 +1122,6 @@ SYSCALL_DEFINE1(epoll_create1, int, flags) |
713 |
+ flags & O_CLOEXEC); |
714 |
+ if (fd < 0) |
715 |
+ ep_free(ep); |
716 |
+- atomic_inc(&ep->user->epoll_devs); |
717 |
+ |
718 |
+ error_return: |
719 |
+ DNPRINTK(3, (KERN_INFO "[%p] eventpoll: sys_epoll_create(%d) = %d\n", |
720 |
+@@ -1362,8 +1346,10 @@ static int __init eventpoll_init(void) |
721 |
+ struct sysinfo si; |
722 |
+ |
723 |
+ si_meminfo(&si); |
724 |
+- max_user_instances = 128; |
725 |
+- max_user_watches = (((si.totalram - si.totalhigh) / 32) << PAGE_SHIFT) / |
726 |
++ /* |
727 |
++ * Allows top 4% of lomem to be allocated for epoll watches (per user). |
728 |
++ */ |
729 |
++ max_user_watches = (((si.totalram - si.totalhigh) / 25) << PAGE_SHIFT) / |
730 |
+ EP_ITEM_COST; |
731 |
+ |
732 |
+ /* Initialize the structure used to perform safe poll wait head wake ups */ |
733 |
+diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c |
734 |
+index 1f55382..89b1c93 100644 |
735 |
+--- a/fs/ext3/namei.c |
736 |
++++ b/fs/ext3/namei.c |
737 |
+@@ -1374,7 +1374,7 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, |
738 |
+ struct fake_dirent *fde; |
739 |
+ |
740 |
+ blocksize = dir->i_sb->s_blocksize; |
741 |
+- dxtrace(printk("Creating index\n")); |
742 |
++ dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino)); |
743 |
+ retval = ext3_journal_get_write_access(handle, bh); |
744 |
+ if (retval) { |
745 |
+ ext3_std_error(dir->i_sb, retval); |
746 |
+@@ -1383,6 +1383,19 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, |
747 |
+ } |
748 |
+ root = (struct dx_root *) bh->b_data; |
749 |
+ |
750 |
++ /* The 0th block becomes the root, move the dirents out */ |
751 |
++ fde = &root->dotdot; |
752 |
++ de = (struct ext3_dir_entry_2 *)((char *)fde + |
753 |
++ ext3_rec_len_from_disk(fde->rec_len)); |
754 |
++ if ((char *) de >= (((char *) root) + blocksize)) { |
755 |
++ ext3_error(dir->i_sb, __func__, |
756 |
++ "invalid rec_len for '..' in inode %lu", |
757 |
++ dir->i_ino); |
758 |
++ brelse(bh); |
759 |
++ return -EIO; |
760 |
++ } |
761 |
++ len = ((char *) root) + blocksize - (char *) de; |
762 |
++ |
763 |
+ bh2 = ext3_append (handle, dir, &block, &retval); |
764 |
+ if (!(bh2)) { |
765 |
+ brelse(bh); |
766 |
+@@ -1391,11 +1404,6 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, |
767 |
+ EXT3_I(dir)->i_flags |= EXT3_INDEX_FL; |
768 |
+ data1 = bh2->b_data; |
769 |
+ |
770 |
+- /* The 0th block becomes the root, move the dirents out */ |
771 |
+- fde = &root->dotdot; |
772 |
+- de = (struct ext3_dir_entry_2 *)((char *)fde + |
773 |
+- ext3_rec_len_from_disk(fde->rec_len)); |
774 |
+- len = ((char *) root) + blocksize - (char *) de; |
775 |
+ memcpy (data1, de, len); |
776 |
+ de = (struct ext3_dir_entry_2 *) data1; |
777 |
+ top = data1 + len; |
778 |
+diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c |
779 |
+index 87250b6..279734f 100644 |
780 |
+--- a/fs/fuse/dev.c |
781 |
++++ b/fs/fuse/dev.c |
782 |
+@@ -281,7 +281,8 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) |
783 |
+ fc->blocked = 0; |
784 |
+ wake_up_all(&fc->blocked_waitq); |
785 |
+ } |
786 |
+- if (fc->num_background == FUSE_CONGESTION_THRESHOLD) { |
787 |
++ if (fc->num_background == FUSE_CONGESTION_THRESHOLD && |
788 |
++ fc->connected) { |
789 |
+ clear_bdi_congested(&fc->bdi, READ); |
790 |
+ clear_bdi_congested(&fc->bdi, WRITE); |
791 |
+ } |
792 |
+diff --git a/fs/fuse/file.c b/fs/fuse/file.c |
793 |
+index c8206db..3ada9d7 100644 |
794 |
+--- a/fs/fuse/file.c |
795 |
++++ b/fs/fuse/file.c |
796 |
+@@ -54,7 +54,7 @@ struct fuse_file *fuse_file_alloc(void) |
797 |
+ ff->reserved_req = fuse_request_alloc(); |
798 |
+ if (!ff->reserved_req) { |
799 |
+ kfree(ff); |
800 |
+- ff = NULL; |
801 |
++ return NULL; |
802 |
+ } else { |
803 |
+ INIT_LIST_HEAD(&ff->write_entry); |
804 |
+ atomic_set(&ff->count, 0); |
805 |
+diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c |
806 |
+index d2249f1..57342a6 100644 |
807 |
+--- a/fs/fuse/inode.c |
808 |
++++ b/fs/fuse/inode.c |
809 |
+@@ -292,6 +292,7 @@ static void fuse_put_super(struct super_block *sb) |
810 |
+ list_del(&fc->entry); |
811 |
+ fuse_ctl_remove_conn(fc); |
812 |
+ mutex_unlock(&fuse_mutex); |
813 |
++ bdi_destroy(&fc->bdi); |
814 |
+ fuse_conn_put(fc); |
815 |
+ } |
816 |
+ |
817 |
+@@ -531,7 +532,6 @@ void fuse_conn_put(struct fuse_conn *fc) |
818 |
+ if (fc->destroy_req) |
819 |
+ fuse_request_free(fc->destroy_req); |
820 |
+ mutex_destroy(&fc->inst_mutex); |
821 |
+- bdi_destroy(&fc->bdi); |
822 |
+ kfree(fc); |
823 |
+ } |
824 |
+ } |
825 |
+@@ -832,12 +832,16 @@ static int fuse_fill_super(struct super_block *sb, void *data, int silent) |
826 |
+ if (!file) |
827 |
+ return -EINVAL; |
828 |
+ |
829 |
+- if (file->f_op != &fuse_dev_operations) |
830 |
++ if (file->f_op != &fuse_dev_operations) { |
831 |
++ fput(file); |
832 |
+ return -EINVAL; |
833 |
++ } |
834 |
+ |
835 |
+ fc = new_conn(sb); |
836 |
+- if (!fc) |
837 |
++ if (!fc) { |
838 |
++ fput(file); |
839 |
+ return -ENOMEM; |
840 |
++ } |
841 |
+ |
842 |
+ fc->flags = d.flags; |
843 |
+ fc->user_id = d.user_id; |
844 |
+diff --git a/fs/inotify_user.c b/fs/inotify_user.c |
845 |
+index a13f487..5c92d90 100644 |
846 |
+--- a/fs/inotify_user.c |
847 |
++++ b/fs/inotify_user.c |
848 |
+@@ -427,10 +427,61 @@ static unsigned int inotify_poll(struct file *file, poll_table *wait) |
849 |
+ return ret; |
850 |
+ } |
851 |
+ |
852 |
++/* |
853 |
++ * Get an inotify_kernel_event if one exists and is small |
854 |
++ * enough to fit in "count". Return an error pointer if |
855 |
++ * not large enough. |
856 |
++ * |
857 |
++ * Called with the device ev_mutex held. |
858 |
++ */ |
859 |
++static struct inotify_kernel_event *get_one_event(struct inotify_device *dev, |
860 |
++ size_t count) |
861 |
++{ |
862 |
++ size_t event_size = sizeof(struct inotify_event); |
863 |
++ struct inotify_kernel_event *kevent; |
864 |
++ |
865 |
++ if (list_empty(&dev->events)) |
866 |
++ return NULL; |
867 |
++ |
868 |
++ kevent = inotify_dev_get_event(dev); |
869 |
++ if (kevent->name) |
870 |
++ event_size += kevent->event.len; |
871 |
++ |
872 |
++ if (event_size > count) |
873 |
++ return ERR_PTR(-EINVAL); |
874 |
++ |
875 |
++ remove_kevent(dev, kevent); |
876 |
++ return kevent; |
877 |
++} |
878 |
++ |
879 |
++/* |
880 |
++ * Copy an event to user space, returning how much we copied. |
881 |
++ * |
882 |
++ * We already checked that the event size is smaller than the |
883 |
++ * buffer we had in "get_one_event()" above. |
884 |
++ */ |
885 |
++static ssize_t copy_event_to_user(struct inotify_kernel_event *kevent, |
886 |
++ char __user *buf) |
887 |
++{ |
888 |
++ size_t event_size = sizeof(struct inotify_event); |
889 |
++ |
890 |
++ if (copy_to_user(buf, &kevent->event, event_size)) |
891 |
++ return -EFAULT; |
892 |
++ |
893 |
++ if (kevent->name) { |
894 |
++ buf += event_size; |
895 |
++ |
896 |
++ if (copy_to_user(buf, kevent->name, kevent->event.len)) |
897 |
++ return -EFAULT; |
898 |
++ |
899 |
++ event_size += kevent->event.len; |
900 |
++ } |
901 |
++ return event_size; |
902 |
++} |
903 |
++ |
904 |
+ static ssize_t inotify_read(struct file *file, char __user *buf, |
905 |
+ size_t count, loff_t *pos) |
906 |
+ { |
907 |
+- size_t event_size = sizeof (struct inotify_event); |
908 |
+ struct inotify_device *dev; |
909 |
+ char __user *start; |
910 |
+ int ret; |
911 |
+@@ -440,81 +491,43 @@ static ssize_t inotify_read(struct file *file, char __user *buf, |
912 |
+ dev = file->private_data; |
913 |
+ |
914 |
+ while (1) { |
915 |
++ struct inotify_kernel_event *kevent; |
916 |
+ |
917 |
+ prepare_to_wait(&dev->wq, &wait, TASK_INTERRUPTIBLE); |
918 |
+ |
919 |
+ mutex_lock(&dev->ev_mutex); |
920 |
+- if (!list_empty(&dev->events)) { |
921 |
+- ret = 0; |
922 |
+- break; |
923 |
+- } |
924 |
++ kevent = get_one_event(dev, count); |
925 |
+ mutex_unlock(&dev->ev_mutex); |
926 |
+ |
927 |
+- if (file->f_flags & O_NONBLOCK) { |
928 |
+- ret = -EAGAIN; |
929 |
+- break; |
930 |
+- } |
931 |
+- |
932 |
+- if (signal_pending(current)) { |
933 |
+- ret = -EINTR; |
934 |
+- break; |
935 |
++ if (kevent) { |
936 |
++ ret = PTR_ERR(kevent); |
937 |
++ if (IS_ERR(kevent)) |
938 |
++ break; |
939 |
++ ret = copy_event_to_user(kevent, buf); |
940 |
++ free_kevent(kevent); |
941 |
++ if (ret < 0) |
942 |
++ break; |
943 |
++ buf += ret; |
944 |
++ count -= ret; |
945 |
++ continue; |
946 |
+ } |
947 |
+ |
948 |
+- schedule(); |
949 |
+- } |
950 |
+- |
951 |
+- finish_wait(&dev->wq, &wait); |
952 |
+- if (ret) |
953 |
+- return ret; |
954 |
+- |
955 |
+- while (1) { |
956 |
+- struct inotify_kernel_event *kevent; |
957 |
+- |
958 |
+- ret = buf - start; |
959 |
+- if (list_empty(&dev->events)) |
960 |
++ ret = -EAGAIN; |
961 |
++ if (file->f_flags & O_NONBLOCK) |
962 |
+ break; |
963 |
+- |
964 |
+- kevent = inotify_dev_get_event(dev); |
965 |
+- if (event_size + kevent->event.len > count) { |
966 |
+- if (ret == 0 && count > 0) { |
967 |
+- /* |
968 |
+- * could not get a single event because we |
969 |
+- * didn't have enough buffer space. |
970 |
+- */ |
971 |
+- ret = -EINVAL; |
972 |
+- } |
973 |
++ ret = -EINTR; |
974 |
++ if (signal_pending(current)) |
975 |
+ break; |
976 |
+- } |
977 |
+- remove_kevent(dev, kevent); |
978 |
+ |
979 |
+- /* |
980 |
+- * Must perform the copy_to_user outside the mutex in order |
981 |
+- * to avoid a lock order reversal with mmap_sem. |
982 |
+- */ |
983 |
+- mutex_unlock(&dev->ev_mutex); |
984 |
+- |
985 |
+- if (copy_to_user(buf, &kevent->event, event_size)) { |
986 |
+- ret = -EFAULT; |
987 |
++ if (start != buf) |
988 |
+ break; |
989 |
+- } |
990 |
+- buf += event_size; |
991 |
+- count -= event_size; |
992 |
+- |
993 |
+- if (kevent->name) { |
994 |
+- if (copy_to_user(buf, kevent->name, kevent->event.len)){ |
995 |
+- ret = -EFAULT; |
996 |
+- break; |
997 |
+- } |
998 |
+- buf += kevent->event.len; |
999 |
+- count -= kevent->event.len; |
1000 |
+- } |
1001 |
+- |
1002 |
+- free_kevent(kevent); |
1003 |
+ |
1004 |
+- mutex_lock(&dev->ev_mutex); |
1005 |
++ schedule(); |
1006 |
+ } |
1007 |
+- mutex_unlock(&dev->ev_mutex); |
1008 |
+ |
1009 |
++ finish_wait(&dev->wq, &wait); |
1010 |
++ if (start != buf && ret != -EFAULT) |
1011 |
++ ret = buf - start; |
1012 |
+ return ret; |
1013 |
+ } |
1014 |
+ |
1015 |
+diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c |
1016 |
+index 006fc64..aa24484 100644 |
1017 |
+--- a/fs/sysfs/bin.c |
1018 |
++++ b/fs/sysfs/bin.c |
1019 |
+@@ -62,6 +62,9 @@ read(struct file *file, char __user *userbuf, size_t bytes, loff_t *off) |
1020 |
+ loff_t offs = *off; |
1021 |
+ int count = min_t(size_t, bytes, PAGE_SIZE); |
1022 |
+ |
1023 |
++ if (!bytes) |
1024 |
++ return 0; |
1025 |
++ |
1026 |
+ if (size) { |
1027 |
+ if (offs > size) |
1028 |
+ return 0; |
1029 |
+@@ -119,6 +122,9 @@ static ssize_t write(struct file *file, const char __user *userbuf, |
1030 |
+ loff_t offs = *off; |
1031 |
+ int count = min_t(size_t, bytes, PAGE_SIZE); |
1032 |
+ |
1033 |
++ if (!bytes) |
1034 |
++ return 0; |
1035 |
++ |
1036 |
+ if (size) { |
1037 |
+ if (offs > size) |
1038 |
+ return 0; |
1039 |
+diff --git a/include/asm-x86/pgalloc.h b/include/asm-x86/pgalloc.h |
1040 |
+index d63ea43..36ef40d 100644 |
1041 |
+--- a/include/asm-x86/pgalloc.h |
1042 |
++++ b/include/asm-x86/pgalloc.h |
1043 |
+@@ -42,6 +42,7 @@ static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) |
1044 |
+ |
1045 |
+ static inline void pte_free(struct mm_struct *mm, struct page *pte) |
1046 |
+ { |
1047 |
++ pgtable_page_dtor(pte); |
1048 |
+ __free_page(pte); |
1049 |
+ } |
1050 |
+ |
1051 |
+diff --git a/include/linux/Kbuild b/include/linux/Kbuild |
1052 |
+index b68ec09..d5eb2e7 100644 |
1053 |
+--- a/include/linux/Kbuild |
1054 |
++++ b/include/linux/Kbuild |
1055 |
+@@ -41,6 +41,7 @@ header-y += baycom.h |
1056 |
+ header-y += bfs_fs.h |
1057 |
+ header-y += blkpg.h |
1058 |
+ header-y += bpqether.h |
1059 |
++header-y += bsg.h |
1060 |
+ header-y += can.h |
1061 |
+ header-y += cdk.h |
1062 |
+ header-y += chio.h |
1063 |
+diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h |
1064 |
+index f1624b3..391cbf3 100644 |
1065 |
+--- a/include/linux/pci_ids.h |
1066 |
++++ b/include/linux/pci_ids.h |
1067 |
+@@ -1346,6 +1346,7 @@ |
1068 |
+ #define PCI_DEVICE_ID_VIA_8783_0 0x3208 |
1069 |
+ #define PCI_DEVICE_ID_VIA_8237 0x3227 |
1070 |
+ #define PCI_DEVICE_ID_VIA_8251 0x3287 |
1071 |
++#define PCI_DEVICE_ID_VIA_8261 0x3402 |
1072 |
+ #define PCI_DEVICE_ID_VIA_8237A 0x3337 |
1073 |
+ #define PCI_DEVICE_ID_VIA_8237S 0x3372 |
1074 |
+ #define PCI_DEVICE_ID_VIA_SATA_EIDE 0x5324 |
1075 |
+@@ -1355,10 +1356,13 @@ |
1076 |
+ #define PCI_DEVICE_ID_VIA_CX700 0x8324 |
1077 |
+ #define PCI_DEVICE_ID_VIA_CX700_IDE 0x0581 |
1078 |
+ #define PCI_DEVICE_ID_VIA_VX800 0x8353 |
1079 |
++#define PCI_DEVICE_ID_VIA_VX855 0x8409 |
1080 |
+ #define PCI_DEVICE_ID_VIA_8371_1 0x8391 |
1081 |
+ #define PCI_DEVICE_ID_VIA_82C598_1 0x8598 |
1082 |
+ #define PCI_DEVICE_ID_VIA_838X_1 0xB188 |
1083 |
+ #define PCI_DEVICE_ID_VIA_83_87XX_1 0xB198 |
1084 |
++#define PCI_DEVICE_ID_VIA_C409_IDE 0XC409 |
1085 |
++#define PCI_DEVICE_ID_VIA_ANON 0xFFFF |
1086 |
+ |
1087 |
+ #define PCI_VENDOR_ID_SIEMENS 0x110A |
1088 |
+ #define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 |
1089 |
+@@ -1780,6 +1784,7 @@ |
1090 |
+ #define PCI_DEVICE_ID_SEALEVEL_UCOMM232 0x7202 |
1091 |
+ #define PCI_DEVICE_ID_SEALEVEL_COMM4 0x7401 |
1092 |
+ #define PCI_DEVICE_ID_SEALEVEL_COMM8 0x7801 |
1093 |
++#define PCI_DEVICE_ID_SEALEVEL_7803 0x7803 |
1094 |
+ #define PCI_DEVICE_ID_SEALEVEL_UCOMM8 0x7804 |
1095 |
+ |
1096 |
+ #define PCI_VENDOR_ID_HYPERCOPE 0x1365 |
1097 |
+@@ -2148,6 +2153,7 @@ |
1098 |
+ #define PCI_DEVICE_ID_RDC_R6040 0x6040 |
1099 |
+ #define PCI_DEVICE_ID_RDC_R6060 0x6060 |
1100 |
+ #define PCI_DEVICE_ID_RDC_R6061 0x6061 |
1101 |
++#define PCI_DEVICE_ID_RDC_D1010 0x1010 |
1102 |
+ |
1103 |
+ #define PCI_VENDOR_ID_LENOVO 0x17aa |
1104 |
+ |
1105 |
+diff --git a/include/linux/sched.h b/include/linux/sched.h |
1106 |
+index 086f5e1..03e0902 100644 |
1107 |
+--- a/include/linux/sched.h |
1108 |
++++ b/include/linux/sched.h |
1109 |
+@@ -588,7 +588,6 @@ struct user_struct { |
1110 |
+ atomic_t inotify_devs; /* How many inotify devs does this user have opened? */ |
1111 |
+ #endif |
1112 |
+ #ifdef CONFIG_EPOLL |
1113 |
+- atomic_t epoll_devs; /* The number of epoll descriptors currently open */ |
1114 |
+ atomic_t epoll_watches; /* The number of file descriptors currently watched */ |
1115 |
+ #endif |
1116 |
+ #ifdef CONFIG_POSIX_MQUEUE |
1117 |
+diff --git a/kernel/relay.c b/kernel/relay.c |
1118 |
+index 8d13a78..b0bbf6f 100644 |
1119 |
+--- a/kernel/relay.c |
1120 |
++++ b/kernel/relay.c |
1121 |
+@@ -664,8 +664,10 @@ int relay_late_setup_files(struct rchan *chan, |
1122 |
+ |
1123 |
+ mutex_lock(&relay_channels_mutex); |
1124 |
+ /* Is chan already set up? */ |
1125 |
+- if (unlikely(chan->has_base_filename)) |
1126 |
++ if (unlikely(chan->has_base_filename)) { |
1127 |
++ mutex_unlock(&relay_channels_mutex); |
1128 |
+ return -EEXIST; |
1129 |
++ } |
1130 |
+ chan->has_base_filename = 1; |
1131 |
+ chan->parent = parent; |
1132 |
+ curr_cpu = get_cpu(); |
1133 |
+diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c |
1134 |
+index 4788f7b..56ad58d 100644 |
1135 |
+--- a/net/mac80211/tx.c |
1136 |
++++ b/net/mac80211/tx.c |
1137 |
+@@ -1335,8 +1335,10 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, |
1138 |
+ if (is_multicast_ether_addr(hdr->addr3)) |
1139 |
+ memcpy(hdr->addr1, hdr->addr3, ETH_ALEN); |
1140 |
+ else |
1141 |
+- if (mesh_nexthop_lookup(skb, odev)) |
1142 |
++ if (mesh_nexthop_lookup(skb, odev)) { |
1143 |
++ dev_put(odev); |
1144 |
+ return 0; |
1145 |
++ } |
1146 |
+ if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0) |
1147 |
+ IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.sta, |
1148 |
+ fwded_frames); |
1149 |
+diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c |
1150 |
+index 24db2b4..0a22f00 100644 |
1151 |
+--- a/net/sunrpc/rpcb_clnt.c |
1152 |
++++ b/net/sunrpc/rpcb_clnt.c |
1153 |
+@@ -469,6 +469,28 @@ static struct rpc_task *rpcb_call_async(struct rpc_clnt *rpcb_clnt, struct rpcbi |
1154 |
+ return rpc_run_task(&task_setup_data); |
1155 |
+ } |
1156 |
+ |
1157 |
++/* |
1158 |
++ * In the case where rpc clients have been cloned, we want to make |
1159 |
++ * sure that we use the program number/version etc of the actual |
1160 |
++ * owner of the xprt. To do so, we walk back up the tree of parents |
1161 |
++ * to find whoever created the transport and/or whoever has the |
1162 |
++ * autobind flag set. |
1163 |
++ */ |
1164 |
++static struct rpc_clnt *rpcb_find_transport_owner(struct rpc_clnt *clnt) |
1165 |
++{ |
1166 |
++ struct rpc_clnt *parent = clnt->cl_parent; |
1167 |
++ |
1168 |
++ while (parent != clnt) { |
1169 |
++ if (parent->cl_xprt != clnt->cl_xprt) |
1170 |
++ break; |
1171 |
++ if (clnt->cl_autobind) |
1172 |
++ break; |
1173 |
++ clnt = parent; |
1174 |
++ parent = parent->cl_parent; |
1175 |
++ } |
1176 |
++ return clnt; |
1177 |
++} |
1178 |
++ |
1179 |
+ /** |
1180 |
+ * rpcb_getport_async - obtain the port for a given RPC service on a given host |
1181 |
+ * @task: task that is waiting for portmapper request |
1182 |
+@@ -478,10 +500,10 @@ static struct rpc_task *rpcb_call_async(struct rpc_clnt *rpcb_clnt, struct rpcbi |
1183 |
+ */ |
1184 |
+ void rpcb_getport_async(struct rpc_task *task) |
1185 |
+ { |
1186 |
+- struct rpc_clnt *clnt = task->tk_client; |
1187 |
++ struct rpc_clnt *clnt; |
1188 |
+ struct rpc_procinfo *proc; |
1189 |
+ u32 bind_version; |
1190 |
+- struct rpc_xprt *xprt = task->tk_xprt; |
1191 |
++ struct rpc_xprt *xprt; |
1192 |
+ struct rpc_clnt *rpcb_clnt; |
1193 |
+ static struct rpcbind_args *map; |
1194 |
+ struct rpc_task *child; |
1195 |
+@@ -490,13 +512,13 @@ void rpcb_getport_async(struct rpc_task *task) |
1196 |
+ size_t salen; |
1197 |
+ int status; |
1198 |
+ |
1199 |
++ clnt = rpcb_find_transport_owner(task->tk_client); |
1200 |
++ xprt = clnt->cl_xprt; |
1201 |
++ |
1202 |
+ dprintk("RPC: %5u %s(%s, %u, %u, %d)\n", |
1203 |
+ task->tk_pid, __func__, |
1204 |
+ clnt->cl_server, clnt->cl_prog, clnt->cl_vers, xprt->prot); |
1205 |
+ |
1206 |
+- /* Autobind on cloned rpc clients is discouraged */ |
1207 |
+- BUG_ON(clnt->cl_parent != clnt); |
1208 |
+- |
1209 |
+ /* Put self on the wait queue to ensure we get notified if |
1210 |
+ * some other task is already attempting to bind the port */ |
1211 |
+ rpc_sleep_on(&xprt->binding, task, NULL); |
1212 |
+@@ -558,7 +580,7 @@ void rpcb_getport_async(struct rpc_task *task) |
1213 |
+ status = -ENOMEM; |
1214 |
+ dprintk("RPC: %5u %s: no memory available\n", |
1215 |
+ task->tk_pid, __func__); |
1216 |
+- goto bailout_nofree; |
1217 |
++ goto bailout_release_client; |
1218 |
+ } |
1219 |
+ map->r_prog = clnt->cl_prog; |
1220 |
+ map->r_vers = clnt->cl_vers; |
1221 |
+@@ -578,11 +600,13 @@ void rpcb_getport_async(struct rpc_task *task) |
1222 |
+ task->tk_pid, __func__); |
1223 |
+ return; |
1224 |
+ } |
1225 |
+- rpc_put_task(child); |
1226 |
+ |
1227 |
+- task->tk_xprt->stat.bind_count++; |
1228 |
++ xprt->stat.bind_count++; |
1229 |
++ rpc_put_task(child); |
1230 |
+ return; |
1231 |
+ |
1232 |
++bailout_release_client: |
1233 |
++ rpc_release_client(rpcb_clnt); |
1234 |
+ bailout_nofree: |
1235 |
+ rpcb_wake_rpcbind_waiters(xprt, status); |
1236 |
+ task->tk_status = status; |
1237 |
+diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c |
1238 |
+index 7c1eb23..a50089f 100644 |
1239 |
+--- a/sound/pci/hda/patch_conexant.c |
1240 |
++++ b/sound/pci/hda/patch_conexant.c |
1241 |
+@@ -1470,6 +1470,7 @@ static struct snd_pci_quirk cxt5047_cfg_tbl[] = { |
1242 |
+ SND_PCI_QUIRK(0x103c, 0x30a5, "HP DV5200T/DV8000T", CXT5047_LAPTOP_HP), |
1243 |
+ SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV2000T/DV3000T", CXT5047_LAPTOP), |
1244 |
+ SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2000Z", CXT5047_LAPTOP), |
1245 |
++ SND_PCI_QUIRK(0x103c, 0x30cf, "HP DV6700", CXT5047_LAPTOP), |
1246 |
+ SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P100", CXT5047_LAPTOP_EAPD), |
1247 |
+ {} |
1248 |
+ }; |
1249 |
+diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c |
1250 |
+index 7225f0f..aa7dc03 100644 |
1251 |
+--- a/sound/pci/hda/patch_realtek.c |
1252 |
++++ b/sound/pci/hda/patch_realtek.c |
1253 |
+@@ -6631,6 +6631,7 @@ static int patch_alc882(struct hda_codec *codec) |
1254 |
+ case 0x106b00a1: /* Macbook (might be wrong - PCI SSID?) */ |
1255 |
+ case 0x106b2c00: /* Macbook Pro rev3 */ |
1256 |
+ case 0x106b3600: /* Macbook 3.1 */ |
1257 |
++ case 0x106b3800: /* MacbookPro4,1 - latter revision */ |
1258 |
+ board_config = ALC885_MBP3; |
1259 |
+ break; |
1260 |
+ default: |
1261 |
+diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c |
1262 |
+index fdef553..2f52cf1 100644 |
1263 |
+--- a/sound/pci/hda/patch_sigmatel.c |
1264 |
++++ b/sound/pci/hda/patch_sigmatel.c |
1265 |
+@@ -2048,6 +2048,8 @@ static int stac92xx_build_pcms(struct hda_codec *codec) |
1266 |
+ |
1267 |
+ info->name = "STAC92xx Analog"; |
1268 |
+ info->stream[SNDRV_PCM_STREAM_PLAYBACK] = stac92xx_pcm_analog_playback; |
1269 |
++ info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = |
1270 |
++ spec->multiout.dac_nids[0]; |
1271 |
+ info->stream[SNDRV_PCM_STREAM_CAPTURE] = stac92xx_pcm_analog_capture; |
1272 |
+ info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[0]; |
1273 |
+ info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = spec->num_adcs; |
1274 |
+diff --git a/sound/pci/oxygen/virtuoso.c b/sound/pci/oxygen/virtuoso.c |
1275 |
+index 01d7b75..82a7814 100644 |
1276 |
+--- a/sound/pci/oxygen/virtuoso.c |
1277 |
++++ b/sound/pci/oxygen/virtuoso.c |
1278 |
+@@ -26,7 +26,7 @@ |
1279 |
+ * SPI 0 -> 1st PCM1796 (front) |
1280 |
+ * SPI 1 -> 2nd PCM1796 (surround) |
1281 |
+ * SPI 2 -> 3rd PCM1796 (center/LFE) |
1282 |
+- * SPI 4 -> 4th PCM1796 (back) |
1283 |
++ * SPI 4 -> 4th PCM1796 (back) and EEPROM self-destruct (do not use!) |
1284 |
+ * |
1285 |
+ * GPIO 2 -> M0 of CS5381 |
1286 |
+ * GPIO 3 -> M1 of CS5381 |
1287 |
+@@ -142,6 +142,12 @@ struct xonar_data { |
1288 |
+ static void pcm1796_write(struct oxygen *chip, unsigned int codec, |
1289 |
+ u8 reg, u8 value) |
1290 |
+ { |
1291 |
++ /* |
1292 |
++ * We don't want to do writes on SPI 4 because the EEPROM, which shares |
1293 |
++ * the same pin, might get confused and broken. We'd better take care |
1294 |
++ * that the driver works with the default register values ... |
1295 |
++ */ |
1296 |
++#if 0 |
1297 |
+ /* maps ALSA channel pair number to SPI output */ |
1298 |
+ static const u8 codec_map[4] = { |
1299 |
+ 0, 1, 2, 4 |
1300 |
+@@ -152,6 +158,7 @@ static void pcm1796_write(struct oxygen *chip, unsigned int codec, |
1301 |
+ (codec_map[codec] << OXYGEN_SPI_CODEC_SHIFT) | |
1302 |
+ OXYGEN_SPI_CEN_LATCH_CLOCK_HI, |
1303 |
+ (reg << 8) | value); |
1304 |
++#endif |
1305 |
+ } |
1306 |
+ |
1307 |
+ static void cs4398_write(struct oxygen *chip, u8 reg, u8 value) |
1308 |
+@@ -539,6 +546,9 @@ static const DECLARE_TLV_DB_SCALE(cs4362a_db_scale, -12700, 100, 0); |
1309 |
+ |
1310 |
+ static int xonar_d2_control_filter(struct snd_kcontrol_new *template) |
1311 |
+ { |
1312 |
++ if (!strncmp(template->name, "Master Playback ", 16)) |
1313 |
++ /* disable volume/mute because they would require SPI writes */ |
1314 |
++ return 1; |
1315 |
+ if (!strncmp(template->name, "CD Capture ", 11)) |
1316 |
+ /* CD in is actually connected to the video in pin */ |
1317 |
+ template->private_value ^= AC97_CD ^ AC97_VIDEO; |
1318 |
+@@ -588,9 +598,8 @@ static const struct oxygen_model xonar_models[] = { |
1319 |
+ .dac_volume_min = 0x0f, |
1320 |
+ .dac_volume_max = 0xff, |
1321 |
+ .misc_flags = OXYGEN_MISC_MIDI, |
1322 |
+- .function_flags = OXYGEN_FUNCTION_SPI | |
1323 |
+- OXYGEN_FUNCTION_ENABLE_SPI_4_5, |
1324 |
+- .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
1325 |
++ .function_flags = OXYGEN_FUNCTION_SPI, |
1326 |
++ .dac_i2s_format = OXYGEN_I2S_FORMAT_I2S, |
1327 |
+ .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
1328 |
+ }, |
1329 |
+ [MODEL_D2X] = { |
1330 |
+@@ -619,9 +628,8 @@ static const struct oxygen_model xonar_models[] = { |
1331 |
+ .dac_volume_min = 0x0f, |
1332 |
+ .dac_volume_max = 0xff, |
1333 |
+ .misc_flags = OXYGEN_MISC_MIDI, |
1334 |
+- .function_flags = OXYGEN_FUNCTION_SPI | |
1335 |
+- OXYGEN_FUNCTION_ENABLE_SPI_4_5, |
1336 |
+- .dac_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
1337 |
++ .function_flags = OXYGEN_FUNCTION_SPI, |
1338 |
++ .dac_i2s_format = OXYGEN_I2S_FORMAT_I2S, |
1339 |
+ .adc_i2s_format = OXYGEN_I2S_FORMAT_LJUST, |
1340 |
+ }, |
1341 |
+ [MODEL_D1] = { |
1342 |
|
1343 |
Deleted: genpatches-2.6/trunk/2.6.27/1725_alpha-srm-compile-failure.patch |
1344 |
=================================================================== |
1345 |
--- genpatches-2.6/trunk/2.6.27/1725_alpha-srm-compile-failure.patch 2009-01-31 20:32:27 UTC (rev 1489) |
1346 |
+++ genpatches-2.6/trunk/2.6.27/1725_alpha-srm-compile-failure.patch 2009-02-02 19:55:54 UTC (rev 1490) |
1347 |
@@ -1,38 +0,0 @@ |
1348 |
-From: Ivan Kokshaysky <ink@×××××××××××××××××.ru> |
1349 |
-Date: Thu, 15 Jan 2009 21:51:17 +0000 (-0800) |
1350 |
-Subject: alpha: nautilus - fix compile failure with gcc-4.3 |
1351 |
-X-Git-Tag: v2.6.29-rc2~27 |
1352 |
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=70b66cbfd3316b792a855cb9a2574e85f1a63d0f |
1353 |
- |
1354 |
-alpha: nautilus - fix compile failure with gcc-4.3 |
1355 |
- |
1356 |
-init_srm_irq() deals with irq's #16 and above, but size of irq_desc |
1357 |
-array on nautilus and some other system types is 16. So gcc-4.3 |
1358 |
-complains that "array subscript is above array bounds", even though |
1359 |
-this function is never called on those systems. |
1360 |
- |
1361 |
-This adds a check for NR_IRQS <= 16, which effectively optimizes |
1362 |
-init_srm_irq() code away on problematic platforms. |
1363 |
- |
1364 |
-Thanks to Daniel Drake <dsd@g.o> for detailed analysis |
1365 |
-of the problem. |
1366 |
- |
1367 |
-Signed-off-by: Ivan Kokshaysky <ink@×××××××××××××××××.ru> |
1368 |
-Cc: Richard Henderson <rth@×××××××.net> |
1369 |
-Signed-off-by: Andrew Morton <akpm@××××××××××××××××.org> |
1370 |
-Signed-off-by: Linus Torvalds <torvalds@××××××××××××××××.org> |
1371 |
---- |
1372 |
- |
1373 |
-diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c |
1374 |
-index 3221201..a03fbca 100644 |
1375 |
---- a/arch/alpha/kernel/irq_srm.c |
1376 |
-+++ b/arch/alpha/kernel/irq_srm.c |
1377 |
-@@ -63,6 +63,8 @@ init_srm_irqs(long max, unsigned long ignore_mask) |
1378 |
- { |
1379 |
- long i; |
1380 |
- |
1381 |
-+ if (NR_IRQS <= 16) |
1382 |
-+ return; |
1383 |
- for (i = 16; i < max; ++i) { |
1384 |
- if (i < 64 && ((ignore_mask >> i) & 1)) |
1385 |
- continue; |