1 ChangeSet@1.1136.1.75 2003-12-07 21:20:48-02:00 willy at debian.org
2 [PATCH] Remove broken file lock accounting
4 On Mon, Jul 01, 2002 at 11:13:55PM +0100, Matthew Wilcox wrote:
5 > The file lock accounting code is horribly broken (and I wrote it, I
6 > should know). I think the best solution to 2.4 is simply to delete it,
7 > at least for BSD-style flocks.
9 > Patch to follow. Note that 2.5 has the same issue, but I'll fix it
12 Here's the patch for 2.4:
14 - --- linux-2.4.23/fs/locks.c.orig Tue Dec 9 00:11:23 2003
15 +++ linux-2.4.23/fs/locks.c Tue Dec 9 00:13:00 2003
17 static kmem_cache_t *filelock_cache;
19 /* Allocate an empty lock structure. */
20 - -static struct file_lock *locks_alloc_lock(int account)
21 +static struct file_lock *locks_alloc_lock(void)
23 - - struct file_lock *fl;
24 - - if (account && current->locks >= current->rlim[RLIMIT_LOCKS].rlim_cur)
26 - - fl = kmem_cache_alloc(filelock_cache, SLAB_KERNEL);
30 + return kmem_cache_alloc(filelock_cache, SLAB_KERNEL);
33 /* Free a lock which is not in use. */
39 if (waitqueue_active(&fl->fl_wait))
40 panic("Attempting to free lock with active wait queue");
43 /* Fill in a file_lock structure with an appropriate FLOCK lock. */
44 static struct file_lock *flock_make_lock(struct file *filp, unsigned int type)
46 - - struct file_lock *fl = locks_alloc_lock(1);
47 + struct file_lock *fl = locks_alloc_lock();
52 /* Allocate a file_lock initialised to this type of lease */
53 static int lease_alloc(struct file *filp, int type, struct file_lock **flp)
55 - - struct file_lock *fl = locks_alloc_lock(1);
56 + struct file_lock *fl = locks_alloc_lock();
64 - - struct file_lock *new_fl = locks_alloc_lock(0);
65 + struct file_lock *new_fl = locks_alloc_lock();
70 * We may need two file_lock structures for this operation,
71 * so we get them in advance to avoid races.
73 - - new_fl = locks_alloc_lock(0);
74 - - new_fl2 = locks_alloc_lock(0);
75 + new_fl = locks_alloc_lock();
76 + new_fl2 = locks_alloc_lock();
77 error = -ENOLCK; /* "no luck" */
78 if (!(new_fl && new_fl2))
81 int fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l)
84 - - struct file_lock *file_lock = locks_alloc_lock(0);
85 + struct file_lock *file_lock = locks_alloc_lock();
90 int fcntl_setlk64(unsigned int fd, unsigned int cmd, struct flock64 *l)
93 - - struct file_lock *file_lock = locks_alloc_lock(0);
94 + struct file_lock *file_lock = locks_alloc_lock();
98 ChangeSet@1.1136.1.68 2003-12-06 16:25:16-02:00 wli at holomorphy.com
99 [PATCH] Fixup smb_boot_cpus(): Fix HT detection bug
101 On Wed, Dec 03, 2003 at 06:41:36PM -0500, Ethan Weinstein wrote:
102 > Ok, setting CONFIG_NR_CPUS=8 does indeed solve the HT issue, looks like
103 > it was the numbering scheme:
105 Something like this might do the trick. NR_CPUS is already checked
106 indirectly via max_cpus.
113 - --- linux-2.4.23/arch/i386/kernel/smpboot.c.orig Tue Dec 9 00:27:10 2003
114 +++ linux-2.4.23/arch/i386/kernel/smpboot.c Tue Dec 9 00:27:23 2003
115 @@ -1106,7 +1106,7 @@
117 Dprintk("CPU present map: %lx\n", phys_cpu_present_map);
119 - - for (bit = 0; bit < NR_CPUS; bit++) {
120 + for (bit = 0; bit < BITS_PER_LONG; bit++) {
121 apicid = cpu_present_to_apicid(bit);
123 /* don't try to boot BAD_APICID */
124 Patch originally in 2.6 from Rusty but updated in bk by marcello for
125 ChangeSet@1.1136.71.52 2003-12-04 10:32:56-08:00 laforge@netfilter.org
127 Marcelo> Please try the updated 2.4 BK tree (you can use -bk5,
128 Marcelo> http://www.kernel.org/pub/linux/kernel/v2.4/snapshots/patch-2.4.23-bk5.bz2).
130 Marcelo> It contains a fix for a known bug in the netfilter which
131 Marcelo> might what you're hitting.
133 - --- linux-2.4.23/net/ipv4/netfilter/ip_fw_compat_masq.c.orig Tue Dec 9 00:01:18 2003
134 +++ linux-2.4.23/net/ipv4/netfilter/ip_fw_compat_masq.c Tue Dec 9 00:01:27 2003
136 WRITE_UNLOCK(&ip_nat_lock);
140 - - place_in_hashes(ct, info);
141 - - info->initialized = 1;
143 DEBUGP("Masquerading already done on this conn.\n");
144 WRITE_UNLOCK(&ip_nat_lock);
145 ChangeSet@1.1136.1.73 2003-12-07 15:10:38-02:00 mikulas at cuni.cz
146 [PATCH] from -aa tree: Fix potential fsync() race condition
148 > 00_ll_rw_block-sync-race-1 first appeared in 2.4.21pre4aa3 - 470 bytes
150 > Add lock_page in ll_rw_block to fix a fs race
151 > condition. Fix suggested by Mikulas Patocka.
153 Yes. You have two inodes placed in the same buffer.
155 Process 1 modifies inode 1 and calls fsync on it. fsync initiates write of
156 the block. ll_rw_block returns, write is in progress.
158 Process 2 modifies inode 2 and calls fsync on it. Filesystem calls
159 ll_rw_block write on the same buffer. ll_rw_block immediatelly returns,
160 because it sees there is already IO on the buffer (there used to be
161 something like if (buffer_locked(bh)) return;). Process 2 waits on buffer.
163 The write finished. Both processes are waken up. Both processes return out
164 of fsync function. Process 2 returns from fsync while it did not write its
165 inode modification to disk --- it waited on process 1's write.
168 - --- linux-2.4.23/drivers/block/ll_rw_blk.c~ Tue Dec 9 00:17:12 2003
169 +++ linux-2.4.23/drivers/block/ll_rw_blk.c Tue Dec 9 00:17:12 2003
170 @@ -1377,9 +1377,7 @@
171 for (i = 0; i < nr; i++) {
172 struct buffer_head *bh = bhs[i];
174 - - /* Only one thread can actually submit the I/O. */
175 - - if (test_and_set_bit(BH_Lock, &bh->b_state))
179 /* We have the buffer lock */
180 atomic_inc(&bh->b_count);
181 ChangeSet@1.1136.73.4 2003-12-02 12:02:00-02:00 neilb at unsw.edu.au
182 [PATCH] Drop module count if lockd reclaimer thread failed to start.
184 - --- linux-2.4.23/fs/lockd/clntlock.c~ Tue Dec 9 00:35:29 2003
185 +++ linux-2.4.23/fs/lockd/clntlock.c Tue Dec 9 00:35:29 2003
187 nlmclnt_prepare_reclaim(host, newstate);
190 - - kernel_thread(reclaimer, host, CLONE_SIGNAL);
191 + if(kernel_thread(reclaimer, host, CLONE_SIGNAL) < 0)
196 ChangeSet@1.1136.1.65 2003-12-05 15:53:34-02:00 mikpe at se
197 [PATCH] fix reboot/no_idt bug
199 When compiling 2.4.23 with gcc-3.3.2, gcc generates the
200 following warning for arch/i386/kernel/process.c:
202 process.c: In function `machine_restart':
203 process.c:427: warning: use of memory input without lvalue in asm operand 0
206 The warning identifies a real bug. no_idt is passed to
207 lidt with an "m" constraint, which requires an l-value.
208 Since no_idt is faked as an array, gcc creates an anonymous
209 variable pointing to no_idt and passes that to lidt(*),
210 so at runtime lidt sees the wrong address. Not good.
211 (The bug, while real, is unlikely to trigger since it
212 sits in an infrequently used path in the reboot code.)
214 The fix is to make no_idt a struct (and thus an l-lvalue)
215 like the other gdt/idt descriptors.
217 This patch is a backport of the fix Linus made for the
218 same bug in 2.6.0-test4.
220 [Andi: x86-64 appears to have the same bug]
222 (*) Verified by inspection of the assembly code.
227 - --- linux-2.4.23/arch/i386/kernel/process.c.orig Tue Dec 9 00:29:52 2003
228 +++ linux-2.4.23/arch/i386/kernel/process.c Tue Dec 9 00:30:46 2003
231 __setup("idle=", idle_setup);
233 - -static long no_idt[2];
234 static int reboot_mode;
235 int reboot_thru_bios;
238 unsigned long long * base __attribute__ ((packed));
240 real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, real_mode_gdt_entries },
241 - -real_mode_idt = { 0x3ff, 0 };
242 +real_mode_idt = { 0x3ff, 0 },
245 /* This is 16-bit protected mode code to disable paging and the cache,
246 switch to real mode and jump to the BIOS reset code.
247 ChangeSet@1.1136.78.2 2003-12-07 12:43:34-02:00 wli at holomorphy.com
248 [PATCH] out_of_memory() locking
250 On Sun, Nov 30, 2003 at 08:18:02AM -0800, William Lee Irwin III wrote:
251 > (1) the timestamps/etc. weren't locked, and when cpus raced, it caused
253 > (2) the mm could go away while scanning the tasklist, causing the thing
254 > to try to kill kernel threads
255 > Here's a preliminary backport (please do _NOT_ apply until I or someone
256 > tests it) for you to comment on. Basically, do you want (1) and (2)
257 > split out, is the basic thing okay, etc.?
259 out_of_memory()'s operational variables are not locked, and can be
260 reset by multiple cpus simultaneously, causing false OOM kills.
262 This patch adds an oom_lock to out_of_memory() to protect its operational
270 - --- linux-2.4.23/mm/oom_kill.c.orig Tue Dec 9 00:20:47 2003
271 +++ linux-2.4.23/mm/oom_kill.c Tue Dec 9 00:24:20 2003
274 void out_of_memory(void)
277 + * oom_lock protects out_of_memory()'s static variables.
278 + * It's a global lock; this is not performance-critical.
280 + static spinlock_t oom_lock = SPIN_LOCK_UNLOCKED;
281 static unsigned long first, last, count, lastkill;
282 unsigned long now, since;
285 if (nr_swap_pages > 0)
288 + spin_lock(&oom_lock);
292 @@ -229,14 +235,14 @@
300 * If we have gotten only a few failures,
301 * we're not really oom.
308 * If we just killed a process, wait a while
309 @@ -245,17 +251,25 @@
311 since = now - lastkill;
317 * Ok, really out of memory. Kill something.
321 + /* oom_kill() can sleep */
322 + spin_unlock(&oom_lock);
324 + spin_lock(&oom_lock);
333 + spin_unlock(&oom_lock);
336 #endif /* Unused file */
337 ChangeSet@1.1136.1.61 2003-12-01 12:43:59-07:00 davidm at com[helgaas]
339 ia64: Fix a bug in sigtramp() which corrupted ar.rnat when unwinding
340 across a signal trampoline (in user space). Reported by
343 arch/ia64/kernel/gate.S@1.11 2003-12-01 05:43:29-07:00 davidm at com[helgaas]
345 (__kernel_sigtramp): Replace usage of p8 with p1. We must use a preserved
346 predicate for the .spillsp.p directive, otherwise, the predicate
347 may have been clobbered by the time the unwinder looks at it.
348 Fortunately, we can just use p1 because the entire pr register
349 is already saved/restored by the kernel.
352 - --- linux-2.4.23/arch/ia64/kernel/gate.S~ Tue Dec 9 00:46:11 2003
353 +++ linux-2.4.23/arch/ia64/kernel/gate.S Tue Dec 9 00:46:11 2003
355 ld8 r15=[base1] // get address of new RBS base (or NULL)
356 cover // push args in interrupted frame onto backing store
358 - - cmp.ne p8,p0=r15,r0 // do we need to switch the rbs?
359 + cmp.ne p1,p0=r15,r0 // do we need to switch rbs? (note: pr is saved by kernel)
360 mov.m r9=ar.bsp // fetch ar.bsp
361 - - .spillsp.p p8, ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
362 - -(p8) br.cond.spnt setup_rbs // yup -> (clobbers r14, r15, and r16)
363 + .spillsp.p p1, ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
364 +(p1) br.cond.spnt setup_rbs // yup -> (clobbers p8, r14, r15, and r16)
366 alloc r8=ar.pfs,0,0,3,0
367 ld8 out0=[base0],16 // load arg0 (signum)
369 ld8 r15=[base0],(CFM_OFF-BSP_OFF) // fetch sc_ar_bsp and advance to CFM_OFF
372 - - cmp.ne p8,p0=r14,r15 // do we need to restore the rbs?
373 - -(p8) br.cond.spnt restore_rbs // yup -> (clobbers r14-r18, f6 & f7)
374 + cmp.ne p1,p0=r14,r15 // do we need to restore the rbs?
375 +(p1) br.cond.spnt restore_rbs // yup -> (clobbers p8, r14-r18, f6 & f7)
377 back_from_restore_rbs:
378 adds base0=(FR6_OFF+SIGCONTEXT_OFF),sp
379 ChangeSet@1.1136.73.2 2003-12-02 11:58:06-02:00 neilb at unsw.edu.au
380 [PATCH] Make root a special case for per-user process limits.
382 This is needed because when a setuid-root program calls
383 setuid(0) to become really-root, p->user becomes root_user,
384 but ->rlim stays as the original user's limit, and now
385 the process cannot fork - becuase root has more processes than
386 the original user had.
388 The real problem is that NPROC is not really a per-process limit,
389 but its a per-user limit, and including it with the rlim structure
390 was not a good idea :-(
392 This fix is already in 2.6
395 - --- linux-2.4.23/kernel/fork.c.orig Tue Dec 9 00:38:16 2003
396 +++ linux-2.4.23/kernel/fork.c Tue Dec 9 00:38:59 2003
398 * than the amount of processes root is running. -- Rik
400 if (atomic_read(&p->user->processes) >= p->rlim[RLIMIT_NPROC].rlim_cur
401 + && p->user != &root_user
402 && !capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE))
405 As per http://lkml.org/lkml/2003/12/1/150
407 diff -urN --exclude=CVS --exclude=.cvsignore linux-2.4.23/include/linux/mc146818rtc.h linux-cvs-2.4.23/include/linux/mc146818rtc.h
408 - --- linux-2.4.23/include/linux/mc146818rtc.h 2001-11-22 20:46:58.000000000 +0100
409 +++ linux-cvs-2.4.23/include/linux/mc146818rtc.h 2003-11-28 15:09:41.000000000 +0100
411 #define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
414 +#ifndef RTC_IO_EXTENT
415 +#define RTC_IO_EXTENT 0x10 /* Only really two ports, but... */
418 +#ifndef RTC_IOMAPPED
419 +#define RTC_IOMAPPED 1 /* Default to I/O mapping. */
422 #endif /* _MC146818RTC_H */
423 - From linux-kernel@vger.kernel.org Thu Dec 18 21:50:26 2003
424 Date: Tue, 16 Dec 2003 15:59:16 +0000
425 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
426 To: bk-commits-24@vger.kernel.org
427 Subject: [PATCH] duplicate PID fix
429 ChangeSet 1.1302, 2003/12/16 13:59:16-02:00, t-kochi@bq.jp.nec.com
431 [PATCH] duplicate PID fix
435 This fix was sent to lkml in April, and was merged to -ac tree,
436 but is not merged in the main tree yet.
437 Please consider taking this in.
439 Without this, duplicate pids can be allocated, which will make
440 one of them unkillable (signals are deliverd to only one of them),
441 and this can be exploitable (I don't know for sure, but maybe,
444 This situation happens only when all pid space is full.
445 Usually, users cannot fork processes more than 32768 (PID_MAX),
446 but default user limit of max processes can be more
447 than PID_MAX on large memory machines such as 64bit
448 platforms (although it's adjustable by threads-max sysctl).
450 This patch modifies common code and affects all architectures,
451 but modifies code only executed when no pid is available,
452 so it doesn't hurt any normal path anyway.
454 (BTW, once I sent this patch to Rusty's Trivial patch monkey,
455 but his reply was non-trivial, and he also said this is
458 The details are described below:
460 In get_pid(), an available pid is searched through all task_structs
461 even when there is no available pid. If a new pid is not available,
462 the kernel exits the loop with static variable 'next_safe' untouched,
463 which usually is no problem.
466 spin_lock(&lastpid_lock);
468 if((++last_pid) & 0xffff8000) {
469 last_pid = 300; /* Skip daemons etc. */
472 if(last_pid >= next_safe) {
475 read_lock(&tasklist_lock);
478 if(p->pid == last_pid ||
479 p->pgrp == last_pid ||
480 p->tgid == last_pid ||
481 p->session == last_pid) { <= (A)
482 if(++last_pid >= next_safe) { <= (B)
483 if(last_pid & 0xffff8000)
487 if(unlikely(last_pid == beginpid)) <= (C)
491 if(p->pid > last_pid && next_safe > p->pid)
493 if(p->pgrp > last_pid && next_safe > p->pgrp)
495 if(p->tgid > last_pid && next_safe > p->tgid)
497 if(p->session > last_pid && next_safe > p->session)
498 next_safe = p->session;
502 In a rare case, both (B) and (C) can be true and then, next_safe
503 will remain PID_MAX (32768). If that happens, following get_pid() will
504 always succeed until last_pid reaches 32768 and there may be many
507 For example, this happens when
509 * PID space are full (300-32767 are all occupied)
510 * the last pid allocated is 10000
511 * task list chain is like:
512 ...(pids < 9999), 9999, ...(pids 300~9998, 10001~32767)... , 10000
514 The loop starts searching an available pid with beginpid=10000 and
515 last_pid=10001. last_pid is incremented until it gets PID_MAX
516 and then wraps around to 300, then is incremented again.
518 At the point that p->pid=9999 is found in tasklist (condition (A)),
523 therefore condition (B) is true, and then
528 and then, condition (C) is also true, and exits the loop.
530 To protect this case is simple; when the condition (C) is true,
531 set next_safe to 0 or any safe value to guarantee that a free pid
532 will be searched through next time.
537 # This patch includes the following deltas:
538 # ChangeSet 1.1301 -> 1.1302
539 # kernel/fork.c 1.31 -> 1.32
543 1 files changed, 3 insertions(+), 1 deletion(-)
546 diff -Nru a/kernel/fork.c b/kernel/fork.c
547 - --- a/kernel/fork.c Tue Dec 16 09:02:43 2003
548 +++ b/kernel/fork.c Tue Dec 16 09:02:43 2003
553 - - if(unlikely(last_pid == beginpid))
554 + if(unlikely(last_pid == beginpid)) {
560 if(p->pid > last_pid && next_safe > p->pid)
562 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
563 the body of a message to majordomo@vger.kernel.org
564 More majordomo info at http://vger.kernel.org/majordomo-info.html
565 - From linux-kernel@vger.kernel.org Thu Dec 18 21:30:47 2003
566 Date: Sat, 13 Dec 2003 13:20:08 +0000
567 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
568 To: bk-commits-24@vger.kernel.org
569 Subject: [PATCH] IrDA kernel log buster
571 ChangeSet 1.1277, 2003/12/13 11:20:08-02:00, jt@bougret.hpl.hp.com
573 [PATCH] IrDA kernel log buster
577 I just ran 2.4.23, and after a few min the disk reached 100%
578 capacity. A quick check lead to to oversized kernel log, and to the
579 following changeset :
581 http://linux.bkbits.net:8080/linux-2.4/cset@1.1136.23.2?nav=index.html|ChangeSet@-12w
583 Patch to fix this problem is attached below, I've just
584 backported the proper fixes from 2.5.X into 2.4.X.
585 Probably this person did too much Python, but in C you need
586 braces around multiple statements part of the same branch, so the
587 second printf was always executed even when logging was disabled. I
588 also don't understand why this person didn't decided to backport the
590 I'm also bit surprised that this kind of patch went into the
591 kernel behind my back, because I though that freeze meant not
592 accepting untested patch from random hacker.
599 # This patch includes the following deltas:
600 # ChangeSet 1.1276 -> 1.1277
601 # net/irda/irnet/irnet.h 1.11 -> 1.12
604 irnet.h | 20 ++++++++++----------
605 1 files changed, 10 insertions(+), 10 deletions(-)
608 diff -Nru a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h
609 - --- a/net/irda/irnet/irnet.h Sat Dec 13 06:02:55 2003
610 +++ b/net/irda/irnet/irnet.h Sat Dec 13 06:02:55 2003
611 @@ -322,29 +322,29 @@
612 * compiler will optimise away the if() in all cases.
614 /* All error messages (will show up in the normal logs) */
615 - -#define DERROR(dbg, args...) \
616 +#define DERROR(dbg, format, args...) \
618 - - printk(KERN_INFO "irnet: %s(): ", __FUNCTION__); printk(args);}
619 + printk(KERN_INFO "irnet: %s(): " format, __FUNCTION__ , ##args);}
621 /* Normal debug message (will show up in /var/log/debug) */
622 - -#define DEBUG(dbg, args...) \
623 +#define DEBUG(dbg, format, args...) \
625 - - printk(KERN_DEBUG "irnet: %s(): ", __FUNCTION__); printk(args);}
626 + printk(KERN_DEBUG "irnet: %s(): " format, __FUNCTION__ , ##args);}
628 /* Entering a function (trace) */
629 - -#define DENTER(dbg, args...) \
630 +#define DENTER(dbg, format, args...) \
632 - - printk(KERN_DEBUG "irnet: ->%s", __FUNCTION__); printk(args);}
633 + printk(KERN_DEBUG "irnet: -> %s" format, __FUNCTION__ , ##args);}
635 /* Entering and exiting a function in one go (trace) */
636 - -#define DPASS(dbg, args...) \
637 +#define DPASS(dbg, format, args...) \
639 - - printk(KERN_DEBUG "irnet: <>%s", __FUNCTION__); printk(args);}
640 + printk(KERN_DEBUG "irnet: <>%s" format, __FUNCTION__ , ##args);}
642 /* Exiting a function (trace) */
643 - -#define DEXIT(dbg, args...) \
644 +#define DEXIT(dbg, format, args...) \
646 - - printk(KERN_DEBUG "irnet: <-%s()", __FUNCTION__); printk(args);}
647 + printk(KERN_DEBUG "irnet: <-%s()" format, __FUNCTION__ , ##args);}
649 /* Exit a function with debug */
650 #define DRETURN(ret, dbg, args...) \
652 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
653 the body of a message to majordomo@vger.kernel.org
654 More majordomo info at http://vger.kernel.org/majordomo-info.html
655 - From linux-kernel@vger.kernel.org Thu Dec 18 21:43:15 2003
656 Date: Mon, 15 Dec 2003 04:44:43 +0000
657 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
658 To: bk-commits-24@vger.kernel.org
659 Subject: [PPC64] Fix save_flags/restore_flags on iSeries.
661 ChangeSet 1.1270.3.9, 2003/12/15 15:44:43+11:00, engebret@us.ibm.com
663 [PPC64] Fix save_flags/restore_flags on iSeries.
666 # This patch includes the following deltas:
667 # ChangeSet 1.1270.3.8 -> 1.1270.3.9
668 # arch/ppc64/kernel/misc.S 1.8 -> 1.9
671 misc.S | 14 +++++++-------
672 1 files changed, 7 insertions(+), 7 deletions(-)
675 diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
676 - --- a/arch/ppc64/kernel/misc.S Mon Dec 15 07:03:59 2003
677 +++ b/arch/ppc64/kernel/misc.S Mon Dec 15 07:03:59 2003
679 _GLOBAL(__no_use_save_flags)
681 lbz r3,PACAPROCENABLED(r4)
682 + /* shift into position of MSR.EE */
686 - -/* void __no_use_restore_flags(unsigned long flags) */
687 +/* void __no_use_restore_flags(unsigned long flags) */
688 _GLOBAL(__no_use_restore_flags)
690 - - * Just set/clear the MSR_EE bit through restore/flags but do not
691 - - * change anything else. This is needed by the RT system and makes
695 + /* shift from position of MSR.EE */
698 lbz r5,PACAPROCENABLED(r6)
699 /* Check if things are setup the way we want _already_. */
701 lbz r3,PACAPROCENABLED(r5)
703 stb r4,PACAPROCENABLED(r5)
704 + /* shift into position of MSR.EE */
708 _GLOBAL(__no_use_sti)
710 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
711 the body of a message to majordomo@vger.kernel.org
712 More majordomo info at http://vger.kernel.org/majordomo-info.html
713 - From linux-kernel@vger.kernel.org Thu Dec 18 21:41:34 2003
714 Date: Fri, 12 Dec 2003 20:18:04 +0000
715 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
716 To: bk-commits-24@vger.kernel.org
717 Subject: [PATCH] USB: MCT-U232 Patch for cts
719 ChangeSet 1.1289, 2003/12/12 12:18:04-08:00, marr@flex.com
721 [PATCH] USB: MCT-U232 Patch for cts
723 Brief Patch Description:
725 Fix a problem in the 'mct_u232' driver whereby output data gets held up in the
726 USB/RS-232 adapter for RS-232 devices which don't assert the 'CTS' signal.
730 The Belkin F5U109 is a 9-pin USB/RS-232 adapter that is supported by the
731 existing 'mct_u232' kernel module. Â Recently, I've been testing it under the
732 2.4.22 (Slackware 9.1) kernel and the 2.6.0-test9 kernel.
734 I've connected a Garmin 'GPS35 TracPak' GPS receiver (RS-232 interface) and an
735 ordinary RS-232 external modem to my PC's USB port via the Belkin F5U109
740 Although _reads_ from either of the RS-232 devices mentioned above work fine
741 via the Belkin adapter, _writes_ to the GPS receiver are not being seen by
742 the GPS. Â Writes to the modem, however, work perfectly.
744 Aside: The 'Linux USB Users' archives show that at least one other person
745 (circa May 2002) had the exact same problem I'm having, but it sounds like no
746 solution was ever determined because the person in question just bought a
747 different USB/RS-232 adapter.
751 Using the 'seyon' terminal emulator in Linux and a crude hardware RS-232
752 "breakout box" that I hacked together, I've determined that the problem is
753 related to the RTS/CTS RS-232 hardware handshaking.
755 After further investigation, I've concluded that RS-232 devices which do not
756 assert the 'Clear To Send' ('CTS') signal prevent the Belkin F5U109 adapter
757 from transmitting data to the RS-232 device when the current (version 1.1)
758 'mct_u232' module is used. The data gets "queued up" (up to a point -- 16
759 bytes, I think) in the adapter but never transmitted.
761 Since this GPS receiver works perfectly (reads and writes) when connected to a
762 PC running W98se using the same Belkin adapter and the Belkin-supplied
763 Windows driver, the Linux driver became suspect.
765 After some testing with SniffUSB, I found that the Windows driver sends a
766 couple of unique undocumented USB 'device requests' that the Linux driver
767 does not. As it turns out, the second of those 2 requests is critical in
768 making the adapter transmit data to a device which doesn't assert 'CTS'.
770 For completeness, the Windows driver in use was determined from the 'Device
771 Manager', 'Driver File Details' page:
774 Â Â Provider: Magic Control Technology
775 Â Â File version: 1.21P.0104 for Win98/Me
779 My patch adds the 2 missing USB 'device request' commands right after a
780 baud-change command. This mimics the operation of the W98 driver.
782 Unfortunately, after much testing, I found no other operation (besides a
783 baud-change request) under Windows that triggers either of these 2 'device
784 request' commands. This makes it impossible to fully document the behavior of
785 these requests, but I've made entries for them alongside the others in the
788 Purely for clarity, the patch also modifies various comments in 'mct_u232.h',
789 mostly to reflect proper sizes of the various 'USB Device Request' fields per
790 the USB 1.1 specification.
792 The patch also updates the version number of the driver, corrects a minor
793 typographical error, and documents a difference in the length of the data in
794 a 'baud rate change' command for certain adapters which use a coded baud-rate
795 rather than the conventional RS-232 baud rate divisor.
798 # This patch includes the following deltas:
799 # ChangeSet 1.1288 -> 1.1289
800 # drivers/usb/serial/mct_u232.c 1.18 -> 1.19
801 # drivers/usb/serial/mct_u232.h 1.3 -> 1.4
804 mct_u232.c | 37 +++++++++++++++++++++-
805 mct_u232.h | 101 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
806 2 files changed, 116 insertions(+), 22 deletions(-)
809 diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
810 - --- a/drivers/usb/serial/mct_u232.c Mon Dec 15 07:03:29 2003
811 +++ b/drivers/usb/serial/mct_u232.c Mon Dec 15 07:03:29 2003
813 * Basic tests have been performed with minicom/zmodem transfers and
814 * modem dialing under Linux 2.4.0-test10 (for me it works fine).
816 + * 04-Nov-2003 Bill Marr <marr at flex dot com>
817 + * - Mimic Windows driver by sending 2 USB 'device request' messages
818 + * following normal 'baud rate change' message. This allows data to be
819 + * transmitted to RS-232 devices which don't assert the 'CTS' signal.
821 * 10-Nov-2001 Wolfgang Grandegger
822 * - Fixed an endianess problem with the baudrate selection for PowerPC.
826 * Version Information
828 - -#define DRIVER_VERSION "v1.1"
829 +#define DRIVER_VERSION "v1.2"
830 #define DRIVER_AUTHOR "Wolfgang Grandegger <wolfgang@ces.ch>"
831 #define DRIVER_DESC "Magic Control Technology USB-RS232 converter driver"
835 unsigned int divisor;
837 + unsigned char zero_byte = 0;
838 divisor = cpu_to_le32(mct_u232_calculate_baud_rate(serial, value));
839 rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
840 MCT_U232_SET_BAUD_RATE_REQUEST,
843 err("Set BAUD RATE %d failed (error = %d)", value, rc);
844 dbg("set_baud_rate: value: %d, divisor: 0x%x", value, divisor);
846 + /* Mimic the MCT-supplied Windows driver (version 1.21P.0104), which
847 + always sends two extra USB 'device request' messages after the
848 + 'baud rate change' message. The actual functionality of the
849 + request codes in these messages is not fully understood but these
850 + particular codes are never seen in any operation besides a baud
851 + rate change. Both of these messages send a single byte of data
852 + whose value is always zero. The second of these two extra messages
853 + is required in order for data to be properly written to an RS-232
854 + device which does not assert the 'CTS' signal. */
856 + rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
857 + MCT_U232_SET_UNKNOWN1_REQUEST,
858 + MCT_U232_SET_REQUEST_TYPE,
859 + 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN1_SIZE,
862 + err("Sending USB device request code %d failed (error = %d)",
863 + MCT_U232_SET_UNKNOWN1_REQUEST, rc);
865 + rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
866 + MCT_U232_SET_UNKNOWN2_REQUEST,
867 + MCT_U232_SET_REQUEST_TYPE,
868 + 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN2_SIZE,
871 + err("Sending USB device request code %d failed (error = %d)",
872 + MCT_U232_SET_UNKNOWN2_REQUEST, rc);
875 } /* mct_u232_set_baud_rate */
877 diff -Nru a/drivers/usb/serial/mct_u232.h b/drivers/usb/serial/mct_u232.h
878 - --- a/drivers/usb/serial/mct_u232.h Mon Dec 15 07:03:29 2003
879 +++ b/drivers/usb/serial/mct_u232.h Mon Dec 15 07:03:29 2003
881 #define MCT_U232_SET_MODEM_CTRL_REQUEST 10 /* Set Modem Control Register (MCR) */
882 #define MCT_U232_SET_MODEM_CTRL_SIZE 1
884 +/* This USB device request code is not well understood. It is transmitted by
885 + the MCT-supplied Windows driver whenever the baud rate changes.
887 +#define MCT_U232_SET_UNKNOWN1_REQUEST 11 /* Unknown functionality */
888 +#define MCT_U232_SET_UNKNOWN1_SIZE 1
890 +/* This USB device request code is not well understood. It is transmitted by
891 + the MCT-supplied Windows driver whenever the baud rate changes.
893 + Without this USB device request, the USB/RS-232 adapter will not write to
894 + RS-232 devices which do not assert the 'CTS' signal.
896 +#define MCT_U232_SET_UNKNOWN2_REQUEST 12 /* Unknown functionality */
897 +#define MCT_U232_SET_UNKNOWN2_SIZE 1
900 * Baud rate (divisor)
902 @@ -137,22 +152,31 @@
903 * Baud rate (divisor)
904 * -------------------
906 - - * BmRequestType: 0x4 (0100 0000B)
911 + * BmRequestType: 0x40 (0100 0000B)
916 * Data: divisor = 115200 / baud_rate
918 + * SniffUSB observations (Nov 2003): Contrary to the 'wLength' value of 4
919 + * shown above, observations with a Belkin F5U109 adapter, using the
920 + * MCT-supplied Windows98 driver (U2SPORT.VXD, "File version: 1.21P.0104 for
921 + * Win98/Me"), show this request has a length of 1 byte, presumably because
922 + * of the fact that the Belkin adapter and the 'Sitecom U232-P25' adapter
923 + * use a baud-rate code instead of a conventional RS-232 baud rate divisor.
924 + * The current source code for this driver does not reflect this fact, but
925 + * the driver works fine with this adapter/driver combination nonetheless.
928 * Line Control Register (LCR)
929 * ---------------------------
931 - - * BmRequestType: 0x4 (0100 0000B) 0xc (1100 0000B)
932 - - * bRequest: 0x7 0x6
936 + * BmRequestType: 0x40 (0100 0000B) 0xc0 (1100 0000B)
937 + * bRequest: 0x07 0x06
941 * Data: LCR (see below)
943 * Bit 7: Divisor Latch Access Bit (DLAB). When set, access to the data
944 @@ -186,18 +210,18 @@
946 * SniffUSB observations: Bit 7 seems not to be used. There seem to be two bugs
947 * in the Win98 driver: the break does not work (bit 6 is not asserted) and the
948 - - * sticky parity bit is not cleared when set once. The LCR can also be read
949 + * stick parity bit is not cleared when set once. The LCR can also be read
950 * back with USB request 6 but this has never been observed with SniffUSB.
953 * Modem Control Register (MCR)
954 * ----------------------------
956 - - * BmRequestType: 0x4 (0100 0000B)
961 + * BmRequestType: 0x40 (0100 0000B)
966 * Data: MCR (Bit 4..7, see below)
968 * Bit 7: Reserved, always 0.
969 @@ -226,11 +250,11 @@
970 * Modem Status Register (MSR)
971 * ---------------------------
973 - - * BmRequestType: 0xc (1100 0000B)
978 + * BmRequestType: 0xc0 (1100 0000B)
983 * Data: MSR (see below)
985 * Bit 7: Data Carrier Detect (CD). Reflects the state of the DCD line on the
987 * SniffUSB observations: the LSR is returned as second byte on the interrupt-in
988 * endpoint 0x83 to signal error conditions. Such errors have been seen with
989 * minicom/zmodem transfers (CRC errors).
993 + * -------------------
995 + * BmRequestType: 0x40 (0100 0000B)
1002 + * SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
1003 + * (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
1004 + * occurs immediately after a "Baud rate (divisor)" message. It was not
1005 + * observed at any other time. It is unclear what purpose this message
1010 + * -------------------
1012 + * BmRequestType: 0x40 (0100 0000B)
1019 + * SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
1020 + * (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
1021 + * occurs immediately after the 'Unknown #1' message (see above). It was
1022 + * not observed at any other time. It is unclear what other purpose (if
1023 + * any) this message might serve, but without it, the USB/RS-232 adapter
1024 + * will not write to RS-232 devices which do not assert the 'CTS' signal.
1029 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1030 the body of a message to majordomo@vger.kernel.org
1031 More majordomo info at http://vger.kernel.org/majordomo-info.html
1032 - From cel@citi.umich.edu Thu Dec 18 22:13:19 2003
1033 Date: Thu, 18 Dec 2003 16:34:58 -0500 (EST)
1034 From: Chuck Lever <cel@citi.umich.edu>
1035 To: Marcelo Tosatti <marcelo@conectiva.com.br>
1036 Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
1037 Trond Myklebust <trond.myklebust@fys.uio.no>,
1038 Steve Dickson <SteveD@redhat.com>, greg.marsden@oracle.com
1039 Subject: [PATCH] NFS O_DIRECT offset wrap bug
1043 here's an obvious mistake i made in the NFS O_DIRECT implementation. a
1044 missing type cast causes the offset of direct read and write requests to
1045 wrap at 4GB. please include this in 2.4.24-pre2.
1047 as far as i can tell, this is not a problem for 2.6 NFS O_DIRECT.
1050 diff -X ../dont-diff -Naurp 00-stock/fs/nfs/direct.c 01-direct-offset/fs/nfs/direct.c
1051 - --- 00-stock/fs/nfs/direct.c 2003-08-25 07:44:43.000000000 -0400
1052 +++ 01-direct-offset/fs/nfs/direct.c 2003-12-18 16:28:20.000000000 -0500
1053 @@ -354,7 +354,7 @@ nfs_direct_IO(int rw, struct file *file,
1054 size_t count = iobuf->length;
1055 struct dentry *dentry = file->f_dentry;
1056 struct inode *inode = dentry->d_inode;
1057 - - loff_t offset = blocknr << inode->i_blkbits;
1058 + loff_t offset = (loff_t) blocknr << inode->i_blkbits;
1065 corporate: <cel at netapp dot com>
1066 personal: <chucklever at bigfoot dot com>
1069 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
1070 the body of a message to majordomo@vger.kernel.org
1071 More majordomo info at http://vger.kernel.org/majordomo-info.html
1072 Please read the FAQ at http://www.tux.org/lkml/
1073 - From linux-kernel@vger.kernel.org Thu Dec 18 21:47:47 2003
1074 Date: Mon, 15 Dec 2003 05:42:19 +0000
1075 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1076 To: bk-commits-24@vger.kernel.org
1077 Subject: [PPC64] Fix compile error in arch/ppc64/kernel/pmc.c.
1079 ChangeSet 1.1270.3.10, 2003/12/15 16:42:19+11:00, paulus@quango.ozlabs.ibm.com
1081 [PPC64] Fix compile error in arch/ppc64/kernel/pmc.c.
1084 # This patch includes the following deltas:
1085 # ChangeSet 1.1270.3.9 -> 1.1270.3.10
1086 # arch/ppc64/kernel/pmc.c 1.5 -> 1.6
1087 # include/asm-ppc64/mmu.h 1.4 -> 1.5
1090 arch/ppc64/kernel/pmc.c | 5 ++---
1091 include/asm-ppc64/mmu.h | 3 ++-
1092 2 files changed, 4 insertions(+), 4 deletions(-)
1095 diff -Nru a/arch/ppc64/kernel/pmc.c b/arch/ppc64/kernel/pmc.c
1096 - --- a/arch/ppc64/kernel/pmc.c Mon Dec 15 07:04:01 2003
1097 +++ b/arch/ppc64/kernel/pmc.c Mon Dec 15 07:04:01 2003
1099 page_table_lock : SPIN_LOCK_UNLOCKED};
1101 extern spinlock_t hash_table_lock[];
1102 - -extern inline unsigned long get_lock_slot(unsigned long vpn);
1105 ppc64_pmc_stab(int file)
1107 lock_slot = get_lock_slot(vpn);
1108 rpn = pa >> PAGE_SHIFT;
1110 - - spin_lock(&hash_table_lock[lock_slot].lock);
1111 + spin_lock(&hash_table_lock[lock_slot]);
1112 /* Get a pointer to the linux page table entry for this page
1113 * allocating pmd or pte pages along the way as needed. Note
1114 * that the pmd & pte pages are not themselfs bolted.
1119 - - spin_unlock(&hash_table_lock[lock_slot].lock);
1120 + spin_unlock(&hash_table_lock[lock_slot]);
1123 spin_unlock(&btmalloc_mm.page_table_lock);
1124 diff -Nru a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h
1125 - --- a/include/asm-ppc64/mmu.h Mon Dec 15 07:04:01 2003
1126 +++ b/include/asm-ppc64/mmu.h Mon Dec 15 07:04:01 2003
1128 extern HTAB htab_data;
1130 #include <linux/cache.h>
1131 - -#include <asm/spinlock.h>
1132 +#include <linux/spinlock.h>
1135 } ____cacheline_aligned hash_table_lock_t;
1137 unsigned long prpn, unsigned hash,
1138 void * ptep, unsigned hpteflags,
1140 +unsigned long get_lock_slot(unsigned long vpn);
1142 #define PD_SHIFT (10+12) /* Page directory */
1143 #define PD_MASK 0x02FF
1145 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1146 the body of a message to majordomo@vger.kernel.org
1147 More majordomo info at http://vger.kernel.org/majordomo-info.html
1148 - From linux-kernel@vger.kernel.org Thu Dec 18 21:48:23 2003
1149 Date: Mon, 15 Dec 2003 03:20:20 +0000
1150 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1151 To: bk-commits-24@vger.kernel.org
1152 Subject: [PPC64] Fix smp_call_function so we don't crash if an IPI is very
1155 ChangeSet 1.1270.3.2, 2003/12/15 14:20:20+11:00, olof@austin.ibm.com
1157 [PPC64] Fix smp_call_function so we don't crash if an IPI is very late.
1160 # This patch includes the following deltas:
1161 # ChangeSet 1.1270.3.1 -> 1.1270.3.2
1162 # arch/ppc64/kernel/smp.c 1.4 -> 1.5
1165 smp.c | 18 +++++++++++++++---
1166 1 files changed, 15 insertions(+), 3 deletions(-)
1169 diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
1170 - --- a/arch/ppc64/kernel/smp.c Mon Dec 15 07:03:47 2003
1171 +++ b/arch/ppc64/kernel/smp.c Mon Dec 15 07:03:47 2003
1178 spin_unlock_bh(&call_lock);
1180 @@ -571,9 +572,20 @@
1182 void smp_call_function_interrupt(void)
1184 - - void (*func) (void *info) = call_data->func;
1185 - - void *info = call_data->info;
1186 - - int wait = call_data->wait;
1187 + void (*func) (void *info);
1192 + /* call_data will be NULL if the sender timed out while
1193 + * waiting on us to receive the call.
1198 + func = call_data->func;
1199 + info = call_data->info;
1200 + wait = call_data->wait;
1203 * Notify initiating CPU that I've grabbed the data and am
1205 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1206 the body of a message to majordomo@vger.kernel.org
1207 More majordomo info at http://vger.kernel.org/majordomo-info.html
1208 - From linux-kernel@vger.kernel.org Thu Dec 18 21:54:39 2003
1209 Date: Wed, 10 Dec 2003 20:30:50 +0000
1210 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1211 To: bk-commits-24@vger.kernel.org
1212 Subject: [PATCH] Fix rtc leak
1214 ChangeSet 1.1273, 2003/12/10 18:30:50-02:00, trini@mvista.com
1216 [PATCH] Fix rtc leak
1218 ===== arch/cris/drivers/ds1302.c 1.6 vs edited =====
1221 # This patch includes the following deltas:
1222 # ChangeSet 1.1272 -> 1.1273
1223 # arch/m68k/bvme6000/rtc.c 1.6 -> 1.7
1224 # drivers/char/mips_rtc.c 1.1 -> 1.2
1225 # drivers/sbus/char/rtc.c 1.8 -> 1.9
1226 # drivers/char/ds1286.c 1.9 -> 1.10
1227 # drivers/char/rtc.c 1.14 -> 1.15
1228 # drivers/char/ip27-rtc.c 1.5 -> 1.6
1229 # arch/cris/drivers/pcf8563.c 1.3 -> 1.4
1230 # drivers/hil/hp_sdc_rtc.c 1.2 -> 1.3
1231 # drivers/char/efirtc.c 1.5 -> 1.6
1232 # arch/cris/drivers/ds1302.c 1.6 -> 1.7
1233 # drivers/macintosh/rtc.c 1.6 -> 1.7
1234 # drivers/acorn/char/i2c.c 1.3 -> 1.4
1235 # arch/ppc64/kernel/rtc.c 1.2 -> 1.3
1236 # arch/m68k/mvme16x/rtc.c 1.4 -> 1.5
1239 arch/cris/drivers/ds1302.c | 1 +
1240 arch/cris/drivers/pcf8563.c | 1 +
1241 arch/m68k/bvme6000/rtc.c | 1 +
1242 arch/m68k/mvme16x/rtc.c | 1 +
1243 arch/ppc64/kernel/rtc.c | 1 +
1244 drivers/acorn/char/i2c.c | 1 +
1245 drivers/char/ds1286.c | 3 ++-
1246 drivers/char/efirtc.c | 1 +
1247 drivers/char/ip27-rtc.c | 1 +
1248 drivers/char/mips_rtc.c | 1 +
1249 drivers/char/rtc.c | 3 ++-
1250 drivers/hil/hp_sdc_rtc.c | 2 ++
1251 drivers/macintosh/rtc.c | 1 +
1252 drivers/sbus/char/rtc.c | 1 +
1253 14 files changed, 17 insertions(+), 2 deletions(-)
1256 diff -ruN linux-2.4.23/arch/cris/drivers/ds1302.c linux-2.4.23.patched/arch/cris/drivers/ds1302.c
1257 - --- linux-2.4.23/arch/cris/drivers/ds1302.c Thu Dec 18 23:52:46 2003
1258 +++ linux-2.4.23.patched/arch/cris/drivers/ds1302.c Thu Dec 18 23:53:32 2003
1261 struct rtc_time rtc_tm;
1263 + memset(&rtc_tm, 0, sizeof (struct rtc_time));
1264 get_rtc_time(&rtc_tm);
1265 if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
1267 diff -ruN linux-2.4.23/arch/cris/drivers/pcf8563.c linux-2.4.23.patched/arch/cris/drivers/pcf8563.c
1268 - --- linux-2.4.23/arch/cris/drivers/pcf8563.c Thu Dec 18 23:52:46 2003
1269 +++ linux-2.4.23.patched/arch/cris/drivers/pcf8563.c Thu Dec 18 23:53:32 2003
1274 + memset(&tm, 0, sizeof (struct rtc_time));
1277 if (copy_to_user((struct rtc_time *) arg, &tm, sizeof tm)) {
1278 diff -ruN linux-2.4.23/arch/m68k/bvme6000/rtc.c linux-2.4.23.patched/arch/m68k/bvme6000/rtc.c
1279 - --- linux-2.4.23/arch/m68k/bvme6000/rtc.c Thu Dec 18 23:52:46 2003
1280 +++ linux-2.4.23.patched/arch/m68k/bvme6000/rtc.c Thu Dec 18 23:53:32 2003
1282 /* Ensure clock and real-time-mode-register are accessible */
1283 msr = rtc->msr & 0xc0;
1285 + memset(&wtime, 0, sizeof(struct rtc_time));
1287 wtime.tm_sec = BCD2BIN(rtc->bcd_sec);
1288 wtime.tm_min = BCD2BIN(rtc->bcd_min);
1289 diff -ruN linux-2.4.23/arch/m68k/mvme16x/rtc.c linux-2.4.23.patched/arch/m68k/mvme16x/rtc.c
1290 - --- linux-2.4.23/arch/m68k/mvme16x/rtc.c Thu Dec 18 23:52:46 2003
1291 +++ linux-2.4.23.patched/arch/m68k/mvme16x/rtc.c Thu Dec 18 23:53:32 2003
1294 /* Ensure clock and real-time-mode-register are accessible */
1295 rtc->ctrl = RTC_READ;
1296 + memset(&wtime, 0, sizeof(struct rtc_time));
1297 wtime.tm_sec = BCD2BIN(rtc->bcd_sec);
1298 wtime.tm_min = BCD2BIN(rtc->bcd_min);
1299 wtime.tm_hour = BCD2BIN(rtc->bcd_hr);
1300 diff -ruN linux-2.4.23/arch/ppc64/kernel/rtc.c linux-2.4.23.patched/arch/ppc64/kernel/rtc.c
1301 - --- linux-2.4.23/arch/ppc64/kernel/rtc.c Thu Dec 18 23:52:46 2003
1302 +++ linux-2.4.23.patched/arch/ppc64/kernel/rtc.c Thu Dec 18 23:53:32 2003
1305 case RTC_RD_TIME: /* Read the time/date from RTC */
1307 + memset(&wtime, 0, sizeof(struct rtc_time));
1308 ppc_md.get_rtc_time(&wtime);
1311 diff -ruN linux-2.4.23/drivers/acorn/char/i2c.c linux-2.4.23.patched/drivers/acorn/char/i2c.c
1312 - --- linux-2.4.23/drivers/acorn/char/i2c.c Thu Dec 18 23:52:46 2003
1313 +++ linux-2.4.23.patched/drivers/acorn/char/i2c.c Thu Dec 18 23:53:32 2003
1318 + memset(&rtctm, 0, sizeof(struct rtc_time));
1319 get_rtc_time(&rtc_raw, &year);
1320 rtctm.tm_sec = rtc_raw.secs;
1321 rtctm.tm_min = rtc_raw.mins;
1322 diff -ruN linux-2.4.23/drivers/char/ds1286.c linux-2.4.23.patched/drivers/char/ds1286.c
1323 - --- linux-2.4.23/drivers/char/ds1286.c Thu Dec 18 23:52:46 2003
1324 +++ linux-2.4.23.patched/drivers/char/ds1286.c Thu Dec 18 23:53:32 2003
1326 * means "don't care" or "match all". Only the tm_hour,
1327 * tm_min, and tm_sec values are filled in.
1330 + memset(&wtime, 0, sizeof(struct rtc_time));
1331 ds1286_get_alm_time(&wtime);
1336 case RTC_RD_TIME: /* Read the time/date from RTC */
1338 + memset(&wtime, 0, sizeof(struct rtc_time));
1339 ds1286_get_time(&wtime);
1342 diff -ruN linux-2.4.23/drivers/char/efirtc.c linux-2.4.23.patched/drivers/char/efirtc.c
1343 - --- linux-2.4.23/drivers/char/efirtc.c Thu Dec 18 23:52:46 2003
1344 +++ linux-2.4.23.patched/drivers/char/efirtc.c Thu Dec 18 23:53:32 2003
1347 convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
1349 + memset(&wtime, 0, sizeof(struct rtc_time));
1350 wtime->tm_sec = eft->second;
1351 wtime->tm_min = eft->minute;
1352 wtime->tm_hour = eft->hour;
1353 diff -ruN linux-2.4.23/drivers/char/ip27-rtc.c linux-2.4.23.patched/drivers/char/ip27-rtc.c
1354 - --- linux-2.4.23/drivers/char/ip27-rtc.c Thu Dec 18 23:52:46 2003
1355 +++ linux-2.4.23.patched/drivers/char/ip27-rtc.c Thu Dec 18 23:53:32 2003
1358 case RTC_RD_TIME: /* Read the time/date from RTC */
1360 + memset(&wtime, 0, sizeof(struct rtc_time));
1361 get_rtc_time(&wtime);
1364 diff -ruN linux-2.4.23/drivers/char/mips_rtc.c linux-2.4.23.patched/drivers/char/mips_rtc.c
1365 - --- linux-2.4.23/drivers/char/mips_rtc.c Thu Dec 18 23:52:46 2003
1366 +++ linux-2.4.23.patched/drivers/char/mips_rtc.c Thu Dec 18 23:53:32 2003
1370 case RTC_RD_TIME: /* Read the time/date from RTC */
1371 + memset(&rtc_tm, 0, sizeof(struct rtc_time));
1372 curr_time = rtc_get_time();
1373 to_tm(curr_time, &rtc_tm);
1374 rtc_tm.tm_year -= 1900;
1375 diff -ruN linux-2.4.23/drivers/char/rtc.c linux-2.4.23.patched/drivers/char/rtc.c
1376 - --- linux-2.4.23/drivers/char/rtc.c Thu Dec 18 23:52:46 2003
1377 +++ linux-2.4.23.patched/drivers/char/rtc.c Thu Dec 18 23:53:32 2003
1379 * means "don't care" or "match all". Only the tm_hour,
1380 * tm_min, and tm_sec values are filled in.
1383 + memset(&wtime, 0, sizeof(struct rtc_time));
1384 get_rtc_alm_time(&wtime);
1389 case RTC_RD_TIME: /* Read the time/date from RTC */
1391 + memset(&wtime, 0, sizeof(struct rtc_time));
1392 get_rtc_time(&wtime);
1395 diff -ruN linux-2.4.23/drivers/hil/hp_sdc_rtc.c linux-2.4.23.patched/drivers/hil/hp_sdc_rtc.c
1396 - --- linux-2.4.23/drivers/hil/hp_sdc_rtc.c Thu Dec 18 23:52:46 2003
1397 +++ linux-2.4.23.patched/drivers/hil/hp_sdc_rtc.c Thu Dec 18 23:53:32 2003
1400 case RTC_ALM_READ: /* Read the present alarm time */
1402 + memset(&ttime, 0, sizeof(struct timeval));
1403 if (hp_sdc_rtc_read_mt(&ttime)) return -EFAULT;
1408 case RTC_RD_TIME: /* Read the time/date from RTC */
1410 + memset(&wtime, 0, sizeof(struct rtc_time));
1411 if (hp_sdc_rtc_read_bbrtc(&wtime)) return -EFAULT;
1414 diff -ruN linux-2.4.23/drivers/macintosh/rtc.c linux-2.4.23.patched/drivers/macintosh/rtc.c
1415 - --- linux-2.4.23/drivers/macintosh/rtc.c Thu Dec 18 23:52:46 2003
1416 +++ linux-2.4.23.patched/drivers/macintosh/rtc.c Thu Dec 18 23:53:32 2003
1419 if (ppc_md.get_rtc_time)
1421 + memset(&rtc_tm, 0, sizeof(struct rtc_time));
1422 get_rtc_time(&rtc_tm);
1424 if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
1425 diff -ruN linux-2.4.23/drivers/sbus/char/rtc.c linux-2.4.23.patched/drivers/sbus/char/rtc.c
1426 - --- linux-2.4.23/drivers/sbus/char/rtc.c Thu Dec 18 23:52:46 2003
1427 +++ linux-2.4.23.patched/drivers/sbus/char/rtc.c Thu Dec 18 23:53:32 2003
1432 + memset(&rtc_tm, 0, sizeof(struct rtc_time));
1433 get_rtc_time(&rtc_tm);
1435 if (copy_to_user((struct rtc_time*)arg, &rtc_tm, sizeof(struct rtc_time)))
1438 - From bjorn.helgaas@hp.com Wed Dec 17 23:08:00 2003
1439 Date: Wed, 17 Dec 2003 15:02:37 -0700
1440 From: Bjorn Helgaas <bjorn.helgaas@hp.com>
1441 To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
1442 Cc: trini@mvista.com, linux-kernel@vger.kernel.org
1443 Subject: [PATCH] Fix 2.4 EFI RTC oops
1445 This recent change to 2.4:
1447 ChangeSet@1.1069.155.3, 2003-12-10 18:30:50-02:00, trini@mvista.com
1448 [PATCH] Fix rtc leak
1450 ===== arch/cris/drivers/ds1302.c 1.6 vs edited =====
1452 broke efirtc.c (it causes a null pointer dereference on ia64).
1453 The fix is below. Please apply.
1457 P.S. The changeset above doesn't appear to be in 2.6 yet. If/when
1458 you submit it for 2.6, you might consider using this style:
1460 memset(&wtime, 0, sizeof(wtime));
1461 memset(wtime, 0, sizeof(*wtime));
1463 which is more obviously correct than:
1465 memset(&wtime, 0, sizeof(struct rtc_time));
1466 memset(wtime, 0, sizeof(struct rtc_time));
1469 ===== drivers/char/efirtc.c 1.6 vs edited =====
1470 - --- 1.6/drivers/char/efirtc.c Fri Oct 24 04:35:10 2003
1471 +++ edited/drivers/char/efirtc.c Wed Dec 17 14:33:08 2003
1474 convert_from_efi_time(efi_time_t *eft, struct rtc_time *wtime)
1476 - - memset(&wtime, 0, sizeof(struct rtc_time));
1477 + memset(wtime, 0, sizeof(struct rtc_time));
1478 wtime->tm_sec = eft->second;
1479 wtime->tm_min = eft->minute;
1480 wtime->tm_hour = eft->hour;
1483 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
1484 the body of a message to majordomo@vger.kernel.org
1485 More majordomo info at http://vger.kernel.org/majordomo-info.html
1486 Please read the FAQ at http://www.tux.org/lkml/
1487 - From linux-kernel@vger.kernel.org Thu Dec 18 21:45:37 2003
1488 Date: Sun, 14 Dec 2003 05:52:29 +0000
1489 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1490 To: bk-commits-24@vger.kernel.org
1491 Subject: [SPARC32]: Fix build after asm/system.h include was added to
1494 ChangeSet 1.1270.1.7, 2003/12/13 21:52:29-08:00, davem@nuts.ninka.net
1496 [SPARC32]: Fix build after asm/system.h include was added to linux/spinlock.h
1498 - Do not include asm/oplib.h in system.h
1499 - Remove system.h's halt() macro, prom_halt() is equivalent so replace
1500 the two users of halt() with that.
1501 - Put 'romvec' extern decl where it belongs, in openprom.h
1503 Based upon a patch from Rob Radez.
1506 # This patch includes the following deltas:
1507 # ChangeSet 1.1270.1.6 -> 1.1270.1.7
1508 # include/asm-sparc/openprom.h 1.1 -> 1.2
1509 # include/asm-sparc/system.h 1.7 -> 1.8
1510 # arch/sparc/kernel/devices.c 1.4 -> 1.5
1511 # include/asm-sparc/oplib.h 1.3 -> 1.4
1512 # arch/sparc/kernel/ioport.c 1.8 -> 1.9
1515 arch/sparc/kernel/devices.c | 2 +-
1516 arch/sparc/kernel/ioport.c | 2 +-
1517 include/asm-sparc/openprom.h | 2 ++
1518 include/asm-sparc/oplib.h | 3 ---
1519 include/asm-sparc/system.h | 4 ----
1520 5 files changed, 4 insertions(+), 9 deletions(-)
1523 diff -Nru a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c
1524 - --- a/arch/sparc/kernel/devices.c Mon Dec 15 07:03:40 2003
1525 +++ b/arch/sparc/kernel/devices.c Mon Dec 15 07:03:40 2003
1527 if (linux_num_cpus == 0) {
1528 printk("No CPU nodes found, cannot continue.\n");
1529 /* Probably a sun4e, Sun is trying to trick us ;-) */
1533 printk("Found %d CPU prom device tree node(s).\n", linux_num_cpus);
1535 diff -Nru a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
1536 - --- a/arch/sparc/kernel/ioport.c Mon Dec 15 07:03:40 2003
1537 +++ b/arch/sparc/kernel/ioport.c Mon Dec 15 07:03:40 2003
1540 printk("ioport_init: cpu type %d is unknown.\n",
1547 diff -Nru a/include/asm-sparc/openprom.h b/include/asm-sparc/openprom.h
1548 - --- a/include/asm-sparc/openprom.h Mon Dec 15 07:03:40 2003
1549 +++ b/include/asm-sparc/openprom.h Mon Dec 15 07:03:40 2003
1551 int (*v3_cpuresume)(unsigned int whichcpu);
1554 +extern struct linux_romvec *romvec;
1556 /* Routines for traversing the prom device tree. */
1557 struct linux_nodeops {
1558 int (*no_nextnode)(int node);
1559 diff -Nru a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h
1560 - --- a/include/asm-sparc/oplib.h Mon Dec 15 07:03:40 2003
1561 +++ b/include/asm-sparc/oplib.h Mon Dec 15 07:03:40 2003
1563 #include <asm/openprom.h>
1564 #include <linux/spinlock.h>
1566 - -/* The master romvec pointer... */
1567 - -extern struct linux_romvec *romvec;
1569 /* Enumeration to describe the prom major version we have detected. */
1570 enum prom_major_version {
1571 PROM_V0, /* Original sun4c V0 prom */
1572 diff -Nru a/include/asm-sparc/system.h b/include/asm-sparc/system.h
1573 - --- a/include/asm-sparc/system.h Mon Dec 15 07:03:40 2003
1574 +++ b/include/asm-sparc/system.h Mon Dec 15 07:03:40 2003
1578 #include <asm/page.h>
1579 - -#include <asm/oplib.h>
1580 #include <asm/psr.h>
1581 #include <asm/ptrace.h>
1582 #include <asm/btfixup.h>
1584 extern unsigned long empty_bad_page;
1585 extern unsigned long empty_bad_page_table;
1586 extern unsigned long empty_zero_page;
1588 - -extern struct linux_romvec *romvec;
1589 - -#define halt() romvec->pv_halt()
1591 /* When a context switch happens we must flush all user windows so that
1592 * the windows of the current process are flushed onto its stack. This
1594 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1595 the body of a message to majordomo@vger.kernel.org
1596 More majordomo info at http://vger.kernel.org/majordomo-info.html
1597 - From linux-kernel@vger.kernel.org Thu Dec 18 21:38:26 2003
1598 Date: Fri, 12 Dec 2003 18:18:02 +0000
1599 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1600 To: bk-commits-24@vger.kernel.org
1601 Subject: [PATCH] USB: fix bug when errors happen in ioedgeport driver
1603 ChangeSet 1.1286, 2003/12/12 10:18:02-08:00, tchen@on-go.com
1605 [PATCH] USB: fix bug when errors happen in ioedgeport driver
1608 # This patch includes the following deltas:
1609 # ChangeSet 1.1285 -> 1.1286
1610 # drivers/usb/serial/io_edgeport.c 1.26 -> 1.27
1613 io_edgeport.c | 12 ++++++++----
1614 1 files changed, 8 insertions(+), 4 deletions(-)
1617 diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
1618 - --- a/drivers/usb/serial/io_edgeport.c Mon Dec 15 07:03:23 2003
1619 +++ b/drivers/usb/serial/io_edgeport.c Mon Dec 15 07:03:23 2003
1620 @@ -1468,15 +1468,19 @@
1621 urb->transfer_flags |= USB_QUEUE_BULK;
1623 urb->dev = edge_serial->serial->dev;
1624 + /* decrement the number of credits we have by the number we just sent */
1625 + edge_port->txCredits -= count;
1626 + edge_port->icount.tx += count;
1628 status = usb_submit_urb(urb);
1630 /* something went wrong */
1631 dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__);
1632 edge_port->write_in_progress = FALSE;
1634 - - /* decrement the number of credits we have by the number we just sent */
1635 - - edge_port->txCredits -= count;
1636 - - edge_port->icount.tx += count;
1638 + /*revert the count if something bad happened...*/
1639 + edge_port->txCredits += count;
1640 + edge_port->icount.tx -= count;
1642 dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __FUNCTION__, count, edge_port->txCredits, fifo->count);
1645 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1646 the body of a message to majordomo@vger.kernel.org
1647 More majordomo info at http://vger.kernel.org/majordomo-info.html
1650 - From linux-kernel@vger.kernel.org Thu Dec 18 21:39:10 2003
1651 Date: Fri, 12 Dec 2003 18:18:22 +0000
1652 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1653 To: bk-commits-24@vger.kernel.org
1654 Subject: [PATCH] USB: fix io_edgeport driver alignment issues.
1656 ChangeSet 1.1287, 2003/12/12 10:18:22-08:00, tchen@on-go.com
1658 [PATCH] USB: fix io_edgeport driver alignment issues.
1661 # This patch includes the following deltas:
1662 # ChangeSet 1.1286 -> 1.1287
1663 # drivers/usb/serial/io_fw_boot2.h 1.3 -> 1.4
1664 # drivers/usb/serial/io_fw_down2.h 1.3 -> 1.4
1665 # drivers/usb/serial/io_fw_down.h 1.3 -> 1.4
1666 # drivers/usb/serial/io_fw_boot.h 1.3 -> 1.4
1670 io_fw_boot2.h | 2 +-
1672 io_fw_down2.h | 2 +-
1673 4 files changed, 4 insertions(+), 4 deletions(-)
1676 diff -Nru a/drivers/usb/serial/io_fw_boot.h b/drivers/usb/serial/io_fw_boot.h
1677 - --- a/drivers/usb/serial/io_fw_boot.h Mon Dec 15 07:03:25 2003
1678 +++ b/drivers/usb/serial/io_fw_boot.h Mon Dec 15 07:03:25 2003
1680 unsigned short Addr;
1682 unsigned char Data[0];
1684 + } __attribute__ ((packed));
1686 struct edge_firmware_version_info {
1687 unsigned char MajorVersion;
1688 diff -Nru a/drivers/usb/serial/io_fw_boot2.h b/drivers/usb/serial/io_fw_boot2.h
1689 - --- a/drivers/usb/serial/io_fw_boot2.h Mon Dec 15 07:03:25 2003
1690 +++ b/drivers/usb/serial/io_fw_boot2.h Mon Dec 15 07:03:25 2003
1692 unsigned short Addr;
1694 unsigned char Data[0];
1696 + } __attribute__ ((packed));
1698 struct edge_firmware_version_info {
1699 unsigned char MajorVersion;
1700 diff -Nru a/drivers/usb/serial/io_fw_down.h b/drivers/usb/serial/io_fw_down.h
1701 - --- a/drivers/usb/serial/io_fw_down.h Mon Dec 15 07:03:25 2003
1702 +++ b/drivers/usb/serial/io_fw_down.h Mon Dec 15 07:03:25 2003
1704 unsigned short Addr;
1706 unsigned char Data[0];
1708 + } __attribute ((packed));
1710 struct edge_firmware_version_info {
1711 unsigned char MajorVersion;
1712 diff -Nru a/drivers/usb/serial/io_fw_down2.h b/drivers/usb/serial/io_fw_down2.h
1713 - --- a/drivers/usb/serial/io_fw_down2.h Mon Dec 15 07:03:25 2003
1714 +++ b/drivers/usb/serial/io_fw_down2.h Mon Dec 15 07:03:25 2003
1716 unsigned short Addr;
1718 unsigned char Data[0];
1720 + } __attribute__ ((packed));
1722 struct edge_firmware_version_info {
1723 unsigned char MajorVersion;
1725 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1726 the body of a message to majordomo@vger.kernel.org
1727 More majordomo info at http://vger.kernel.org/majordomo-info.html
1728 - From linux-kernel@vger.kernel.org Sun Dec 28 14:33:44 2003
1729 Date: Sun, 07 Dec 2003 18:27:17 +0000
1730 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1731 To: bk-commits-24@vger.kernel.org
1732 Subject: [wireless airo] Delay MIC activation to prevent Oops
1734 ChangeSet 1.1136.73.7, 2003/12/07 13:27:17-05:00, achirica@telefonica.net
1736 [wireless airo] Delay MIC activation to prevent Oops
1739 # This patch includes the following deltas:
1740 # ChangeSet 1.1136.73.6 -> 1.1136.73.7
1741 # drivers/net/wireless/airo.c 1.62 -> 1.63
1745 1 files changed, 2 insertions(+), 5 deletions(-)
1748 diff -ruN linux-2.4.23.mine/drivers/net/wireless/airo.c linux-2.4.23/drivers/net/wireless/airo.c
1749 - --- linux-2.4.23.mine/drivers/net/wireless/airo.c 2003-11-28 11:26:20.000000000 -0700
1750 +++ linux-2.4.23/drivers/net/wireless/airo.c 2003-12-28 22:30:56.064562029 -0700
1751 @@ -2476,11 +2476,8 @@
1752 OUT4500( apriv, EVACK, EV_MIC );
1754 if (test_bit(FLAG_MIC_CAPABLE, &apriv->flags)) {
1755 - - if (down_trylock(&apriv->sem) != 0) {
1756 - - set_bit(JOB_MIC, &apriv->flags);
1757 - - wake_up_interruptible(&apriv->thr_wait);
1759 - - micinit (apriv);
1760 + set_bit(JOB_MIC, &apriv->flags);
1761 + wake_up_interruptible(&apriv->thr_wait);
1765 - From linux-kernel@vger.kernel.org Sun Dec 28 14:34:44 2003
1766 Date: Sun, 07 Dec 2003 18:27:13 +0000
1767 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1768 To: bk-commits-24@vger.kernel.org
1769 Subject: [wireless airo] Fix PCI registration
1771 ChangeSet 1.1136.73.6, 2003/12/07 13:27:13-05:00, achirica@telefonica.net
1773 [wireless airo] Fix PCI registration
1776 # This patch includes the following deltas:
1777 # ChangeSet 1.1136.73.5 -> 1.1136.73.6
1778 # drivers/net/wireless/airo.c 1.61 -> 1.62
1781 airo.c | 13 ++-----------
1782 1 files changed, 2 insertions(+), 11 deletions(-)
1785 diff -ruN linux-2.4.23.mine/drivers/net/wireless/airo.c linux-2.4.23/drivers/net/wireless/airo.c
1786 - --- linux-2.4.23.mine/drivers/net/wireless/airo.c 2003-12-28 22:32:51.418220092 -0700
1787 +++ linux-2.4.23/drivers/net/wireless/airo.c 2003-12-28 22:33:04.226400129 -0700
1788 @@ -1034,7 +1034,6 @@
1789 #define FLAG_802_11 7
1790 #define FLAG_PENDING_XMIT 9
1791 #define FLAG_PENDING_XMIT11 10
1792 - -#define FLAG_PCI 11
1793 #define JOB_MASK 0x1ff0000
1796 @@ -4639,7 +4638,6 @@
1799 pci_set_drvdata(pdev, dev);
1800 - - set_bit (FLAG_PCI, &((struct airo_info *)dev->priv)->flags);
1804 @@ -4669,7 +4667,7 @@
1807 printk( KERN_INFO "airo: Probing for PCI adapters\n" );
1808 - - pci_module_init(&airo_driver);
1809 + pci_register_driver(&airo_driver);
1810 printk( KERN_INFO "airo: Finished probing for PCI adapters\n" );
1813 @@ -4681,22 +4679,15 @@
1815 static void __exit airo_cleanup_module( void )
1818 while( airo_devices ) {
1819 printk( KERN_INFO "airo: Unregistering %s\n", airo_devices->dev->name );
1820 - -#ifdef CONFIG_PCI
1821 - - if (test_bit(FLAG_PCI, &((struct airo_info *)airo_devices->dev->priv)->flags))
1824 stop_airo_card( airo_devices->dev, 1 );
1826 remove_proc_entry("aironet", proc_root_driver);
1830 - - pci_unregister_driver(&airo_driver);
1831 + pci_unregister_driver(&airo_driver);
1837 - From linux-kernel@vger.kernel.org Sun Dec 28 14:37:12 2003
1838 Date: Sun, 28 Dec 2003 20:09:56 +0000
1839 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1840 To: bk-commits-24@vger.kernel.org
1841 Subject: Daniel Lux: Fix IDE busy-wait race
1843 ChangeSet 1.1344, 2003/12/28 18:09:56-02:00, marcelo@logos.cnet
1845 Daniel Lux: Fix IDE busy-wait race
1848 # This patch includes the following deltas:
1849 # ChangeSet 1.1343 -> 1.1344
1850 # drivers/ide/ide-iops.c 1.7 -> 1.8
1853 ide-iops.c | 16 ++++++++++++----
1854 1 files changed, 12 insertions(+), 4 deletions(-)
1857 diff -Nru a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
1858 - --- a/drivers/ide/ide-iops.c Sun Dec 28 13:01:41 2003
1859 +++ b/drivers/ide/ide-iops.c Sun Dec 28 13:01:41 2003
1860 @@ -664,11 +664,19 @@
1861 if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
1862 local_irq_set(flags);
1864 - - while ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
1865 + stat = hwif->INB(IDE_STATUS_REG);
1866 + while (stat & BUSY_STAT) {
1867 if (time_after(jiffies, timeout)) {
1868 - - local_irq_restore(flags);
1869 - - *startstop = DRIVER(drive)->error(drive, "status timeout", stat);
1872 + * do one more status read in case we were interrupted between last
1873 + * stat = hwif->INB(IDE_STATUS_REG) and time_after(jiffies, timeout)
1874 + * in wich case the timeout might have been shorter than specified.
1876 + if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
1877 + local_irq_restore(flags);
1878 + *startstop = DRIVER(drive)->error(drive, "status timeout", stat);
1883 local_irq_restore(flags);
1885 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1886 the body of a message to majordomo@vger.kernel.org
1887 More majordomo info at http://vger.kernel.org/majordomo-info.html
1889 - From linux-kernel@vger.kernel.org Sun Dec 28 14:37:46 2003
1890 Date: Sun, 28 Dec 2003 20:14:56 +0000
1891 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1892 To: bk-commits-24@vger.kernel.org
1893 Subject: Fix IDE busywait merge
1895 ChangeSet 1.1345, 2003/12/28 18:14:56-02:00, marcelo@logos.cnet
1897 Fix IDE busywait merge
1900 # This patch includes the following deltas:
1901 # ChangeSet 1.1344 -> 1.1345
1902 # drivers/ide/ide-iops.c 1.8 -> 1.9
1906 1 files changed, 2 insertions(+)
1909 diff -Nru a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
1910 - --- a/drivers/ide/ide-iops.c Sun Dec 28 13:01:43 2003
1911 +++ b/drivers/ide/ide-iops.c Sun Dec 28 13:01:43 2003
1917 + stat = hwif->INB(IDE_STATUS_REG);
1919 local_irq_restore(flags);
1922 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1923 the body of a message to majordomo@vger.kernel.org
1924 More majordomo info at http://vger.kernel.org/majordomo-info.html
1925 - From linux-kernel@vger.kernel.org Sun Dec 28 14:36:33 2003
1926 Date: Mon, 22 Dec 2003 18:41:06 +0000
1927 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1928 To: bk-commits-24@vger.kernel.org
1929 Subject: [PATCH] Initialize ioc3_timer before use
1931 ChangeSet 1.1339, 2003/12/22 16:41:06-02:00, ralf@linux-mips.org
1933 [PATCH] Initialize ioc3_timer before use
1937 # This patch includes the following deltas:
1938 # ChangeSet 1.1338 -> 1.1339
1939 # drivers/net/ioc3-eth.c 1.15 -> 1.16
1943 1 files changed, 1 insertion(+), 1 deletion(-)
1946 diff -ruN linux-2.4.23.mine/drivers/net/ioc3-eth.c linux-2.4.23/drivers/net/ioc3-eth.c
1947 - --- linux-2.4.23.mine/drivers/net/ioc3-eth.c 2003-08-25 05:44:42.000000000 -0600
1948 +++ linux-2.4.23/drivers/net/ioc3-eth.c 2003-12-28 22:39:33.291078118 -0700
1949 @@ -1552,11 +1552,11 @@
1952 spin_lock_init(&ip->ioc3_lock);
1953 + init_timer(&ip->ioc3_timer);
1958 - - init_timer(&ip->ioc3_timer);
1961 if (ip->phy == -1) {
1962 - From linux-kernel@vger.kernel.org Sun Dec 28 14:29:04 2003
1963 Date: Mon, 22 Dec 2003 11:32:50 +0000
1964 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1965 To: bk-commits-24@vger.kernel.org
1966 Subject: [PATCH] Fix RAID1 blocksize check
1968 ChangeSet 1.1313, 2003/12/22 09:32:50-02:00, neilb@cse.unsw.edu.au
1970 [PATCH] Fix RAID1 blocksize check
1972 On Saturday December 20, zaitcev@redhat.com wrote:
1973 > In drivers/md/raid1.c, raid1_sync_request contains the following:
1975 > block_nr = sector_nr;
1977 > while (!(block_nr & 1) && bsize < PAGE_SIZE
1978 > && (block_nr+2)*(bsize>>9) < (mddev->sb->size *2)) {
1983 > Suppose that a mirror is 4K in size. The code above produces
1984 > reads (and writes) of the following offsets and sizes:
1985 > 0K[2K], 2K[1K], 3K[0.5K], 3.5K[0.5K]
1987 > The above is correct, but it makes the RAID1 completely unuseable
1988 > on s390, because I/O with sizes less than 4K is not supported.
1989 > I would like the attached patch applied to correct the issue.
1991 Yes, I agree. Marcelo, could you please apply this patch.
1992 The '<' test is just to make sure a request of 2*bsize at block_nr
1993 will still fit within the size of the device, so a <= is appropriate.
1998 # This patch includes the following deltas:
1999 # ChangeSet 1.1312 -> 1.1313
2000 # drivers/md/raid1.c 1.16 -> 1.17
2004 1 files changed, 1 insertion(+), 1 deletion(-)
2007 diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c
2008 - --- a/drivers/md/raid1.c Mon Dec 22 04:03:08 2003
2009 +++ b/drivers/md/raid1.c Mon Dec 22 04:03:08 2003
2010 @@ -1436,7 +1436,7 @@
2011 block_nr = sector_nr;
2013 while (!(block_nr & 1) && bsize < PAGE_SIZE
2014 - - && (block_nr+2)*(bsize>>9) < (mddev->sb->size *2)) {
2015 + && (block_nr+2)*(bsize>>9) <= (mddev->sb->size *2)) {
2020 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
2021 the body of a message to majordomo@vger.kernel.org
2022 More majordomo info at http://vger.kernel.org/majordomo-info.html