/[linux-patches]/genpatches-2.6/tags/2.6.12-10/1002_linux-2.6.12.2.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.12-10/1002_linux-2.6.12.2.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 101 - (show annotations) (download)
Sat Jul 16 11:24:53 2005 UTC (12 years, 10 months ago) by dsd
File size: 8248 byte(s)
2.6.12-10 release
1 diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
2 --- a/drivers/acpi/pci_irq.c
3 +++ b/drivers/acpi/pci_irq.c
4 @@ -435,6 +435,7 @@ acpi_pci_irq_enable (
5 /* Interrupt Line values above 0xF are forbidden */
6 if (dev->irq >= 0 && (dev->irq <= 0xF)) {
7 printk(" - using IRQ %d\n", dev->irq);
8 + acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW);
9 return_VALUE(0);
10 }
11 else {
12 diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
13 --- a/drivers/net/e1000/e1000_main.c
14 +++ b/drivers/net/e1000/e1000_main.c
15 @@ -2307,6 +2307,7 @@ e1000_xmit_frame(struct sk_buff *skb, st
16 tso = e1000_tso(adapter, skb);
17 if (tso < 0) {
18 dev_kfree_skb_any(skb);
19 + spin_unlock_irqrestore(&adapter->tx_lock, flags);
20 return NETDEV_TX_OK;
21 }
22
23 diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
24 --- a/drivers/pci/pci-driver.c
25 +++ b/drivers/pci/pci-driver.c
26 @@ -396,7 +396,7 @@ int pci_register_driver(struct pci_drive
27 /* FIXME, once all of the existing PCI drivers have been fixed to set
28 * the pci shutdown function, this test can go away. */
29 if (!drv->driver.shutdown)
30 - drv->driver.shutdown = pci_device_shutdown,
31 + drv->driver.shutdown = pci_device_shutdown;
32 drv->driver.owner = drv->owner;
33 drv->driver.kobj.ktype = &pci_driver_kobj_type;
34 pci_init_dynids(&drv->dynids);
35 diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
36 --- a/drivers/scsi/qla2xxx/qla_os.c
37 +++ b/drivers/scsi/qla2xxx/qla_os.c
38 @@ -1150,7 +1150,7 @@ iospace_error_exit:
39 */
40 int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info)
41 {
42 - int ret;
43 + int ret = -ENODEV;
44 device_reg_t __iomem *reg;
45 struct Scsi_Host *host;
46 scsi_qla_host_t *ha;
47 @@ -1161,7 +1161,7 @@ int qla2x00_probe_one(struct pci_dev *pd
48 fc_port_t *fcport;
49
50 if (pci_enable_device(pdev))
51 - return -1;
52 + goto probe_out;
53
54 host = scsi_host_alloc(&qla2x00_driver_template,
55 sizeof(scsi_qla_host_t));
56 @@ -1183,9 +1183,8 @@ int qla2x00_probe_one(struct pci_dev *pd
57
58 /* Configure PCI I/O space */
59 ret = qla2x00_iospace_config(ha);
60 - if (ret != 0) {
61 - goto probe_alloc_failed;
62 - }
63 + if (ret)
64 + goto probe_failed;
65
66 /* Sanitize the information from PCI BIOS. */
67 host->irq = pdev->irq;
68 @@ -1258,23 +1257,10 @@ int qla2x00_probe_one(struct pci_dev *pd
69 qla_printk(KERN_WARNING, ha,
70 "[ERROR] Failed to allocate memory for adapter\n");
71
72 - goto probe_alloc_failed;
73 + ret = -ENOMEM;
74 + goto probe_failed;
75 }
76
77 - pci_set_drvdata(pdev, ha);
78 - host->this_id = 255;
79 - host->cmd_per_lun = 3;
80 - host->unique_id = ha->instance;
81 - host->max_cmd_len = MAX_CMDSZ;
82 - host->max_channel = ha->ports - 1;
83 - host->max_id = ha->max_targets;
84 - host->max_lun = ha->max_luns;
85 - host->transportt = qla2xxx_transport_template;
86 - if (scsi_add_host(host, &pdev->dev))
87 - goto probe_alloc_failed;
88 -
89 - qla2x00_alloc_sysfs_attr(ha);
90 -
91 if (qla2x00_initialize_adapter(ha) &&
92 !(ha->device_flags & DFLG_NO_CABLE)) {
93
94 @@ -1285,11 +1271,10 @@ int qla2x00_probe_one(struct pci_dev *pd
95 "Adapter flags %x.\n",
96 ha->host_no, ha->device_flags));
97
98 + ret = -ENODEV;
99 goto probe_failed;
100 }
101
102 - qla2x00_init_host_attr(ha);
103 -
104 /*
105 * Startup the kernel thread for this host adapter
106 */
107 @@ -1299,17 +1284,26 @@ int qla2x00_probe_one(struct pci_dev *pd
108 qla_printk(KERN_WARNING, ha,
109 "Unable to start DPC thread!\n");
110
111 + ret = -ENODEV;
112 goto probe_failed;
113 }
114 wait_for_completion(&ha->dpc_inited);
115
116 + host->this_id = 255;
117 + host->cmd_per_lun = 3;
118 + host->unique_id = ha->instance;
119 + host->max_cmd_len = MAX_CMDSZ;
120 + host->max_channel = ha->ports - 1;
121 + host->max_lun = MAX_LUNS;
122 + host->transportt = qla2xxx_transport_template;
123 +
124 if (IS_QLA2100(ha) || IS_QLA2200(ha))
125 ret = request_irq(host->irq, qla2100_intr_handler,
126 SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha);
127 else
128 ret = request_irq(host->irq, qla2300_intr_handler,
129 SA_INTERRUPT|SA_SHIRQ, ha->brd_info->drv_name, ha);
130 - if (ret != 0) {
131 + if (ret) {
132 qla_printk(KERN_WARNING, ha,
133 "Failed to reserve interrupt %d already in use.\n",
134 host->irq);
135 @@ -1363,9 +1357,18 @@ int qla2x00_probe_one(struct pci_dev *pd
136 msleep(10);
137 }
138
139 + pci_set_drvdata(pdev, ha);
140 ha->flags.init_done = 1;
141 num_hosts++;
142
143 + ret = scsi_add_host(host, &pdev->dev);
144 + if (ret)
145 + goto probe_failed;
146 +
147 + qla2x00_alloc_sysfs_attr(ha);
148 +
149 + qla2x00_init_host_attr(ha);
150 +
151 qla_printk(KERN_INFO, ha, "\n"
152 " QLogic Fibre Channel HBA Driver: %s\n"
153 " QLogic %s - %s\n"
154 @@ -1384,9 +1387,6 @@ int qla2x00_probe_one(struct pci_dev *pd
155 probe_failed:
156 fc_remove_host(ha->host);
157
158 - scsi_remove_host(host);
159 -
160 -probe_alloc_failed:
161 qla2x00_free_device(ha);
162
163 scsi_host_put(host);
164 @@ -1394,7 +1394,8 @@ probe_alloc_failed:
165 probe_disable_device:
166 pci_disable_device(pdev);
167
168 - return -1;
169 +probe_out:
170 + return ret;
171 }
172 EXPORT_SYMBOL_GPL(qla2x00_probe_one);
173
174 diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h
175 --- a/include/asm-i386/string.h
176 +++ b/include/asm-i386/string.h
177 @@ -116,7 +116,8 @@ __asm__ __volatile__(
178 "orb $1,%%al\n"
179 "3:"
180 :"=a" (__res), "=&S" (d0), "=&D" (d1)
181 - :"1" (cs),"2" (ct));
182 + :"1" (cs),"2" (ct)
183 + :"memory");
184 return __res;
185 }
186
187 @@ -138,8 +139,9 @@ __asm__ __volatile__(
188 "3:\tsbbl %%eax,%%eax\n\t"
189 "orb $1,%%al\n"
190 "4:"
191 - :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
192 - :"1" (cs),"2" (ct),"3" (count));
193 + :"=a" (__res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
194 + :"1" (cs),"2" (ct),"3" (count)
195 + :"memory");
196 return __res;
197 }
198
199 @@ -158,7 +160,9 @@ __asm__ __volatile__(
200 "movl $1,%1\n"
201 "2:\tmovl %1,%0\n\t"
202 "decl %0"
203 - :"=a" (__res), "=&S" (d0) : "1" (s),"0" (c));
204 + :"=a" (__res), "=&S" (d0)
205 + :"1" (s),"0" (c)
206 + :"memory");
207 return __res;
208 }
209
210 @@ -175,7 +179,9 @@ __asm__ __volatile__(
211 "leal -1(%%esi),%0\n"
212 "2:\ttestb %%al,%%al\n\t"
213 "jne 1b"
214 - :"=g" (__res), "=&S" (d0), "=&a" (d1) :"0" (0),"1" (s),"2" (c));
215 + :"=g" (__res), "=&S" (d0), "=&a" (d1)
216 + :"0" (0),"1" (s),"2" (c)
217 + :"memory");
218 return __res;
219 }
220
221 @@ -189,7 +195,9 @@ __asm__ __volatile__(
222 "scasb\n\t"
223 "notl %0\n\t"
224 "decl %0"
225 - :"=c" (__res), "=&D" (d0) :"1" (s),"a" (0), "0" (0xffffffffu));
226 + :"=c" (__res), "=&D" (d0)
227 + :"1" (s),"a" (0), "0" (0xffffffffu)
228 + :"memory");
229 return __res;
230 }
231
232 @@ -333,7 +341,9 @@ __asm__ __volatile__(
233 "je 1f\n\t"
234 "movl $1,%0\n"
235 "1:\tdecl %0"
236 - :"=D" (__res), "=&c" (d0) : "a" (c),"0" (cs),"1" (count));
237 + :"=D" (__res), "=&c" (d0)
238 + :"a" (c),"0" (cs),"1" (count)
239 + :"memory");
240 return __res;
241 }
242
243 @@ -369,7 +379,7 @@ __asm__ __volatile__(
244 "je 2f\n\t"
245 "stosb\n"
246 "2:"
247 - : "=&c" (d0), "=&D" (d1)
248 + :"=&c" (d0), "=&D" (d1)
249 :"a" (c), "q" (count), "0" (count/4), "1" ((long) s)
250 :"memory");
251 return (s);
252 @@ -392,7 +402,8 @@ __asm__ __volatile__(
253 "jne 1b\n"
254 "3:\tsubl %2,%0"
255 :"=a" (__res), "=&d" (d0)
256 - :"c" (s),"1" (count));
257 + :"c" (s),"1" (count)
258 + :"memory");
259 return __res;
260 }
261 /* end of additional stuff */
262 @@ -473,7 +484,8 @@ static inline void * memscan(void * addr
263 "dec %%edi\n"
264 "1:"
265 : "=D" (addr), "=c" (size)
266 - : "0" (addr), "1" (size), "a" (c));
267 + : "0" (addr), "1" (size), "a" (c)
268 + : "memory");
269 return addr;
270 }
271
272 diff --git a/mm/memory.c b/mm/memory.c
273 --- a/mm/memory.c
274 +++ b/mm/memory.c
275 @@ -1164,7 +1164,7 @@ int remap_pfn_range(struct vm_area_struc
276 {
277 pgd_t *pgd;
278 unsigned long next;
279 - unsigned long end = addr + size;
280 + unsigned long end = addr + PAGE_ALIGN(size);
281 struct mm_struct *mm = vma->vm_mm;
282 int err;
283
284 diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
285 --- a/net/netlink/af_netlink.c
286 +++ b/net/netlink/af_netlink.c
287 @@ -315,8 +315,8 @@ err:
288 static void netlink_remove(struct sock *sk)
289 {
290 netlink_table_grab();
291 - nl_table[sk->sk_protocol].hash.entries--;
292 - sk_del_node_init(sk);
293 + if (sk_del_node_init(sk))
294 + nl_table[sk->sk_protocol].hash.entries--;
295 if (nlk_sk(sk)->groups)
296 __sk_del_bind_node(sk);
297 netlink_table_ungrab();
298 @@ -429,7 +429,12 @@ retry:
299 err = netlink_insert(sk, pid);
300 if (err == -EADDRINUSE)
301 goto retry;
302 - return 0;
303 +
304 + /* If 2 threads race to autobind, that is fine. */
305 + if (err == -EBUSY)
306 + err = 0;
307 +
308 + return err;
309 }
310
311 static inline int netlink_capable(struct socket *sock, unsigned int flag)

  ViewVC Help
Powered by ViewVC 1.1.20