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