]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/suse-2.6.27.39/patches.kernel.org/patch-2.6.27.34-35
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.kernel.org / patch-2.6.27.34-35
1 From: Greg Kroah-Hartman <gregkh@suse.de>
2 Subject: Linux 2.6.27.35
3
4 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
5
6 diff --git a/Makefile b/Makefile
7 index 1debf9a..5768979 100644
8 --- a/Makefile
9 +++ b/Makefile
10 @@ -1,7 +1,7 @@
11 VERSION = 2
12 PATCHLEVEL = 6
13 SUBLEVEL = 27
14 -EXTRAVERSION = .34
15 +EXTRAVERSION = .35
16 NAME = Trembling Tortoise
17
18 # *DOCUMENTATION*
19 diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
20 index c2df53c..cd1f704 100644
21 --- a/arch/powerpc/include/asm/mmu-hash64.h
22 +++ b/arch/powerpc/include/asm/mmu-hash64.h
23 @@ -41,6 +41,7 @@ extern char initial_stab[];
24
25 #define SLB_NUM_BOLTED 3
26 #define SLB_CACHE_ENTRIES 8
27 +#define SLB_MIN_SIZE 32
28
29 /* Bits in the SLB ESID word */
30 #define SLB_ESID_V ASM_CONST(0x0000000008000000) /* valid */
31 @@ -299,6 +300,7 @@ extern void slb_flush_and_rebolt(void);
32 extern void stab_initialize(unsigned long stab);
33
34 extern void slb_vmalloc_update(void);
35 +extern void slb_set_size(u16 size);
36 #endif /* __ASSEMBLY__ */
37
38 /*
39 diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
40 index b3eef30..c729910 100644
41 --- a/arch/powerpc/kernel/lparcfg.c
42 +++ b/arch/powerpc/kernel/lparcfg.c
43 @@ -35,6 +35,7 @@
44 #include <asm/prom.h>
45 #include <asm/vdso_datapage.h>
46 #include <asm/vio.h>
47 +#include <asm/mmu.h>
48
49 #define MODULE_VERS "1.8"
50 #define MODULE_NAME "lparcfg"
51 @@ -485,6 +486,8 @@ static int pseries_lparcfg_data(struct seq_file *m, void *v)
52
53 seq_printf(m, "shared_processor_mode=%d\n", lppaca[0].shared_proc);
54
55 + seq_printf(m, "slb_size=%d\n", mmu_slb_size);
56 +
57 return 0;
58 }
59
60 diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
61 index 1f8505c..49e6d91 100644
62 --- a/arch/powerpc/kernel/rtas.c
63 +++ b/arch/powerpc/kernel/rtas.c
64 @@ -38,6 +38,7 @@
65 #include <asm/syscalls.h>
66 #include <asm/smp.h>
67 #include <asm/atomic.h>
68 +#include <asm/mmu.h>
69
70 struct rtas_t rtas = {
71 .lock = SPIN_LOCK_UNLOCKED
72 @@ -665,6 +666,7 @@ static void rtas_percpu_suspend_me(void *info)
73 {
74 long rc;
75 unsigned long msr_save;
76 + u16 slb_size = mmu_slb_size;
77 int cpu;
78 struct rtas_suspend_me_data *data =
79 (struct rtas_suspend_me_data *)info;
80 @@ -686,13 +688,16 @@ static void rtas_percpu_suspend_me(void *info)
81 /* All other cpus are in H_JOIN, this cpu does
82 * the suspend.
83 */
84 + slb_set_size(SLB_MIN_SIZE);
85 printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n",
86 smp_processor_id());
87 data->error = rtas_call(data->token, 0, 1, NULL);
88
89 - if (data->error)
90 + if (data->error) {
91 printk(KERN_DEBUG "ibm,suspend-me returned %d\n",
92 data->error);
93 + slb_set_size(slb_size);
94 + }
95 } else {
96 printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n",
97 smp_processor_id(), rc);
98 diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
99 index 89497fb..4d73765 100644
100 --- a/arch/powerpc/mm/slb.c
101 +++ b/arch/powerpc/mm/slb.c
102 @@ -247,14 +247,22 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm)
103 static inline void patch_slb_encoding(unsigned int *insn_addr,
104 unsigned int immed)
105 {
106 - /* Assume the instruction had a "0" immediate value, just
107 - * "or" in the new value
108 - */
109 - *insn_addr |= immed;
110 + *insn_addr = (*insn_addr & 0xffff0000) | immed;
111 flush_icache_range((unsigned long)insn_addr, 4+
112 (unsigned long)insn_addr);
113 }
114
115 +void slb_set_size(u16 size)
116 +{
117 + extern unsigned int *slb_compare_rr_to_size;
118 +
119 + if (mmu_slb_size == size)
120 + return;
121 +
122 + mmu_slb_size = size;
123 + patch_slb_encoding(slb_compare_rr_to_size, mmu_slb_size);
124 +}
125 +
126 void slb_initialize(void)
127 {
128 unsigned long linear_llp, vmalloc_llp, io_llp;
129 diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
130 index 7637bd3..e67e18d 100644
131 --- a/arch/powerpc/platforms/pseries/reconfig.c
132 +++ b/arch/powerpc/platforms/pseries/reconfig.c
133 @@ -20,6 +20,7 @@
134 #include <asm/machdep.h>
135 #include <asm/uaccess.h>
136 #include <asm/pSeries_reconfig.h>
137 +#include <asm/mmu.h>
138
139
140
141 @@ -439,9 +440,15 @@ static int do_update_property(char *buf, size_t bufsize)
142 if (!newprop)
143 return -ENOMEM;
144
145 + if (!strcmp(name, "slb-size") || !strcmp(name, "ibm,slb-size"))
146 + slb_set_size(*(int *)value);
147 +
148 oldprop = of_find_property(np, name,NULL);
149 - if (!oldprop)
150 + if (!oldprop) {
151 + if (strlen(name))
152 + return prom_add_property(np, newprop);
153 return -ENODEV;
154 + }
155
156 rc = prom_update_property(np, newprop, oldprop);
157 if (rc)
158 diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
159 index 2bcf350..5cdd821 100644
160 --- a/drivers/ata/libata-core.c
161 +++ b/drivers/ata/libata-core.c
162 @@ -565,7 +565,13 @@ u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev)
163 head = tf->device & 0xf;
164 sect = tf->lbal;
165
166 - block = (cyl * dev->heads + head) * dev->sectors + sect;
167 + if (!sect) {
168 + ata_dev_printk(dev, KERN_WARNING, "device reported "
169 + "invalid CHS sector 0\n");
170 + sect = 1; /* oh well */
171 + }
172 +
173 + block = (cyl * dev->heads + head) * dev->sectors + sect - 1;
174 }
175
176 return block;
177 diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
178 index ed1879c..4180b55 100644
179 --- a/drivers/char/tpm/tpm_tis.c
180 +++ b/drivers/char/tpm/tpm_tis.c
181 @@ -450,6 +450,12 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
182 goto out_err;
183 }
184
185 + /* Default timeouts */
186 + chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
187 + chip->vendor.timeout_b = msecs_to_jiffies(TIS_LONG_TIMEOUT);
188 + chip->vendor.timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
189 + chip->vendor.timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
190 +
191 if (request_locality(chip, 0) != 0) {
192 rc = -ENODEV;
193 goto out_err;
194 @@ -457,12 +463,6 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
195
196 vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0));
197
198 - /* Default timeouts */
199 - chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
200 - chip->vendor.timeout_b = msecs_to_jiffies(TIS_LONG_TIMEOUT);
201 - chip->vendor.timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
202 - chip->vendor.timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT);
203 -
204 dev_info(dev,
205 "1.2 TPM (device-id 0x%X, rev-id %d)\n",
206 vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0)));
207 diff --git a/drivers/ps3/ps3stor_lib.c b/drivers/ps3/ps3stor_lib.c
208 index 55955f1..40169a1 100644
209 --- a/drivers/ps3/ps3stor_lib.c
210 +++ b/drivers/ps3/ps3stor_lib.c
211 @@ -23,6 +23,65 @@
212 #include <asm/lv1call.h>
213 #include <asm/ps3stor.h>
214
215 +/*
216 + * A workaround for flash memory I/O errors when the internal hard disk
217 + * has not been formatted for OtherOS use. Delay disk close until flash
218 + * memory is closed.
219 + */
220 +
221 +static struct ps3_flash_workaround {
222 + int flash_open;
223 + int disk_open;
224 + struct ps3_system_bus_device *disk_sbd;
225 +} ps3_flash_workaround;
226 +
227 +static int ps3stor_open_hv_device(struct ps3_system_bus_device *sbd)
228 +{
229 + int error = ps3_open_hv_device(sbd);
230 +
231 + if (error)
232 + return error;
233 +
234 + if (sbd->match_id == PS3_MATCH_ID_STOR_FLASH)
235 + ps3_flash_workaround.flash_open = 1;
236 +
237 + if (sbd->match_id == PS3_MATCH_ID_STOR_DISK)
238 + ps3_flash_workaround.disk_open = 1;
239 +
240 + return 0;
241 +}
242 +
243 +static int ps3stor_close_hv_device(struct ps3_system_bus_device *sbd)
244 +{
245 + int error;
246 +
247 + if (sbd->match_id == PS3_MATCH_ID_STOR_DISK
248 + && ps3_flash_workaround.disk_open
249 + && ps3_flash_workaround.flash_open) {
250 + ps3_flash_workaround.disk_sbd = sbd;
251 + return 0;
252 + }
253 +
254 + error = ps3_close_hv_device(sbd);
255 +
256 + if (error)
257 + return error;
258 +
259 + if (sbd->match_id == PS3_MATCH_ID_STOR_DISK)
260 + ps3_flash_workaround.disk_open = 0;
261 +
262 + if (sbd->match_id == PS3_MATCH_ID_STOR_FLASH) {
263 + ps3_flash_workaround.flash_open = 0;
264 +
265 + if (ps3_flash_workaround.disk_sbd) {
266 + ps3_close_hv_device(ps3_flash_workaround.disk_sbd);
267 + ps3_flash_workaround.disk_open = 0;
268 + ps3_flash_workaround.disk_sbd = NULL;
269 + }
270 + }
271 +
272 + return 0;
273 +}
274
275 static int ps3stor_probe_access(struct ps3_storage_device *dev)
276 {
277 @@ -90,7 +149,7 @@ int ps3stor_setup(struct ps3_storage_device *dev, irq_handler_t handler)
278 int error, res, alignment;
279 enum ps3_dma_page_size page_size;
280
281 - error = ps3_open_hv_device(&dev->sbd);
282 + error = ps3stor_open_hv_device(&dev->sbd);
283 if (error) {
284 dev_err(&dev->sbd.core,
285 "%s:%u: ps3_open_hv_device failed %d\n", __func__,
286 @@ -166,7 +225,7 @@ fail_free_irq:
287 fail_sb_event_receive_port_destroy:
288 ps3_sb_event_receive_port_destroy(&dev->sbd, dev->irq);
289 fail_close_device:
290 - ps3_close_hv_device(&dev->sbd);
291 + ps3stor_close_hv_device(&dev->sbd);
292 fail:
293 return error;
294 }
295 @@ -193,7 +252,7 @@ void ps3stor_teardown(struct ps3_storage_device *dev)
296 "%s:%u: destroy event receive port failed %d\n",
297 __func__, __LINE__, error);
298
299 - error = ps3_close_hv_device(&dev->sbd);
300 + error = ps3stor_close_hv_device(&dev->sbd);
301 if (error)
302 dev_err(&dev->sbd.core,
303 "%s:%u: ps3_close_hv_device failed %d\n", __func__,
304 diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
305 index a6f8b8f..e012475 100644
306 --- a/fs/binfmt_elf.c
307 +++ b/fs/binfmt_elf.c
308 @@ -496,22 +496,22 @@ static unsigned long load_elf_interp(struct elfhdr *interp_elf_ex,
309 }
310 }
311
312 - /*
313 - * Now fill out the bss section. First pad the last page up
314 - * to the page boundary, and then perform a mmap to make sure
315 - * that there are zero-mapped pages up to and including the
316 - * last bss page.
317 - */
318 - if (padzero(elf_bss)) {
319 - error = -EFAULT;
320 - goto out_close;
321 - }
322 + if (last_bss > elf_bss) {
323 + /*
324 + * Now fill out the bss section. First pad the last page up
325 + * to the page boundary, and then perform a mmap to make sure
326 + * that there are zero-mapped pages up to and including the
327 + * last bss page.
328 + */
329 + if (padzero(elf_bss)) {
330 + error = -EFAULT;
331 + goto out_close;
332 + }
333
334 - /* What we have mapped so far */
335 - elf_bss = ELF_PAGESTART(elf_bss + ELF_MIN_ALIGN - 1);
336 + /* What we have mapped so far */
337 + elf_bss = ELF_PAGESTART(elf_bss + ELF_MIN_ALIGN - 1);
338
339 - /* Map the last of the bss segment */
340 - if (last_bss > elf_bss) {
341 + /* Map the last of the bss segment */
342 down_write(&current->mm->mmap_sem);
343 error = do_brk(elf_bss, last_bss - elf_bss);
344 up_write(&current->mm->mmap_sem);
345 diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c
346 index 4d617ea..988530d 100644
347 --- a/fs/nfsd/nfs3proc.c
348 +++ b/fs/nfsd/nfs3proc.c
349 @@ -201,6 +201,7 @@ nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp,
350 struct nfsd3_writeres *resp)
351 {
352 __be32 nfserr;
353 + unsigned long cnt = argp->len;
354
355 dprintk("nfsd: WRITE(3) %s %d bytes at %ld%s\n",
356 SVCFH_fmt(&argp->fh),
357 @@ -213,9 +214,9 @@ nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp,
358 nfserr = nfsd_write(rqstp, &resp->fh, NULL,
359 argp->offset,
360 rqstp->rq_vec, argp->vlen,
361 - argp->len,
362 + &cnt,
363 &resp->committed);
364 - resp->count = argp->count;
365 + resp->count = cnt;
366 RETURN_STATUS(nfserr);
367 }
368
369 diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
370 index e5b51ff..fddc656 100644
371 --- a/fs/nfsd/nfs4proc.c
372 +++ b/fs/nfsd/nfs4proc.c
373 @@ -685,6 +685,7 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
374 struct file *filp = NULL;
375 u32 *p;
376 __be32 status = nfs_ok;
377 + unsigned long cnt;
378
379 /* no need to check permission - this will be done in nfsd_write() */
380
381 @@ -703,7 +704,7 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
382 return status;
383 }
384
385 - write->wr_bytes_written = write->wr_buflen;
386 + cnt = write->wr_buflen;
387 write->wr_how_written = write->wr_stable_how;
388 p = (u32 *)write->wr_verifier.data;
389 *p++ = nfssvc_boot.tv_sec;
390 @@ -711,10 +712,12 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
391
392 status = nfsd_write(rqstp, &cstate->current_fh, filp,
393 write->wr_offset, rqstp->rq_vec, write->wr_vlen,
394 - write->wr_buflen, &write->wr_how_written);
395 + &cnt, &write->wr_how_written);
396 if (filp)
397 fput(filp);
398
399 + write->wr_bytes_written = cnt;
400 +
401 if (status == nfserr_symlink)
402 status = nfserr_inval;
403 return status;
404 diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
405 index 0766f95..20c63b2 100644
406 --- a/fs/nfsd/nfsproc.c
407 +++ b/fs/nfsd/nfsproc.c
408 @@ -179,6 +179,7 @@ nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp,
409 {
410 __be32 nfserr;
411 int stable = 1;
412 + unsigned long cnt = argp->len;
413
414 dprintk("nfsd: WRITE %s %d bytes at %d\n",
415 SVCFH_fmt(&argp->fh),
416 @@ -187,7 +188,7 @@ nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp,
417 nfserr = nfsd_write(rqstp, fh_copy(&resp->fh, &argp->fh), NULL,
418 argp->offset,
419 rqstp->rq_vec, argp->vlen,
420 - argp->len,
421 + &cnt,
422 &stable);
423 return nfsd_return_attrs(nfserr, resp);
424 }
425 diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
426 index 18060be..ac31e0c 100644
427 --- a/fs/nfsd/vfs.c
428 +++ b/fs/nfsd/vfs.c
429 @@ -957,7 +957,7 @@ static void kill_suid(struct dentry *dentry)
430 static __be32
431 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
432 loff_t offset, struct kvec *vec, int vlen,
433 - unsigned long cnt, int *stablep)
434 + unsigned long *cnt, int *stablep)
435 {
436 struct svc_export *exp;
437 struct dentry *dentry;
438 @@ -971,7 +971,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
439 err = nfserr_perm;
440
441 if ((fhp->fh_export->ex_flags & NFSEXP_MSNFS) &&
442 - (!lock_may_write(file->f_path.dentry->d_inode, offset, cnt)))
443 + (!lock_may_write(file->f_path.dentry->d_inode, offset, *cnt)))
444 goto out;
445 #endif
446
447 @@ -1003,7 +1003,8 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
448 host_err = vfs_writev(file, (struct iovec __user *)vec, vlen, &offset);
449 set_fs(oldfs);
450 if (host_err >= 0) {
451 - nfsdstats.io_write += cnt;
452 + *cnt = host_err;
453 + nfsdstats.io_write += host_err;
454 fsnotify_modify(file->f_path.dentry);
455 }
456
457 @@ -1050,7 +1051,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
458 dprintk("nfsd: write complete host_err=%d\n", host_err);
459 if (host_err >= 0)
460 err = 0;
461 - else
462 + else
463 err = nfserrno(host_err);
464 out:
465 return err;
466 @@ -1092,7 +1093,7 @@ out:
467 */
468 __be32
469 nfsd_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
470 - loff_t offset, struct kvec *vec, int vlen, unsigned long cnt,
471 + loff_t offset, struct kvec *vec, int vlen, unsigned long *cnt,
472 int *stablep)
473 {
474 __be32 err = 0;
475 diff --git a/fs/udf/lowlevel.c b/fs/udf/lowlevel.c
476 index 703843f..1b88fd5 100644
477 --- a/fs/udf/lowlevel.c
478 +++ b/fs/udf/lowlevel.c
479 @@ -56,7 +56,12 @@ unsigned long udf_get_last_block(struct super_block *sb)
480 struct block_device *bdev = sb->s_bdev;
481 unsigned long lblock = 0;
482
483 - if (ioctl_by_bdev(bdev, CDROM_LAST_WRITTEN, (unsigned long) &lblock))
484 + /*
485 + * ioctl failed or returned obviously bogus value?
486 + * Try using the device size...
487 + */
488 + if (ioctl_by_bdev(bdev, CDROM_LAST_WRITTEN, (unsigned long) &lblock) ||
489 + lblock == 0)
490 lblock = bdev->bd_inode->i_size >> sb->s_blocksize_bits;
491
492 if (lblock)
493 diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
494 index 108f47e..9af9bca 100644
495 --- a/include/linux/nfsd/nfsd.h
496 +++ b/include/linux/nfsd/nfsd.h
497 @@ -105,7 +105,7 @@ void nfsd_close(struct file *);
498 __be32 nfsd_read(struct svc_rqst *, struct svc_fh *, struct file *,
499 loff_t, struct kvec *, int, unsigned long *);
500 __be32 nfsd_write(struct svc_rqst *, struct svc_fh *,struct file *,
501 - loff_t, struct kvec *,int, unsigned long, int *);
502 + loff_t, struct kvec *,int, unsigned long *, int *);
503 __be32 nfsd_readlink(struct svc_rqst *, struct svc_fh *,
504 char *, int *);
505 __be32 nfsd_symlink(struct svc_rqst *, struct svc_fh *,
506 diff --git a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h
507 index 018a7de..ba12825 100644
508 --- a/sound/pci/cs46xx/cs46xx_lib.h
509 +++ b/sound/pci/cs46xx/cs46xx_lib.h
510 @@ -35,7 +35,7 @@
511
512
513 #ifdef CONFIG_SND_CS46XX_NEW_DSP
514 -#define CS46XX_MIN_PERIOD_SIZE 1
515 +#define CS46XX_MIN_PERIOD_SIZE 64
516 #define CS46XX_MAX_PERIOD_SIZE 1024*1024
517 #else
518 #define CS46XX_MIN_PERIOD_SIZE 2048
519 diff --git a/sound/pci/oxygen/oxygen_io.c b/sound/pci/oxygen/oxygen_io.c
520 index 83f135f..6ebd2f3 100644
521 --- a/sound/pci/oxygen/oxygen_io.c
522 +++ b/sound/pci/oxygen/oxygen_io.c
523 @@ -214,17 +214,8 @@ EXPORT_SYMBOL(oxygen_write_spi);
524
525 void oxygen_write_i2c(struct oxygen *chip, u8 device, u8 map, u8 data)
526 {
527 - unsigned long timeout;
528 -
529 /* should not need more than about 300 us */
530 - timeout = jiffies + msecs_to_jiffies(1);
531 - do {
532 - if (!(oxygen_read16(chip, OXYGEN_2WIRE_BUS_STATUS)
533 - & OXYGEN_2WIRE_BUSY))
534 - break;
535 - udelay(1);
536 - cond_resched();
537 - } while (time_after_eq(timeout, jiffies));
538 + msleep(1);
539
540 oxygen_write8(chip, OXYGEN_2WIRE_MAP, map);
541 oxygen_write8(chip, OXYGEN_2WIRE_DATA, data);