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 ChangeSet@1.1136.1.73 2003-12-07 15:10:38-02:00 mikulas at cuni.cz
125 [PATCH] from -aa tree: Fix potential fsync() race condition
127 > 00_ll_rw_block-sync-race-1 first appeared in 2.4.21pre4aa3 - 470 bytes
129 > Add lock_page in ll_rw_block to fix a fs race
130 > condition. Fix suggested by Mikulas Patocka.
132 Yes. You have two inodes placed in the same buffer.
134 Process 1 modifies inode 1 and calls fsync on it. fsync initiates write of
135 the block. ll_rw_block returns, write is in progress.
137 Process 2 modifies inode 2 and calls fsync on it. Filesystem calls
138 ll_rw_block write on the same buffer. ll_rw_block immediatelly returns,
139 because it sees there is already IO on the buffer (there used to be
140 something like if (buffer_locked(bh)) return;). Process 2 waits on buffer.
142 The write finished. Both processes are waken up. Both processes return out
143 of fsync function. Process 2 returns from fsync while it did not write its
144 inode modification to disk --- it waited on process 1's write.
147 - --- linux-2.4.23/drivers/block/ll_rw_blk.c~ Tue Dec 9 00:17:12 2003
148 +++ linux-2.4.23/drivers/block/ll_rw_blk.c Tue Dec 9 00:17:12 2003
149 @@ -1377,9 +1377,7 @@
150 for (i = 0; i < nr; i++) {
151 struct buffer_head *bh = bhs[i];
153 - - /* Only one thread can actually submit the I/O. */
154 - - if (test_and_set_bit(BH_Lock, &bh->b_state))
158 /* We have the buffer lock */
159 atomic_inc(&bh->b_count);
160 ChangeSet@1.1136.73.4 2003-12-02 12:02:00-02:00 neilb at unsw.edu.au
161 [PATCH] Drop module count if lockd reclaimer thread failed to start.
163 - --- linux-2.4.23/fs/lockd/clntlock.c~ Tue Dec 9 00:35:29 2003
164 +++ linux-2.4.23/fs/lockd/clntlock.c Tue Dec 9 00:35:29 2003
166 nlmclnt_prepare_reclaim(host, newstate);
169 - - kernel_thread(reclaimer, host, CLONE_SIGNAL);
170 + if(kernel_thread(reclaimer, host, CLONE_SIGNAL) < 0)
175 ChangeSet@1.1136.1.65 2003-12-05 15:53:34-02:00 mikpe at se
176 [PATCH] fix reboot/no_idt bug
178 When compiling 2.4.23 with gcc-3.3.2, gcc generates the
179 following warning for arch/i386/kernel/process.c:
181 process.c: In function `machine_restart':
182 process.c:427: warning: use of memory input without lvalue in asm operand 0
185 The warning identifies a real bug. no_idt is passed to
186 lidt with an "m" constraint, which requires an l-value.
187 Since no_idt is faked as an array, gcc creates an anonymous
188 variable pointing to no_idt and passes that to lidt(*),
189 so at runtime lidt sees the wrong address. Not good.
190 (The bug, while real, is unlikely to trigger since it
191 sits in an infrequently used path in the reboot code.)
193 The fix is to make no_idt a struct (and thus an l-lvalue)
194 like the other gdt/idt descriptors.
196 This patch is a backport of the fix Linus made for the
197 same bug in 2.6.0-test4.
199 [Andi: x86-64 appears to have the same bug]
201 (*) Verified by inspection of the assembly code.
206 - --- linux-2.4.23/arch/i386/kernel/process.c.orig Tue Dec 9 00:29:52 2003
207 +++ linux-2.4.23/arch/i386/kernel/process.c Tue Dec 9 00:30:46 2003
210 __setup("idle=", idle_setup);
212 - -static long no_idt[2];
213 static int reboot_mode;
214 int reboot_thru_bios;
217 unsigned long long * base __attribute__ ((packed));
219 real_mode_gdt = { sizeof (real_mode_gdt_entries) - 1, real_mode_gdt_entries },
220 - -real_mode_idt = { 0x3ff, 0 };
221 +real_mode_idt = { 0x3ff, 0 },
224 /* This is 16-bit protected mode code to disable paging and the cache,
225 switch to real mode and jump to the BIOS reset code.
226 ChangeSet@1.1136.78.2 2003-12-07 12:43:34-02:00 wli at holomorphy.com
227 [PATCH] out_of_memory() locking
229 On Sun, Nov 30, 2003 at 08:18:02AM -0800, William Lee Irwin III wrote:
230 > (1) the timestamps/etc. weren't locked, and when cpus raced, it caused
232 > (2) the mm could go away while scanning the tasklist, causing the thing
233 > to try to kill kernel threads
234 > Here's a preliminary backport (please do _NOT_ apply until I or someone
235 > tests it) for you to comment on. Basically, do you want (1) and (2)
236 > split out, is the basic thing okay, etc.?
238 out_of_memory()'s operational variables are not locked, and can be
239 reset by multiple cpus simultaneously, causing false OOM kills.
241 This patch adds an oom_lock to out_of_memory() to protect its operational
249 - --- linux-2.4.23/mm/oom_kill.c.orig Tue Dec 9 00:20:47 2003
250 +++ linux-2.4.23/mm/oom_kill.c Tue Dec 9 00:24:20 2003
253 void out_of_memory(void)
256 + * oom_lock protects out_of_memory()'s static variables.
257 + * It's a global lock; this is not performance-critical.
259 + static spinlock_t oom_lock = SPIN_LOCK_UNLOCKED;
260 static unsigned long first, last, count, lastkill;
261 unsigned long now, since;
264 if (nr_swap_pages > 0)
267 + spin_lock(&oom_lock);
271 @@ -229,14 +235,14 @@
279 * If we have gotten only a few failures,
280 * we're not really oom.
287 * If we just killed a process, wait a while
288 @@ -245,17 +251,25 @@
290 since = now - lastkill;
296 * Ok, really out of memory. Kill something.
300 + /* oom_kill() can sleep */
301 + spin_unlock(&oom_lock);
303 + spin_lock(&oom_lock);
312 + spin_unlock(&oom_lock);
315 #endif /* Unused file */
316 ChangeSet@1.1136.1.61 2003-12-01 12:43:59-07:00 davidm at com[helgaas]
318 ia64: Fix a bug in sigtramp() which corrupted ar.rnat when unwinding
319 across a signal trampoline (in user space). Reported by
322 arch/ia64/kernel/gate.S@1.11 2003-12-01 05:43:29-07:00 davidm at com[helgaas]
324 (__kernel_sigtramp): Replace usage of p8 with p1. We must use a preserved
325 predicate for the .spillsp.p directive, otherwise, the predicate
326 may have been clobbered by the time the unwinder looks at it.
327 Fortunately, we can just use p1 because the entire pr register
328 is already saved/restored by the kernel.
331 - --- linux-2.4.23/arch/ia64/kernel/gate.S~ Tue Dec 9 00:46:11 2003
332 +++ linux-2.4.23/arch/ia64/kernel/gate.S Tue Dec 9 00:46:11 2003
334 ld8 r15=[base1] // get address of new RBS base (or NULL)
335 cover // push args in interrupted frame onto backing store
337 - - cmp.ne p8,p0=r15,r0 // do we need to switch the rbs?
338 + cmp.ne p1,p0=r15,r0 // do we need to switch rbs? (note: pr is saved by kernel)
339 mov.m r9=ar.bsp // fetch ar.bsp
340 - - .spillsp.p p8, ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
341 - -(p8) br.cond.spnt setup_rbs // yup -> (clobbers r14, r15, and r16)
342 + .spillsp.p p1, ar.rnat, RNAT_OFF+SIGCONTEXT_OFF
343 +(p1) br.cond.spnt setup_rbs // yup -> (clobbers p8, r14, r15, and r16)
345 alloc r8=ar.pfs,0,0,3,0
346 ld8 out0=[base0],16 // load arg0 (signum)
348 ld8 r15=[base0],(CFM_OFF-BSP_OFF) // fetch sc_ar_bsp and advance to CFM_OFF
351 - - cmp.ne p8,p0=r14,r15 // do we need to restore the rbs?
352 - -(p8) br.cond.spnt restore_rbs // yup -> (clobbers r14-r18, f6 & f7)
353 + cmp.ne p1,p0=r14,r15 // do we need to restore the rbs?
354 +(p1) br.cond.spnt restore_rbs // yup -> (clobbers p8, r14-r18, f6 & f7)
356 back_from_restore_rbs:
357 adds base0=(FR6_OFF+SIGCONTEXT_OFF),sp
358 ChangeSet@1.1136.73.2 2003-12-02 11:58:06-02:00 neilb at unsw.edu.au
359 [PATCH] Make root a special case for per-user process limits.
361 This is needed because when a setuid-root program calls
362 setuid(0) to become really-root, p->user becomes root_user,
363 but ->rlim stays as the original user's limit, and now
364 the process cannot fork - becuase root has more processes than
365 the original user had.
367 The real problem is that NPROC is not really a per-process limit,
368 but its a per-user limit, and including it with the rlim structure
369 was not a good idea :-(
371 This fix is already in 2.6
374 - --- linux-2.4.23/kernel/fork.c.orig Tue Dec 9 00:38:16 2003
375 +++ linux-2.4.23/kernel/fork.c Tue Dec 9 00:38:59 2003
377 * than the amount of processes root is running. -- Rik
379 if (atomic_read(&p->user->processes) >= p->rlim[RLIMIT_NPROC].rlim_cur
380 + && p->user != &root_user
381 && !capable(CAP_SYS_ADMIN) && !capable(CAP_SYS_RESOURCE))
384 As per http://lkml.org/lkml/2003/12/1/150
386 diff -urN --exclude=CVS --exclude=.cvsignore linux-2.4.23/include/linux/mc146818rtc.h linux-cvs-2.4.23/include/linux/mc146818rtc.h
387 - --- linux-2.4.23/include/linux/mc146818rtc.h 2001-11-22 20:46:58.000000000 +0100
388 +++ linux-cvs-2.4.23/include/linux/mc146818rtc.h 2003-11-28 15:09:41.000000000 +0100
390 #define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
393 +#ifndef RTC_IO_EXTENT
394 +#define RTC_IO_EXTENT 0x10 /* Only really two ports, but... */
397 +#ifndef RTC_IOMAPPED
398 +#define RTC_IOMAPPED 1 /* Default to I/O mapping. */
401 #endif /* _MC146818RTC_H */
402 - From linux-kernel@vger.kernel.org Thu Dec 18 21:50:26 2003
403 Date: Tue, 16 Dec 2003 15:59:16 +0000
404 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
405 To: bk-commits-24@vger.kernel.org
406 Subject: [PATCH] duplicate PID fix
408 ChangeSet 1.1302, 2003/12/16 13:59:16-02:00, t-kochi@bq.jp.nec.com
410 [PATCH] duplicate PID fix
414 This fix was sent to lkml in April, and was merged to -ac tree,
415 but is not merged in the main tree yet.
416 Please consider taking this in.
418 Without this, duplicate pids can be allocated, which will make
419 one of them unkillable (signals are deliverd to only one of them),
420 and this can be exploitable (I don't know for sure, but maybe,
423 This situation happens only when all pid space is full.
424 Usually, users cannot fork processes more than 32768 (PID_MAX),
425 but default user limit of max processes can be more
426 than PID_MAX on large memory machines such as 64bit
427 platforms (although it's adjustable by threads-max sysctl).
429 This patch modifies common code and affects all architectures,
430 but modifies code only executed when no pid is available,
431 so it doesn't hurt any normal path anyway.
433 (BTW, once I sent this patch to Rusty's Trivial patch monkey,
434 but his reply was non-trivial, and he also said this is
437 The details are described below:
439 In get_pid(), an available pid is searched through all task_structs
440 even when there is no available pid. If a new pid is not available,
441 the kernel exits the loop with static variable 'next_safe' untouched,
442 which usually is no problem.
445 spin_lock(&lastpid_lock);
447 if((++last_pid) & 0xffff8000) {
448 last_pid = 300; /* Skip daemons etc. */
451 if(last_pid >= next_safe) {
454 read_lock(&tasklist_lock);
457 if(p->pid == last_pid ||
458 p->pgrp == last_pid ||
459 p->tgid == last_pid ||
460 p->session == last_pid) { <= (A)
461 if(++last_pid >= next_safe) { <= (B)
462 if(last_pid & 0xffff8000)
466 if(unlikely(last_pid == beginpid)) <= (C)
470 if(p->pid > last_pid && next_safe > p->pid)
472 if(p->pgrp > last_pid && next_safe > p->pgrp)
474 if(p->tgid > last_pid && next_safe > p->tgid)
476 if(p->session > last_pid && next_safe > p->session)
477 next_safe = p->session;
481 In a rare case, both (B) and (C) can be true and then, next_safe
482 will remain PID_MAX (32768). If that happens, following get_pid() will
483 always succeed until last_pid reaches 32768 and there may be many
486 For example, this happens when
488 * PID space are full (300-32767 are all occupied)
489 * the last pid allocated is 10000
490 * task list chain is like:
491 ...(pids < 9999), 9999, ...(pids 300~9998, 10001~32767)... , 10000
493 The loop starts searching an available pid with beginpid=10000 and
494 last_pid=10001. last_pid is incremented until it gets PID_MAX
495 and then wraps around to 300, then is incremented again.
497 At the point that p->pid=9999 is found in tasklist (condition (A)),
502 therefore condition (B) is true, and then
507 and then, condition (C) is also true, and exits the loop.
509 To protect this case is simple; when the condition (C) is true,
510 set next_safe to 0 or any safe value to guarantee that a free pid
511 will be searched through next time.
516 # This patch includes the following deltas:
517 # ChangeSet 1.1301 -> 1.1302
518 # kernel/fork.c 1.31 -> 1.32
522 1 files changed, 3 insertions(+), 1 deletion(-)
525 diff -Nru a/kernel/fork.c b/kernel/fork.c
526 - --- a/kernel/fork.c Tue Dec 16 09:02:43 2003
527 +++ b/kernel/fork.c Tue Dec 16 09:02:43 2003
532 - - if(unlikely(last_pid == beginpid))
533 + if(unlikely(last_pid == beginpid)) {
539 if(p->pid > last_pid && next_safe > p->pid)
541 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
542 the body of a message to majordomo@vger.kernel.org
543 More majordomo info at http://vger.kernel.org/majordomo-info.html
544 - From linux-kernel@vger.kernel.org Thu Dec 18 21:43:15 2003
545 Date: Mon, 15 Dec 2003 04:44:43 +0000
546 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
547 To: bk-commits-24@vger.kernel.org
548 Subject: [PPC64] Fix save_flags/restore_flags on iSeries.
550 ChangeSet 1.1270.3.9, 2003/12/15 15:44:43+11:00, engebret@us.ibm.com
552 [PPC64] Fix save_flags/restore_flags on iSeries.
555 # This patch includes the following deltas:
556 # ChangeSet 1.1270.3.8 -> 1.1270.3.9
557 # arch/ppc64/kernel/misc.S 1.8 -> 1.9
560 misc.S | 14 +++++++-------
561 1 files changed, 7 insertions(+), 7 deletions(-)
564 diff -Nru a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
565 - --- a/arch/ppc64/kernel/misc.S Mon Dec 15 07:03:59 2003
566 +++ b/arch/ppc64/kernel/misc.S Mon Dec 15 07:03:59 2003
568 _GLOBAL(__no_use_save_flags)
570 lbz r3,PACAPROCENABLED(r4)
571 + /* shift into position of MSR.EE */
575 - -/* void __no_use_restore_flags(unsigned long flags) */
576 +/* void __no_use_restore_flags(unsigned long flags) */
577 _GLOBAL(__no_use_restore_flags)
579 - - * Just set/clear the MSR_EE bit through restore/flags but do not
580 - - * change anything else. This is needed by the RT system and makes
584 + /* shift from position of MSR.EE */
587 lbz r5,PACAPROCENABLED(r6)
588 /* Check if things are setup the way we want _already_. */
590 lbz r3,PACAPROCENABLED(r5)
592 stb r4,PACAPROCENABLED(r5)
593 + /* shift into position of MSR.EE */
597 _GLOBAL(__no_use_sti)
599 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
600 the body of a message to majordomo@vger.kernel.org
601 More majordomo info at http://vger.kernel.org/majordomo-info.html
602 - From linux-kernel@vger.kernel.org Thu Dec 18 21:41:34 2003
603 Date: Fri, 12 Dec 2003 20:18:04 +0000
604 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
605 To: bk-commits-24@vger.kernel.org
606 Subject: [PATCH] USB: MCT-U232 Patch for cts
608 ChangeSet 1.1289, 2003/12/12 12:18:04-08:00, marr@flex.com
610 [PATCH] USB: MCT-U232 Patch for cts
612 Brief Patch Description:
614 Fix a problem in the 'mct_u232' driver whereby output data gets held up in the
615 USB/RS-232 adapter for RS-232 devices which don't assert the 'CTS' signal.
619 The Belkin F5U109 is a 9-pin USB/RS-232 adapter that is supported by the
620 existing 'mct_u232' kernel module. Â Recently, I've been testing it under the
621 2.4.22 (Slackware 9.1) kernel and the 2.6.0-test9 kernel.
623 I've connected a Garmin 'GPS35 TracPak' GPS receiver (RS-232 interface) and an
624 ordinary RS-232 external modem to my PC's USB port via the Belkin F5U109
629 Although _reads_ from either of the RS-232 devices mentioned above work fine
630 via the Belkin adapter, _writes_ to the GPS receiver are not being seen by
631 the GPS. Â Writes to the modem, however, work perfectly.
633 Aside: The 'Linux USB Users' archives show that at least one other person
634 (circa May 2002) had the exact same problem I'm having, but it sounds like no
635 solution was ever determined because the person in question just bought a
636 different USB/RS-232 adapter.
640 Using the 'seyon' terminal emulator in Linux and a crude hardware RS-232
641 "breakout box" that I hacked together, I've determined that the problem is
642 related to the RTS/CTS RS-232 hardware handshaking.
644 After further investigation, I've concluded that RS-232 devices which do not
645 assert the 'Clear To Send' ('CTS') signal prevent the Belkin F5U109 adapter
646 from transmitting data to the RS-232 device when the current (version 1.1)
647 'mct_u232' module is used. The data gets "queued up" (up to a point -- 16
648 bytes, I think) in the adapter but never transmitted.
650 Since this GPS receiver works perfectly (reads and writes) when connected to a
651 PC running W98se using the same Belkin adapter and the Belkin-supplied
652 Windows driver, the Linux driver became suspect.
654 After some testing with SniffUSB, I found that the Windows driver sends a
655 couple of unique undocumented USB 'device requests' that the Linux driver
656 does not. As it turns out, the second of those 2 requests is critical in
657 making the adapter transmit data to a device which doesn't assert 'CTS'.
659 For completeness, the Windows driver in use was determined from the 'Device
660 Manager', 'Driver File Details' page:
663 Â Â Provider: Magic Control Technology
664 Â Â File version: 1.21P.0104 for Win98/Me
668 My patch adds the 2 missing USB 'device request' commands right after a
669 baud-change command. This mimics the operation of the W98 driver.
671 Unfortunately, after much testing, I found no other operation (besides a
672 baud-change request) under Windows that triggers either of these 2 'device
673 request' commands. This makes it impossible to fully document the behavior of
674 these requests, but I've made entries for them alongside the others in the
677 Purely for clarity, the patch also modifies various comments in 'mct_u232.h',
678 mostly to reflect proper sizes of the various 'USB Device Request' fields per
679 the USB 1.1 specification.
681 The patch also updates the version number of the driver, corrects a minor
682 typographical error, and documents a difference in the length of the data in
683 a 'baud rate change' command for certain adapters which use a coded baud-rate
684 rather than the conventional RS-232 baud rate divisor.
687 # This patch includes the following deltas:
688 # ChangeSet 1.1288 -> 1.1289
689 # drivers/usb/serial/mct_u232.c 1.18 -> 1.19
690 # drivers/usb/serial/mct_u232.h 1.3 -> 1.4
693 mct_u232.c | 37 +++++++++++++++++++++-
694 mct_u232.h | 101 ++++++++++++++++++++++++++++++++++++++++++++++++-------------
695 2 files changed, 116 insertions(+), 22 deletions(-)
698 diff -Nru a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
699 - --- a/drivers/usb/serial/mct_u232.c Mon Dec 15 07:03:29 2003
700 +++ b/drivers/usb/serial/mct_u232.c Mon Dec 15 07:03:29 2003
702 * Basic tests have been performed with minicom/zmodem transfers and
703 * modem dialing under Linux 2.4.0-test10 (for me it works fine).
705 + * 04-Nov-2003 Bill Marr <marr at flex dot com>
706 + * - Mimic Windows driver by sending 2 USB 'device request' messages
707 + * following normal 'baud rate change' message. This allows data to be
708 + * transmitted to RS-232 devices which don't assert the 'CTS' signal.
710 * 10-Nov-2001 Wolfgang Grandegger
711 * - Fixed an endianess problem with the baudrate selection for PowerPC.
715 * Version Information
717 - -#define DRIVER_VERSION "v1.1"
718 +#define DRIVER_VERSION "v1.2"
719 #define DRIVER_AUTHOR "Wolfgang Grandegger <wolfgang@ces.ch>"
720 #define DRIVER_DESC "Magic Control Technology USB-RS232 converter driver"
724 unsigned int divisor;
726 + unsigned char zero_byte = 0;
727 divisor = cpu_to_le32(mct_u232_calculate_baud_rate(serial, value));
728 rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
729 MCT_U232_SET_BAUD_RATE_REQUEST,
732 err("Set BAUD RATE %d failed (error = %d)", value, rc);
733 dbg("set_baud_rate: value: %d, divisor: 0x%x", value, divisor);
735 + /* Mimic the MCT-supplied Windows driver (version 1.21P.0104), which
736 + always sends two extra USB 'device request' messages after the
737 + 'baud rate change' message. The actual functionality of the
738 + request codes in these messages is not fully understood but these
739 + particular codes are never seen in any operation besides a baud
740 + rate change. Both of these messages send a single byte of data
741 + whose value is always zero. The second of these two extra messages
742 + is required in order for data to be properly written to an RS-232
743 + device which does not assert the 'CTS' signal. */
745 + rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
746 + MCT_U232_SET_UNKNOWN1_REQUEST,
747 + MCT_U232_SET_REQUEST_TYPE,
748 + 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN1_SIZE,
751 + err("Sending USB device request code %d failed (error = %d)",
752 + MCT_U232_SET_UNKNOWN1_REQUEST, rc);
754 + rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
755 + MCT_U232_SET_UNKNOWN2_REQUEST,
756 + MCT_U232_SET_REQUEST_TYPE,
757 + 0, 0, &zero_byte, MCT_U232_SET_UNKNOWN2_SIZE,
760 + err("Sending USB device request code %d failed (error = %d)",
761 + MCT_U232_SET_UNKNOWN2_REQUEST, rc);
764 } /* mct_u232_set_baud_rate */
766 diff -Nru a/drivers/usb/serial/mct_u232.h b/drivers/usb/serial/mct_u232.h
767 - --- a/drivers/usb/serial/mct_u232.h Mon Dec 15 07:03:29 2003
768 +++ b/drivers/usb/serial/mct_u232.h Mon Dec 15 07:03:29 2003
770 #define MCT_U232_SET_MODEM_CTRL_REQUEST 10 /* Set Modem Control Register (MCR) */
771 #define MCT_U232_SET_MODEM_CTRL_SIZE 1
773 +/* This USB device request code is not well understood. It is transmitted by
774 + the MCT-supplied Windows driver whenever the baud rate changes.
776 +#define MCT_U232_SET_UNKNOWN1_REQUEST 11 /* Unknown functionality */
777 +#define MCT_U232_SET_UNKNOWN1_SIZE 1
779 +/* This USB device request code is not well understood. It is transmitted by
780 + the MCT-supplied Windows driver whenever the baud rate changes.
782 + Without this USB device request, the USB/RS-232 adapter will not write to
783 + RS-232 devices which do not assert the 'CTS' signal.
785 +#define MCT_U232_SET_UNKNOWN2_REQUEST 12 /* Unknown functionality */
786 +#define MCT_U232_SET_UNKNOWN2_SIZE 1
789 * Baud rate (divisor)
791 @@ -137,22 +152,31 @@
792 * Baud rate (divisor)
793 * -------------------
795 - - * BmRequestType: 0x4 (0100 0000B)
800 + * BmRequestType: 0x40 (0100 0000B)
805 * Data: divisor = 115200 / baud_rate
807 + * SniffUSB observations (Nov 2003): Contrary to the 'wLength' value of 4
808 + * shown above, observations with a Belkin F5U109 adapter, using the
809 + * MCT-supplied Windows98 driver (U2SPORT.VXD, "File version: 1.21P.0104 for
810 + * Win98/Me"), show this request has a length of 1 byte, presumably because
811 + * of the fact that the Belkin adapter and the 'Sitecom U232-P25' adapter
812 + * use a baud-rate code instead of a conventional RS-232 baud rate divisor.
813 + * The current source code for this driver does not reflect this fact, but
814 + * the driver works fine with this adapter/driver combination nonetheless.
817 * Line Control Register (LCR)
818 * ---------------------------
820 - - * BmRequestType: 0x4 (0100 0000B) 0xc (1100 0000B)
821 - - * bRequest: 0x7 0x6
825 + * BmRequestType: 0x40 (0100 0000B) 0xc0 (1100 0000B)
826 + * bRequest: 0x07 0x06
830 * Data: LCR (see below)
832 * Bit 7: Divisor Latch Access Bit (DLAB). When set, access to the data
833 @@ -186,18 +210,18 @@
835 * SniffUSB observations: Bit 7 seems not to be used. There seem to be two bugs
836 * in the Win98 driver: the break does not work (bit 6 is not asserted) and the
837 - - * sticky parity bit is not cleared when set once. The LCR can also be read
838 + * stick parity bit is not cleared when set once. The LCR can also be read
839 * back with USB request 6 but this has never been observed with SniffUSB.
842 * Modem Control Register (MCR)
843 * ----------------------------
845 - - * BmRequestType: 0x4 (0100 0000B)
850 + * BmRequestType: 0x40 (0100 0000B)
855 * Data: MCR (Bit 4..7, see below)
857 * Bit 7: Reserved, always 0.
858 @@ -226,11 +250,11 @@
859 * Modem Status Register (MSR)
860 * ---------------------------
862 - - * BmRequestType: 0xc (1100 0000B)
867 + * BmRequestType: 0xc0 (1100 0000B)
872 * Data: MSR (see below)
874 * Bit 7: Data Carrier Detect (CD). Reflects the state of the DCD line on the
876 * SniffUSB observations: the LSR is returned as second byte on the interrupt-in
877 * endpoint 0x83 to signal error conditions. Such errors have been seen with
878 * minicom/zmodem transfers (CRC errors).
882 + * -------------------
884 + * BmRequestType: 0x40 (0100 0000B)
891 + * SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
892 + * (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
893 + * occurs immediately after a "Baud rate (divisor)" message. It was not
894 + * observed at any other time. It is unclear what purpose this message
899 + * -------------------
901 + * BmRequestType: 0x40 (0100 0000B)
908 + * SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
909 + * (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
910 + * occurs immediately after the 'Unknown #1' message (see above). It was
911 + * not observed at any other time. It is unclear what other purpose (if
912 + * any) this message might serve, but without it, the USB/RS-232 adapter
913 + * will not write to RS-232 devices which do not assert the 'CTS' signal.
918 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
919 the body of a message to majordomo@vger.kernel.org
920 More majordomo info at http://vger.kernel.org/majordomo-info.html
921 - From cel@citi.umich.edu Thu Dec 18 22:13:19 2003
922 Date: Thu, 18 Dec 2003 16:34:58 -0500 (EST)
923 From: Chuck Lever <cel@citi.umich.edu>
924 To: Marcelo Tosatti <marcelo@conectiva.com.br>
925 Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
926 Trond Myklebust <trond.myklebust@fys.uio.no>,
927 Steve Dickson <SteveD@redhat.com>, greg.marsden@oracle.com
928 Subject: [PATCH] NFS O_DIRECT offset wrap bug
932 here's an obvious mistake i made in the NFS O_DIRECT implementation. a
933 missing type cast causes the offset of direct read and write requests to
934 wrap at 4GB. please include this in 2.4.24-pre2.
936 as far as i can tell, this is not a problem for 2.6 NFS O_DIRECT.
939 diff -X ../dont-diff -Naurp 00-stock/fs/nfs/direct.c 01-direct-offset/fs/nfs/direct.c
940 - --- 00-stock/fs/nfs/direct.c 2003-08-25 07:44:43.000000000 -0400
941 +++ 01-direct-offset/fs/nfs/direct.c 2003-12-18 16:28:20.000000000 -0500
942 @@ -354,7 +354,7 @@ nfs_direct_IO(int rw, struct file *file,
943 size_t count = iobuf->length;
944 struct dentry *dentry = file->f_dentry;
945 struct inode *inode = dentry->d_inode;
946 - - loff_t offset = blocknr << inode->i_blkbits;
947 + loff_t offset = (loff_t) blocknr << inode->i_blkbits;
954 corporate: <cel at netapp dot com>
955 personal: <chucklever at bigfoot dot com>
958 To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
959 the body of a message to majordomo@vger.kernel.org
960 More majordomo info at http://vger.kernel.org/majordomo-info.html
961 Please read the FAQ at http://www.tux.org/lkml/
962 - From linux-kernel@vger.kernel.org Thu Dec 18 21:47:47 2003
963 Date: Mon, 15 Dec 2003 05:42:19 +0000
964 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
965 To: bk-commits-24@vger.kernel.org
966 Subject: [PPC64] Fix compile error in arch/ppc64/kernel/pmc.c.
968 ChangeSet 1.1270.3.10, 2003/12/15 16:42:19+11:00, paulus@quango.ozlabs.ibm.com
970 [PPC64] Fix compile error in arch/ppc64/kernel/pmc.c.
973 # This patch includes the following deltas:
974 # ChangeSet 1.1270.3.9 -> 1.1270.3.10
975 # arch/ppc64/kernel/pmc.c 1.5 -> 1.6
976 # include/asm-ppc64/mmu.h 1.4 -> 1.5
979 arch/ppc64/kernel/pmc.c | 5 ++---
980 include/asm-ppc64/mmu.h | 3 ++-
981 2 files changed, 4 insertions(+), 4 deletions(-)
984 diff -Nru a/arch/ppc64/kernel/pmc.c b/arch/ppc64/kernel/pmc.c
985 - --- a/arch/ppc64/kernel/pmc.c Mon Dec 15 07:04:01 2003
986 +++ b/arch/ppc64/kernel/pmc.c Mon Dec 15 07:04:01 2003
988 page_table_lock : SPIN_LOCK_UNLOCKED};
990 extern spinlock_t hash_table_lock[];
991 - -extern inline unsigned long get_lock_slot(unsigned long vpn);
994 ppc64_pmc_stab(int file)
996 lock_slot = get_lock_slot(vpn);
997 rpn = pa >> PAGE_SHIFT;
999 - - spin_lock(&hash_table_lock[lock_slot].lock);
1000 + spin_lock(&hash_table_lock[lock_slot]);
1001 /* Get a pointer to the linux page table entry for this page
1002 * allocating pmd or pte pages along the way as needed. Note
1003 * that the pmd & pte pages are not themselfs bolted.
1008 - - spin_unlock(&hash_table_lock[lock_slot].lock);
1009 + spin_unlock(&hash_table_lock[lock_slot]);
1012 spin_unlock(&btmalloc_mm.page_table_lock);
1013 diff -Nru a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h
1014 - --- a/include/asm-ppc64/mmu.h Mon Dec 15 07:04:01 2003
1015 +++ b/include/asm-ppc64/mmu.h Mon Dec 15 07:04:01 2003
1017 extern HTAB htab_data;
1019 #include <linux/cache.h>
1020 - -#include <asm/spinlock.h>
1021 +#include <linux/spinlock.h>
1024 } ____cacheline_aligned hash_table_lock_t;
1026 unsigned long prpn, unsigned hash,
1027 void * ptep, unsigned hpteflags,
1029 +unsigned long get_lock_slot(unsigned long vpn);
1031 #define PD_SHIFT (10+12) /* Page directory */
1032 #define PD_MASK 0x02FF
1034 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1035 the body of a message to majordomo@vger.kernel.org
1036 More majordomo info at http://vger.kernel.org/majordomo-info.html
1037 - From linux-kernel@vger.kernel.org Thu Dec 18 21:48:23 2003
1038 Date: Mon, 15 Dec 2003 03:20:20 +0000
1039 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1040 To: bk-commits-24@vger.kernel.org
1041 Subject: [PPC64] Fix smp_call_function so we don't crash if an IPI is very
1044 ChangeSet 1.1270.3.2, 2003/12/15 14:20:20+11:00, olof@austin.ibm.com
1046 [PPC64] Fix smp_call_function so we don't crash if an IPI is very late.
1049 # This patch includes the following deltas:
1050 # ChangeSet 1.1270.3.1 -> 1.1270.3.2
1051 # arch/ppc64/kernel/smp.c 1.4 -> 1.5
1054 smp.c | 18 +++++++++++++++---
1055 1 files changed, 15 insertions(+), 3 deletions(-)
1058 diff -Nru a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
1059 - --- a/arch/ppc64/kernel/smp.c Mon Dec 15 07:03:47 2003
1060 +++ b/arch/ppc64/kernel/smp.c Mon Dec 15 07:03:47 2003
1067 spin_unlock_bh(&call_lock);
1069 @@ -571,9 +572,20 @@
1071 void smp_call_function_interrupt(void)
1073 - - void (*func) (void *info) = call_data->func;
1074 - - void *info = call_data->info;
1075 - - int wait = call_data->wait;
1076 + void (*func) (void *info);
1081 + /* call_data will be NULL if the sender timed out while
1082 + * waiting on us to receive the call.
1087 + func = call_data->func;
1088 + info = call_data->info;
1089 + wait = call_data->wait;
1092 * Notify initiating CPU that I've grabbed the data and am
1094 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1095 the body of a message to majordomo@vger.kernel.org
1096 More majordomo info at http://vger.kernel.org/majordomo-info.html
1097 - From linux-kernel@vger.kernel.org Thu Dec 18 21:45:37 2003
1098 Date: Sun, 14 Dec 2003 05:52:29 +0000
1099 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1100 To: bk-commits-24@vger.kernel.org
1101 Subject: [SPARC32]: Fix build after asm/system.h include was added to
1104 ChangeSet 1.1270.1.7, 2003/12/13 21:52:29-08:00, davem@nuts.ninka.net
1106 [SPARC32]: Fix build after asm/system.h include was added to linux/spinlock.h
1108 - Do not include asm/oplib.h in system.h
1109 - Remove system.h's halt() macro, prom_halt() is equivalent so replace
1110 the two users of halt() with that.
1111 - Put 'romvec' extern decl where it belongs, in openprom.h
1113 Based upon a patch from Rob Radez.
1116 # This patch includes the following deltas:
1117 # ChangeSet 1.1270.1.6 -> 1.1270.1.7
1118 # include/asm-sparc/openprom.h 1.1 -> 1.2
1119 # include/asm-sparc/system.h 1.7 -> 1.8
1120 # arch/sparc/kernel/devices.c 1.4 -> 1.5
1121 # include/asm-sparc/oplib.h 1.3 -> 1.4
1122 # arch/sparc/kernel/ioport.c 1.8 -> 1.9
1125 arch/sparc/kernel/devices.c | 2 +-
1126 arch/sparc/kernel/ioport.c | 2 +-
1127 include/asm-sparc/openprom.h | 2 ++
1128 include/asm-sparc/oplib.h | 3 ---
1129 include/asm-sparc/system.h | 4 ----
1130 5 files changed, 4 insertions(+), 9 deletions(-)
1133 diff -Nru a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c
1134 - --- a/arch/sparc/kernel/devices.c Mon Dec 15 07:03:40 2003
1135 +++ b/arch/sparc/kernel/devices.c Mon Dec 15 07:03:40 2003
1137 if (linux_num_cpus == 0) {
1138 printk("No CPU nodes found, cannot continue.\n");
1139 /* Probably a sun4e, Sun is trying to trick us ;-) */
1143 printk("Found %d CPU prom device tree node(s).\n", linux_num_cpus);
1145 diff -Nru a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
1146 - --- a/arch/sparc/kernel/ioport.c Mon Dec 15 07:03:40 2003
1147 +++ b/arch/sparc/kernel/ioport.c Mon Dec 15 07:03:40 2003
1150 printk("ioport_init: cpu type %d is unknown.\n",
1157 diff -Nru a/include/asm-sparc/openprom.h b/include/asm-sparc/openprom.h
1158 - --- a/include/asm-sparc/openprom.h Mon Dec 15 07:03:40 2003
1159 +++ b/include/asm-sparc/openprom.h Mon Dec 15 07:03:40 2003
1161 int (*v3_cpuresume)(unsigned int whichcpu);
1164 +extern struct linux_romvec *romvec;
1166 /* Routines for traversing the prom device tree. */
1167 struct linux_nodeops {
1168 int (*no_nextnode)(int node);
1169 diff -Nru a/include/asm-sparc/oplib.h b/include/asm-sparc/oplib.h
1170 - --- a/include/asm-sparc/oplib.h Mon Dec 15 07:03:40 2003
1171 +++ b/include/asm-sparc/oplib.h Mon Dec 15 07:03:40 2003
1173 #include <asm/openprom.h>
1174 #include <linux/spinlock.h>
1176 - -/* The master romvec pointer... */
1177 - -extern struct linux_romvec *romvec;
1179 /* Enumeration to describe the prom major version we have detected. */
1180 enum prom_major_version {
1181 PROM_V0, /* Original sun4c V0 prom */
1182 diff -Nru a/include/asm-sparc/system.h b/include/asm-sparc/system.h
1183 - --- a/include/asm-sparc/system.h Mon Dec 15 07:03:40 2003
1184 +++ b/include/asm-sparc/system.h Mon Dec 15 07:03:40 2003
1188 #include <asm/page.h>
1189 - -#include <asm/oplib.h>
1190 #include <asm/psr.h>
1191 #include <asm/ptrace.h>
1192 #include <asm/btfixup.h>
1194 extern unsigned long empty_bad_page;
1195 extern unsigned long empty_bad_page_table;
1196 extern unsigned long empty_zero_page;
1198 - -extern struct linux_romvec *romvec;
1199 - -#define halt() romvec->pv_halt()
1201 /* When a context switch happens we must flush all user windows so that
1202 * the windows of the current process are flushed onto its stack. This
1204 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1205 the body of a message to majordomo@vger.kernel.org
1206 More majordomo info at http://vger.kernel.org/majordomo-info.html
1207 - From linux-kernel@vger.kernel.org Thu Dec 18 21:38:26 2003
1208 Date: Fri, 12 Dec 2003 18:18:02 +0000
1209 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1210 To: bk-commits-24@vger.kernel.org
1211 Subject: [PATCH] USB: fix bug when errors happen in ioedgeport driver
1213 ChangeSet 1.1286, 2003/12/12 10:18:02-08:00, tchen@on-go.com
1215 [PATCH] USB: fix bug when errors happen in ioedgeport driver
1218 # This patch includes the following deltas:
1219 # ChangeSet 1.1285 -> 1.1286
1220 # drivers/usb/serial/io_edgeport.c 1.26 -> 1.27
1223 io_edgeport.c | 12 ++++++++----
1224 1 files changed, 8 insertions(+), 4 deletions(-)
1227 diff -Nru a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
1228 - --- a/drivers/usb/serial/io_edgeport.c Mon Dec 15 07:03:23 2003
1229 +++ b/drivers/usb/serial/io_edgeport.c Mon Dec 15 07:03:23 2003
1230 @@ -1468,15 +1468,19 @@
1231 urb->transfer_flags |= USB_QUEUE_BULK;
1233 urb->dev = edge_serial->serial->dev;
1234 + /* decrement the number of credits we have by the number we just sent */
1235 + edge_port->txCredits -= count;
1236 + edge_port->icount.tx += count;
1238 status = usb_submit_urb(urb);
1240 /* something went wrong */
1241 dbg("%s - usb_submit_urb(write bulk) failed", __FUNCTION__);
1242 edge_port->write_in_progress = FALSE;
1244 - - /* decrement the number of credits we have by the number we just sent */
1245 - - edge_port->txCredits -= count;
1246 - - edge_port->icount.tx += count;
1248 + /*revert the count if something bad happened...*/
1249 + edge_port->txCredits += count;
1250 + edge_port->icount.tx -= count;
1252 dbg("%s wrote %d byte(s) TxCredit %d, Fifo %d", __FUNCTION__, count, edge_port->txCredits, fifo->count);
1255 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1256 the body of a message to majordomo@vger.kernel.org
1257 More majordomo info at http://vger.kernel.org/majordomo-info.html
1260 - From linux-kernel@vger.kernel.org Thu Dec 18 21:39:10 2003
1261 Date: Fri, 12 Dec 2003 18:18:22 +0000
1262 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1263 To: bk-commits-24@vger.kernel.org
1264 Subject: [PATCH] USB: fix io_edgeport driver alignment issues.
1266 ChangeSet 1.1287, 2003/12/12 10:18:22-08:00, tchen@on-go.com
1268 [PATCH] USB: fix io_edgeport driver alignment issues.
1271 # This patch includes the following deltas:
1272 # ChangeSet 1.1286 -> 1.1287
1273 # drivers/usb/serial/io_fw_boot2.h 1.3 -> 1.4
1274 # drivers/usb/serial/io_fw_down2.h 1.3 -> 1.4
1275 # drivers/usb/serial/io_fw_down.h 1.3 -> 1.4
1276 # drivers/usb/serial/io_fw_boot.h 1.3 -> 1.4
1280 io_fw_boot2.h | 2 +-
1282 io_fw_down2.h | 2 +-
1283 4 files changed, 4 insertions(+), 4 deletions(-)
1286 diff -Nru a/drivers/usb/serial/io_fw_boot.h b/drivers/usb/serial/io_fw_boot.h
1287 - --- a/drivers/usb/serial/io_fw_boot.h Mon Dec 15 07:03:25 2003
1288 +++ b/drivers/usb/serial/io_fw_boot.h Mon Dec 15 07:03:25 2003
1290 unsigned short Addr;
1292 unsigned char Data[0];
1294 + } __attribute__ ((packed));
1296 struct edge_firmware_version_info {
1297 unsigned char MajorVersion;
1298 diff -Nru a/drivers/usb/serial/io_fw_boot2.h b/drivers/usb/serial/io_fw_boot2.h
1299 - --- a/drivers/usb/serial/io_fw_boot2.h Mon Dec 15 07:03:25 2003
1300 +++ b/drivers/usb/serial/io_fw_boot2.h Mon Dec 15 07:03:25 2003
1302 unsigned short Addr;
1304 unsigned char Data[0];
1306 + } __attribute__ ((packed));
1308 struct edge_firmware_version_info {
1309 unsigned char MajorVersion;
1310 diff -Nru a/drivers/usb/serial/io_fw_down.h b/drivers/usb/serial/io_fw_down.h
1311 - --- a/drivers/usb/serial/io_fw_down.h Mon Dec 15 07:03:25 2003
1312 +++ b/drivers/usb/serial/io_fw_down.h Mon Dec 15 07:03:25 2003
1314 unsigned short Addr;
1316 unsigned char Data[0];
1318 + } __attribute ((packed));
1320 struct edge_firmware_version_info {
1321 unsigned char MajorVersion;
1322 diff -Nru a/drivers/usb/serial/io_fw_down2.h b/drivers/usb/serial/io_fw_down2.h
1323 - --- a/drivers/usb/serial/io_fw_down2.h Mon Dec 15 07:03:25 2003
1324 +++ b/drivers/usb/serial/io_fw_down2.h Mon Dec 15 07:03:25 2003
1326 unsigned short Addr;
1328 unsigned char Data[0];
1330 + } __attribute__ ((packed));
1332 struct edge_firmware_version_info {
1333 unsigned char MajorVersion;
1335 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1336 the body of a message to majordomo@vger.kernel.org
1337 More majordomo info at http://vger.kernel.org/majordomo-info.html
1338 - From linux-kernel@vger.kernel.org Sun Dec 28 14:33:44 2003
1339 Date: Sun, 07 Dec 2003 18:27:17 +0000
1340 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1341 To: bk-commits-24@vger.kernel.org
1342 Subject: [wireless airo] Delay MIC activation to prevent Oops
1344 ChangeSet 1.1136.73.7, 2003/12/07 13:27:17-05:00, achirica@telefonica.net
1346 [wireless airo] Delay MIC activation to prevent Oops
1349 # This patch includes the following deltas:
1350 # ChangeSet 1.1136.73.6 -> 1.1136.73.7
1351 # drivers/net/wireless/airo.c 1.62 -> 1.63
1355 1 files changed, 2 insertions(+), 5 deletions(-)
1358 diff -ruN linux-2.4.23.mine/drivers/net/wireless/airo.c linux-2.4.23/drivers/net/wireless/airo.c
1359 - --- linux-2.4.23.mine/drivers/net/wireless/airo.c 2003-11-28 11:26:20.000000000 -0700
1360 +++ linux-2.4.23/drivers/net/wireless/airo.c 2003-12-28 22:30:56.064562029 -0700
1361 @@ -2476,11 +2476,8 @@
1362 OUT4500( apriv, EVACK, EV_MIC );
1364 if (test_bit(FLAG_MIC_CAPABLE, &apriv->flags)) {
1365 - - if (down_trylock(&apriv->sem) != 0) {
1366 - - set_bit(JOB_MIC, &apriv->flags);
1367 - - wake_up_interruptible(&apriv->thr_wait);
1369 - - micinit (apriv);
1370 + set_bit(JOB_MIC, &apriv->flags);
1371 + wake_up_interruptible(&apriv->thr_wait);
1375 - From linux-kernel@vger.kernel.org Sun Dec 28 14:34:44 2003
1376 Date: Sun, 07 Dec 2003 18:27:13 +0000
1377 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1378 To: bk-commits-24@vger.kernel.org
1379 Subject: [wireless airo] Fix PCI registration
1381 ChangeSet 1.1136.73.6, 2003/12/07 13:27:13-05:00, achirica@telefonica.net
1383 [wireless airo] Fix PCI registration
1386 # This patch includes the following deltas:
1387 # ChangeSet 1.1136.73.5 -> 1.1136.73.6
1388 # drivers/net/wireless/airo.c 1.61 -> 1.62
1391 airo.c | 13 ++-----------
1392 1 files changed, 2 insertions(+), 11 deletions(-)
1395 diff -ruN linux-2.4.23.mine/drivers/net/wireless/airo.c linux-2.4.23/drivers/net/wireless/airo.c
1396 - --- linux-2.4.23.mine/drivers/net/wireless/airo.c 2003-12-28 22:32:51.418220092 -0700
1397 +++ linux-2.4.23/drivers/net/wireless/airo.c 2003-12-28 22:33:04.226400129 -0700
1398 @@ -1034,7 +1034,6 @@
1399 #define FLAG_802_11 7
1400 #define FLAG_PENDING_XMIT 9
1401 #define FLAG_PENDING_XMIT11 10
1402 - -#define FLAG_PCI 11
1403 #define JOB_MASK 0x1ff0000
1406 @@ -4639,7 +4638,6 @@
1409 pci_set_drvdata(pdev, dev);
1410 - - set_bit (FLAG_PCI, &((struct airo_info *)dev->priv)->flags);
1414 @@ -4669,7 +4667,7 @@
1417 printk( KERN_INFO "airo: Probing for PCI adapters\n" );
1418 - - pci_module_init(&airo_driver);
1419 + pci_register_driver(&airo_driver);
1420 printk( KERN_INFO "airo: Finished probing for PCI adapters\n" );
1423 @@ -4681,22 +4679,15 @@
1425 static void __exit airo_cleanup_module( void )
1428 while( airo_devices ) {
1429 printk( KERN_INFO "airo: Unregistering %s\n", airo_devices->dev->name );
1430 - -#ifdef CONFIG_PCI
1431 - - if (test_bit(FLAG_PCI, &((struct airo_info *)airo_devices->dev->priv)->flags))
1434 stop_airo_card( airo_devices->dev, 1 );
1436 remove_proc_entry("aironet", proc_root_driver);
1440 - - pci_unregister_driver(&airo_driver);
1441 + pci_unregister_driver(&airo_driver);
1447 - From linux-kernel@vger.kernel.org Sun Dec 28 14:37:12 2003
1448 Date: Sun, 28 Dec 2003 20:09:56 +0000
1449 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1450 To: bk-commits-24@vger.kernel.org
1451 Subject: Daniel Lux: Fix IDE busy-wait race
1453 ChangeSet 1.1344, 2003/12/28 18:09:56-02:00, marcelo@logos.cnet
1455 Daniel Lux: Fix IDE busy-wait race
1458 # This patch includes the following deltas:
1459 # ChangeSet 1.1343 -> 1.1344
1460 # drivers/ide/ide-iops.c 1.7 -> 1.8
1463 ide-iops.c | 16 ++++++++++++----
1464 1 files changed, 12 insertions(+), 4 deletions(-)
1467 diff -Nru a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
1468 - --- a/drivers/ide/ide-iops.c Sun Dec 28 13:01:41 2003
1469 +++ b/drivers/ide/ide-iops.c Sun Dec 28 13:01:41 2003
1470 @@ -664,11 +664,19 @@
1471 if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
1472 local_irq_set(flags);
1474 - - while ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
1475 + stat = hwif->INB(IDE_STATUS_REG);
1476 + while (stat & BUSY_STAT) {
1477 if (time_after(jiffies, timeout)) {
1478 - - local_irq_restore(flags);
1479 - - *startstop = DRIVER(drive)->error(drive, "status timeout", stat);
1482 + * do one more status read in case we were interrupted between last
1483 + * stat = hwif->INB(IDE_STATUS_REG) and time_after(jiffies, timeout)
1484 + * in wich case the timeout might have been shorter than specified.
1486 + if ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
1487 + local_irq_restore(flags);
1488 + *startstop = DRIVER(drive)->error(drive, "status timeout", stat);
1493 local_irq_restore(flags);
1495 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1496 the body of a message to majordomo@vger.kernel.org
1497 More majordomo info at http://vger.kernel.org/majordomo-info.html
1499 - From linux-kernel@vger.kernel.org Sun Dec 28 14:37:46 2003
1500 Date: Sun, 28 Dec 2003 20:14:56 +0000
1501 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1502 To: bk-commits-24@vger.kernel.org
1503 Subject: Fix IDE busywait merge
1505 ChangeSet 1.1345, 2003/12/28 18:14:56-02:00, marcelo@logos.cnet
1507 Fix IDE busywait merge
1510 # This patch includes the following deltas:
1511 # ChangeSet 1.1344 -> 1.1345
1512 # drivers/ide/ide-iops.c 1.8 -> 1.9
1516 1 files changed, 2 insertions(+)
1519 diff -Nru a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
1520 - --- a/drivers/ide/ide-iops.c Sun Dec 28 13:01:43 2003
1521 +++ b/drivers/ide/ide-iops.c Sun Dec 28 13:01:43 2003
1527 + stat = hwif->INB(IDE_STATUS_REG);
1529 local_irq_restore(flags);
1532 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1533 the body of a message to majordomo@vger.kernel.org
1534 More majordomo info at http://vger.kernel.org/majordomo-info.html
1535 - From linux-kernel@vger.kernel.org Sun Dec 28 14:36:33 2003
1536 Date: Mon, 22 Dec 2003 18:41:06 +0000
1537 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1538 To: bk-commits-24@vger.kernel.org
1539 Subject: [PATCH] Initialize ioc3_timer before use
1541 ChangeSet 1.1339, 2003/12/22 16:41:06-02:00, ralf@linux-mips.org
1543 [PATCH] Initialize ioc3_timer before use
1547 # This patch includes the following deltas:
1548 # ChangeSet 1.1338 -> 1.1339
1549 # drivers/net/ioc3-eth.c 1.15 -> 1.16
1553 1 files changed, 1 insertion(+), 1 deletion(-)
1556 diff -ruN linux-2.4.23.mine/drivers/net/ioc3-eth.c linux-2.4.23/drivers/net/ioc3-eth.c
1557 - --- linux-2.4.23.mine/drivers/net/ioc3-eth.c 2003-08-25 05:44:42.000000000 -0600
1558 +++ linux-2.4.23/drivers/net/ioc3-eth.c 2003-12-28 22:39:33.291078118 -0700
1559 @@ -1552,11 +1552,11 @@
1562 spin_lock_init(&ip->ioc3_lock);
1563 + init_timer(&ip->ioc3_timer);
1568 - - init_timer(&ip->ioc3_timer);
1571 if (ip->phy == -1) {
1572 - From linux-kernel@vger.kernel.org Sun Dec 28 14:29:04 2003
1573 Date: Mon, 22 Dec 2003 11:32:50 +0000
1574 From: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
1575 To: bk-commits-24@vger.kernel.org
1576 Subject: [PATCH] Fix RAID1 blocksize check
1578 ChangeSet 1.1313, 2003/12/22 09:32:50-02:00, neilb@cse.unsw.edu.au
1580 [PATCH] Fix RAID1 blocksize check
1582 On Saturday December 20, zaitcev@redhat.com wrote:
1583 > In drivers/md/raid1.c, raid1_sync_request contains the following:
1585 > block_nr = sector_nr;
1587 > while (!(block_nr & 1) && bsize < PAGE_SIZE
1588 > && (block_nr+2)*(bsize>>9) < (mddev->sb->size *2)) {
1593 > Suppose that a mirror is 4K in size. The code above produces
1594 > reads (and writes) of the following offsets and sizes:
1595 > 0K[2K], 2K[1K], 3K[0.5K], 3.5K[0.5K]
1597 > The above is correct, but it makes the RAID1 completely unuseable
1598 > on s390, because I/O with sizes less than 4K is not supported.
1599 > I would like the attached patch applied to correct the issue.
1601 Yes, I agree. Marcelo, could you please apply this patch.
1602 The '<' test is just to make sure a request of 2*bsize at block_nr
1603 will still fit within the size of the device, so a <= is appropriate.
1608 # This patch includes the following deltas:
1609 # ChangeSet 1.1312 -> 1.1313
1610 # drivers/md/raid1.c 1.16 -> 1.17
1614 1 files changed, 1 insertion(+), 1 deletion(-)
1617 diff -Nru a/drivers/md/raid1.c b/drivers/md/raid1.c
1618 - --- a/drivers/md/raid1.c Mon Dec 22 04:03:08 2003
1619 +++ b/drivers/md/raid1.c Mon Dec 22 04:03:08 2003
1620 @@ -1436,7 +1436,7 @@
1621 block_nr = sector_nr;
1623 while (!(block_nr & 1) && bsize < PAGE_SIZE
1624 - - && (block_nr+2)*(bsize>>9) < (mddev->sb->size *2)) {
1625 + && (block_nr+2)*(bsize>>9) <= (mddev->sb->size *2)) {
1630 To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
1631 the body of a message to majordomo@vger.kernel.org
1632 More majordomo info at http://vger.kernel.org/majordomo-info.html