Skip to contentSkip to conversation

Linux v2.5.29

PATCH In review Linus Torvalds 6 participants 12 messages Jul 27, 2002 – Jul 30, 2002

Subsystems (5)
Documentation SCSI USB Block layer +1 more subsystems
lore
Share & tools
lore
#0 lore raw

Hmm.. All over the map. IDE patches as usual, USB updates, tons of C99 named initializers work, ACPI update, fixes from Alan, driverfs race fixes and cleanups, SCSI driver fixes from Doug and tons of input layer updates.

Oh, and a new LDM driver, Rusty's CPU hotplug infrastructure, and Ingo's new cleaned-up GDT code with a per-process gdt segment on x86 for thread-local storage. And the serial and parallel port drivers seems to work again on SMP after the big irq lock upheaval.

Linus

----

Summary of changes from v2.5.28 to v2.5.29
============================================

<[email protected]>:
o LSM to designated initializers

Andy Grover <[email protected]>:
o ACPI compile fix
o Interpreter update
o Use C99 initializers (Rusty Russell)
o Last little bit of C99 init fixes Fix panic in EC driver (Dom B) Add a some more sanity checking (Richard Schaal)

<[email protected]>:
o designated initializer patch for USB

Alan Cox <[email protected]>:
o I2O does not need init in genhd now
o backpack driver only needs module license in one file
o fix umem compile
o epca and specialix warning fixes
o Q40 keyboard
o miropcm20 fails to build
o Update i2o core functionality to 2.5
o ad1848_lib does not build
o CS4281 is missing in sound/pci/Config.in
o fix ALSA PCI compile problems
o Fix other peoples ALSA PCI fixe
o Fix multiple driver build failures due to missing include
o Update tlan driver to new pci api
o Make the tulip compile again
o Fix cisco aironet tristate check
o atp870u scsi update
o SuS/LSB compliance in readv/writev from 2.4
o Handle dunord pci decode problem
o Remove dead i2c bits from media/video

<[email protected]>:
o new USB scanner IDs

<[email protected]>:
o fix unresolved syms for serial drivers

<[email protected]>:
o i385 mm cleanup

Martin Dalecki <[email protected]>:
o 2.5.28 small REQ_SPECIAL abstraction
o 2.5.28 IDE 102-107

<[email protected]>:
o resolve ACPI lockup

<[email protected]>:
o WoL support to the 8139cp ethernet driver

<[email protected]>:
o 2.5: kconfig missing EXPERIMENTAL 3 (10_13)

<[email protected]>:
o Merged hid-lgff.c and hid-lg3d.c

<[email protected]>:
o Ensure xtime_lock and timerlist_lock are on difft cachelines

<[email protected]>:
o CMIPCI compile fix

<[email protected]>:
o New LDM Driver (Windows Dynamic Disks)

Ingo Molnar <[email protected]>:
o Thread-Local Storage (TLS) support
o f00f workaround update, TLS, 2.5.28
o comment fix, 2.5.28

<[email protected]>:
o irqlock fixes

<[email protected]>:
o Made 'make sgmldocs' work again after serial merge [1/9]
o kernel-doc: Improved support for man-page generation [2/9]
o kernel-doc: Generate valid DocBook syntax [3/9]
o kernel-doc: Fix warnings [4/9]
o docbook: scripts/docproc improved [5/9]
o docbook: Makefile cleanup [6/9]
o docbook: Update documentation to reflect new docproc [7/9]
o docbook: Move script target in top-level file [8/9]
o docbook: Call docbook makefile with -f [9/9]
o Remove docgen + gen-all-syms targets

<[email protected]>:
o LSM: CREDITS entries
o LSM: file related LSM hooks

<[email protected]>:
o cli-sti-removal.txt fixup

Anton Blanchard <[email protected]>:
o Missing memory barrier in pte_chain_unlock

Brad Hards <[email protected]>:
o trivial USB Config.help cleanups

Chris Wright <[email protected]>:
o LSM: CREDITS entry

David Brownell <[email protected]>:
o ehci-hcd more polite on cardbus
o ohci unlink cleanups
o ohci-hcd cardbus unplug, remove interrupt length limit,

David Howells <[email protected]>:
o read-write semaphore downgrade and trylock

Doug Ledford <[email protected]>:
o Fix the BusLogic driver in 2.5.x
o Fix cpqfcTS driver in 2.5.x

Greg Kroah-Hartman <[email protected]>:
o LSM: fixed up all of the other archs (non i386) to include the security config menu
o updated my CREDITS entry
o added ptrace hook for ia64
o LSM: convert initializers to C99 style
o LSM: fixed typo that happened in merge
o i810_audio.c cli/sti fix
o USB: fixed the interface names to have the proper bus id
o USB: fix compiler warning in drivers/usb/serial/digi_acceleport.c
o USB: deleted hid-lg3dff.c as it's no longer needed
o USB: usb-serial.c update the version number, and document the previous changes
o USB: added driver to support the I/O Networks TI based usb-serial devices

James Morris <[email protected]>:
o credits update

Linus Torvalds <[email protected]>:
o cmd640 IDE driver internal spinlocks for config etc accesses
o Remove unnecessary (and now nonworking) "sti()" in parport interrupt probing
o Remove (broken) parport locking, add comment on fixing it
o Make smp_init() happen before initializing drivers
o Don't compile with "-g" by default, that was a left-over from the global irq-lock debugging
o Clean up more x86 MM init details after splitup

Mikael Pettersson <[email protected]>:
o shrink check_nmi_watchdog stack frame
o fix two unwrapped uses of thread_info->cpu

Neil Brown <[email protected]>:
o remove sti() from calibrate_xor_block()

Patrick Mochel <[email protected]>:
o Remove BKL from driverfs
o Use C99 initializers in driverfs
o driverfs: stop using vfs layer for file creation This is the first of a series of patches to driverfs to _not_ use the vfs layer for file creation and deletion.
o driverfs: don't use VFS for directory creation Call driverfs_mkdir directly, instead of going through vfs.
o driverfs: don't use vfs for creating symlinks Add check for existence of dentry in driverfs_symlink and driverfs_mknod (which the other creation functions use).
o driverfs: Don't use VFS for file or directory deletion These are tied together a bit, so they're included in the same patch
o fix memory leak when driverfs symlink fails

Petr Vandrovec <[email protected]>:
o Do not call ncp_lookup_validate on mountpoint
o Remove unneeded server_file_handle and open_create_action property from ncpfs info structures
o Return total/free space on ncpfs mounted volume
o Allow access to all 256 volumes from Netware server
o Use search for fileset instead of search for one item in ncpfs. It is much faster as you usually read whole directory in one request when using TCP transport, instead
o Check for s_maxbytes and generate SIGXFSZ correctly in ncpfs's read and write. Only page cache generic_file_read/generic_file_write check for these conditions, and because of ncpfs does not use page cache, it must do that itself.
o Update and fix inode attributes handling in ncpfs
o Utilize NFS extended attributes for storing file mode and rdev. Make sure that you use nodev,nosuid together with nfsextras if you do not trust server...
o Decide whether to build fs/ncpfs/symlinks.c or not in Makefile and not through ifdefing whole file out. It should make Al happier.
o ipx use of cli/sti

Russell King <[email protected]>:
o [SERIAL] Remove drivers/char/serial_{21285,amba}.c These drivers are now part of drivers/serial
o [SERIAL] Fix documentation bug for expected stop_tx interrupt state
o [SERIAL] Fix buglet causing (eg) ttyS-14 Allocate positive instead of negative line numbers when 8250.c registers a new port with the core. This bug could cause registrations to erroneously fail, or oopsen when the pcmcia serial device is ejected.
o [SERIAL] Stop open() looping while opening a non-present port Trying to open a non-present port (for configuration) causes us to to endlessly loop (by returning -ERESTARTSYS). We should be returning success. This cset fixes this.
o [SERIAL] Turn on 8250 framing/parity error reporting on INPCK not IGNPAR
o designated initalizers for serial/
o [SERIAL] Fix initialiser warnings for HUB6 ports We were missing an element in the old_serial_port structure.

Rusty Russell <[email protected]>:
o cpu_online() has odd semantics
o Hot-plug CPU Boot Changes
o Hot-plug CPU Boot Rewrite for i386
o Hot-plug CPU Boot Rewrite for PPC

Trond Myklebust <[email protected]>:
o clean up RPC write_space() code
o increase socket buffer for RPC over UDP
o Reduce the number of getattr/lookup calls in
nfs_lookup_revalidate()
o add proper NFSv3 permissions checking

Vojtech Pavlik <[email protected]>:
o Fixes needed to get Logitech WingMan 3D running
o Kernel command line [__setup()] parsing fixes in all the input drivers that use it, except i8042.
o Update of the X-Box USB pad driver and documentation to version

    0.0.5

o This patch by Brad Hards replaces the four id* fields of the input struct by a single struct to simplify passing it around and to userspace.
o Add an i8042_restore_ctr command line option. This allows not restoring the CTR value after an AUX write by default, which breaks Transmeta Crusoe i8042 chip emulation. The option might be needed on some ancient hardware, though.
o Fox a typo in input documentation. Patch by Pavel Machek
o Remove duplicately defined keys in input.h that got there as a part
o Osamu Tomita <[email protected]>
o Fix the PS/2 mouse wheel in Explorer PS/2 mode
o Enable the Q40 keyboard only on the Q40 platform
o After some grepping and talking to maintainers, I did the appended cleanup patch. This should be it from me until char/keyboard.c becomes a real input layer client, but this final patch will be _very_ small now :-)).
o The following fixes compilation errors in the Acorn related input drivers.
o The following patch adds the "resend" capability to the keyboard driver; when the host driver detects a parity or framing error, we can ask the keyboard to resend the data, instead of treating random garbage as valid data.
o This patch adds two new serio input drivers. Both are "UART" type drivers for PS/2 ports on both StrongARM and ARM Integrator hardware.
o Apply Rusty's C99 initializer patch to input drivers
o Add a GrIP MultiPort gamepad hub by Brian Bonnlander and Bill Soudan
o By popular request, and explicit method of telling which events from a device belong together was implemented - input_sync() and EV_SYN. Touches every input driver. The first to make use of it is mousedev.c to properly merge events into PS/2 packets.
o Small cleanup in evdev.c, which copies the data directly from input struct to userspace.
o Add support for AT keyboards connected over a PS/2 to Serial converter to atkbd.c - trivial. Remove ps2serkbd, because it's not needed anymore.
o Because the Linux Input core follows the USB HID standard where it comes to directions of movement and rotation, a mouse wheel should be positive where it "rotates forward, away from the user". We had the opposite in psmouse.c. Fixed this.
o Add EVIOCSABS() ioctl to change the abs* informative values on input devices. This is something the X peoople really wanted.

#1 lore raw

I forgot to mention.. You have all been busy little critters, and I probably missed a number of merges. Give me a day to catch my breath (and take the kids to the aquarium), and if you think I overlooked or forgot your patch, you should probably re-send.

Linus

#2 lore raw
In reply to Linus Torvalds
Quoted 6 lines · On Fri, 26 Jul 2002 20:12:00 -0700 (PDT) Linus Torvalds…

Hmm.. All over the map. IDE patches as usual, USB updates, tons of C99 named initializers work, ACPI update, fixes from Alan, driverfs race fixes and cleanups, SCSI driver fixes from Doug and tons of input layer updates.

Oh, and a new LDM driver, Rusty's CPU hotplug infrastructure

Badly broken on SMP by Linus.

You'll only get one migration thread, and one ksoftirqd.

Issue is that some initcalls (softirq.c and sched.c) are way easier before other CPUs are brought up, but doing it the other way broke AGP and Linus decided to call all the initcalls after CPUs are brought up in case someone else needed it (I still strongly disagree).

This hack fixes it: real fix is the explicit initcall ordering patch, which Linus hasn't commented on 8(

Name: Hot-plug CPU Boot ksoftirqd and migration fix
Author: Rusty Russell
Status: Tested on 2.5.29, x86 SMP

D: This patch fixes the calls to initialize ksoftirqd and the
D: migration threads. This really should be done by the initcall
D: depends patch.

init/main.c +12 -0
diff -urNp -I \$.*\$ --exclude TAGS -X /home/rusty/current-dontdiff --minimal linux-2.5.29/init/main.c working-2.5.29/init/main.c
@@ -524,6 +524,15 @@ static void __init do_basic_setup(void)
 	do_initcalls();
 }
 
+static void do_pre_smp_initcalls(void)
+{
+	extern int migration_init(void);
+	extern int spawn_ksoftirqd(void);
+
+	migration_init();
+	spawn_ksoftirqd();
+}
+
 extern void prepare_namespace(void);
 
 static int init(void * unused)
@@ -533,6 +542,9 @@ static int init(void * unused)
 	lock_kernel();
 	/* Sets up cpus_possible() */
 	smp_prepare_cpus(max_cpus);
+
+	do_pre_smp_initcalls();
+
 	smp_init();
 	do_basic_setup();
 
kernel/sched.c +3 -2
diff -urNp -I \$.*\$ --exclude TAGS -X /home/rusty/current-dontdiff --minimal linux-2.5.29/kernel/sched.c working-2.5.29/kernel/sched.c
@@ -1894,6 +1894,8 @@ static int migration_call(struct notifie
 		       (long)hcpu);
 		kernel_thread(migration_thread, hcpu,
 			      CLONE_FS | CLONE_FILES | CLONE_SIGNAL);
+		while (!cpu_rq((long)hcpu)->migration_thread)
+			yield();
 		break;
 	}
 	return NOTIFY_OK;
@@ -1901,7 +1903,7 @@ static int migration_call(struct notifie
 
 static struct notifier_block migration_notifier = { &migration_call, NULL, 0 };
 
-int __init migration_init(void)
+__init int migration_init(void)
 {
 	/* Start one for boot CPU. */
 	migration_call(&migration_notifier, CPU_ONLINE,
@@ -1910,7 +1912,6 @@ int __init migration_init(void)
 	return 0;
 }
 
-__initcall(migration_init);
 #endif
 
 extern void init_timervecs(void);
kernel/softirq.c +1 -3
diff -urNp -I \$.*\$ --exclude TAGS -X /home/rusty/current-dontdiff --minimal linux-2.5.29/kernel/softirq.c working-2.5.29/kernel/softirq.c
@@ -410,11 +410,9 @@ static int __devinit cpu_callback(struct
 
 static struct notifier_block cpu_nfb = { &cpu_callback, NULL, 0 };
 
-static __init int spawn_ksoftirqd(void)
+__init int spawn_ksoftirqd(void)
 {
 	cpu_callback(&cpu_nfb, CPU_ONLINE, (void *)smp_processor_id());
 	register_cpu_notifier(&cpu_nfb);
 	return 0;
 }
-
-__initcall(spawn_ksoftirqd);
Signature · 2 lines
   there are those who do and those who hang on and you don't see too
   many doers quoting their contemporaries.  -- Larry McVoy
#3 lore raw

2.5.29: oops on boot

In reply to Linus Torvalds

2.5.27 and 2.5.28 wouldn't boot at all (they hung at ide probe). 2.5.29 boots, but oopses after freeing unused memory.

Again, root = hdc = cdrom with ext2 fs on it.

HW is vmware, which may be the cause of the problem (but frankly I don't dare to run 2.5 on real hw at this point :).

<...>
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
ds: no socket drivers loaded!
VFS: Mounted root (ext2 filesystem) readonly. Freeing unused kernel memory: 216k freed

Unable to handle kernel paging request at virtual address 645f00ad
c013f646
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c013f646>]    Not tainted

Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00000246
eax: 00000000 ebx: c109d138 ecx: c109d138 edx: c109d138
esi: 00000000 edi: 645f0065 ebp: c10cda68 esp: c10cda0c
ds: 0018 es: 0018 ss: 0018

Stack: 00000002 00000060 fffffff5 00000000 c3ee1090 000224b3 00000000 00000000 
       000001d0 c10cda50 00112538 645f0065 c11e2620 0000000c c10cda54 c01a68ce 
       0000000c 00000000 c10cda68 c015923c c109d138 00000000 0000000c c10cdaf8 
Call Trace: [<c01a68ce>] [<c015923c>] [<c0159512>] [<c0168c10>] [<c017a136>] 
   [<c017a16f>] [<c012a457>] [<c0159675>] [<c0168c10>] [<c0168e57>] [<c0168c10>]
   [<c0138d26>] [<c0138e06>] [<c0138ecc>] [<c012ab54>] [<c012adb0>] [<c012afa8>] 
   [<c012adb0>] [<c0144db1>] [<c0144e36>] [<c015bda7>] [<c0107afb>] [<c0138ecc>]
   [<c012ac98>] [<c0131ba1>] [<c015b1c0>] [<c0145624>] [<c01459ae>] [<c0107c1d>] 
   [<c01094df>] [<c0105147>] [<c0105000>] [<c01076be>] [<c0105060>] 
Code: 8b 5f 48 c7 45 c4 01 00 00 00 8b 7d 08 88 d9 d3 65 c4 8b 47 
Quoted 1 line
Quoted 1 line

EIP; c013f646 <block_read_full_page+36/2b0> <=====

Trace; c01a68ce <submit_bio+3e/80>
Trace; c015923c <mpage_bio_submit+3c/50>
Trace; c0159512 <do_mpage_readpage+222/2c0>
Trace; c0168c10 <ext2_get_block+0/1e0>
Trace; c017a136 <radix_tree_reserve+e6/100>
Trace; c017a16f <radix_tree_insert+1f/40>
Trace; c012a457 <add_to_page_cache+c7/f0>
Trace; c0159675 <mpage_readpages+c5/d0>
Trace; c0168c10 <ext2_get_block+0/1e0>
Trace; c0168e57 <ext2_readpages+27/30>
Trace; c0168c10 <ext2_get_block+0/1e0>
Trace; c0138d26 <read_pages+96/a0>
Trace; c0138e06 <do_page_cache_readahead+d6/130>
Trace; c0138ecc <page_cache_readahead+6c/180>
Trace; c012ab54 <do_generic_file_read+84/2e0>
Trace; c012adb0 <file_read_actor+0/a0>
Trace; c012afa8 <generic_file_read+158/180>
Trace; c012adb0 <file_read_actor+0/a0>
Trace; c0144db1 <open_exec+c1/e0>
Trace; c0144e36 <kernel_read+66/70>
Trace; c015bda7 <load_elf_binary+be7/c50>
Trace; c0107afb <__switch_to+10b/110>
Trace; c0138ecc <page_cache_readahead+6c/180>
Trace; c012ac98 <do_generic_file_read+1c8/2e0>
Trace; c0131ba1 <rmqueue+2b1/2f0>
Trace; c015b1c0 <load_elf_binary+0/c50>
Trace; c0145624 <search_binary_handler+94/210>
Trace; c01459ae <do_execve+20e/230>
Trace; c0107c1d <sys_execve+4d/80>
Trace; c01094df <syscall_call+7/b>
Trace; c0105147 <init+e7/1a0>
Trace; c0105000 <_stext+0/0>
Trace; c01076be <kernel_thread+2e/40>
Trace; c0105060 <init+0/1a0>
Code; c013f646 <block_read_full_page+36/2b0>
00000000 <_EIP>:
Code; c013f646 <block_read_full_page+36/2b0> <=====
0: 8b 5f 48 mov 0x48(%edi),%ebx <=====
Code; c013f649 <block_read_full_page+39/2b0>
3: c7 45 c4 01 00 00 00 movl $0x1,0xffffffc4(%ebp)
Code; c013f650 <block_read_full_page+40/2b0>
a: 8b 7d 08 mov 0x8(%ebp),%edi
Code; c013f653 <block_read_full_page+43/2b0>
d: 88 d9 mov %bl,%cl
Code; c013f655 <block_read_full_page+45/2b0>
f: d3 65 c4 shll %cl,0xffffffc4(%ebp)
Code; c013f658 <block_read_full_page+48/2b0>
12: 8b 47 00 mov 0x0(%edi),%eax

<0>Kernel panic: Attempted to kill init!

-- v --

[email protected]

#4 lore raw

Re: 2.5.29: oops on boot

Quoted 18 lines · you [Ville Herva]

2.5.27 and 2.5.28 wouldn't boot at all (they hung at ide probe). 2.5.29 boots, but oopses after freeing unused memory.

Again, root = hdc = cdrom with ext2 fs on it.

HW is vmware, which may be the cause of the problem (but frankly I don't dare to run 2.5 on real hw at this point :).

<...>
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 4096 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
ds: no socket drivers loaded!
VFS: Mounted root (ext2 filesystem) readonly. Freeing unused kernel memory: 216k freed

Quoted 3 lines
Unable to handle kernel paging request at virtual address 645f00ad

c013f646
*pde = 00000000

That was with gcc (GCC) 3.1 20020620. With 2.96.110, I get this:

<...>
TCP: Hash tables configured (established 4096 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
ds: no socket drivers loaded!
VFS: Mounted root (ext2 filesystem) readonly. Freeing unused kernel memory: 216k freed

Unable to handle kernel paging request at virtual address 645f00ad
c013f646
*pde = 00000000
Oops: 0000
CPU:    0
EIP:    0010:[<c013f646>]    Not tainted

Using defaults from ksymoops -t elf32-i386 -a i386
EFLAGS: 00000246
eax: 00000000 ebx: c109d138 ecx: c109d138 edx: c109d138
esi: 00000000 edi: 645f0065 ebp: c10cda68 esp: c10cda0c
ds: 0018 es: 0018 ss: 0018

Stack: 00000002 00000060 fffffff5 00000000 c3ee1090 000224b3 00000000 00000000 
       000001d0 c10cda50 00112538 645f0065 c11e2620 0000000c c10cda54 c01a68ce 
       0000000c 00000000 c10cda68 c015923c c109d138 00000000 0000000c c10cdaf8 
Call Trace: [<c01a68ce>] [<c015923c>] [<c0159512>] [<c0168c10>] [<c017a136>] 
   [<c017a16f>] [<c012a457>] [<c0159675>] [<c0168c10>] [<c0168e57>] [<c0168c10>]
   [<c0138d26>] [<c0138e06>] [<c0138ecc>] [<c012ab54>] [<c012adb0>] [<c012afa8>]
   [<c012adb0>] [<c0144db1>] [<c0144e36>] [<c015bda7>] [<c0107afb>] [<c0138ecc>]
   [<c012ac98>] [<c0131ba1>] [<c015b1c0>] [<c0145624>] [<c01459ae>] [<c0107c1d>]
   [<c01094df>] [<c0105147>] [<c0105000>] [<c01076be>] [<c0105060>] 
Code: 8b 5f 48 c7 45 c4 01 00 00 00 8b 7d 08 88 d9 d3 65 c4 8b 47 
Quoted 1 line
Quoted 1 line

EIP; c013f646 <real_lookup+56/d0> <=====

Trace; c01a68ce <ray_interrupt+de/280>
Trace; c015923c <msdos_partition+1dc/320> Trace; c0159512 <driverfs_get_inode+72/f0> Trace; c0168c10 <shm_close+60/e0>
Trace; c017a136 <uart_line_info+6/340>
Trace; c017a16f <uart_line_info+3f/340>
Trace; c012a457 <__kmem_cache_shrink+27/b0> Trace; c0159675 <driverfs_symlink+15/b0>
Trace; c0168c10 <shm_close+60/e0>
Trace; c0168e57 <newseg+117/170>
Trace; c0168c10 <shm_close+60/e0>
Trace; c0138d26 <__block_commit_write+66/b0> Trace; c0138e06 <block_read_full_page+96/270> Trace; c0138ecc <block_read_full_page+15c/270> Trace; c012ab54 <kfree+44/c0>
Trace; c012adb0 <kmem_cache_reap+1a0/230> Trace; c012afa8 <s_show+a8/1e0>
Trace; c012adb0 <kmem_cache_reap+1a0/230> Trace; c0144db1 <fifo_open+1d1/2bd>
Trace; c0144e36 <fifo_open+256/2bd>
Trace; c015bda7 <ext2_set_link+57/e0>
Trace; c0107afb <__down_trylock+3b/50>
Trace; c0138ecc <block_read_full_page+15c/270> Trace; c012ac98 <kmem_cache_reap+88/230>
Trace; c0131ba1 <bounce_end_io_write+61/90> Trace; c015b1c0 <ext2_new_block+4f0/740>
Trace; c0145624 <locks_delete_lock+94/d0> Trace; c01459ae <locks_mandatory_locked+1e/80> Trace; c0107c1d <sys_sigsuspend+dd/e0>
Trace; c01094df <do_device_not_available+f/80> Trace; c0105147 <init+f7/190>
Trace; c0105000 <_stext+0/0>
Trace; c01076be <get_wchan+1e/70>
Trace; c0105060 <init+10/190>
Code; c013f646 <real_lookup+56/d0>
00000000 <_EIP>:
Code; c013f646 <real_lookup+56/d0> <=====
0: 8b 5f 48 mov 0x48(%edi),%ebx <=====
Code; c013f649 <real_lookup+59/d0>
3: c7 45 c4 01 00 00 00 movl $0x1,0xffffffc4(%ebp)
Code; c013f650 <real_lookup+60/d0>
a: 8b 7d 08 mov 0x8(%ebp),%edi
Code; c013f653 <real_lookup+63/d0>
d: 88 d9 mov %bl,%cl
Code; c013f655 <real_lookup+65/d0>
f: d3 65 c4 shll %cl,0xffffffc4(%ebp)
Code; c013f658 <real_lookup+68/d0>
12: 8b 47 00 mov 0x0(%edi),%eax

<0>Kernel panic: Attempted to kill init!

-- v --

[email protected]

#5 lore raw
In reply to Linus Torvalds
Quoted 2 lines · Linus Torvalds

<[email protected]>:
o New LDM Driver (Windows Dynamic Disks)

Breaks "make xconfig". Here is a patch to fix it:

fs/partitions/Config.in renamed from fs/partitions/Config.in.orig +1 -1
@@ -25,7 +25,7 @@
       bool '    Solaris (x86) partition table support' CONFIG_SOLARIS_X86_PARTITION
       bool '    Unixware slices support' CONFIG_UNIXWARE_DISKLABEL
    fi
-   dep_bool '  Windows Logical Disk Manager (Dynamic Disk) support' CONFIG_LDM_PARTITION
+   bool '  Windows Logical Disk Manager (Dynamic Disk) support' CONFIG_LDM_PARTITION
    if [ "$CONFIG_LDM_PARTITION" = "y" ]; then
       bool '    Windows LDM extra logging' CONFIG_LDM_DEBUG
    fi
Signature · 2 lines
Peter Osterlund - [email protected]
http://w1.894.telia.com/~u89404340
#6 lore raw

PATCH 1/1 2.5.29 IDE 108

In reply to Linus Torvalds

- typedef unsigned char byte; is finally gone. Everything using it should be just ported to u8 if I missed some place where it still gets used.

- Next round of parameter parsing cleanups by Gerald Champagne. Adjusted a bit to harmonize with hd.c.

- Move IDE register bitfields declarations over from hdparm.h to ide.h.

- Fixup cmd640 fix by LT.

- Don't manipulate REQ_QUEUED in blk_insert_special() as discussed on lkml. The single only affected file is ll_rw_blk.c of course.

- Declare constants needed by hd.c directly there. Those are standard values not subject to change and we prefer a bit of code duplication in favour of making the two drivers independant from each other.

- Move everything not ioctl related away from hdreg.h to ide.h. This header is in effect not private to the ATA code and should therefore not contain stuff only usefull there.

drivers/block/ll_rw_blk.c +7 -4
diff -durNp -X /tmp/diff.8vxI0X linux-2.5.29/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
@@ -1253,7 +1253,7 @@ struct request *__blk_get_request(reques
  *    host that is unable to accept a particular command.
  */
 void blk_insert_request(request_queue_t *q, struct request *rq,
-		int at_head, void *data)
+			int at_head, void *data)
 {
 	unsigned long flags;
 
@@ -1262,15 +1262,18 @@ void blk_insert_request(request_queue_t 
 	 * must not attempt merges on this) and that it acts as a soft
 	 * barrier
 	 */
-	rq->flags &= REQ_QUEUED;
 	rq->flags |= REQ_SPECIAL | REQ_BARRIER;
 
 	rq->special = data;
 
 	spin_lock_irqsave(q->queue_lock, flags);
-	/* If command is tagged, release the tag */
-	if(blk_rq_tagged(rq))
+
+	/*
+	 * If command is tagged, release the tag
+	 */
+	if (blk_rq_tagged(rq))
 		blk_queue_end_tag(q, rq);
+
 	_elv_add_request(q, rq, !at_head, 0);
 	q->request_fn(q);
 	spin_unlock_irqrestore(q->queue_lock, flags);
drivers/ide/cmd640.c +6 -7
diff -durNp -X /tmp/diff.8vxI0X linux-2.5.29/drivers/ide/cmd640.c linux/drivers/ide/cmd640.c
@@ -167,16 +167,18 @@ int cmd640_vlb = 0;
  * Registers and masks for easy access by drive index:
  */
 static u8 prefetch_regs[4]  = {CNTRL, CNTRL, ARTTIM23, ARTTIM23};
-static u8 prefetch_masks[4] = {CNTRL_DIS_RA0, CNTRL_DIS_RA1, ARTTIM23_DIS_RA2, ARTTIM23_DIS_RA3};
-
-#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
 
 /*
  * Protects register file access from overlapping on primary and secondary
  * channel, since those share hardware resources.
  */
+/* This is broken, but no more so than the old code.. */
 static spinlock_t cmd640_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
 
+static u8 prefetch_masks[4] = {CNTRL_DIS_RA0, CNTRL_DIS_RA1, ARTTIM23_DIS_RA2, ARTTIM23_DIS_RA3};
+
+#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
+
 static u8 arttim_regs[4] = {ARTTIM0, ARTTIM1, ARTTIM23, ARTTIM23};
 static u8 drwtim_regs[4] = {DRWTIM0, DRWTIM1, DRWTIM23, DRWTIM23};
 
@@ -214,9 +216,6 @@ static unsigned int cmd640_chip_version;
  * Therefore, we must use direct IO instead.
  */
 
-/* This is broken, but no more so than the old code.. */
-static spinlock_t cmd640_lock = SPIN_LOCK_UNLOCKED;
-
 /* PCI method 1 access */
 
 static void put_cmd640_reg_pci1 (unsigned short reg, u8 val)
@@ -574,7 +573,7 @@ static void program_drive_counts (unsign
 	/*
 	 * Now that everything is ready, program the new timings
 	 */
-	spin_lock(&cmd640_lock, flags);
+	spin_lock_irqsave(&cmd640_lock, flags);
 	/*
 	 * Program the address_setup clocks into ARTTIM reg,
 	 * and then the active/recovery counts into the DRWTIM reg
drivers/ide/hd.c +60 -20

172 lines not on this page · raw message

drivers/ide/ide-cd.c +2 -1
diff -durNp -X /tmp/diff.8vxI0X linux-2.5.29/drivers/ide/ide-cd.c linux/drivers/ide/ide-cd.c
@@ -305,8 +305,9 @@
 #include <linux/interrupt.h>
 #include <linux/errno.h>
 #include <linux/cdrom.h>
-#include <linux/ide.h>
 #include <linux/completion.h>
+#include <linux/hdreg.h>
+#include <linux/ide.h>
 
 #include <asm/irq.h>
 #include <asm/io.h>
drivers/ide/ide-floppy.c +2 -1
diff -durNp -X /tmp/diff.8vxI0X linux-2.5.29/drivers/ide/ide-floppy.c linux/drivers/ide/ide-floppy.c
@@ -94,9 +94,10 @@
 #include <linux/genhd.h>
 #include <linux/slab.h>
 #include <linux/cdrom.h>
+#include <linux/buffer_head.h>
+#include <linux/hdreg.h>
 #include <linux/ide.h>
 #include <linux/atapi.h>
-#include <linux/buffer_head.h>
 
 #include <asm/byteorder.h>
 #include <asm/irq.h>
drivers/ide/ide-pci.c +2 -1
diff -durNp -X /tmp/diff.8vxI0X linux-2.5.29/drivers/ide/ide-pci.c linux/drivers/ide/ide-pci.c
@@ -550,7 +550,8 @@ static void __init hpt374_device_order_f
 	if (!dev2) {
 		return;
 	} else {
-		byte irq = 0, irq2 = 0;
+		u8 irq = 0;
+		u8 irq2 = 0;
 		pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
 		pci_read_config_byte(dev2, PCI_INTERRUPT_LINE, &irq2);
 		if (irq != irq2) {
drivers/ide/ide-tape.c +7 -6
diff -durNp -X /tmp/diff.8vxI0X linux-2.5.29/drivers/ide/ide-tape.c linux/drivers/ide/ide-tape.c
@@ -419,9 +419,10 @@
 #include <linux/pci.h>
 #include <linux/smp_lock.h>
 #include <linux/completion.h>
+#include <linux/buffer_head.h>
+#include <linux/hdreg.h>
 #include <linux/ide.h>
 #include <linux/atapi.h>
-#include <linux/buffer_head.h>
 
 #include <asm/byteorder.h>
 #include <asm/irq.h>
@@ -1249,7 +1250,7 @@ char *idetape_sense_key_verbose(u8 ideta
 	}
 }
 
-char *idetape_command_key_verbose (byte idetape_command_key)
+char *idetape_command_key_verbose(u8 idetape_command_key)
 {
 	switch (idetape_command_key) {
 		case IDETAPE_TEST_UNIT_READY_CMD:	return("TEST_UNIT_READY_CMD");
@@ -1439,7 +1440,7 @@ static void idetape_analyze_error(struct
 # if IDETAPE_DEBUG_LOG_VERBOSE
 	if (tape->debug_level >= 1)
 		printk (KERN_INFO "ide-tape: pc = %s, sense key = %x, asc = %x, ascq = %x\n",
-			idetape_command_key_verbose((byte) pc->c[0]),
+			idetape_command_key_verbose(pc->c[0]),
 			result->sense_key,
 			result->asc,
 			result->ascq);
@@ -2166,7 +2167,7 @@ static void idetape_pc_callback(struct a
 /*
  *	A mode sense command is used to "sense" tape parameters.
  */
-static void idetape_create_mode_sense_cmd(struct atapi_packet_command *pc, byte page_code)
+static void idetape_create_mode_sense_cmd(struct atapi_packet_command *pc, u8 page_code)
 {
 	atapi_init_pc(pc);
 	pc->c[0] = IDETAPE_MODE_SENSE_CMD;
@@ -3225,7 +3226,7 @@ static int __idetape_discard_read_pipeli
  *	of the request queue and wait for their completion.
  *
  */
-static int idetape_position_tape(struct ata_device *drive, unsigned int block, byte partition, int skip)
+static int idetape_position_tape(struct ata_device *drive, unsigned int block, u8 partition, int skip)
 {
 	idetape_tape_t *tape = drive->driver_data;
 	int retval;
@@ -3981,7 +3982,7 @@ static int idetape_add_chrdev_read_reque
 		printk (KERN_ERR "ide-tape: bug: trying to return more bytes than requested\n");
 		bytes_read=blocks*tape->tape_block_size;
 	}
-#endif /* IDETAPE_DEBUG_BUGS */
+#endif
 	return (bytes_read);
 }
 
drivers/ide/ioctl.c +9 -0
diff -durNp -X /tmp/diff.8vxI0X linux-2.5.29/drivers/ide/ioctl.c linux/drivers/ide/ioctl.c
@@ -33,6 +33,15 @@
 
 #include "ioctl.h"
 
+
+/* BIG GEOMETRY - dying, used only by HDIO_GETGEO_BIG_RAW */
+struct hd_big_geometry {
+	u8 heads;
+	u8 sectors;
+	u32 cylinders;
+	unsigned long start;
+};
+
 /*
  * Implement generic ioctls invoked from userspace to imlpement specific
  * functionality.
drivers/ide/main.c +98 -66

278 lines not on this page · raw message

drivers/ide/probe.c +6 -1
diff -durNp -X /tmp/diff.8vxI0X linux-2.5.29/drivers/ide/probe.c linux/drivers/ide/probe.c
@@ -1082,7 +1082,12 @@ static void channel_init(struct ata_chan
 		}
 	}
 #ifdef CONFIG_BLK_DEV_HD
-	if (ch->irq == HD_IRQ && ch->io_ports[IDE_DATA_OFFSET] != HD_DATA) {
+
+	/* The first "legacy"  HD gets distinguished by the IRQ it is attached
+	 * to and the IO port it takes.
+	 */
+
+	if (ch->irq == 14 && ch->io_ports[IDE_DATA_OFFSET] != 0x1f0) {
 		printk("%s: CANNOT SHARE IRQ WITH OLD HARDDISK DRIVER (hd.c)\n", ch->name);
 
 		return;
drivers/usb/storage/freecom.c +23 -19

66 lines not on this page · raw message

include/linux/hdreg.h +3 -519

545 lines not on this page · raw message

include/linux/ide.h +483 -2

503 lines not on this page · raw message

Binary files linux-2.5.29/scripts/docproc and linux/scripts/docproc differ Binary files linux-2.5.29/scripts/lxdialog/lxdialog and linux/scripts/lxdialog/lxdialog differ

#7 lore raw

Re: [PATCH] 2.5.29 IDE 108

Quoted 1 line · Marcin Dalecki

- Fixup cmd640 fix by LT.

The CMD640 fix is wrong. You must take pci_lock to protected the cmd640 pci access functions. You also need to check if conf1/conf2 is available otherwise you will crash some systems when the driver init runs (found by Justin Gibbs at Adaptec). I sent Linus the proper patch for this a few days ago and cc'd the list.

Basically conf1/conf2 is protected elsewhere in the kernel via arch specific locks and via a higher level config lock. Since the non x86 folks use CMD640 we have to take the higher level lock.

Alan

#8 lore raw

Re: [PATCH] 2.5.29 IDE 108

Quoted 11 lines · Alan Cox
Quoted 1 line · Marcin Dalecki

- Fixup cmd640 fix by LT.

The CMD640 fix is wrong. You must take pci_lock to protected the cmd640 pci access functions. You also need to check if conf1/conf2 is available otherwise you will crash some systems when the driver init runs (found by Justin Gibbs at Adaptec). I sent Linus the proper patch for this a few days ago and cc'd the list.

Quoted 3 lines

Basically conf1/conf2 is protected elsewhere in the kernel via arch specific locks and via a higher level config lock. Since the non x86 folks use CMD640 we have to take the higher level lock.

Yes I know. However I see the bk-tree drifting and therefore I have postponed the integration of your patch a bit. The chunk above I did immediately after 2.5.29 release. Hope this explains. OK?

#9 lore raw

PATCH 1/1 2.5.29 IDE 109

In reply to Linus Torvalds

- Include first cut by Adam J. Richter on proper lock protection for tuning functions.

- Rename ide_register_subdriver() to ata_register_device() and ide_unregister_subdriver() accordingly to ata_unregister_device(), since this is reflecting better what those functions are about.

- Remove tons of "curicum vite" style useless documentation here and there.

Documentation/ide.txt +47 -3
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/Documentation/ide.txt linux/Documentation/ide.txt
@@ -1,9 +1,6 @@
 
-
-
 	Information regarding the Enhanced IDE drive in Linux 2.5
 
-
 ==============================================================================
 
    
@@ -303,6 +300,53 @@ Everything else is rejected with a "BAD 
 
 ================================================================================
 
+IDE ATAPI streaming tape driver
+-------------------------------
+
+This driver is a part of the Linux ide driver and works in co-operation
+with linux/drivers/block/ide.c.
+
+The driver, in co-operation with ide.c, basically traverses the
+request-list for the block device interface. The character device
+interface, on the other hand, creates new requests, adds them
+to the request-list of the block device, and waits for their completion.
+
+Pipelined operation mode is now supported on both reads and writes.
+
+The block device major and minor numbers are determined from the
+tape's relative position in the ide interfaces, as explained in ide.c.
+
+The character device interface consists of the following devices:
+
+ ht0		major 37, minor 0	first  IDE tape, rewind on close.
+ ht1		major 37, minor 1	second IDE tape, rewind on close.
+ ...
+ nht0		major 37, minor 128	first  IDE tape, no rewind on close.
+ nht1		major 37, minor 129	second IDE tape, no rewind on close.
+ ...
+
+Run linux/scripts/MAKEDEV.ide to create the above entries.
+
+The general magnetic tape commands compatible interface, as defined by
+include/linux/mtio.h, is accessible through the character device.
+
+General ide driver configuration options, such as the interrupt-unmask
+flag, can be configured by issuing an ioctl to the block device interface,
+as any other ide device.
+
+Our own ide-tape ioctl's can be issued to either the block device or
+the character device interface.
+
+Maximal throughput with minimal bus load will usually be achieved in the
+following scenario:
+
+	1.	ide-tape is operating in the pipelined operation mode.
+	2.	No buffering is performed by the user backup program.
+
+
+
+================================================================================
+
 Some Terminology
 ----------------
 IDE = Integrated Drive Electronics, meaning that each drive has a built-in
drivers/ide/ali14xx.c +2 -4
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/ali14xx.c linux/drivers/ide/ali14xx.c
@@ -107,13 +107,14 @@ static inline void out_reg(u8 data, u8 r
  * Set PIO mode for the specified drive.
  * This function computes timing parameters
  * and sets controller registers accordingly.
+ * It assumes IRQ's are disabled or at least that no other process will
+ * attempt to access the IDE registers concurrently.
  */
 static void ali14xx_tune_drive(struct ata_device *drive, u8 pio)
 {
 	int drive_num;
 	int time1, time2;
 	u8 param1, param2, param3, param4;
-	unsigned long flags;
 	struct ata_timing *t;
 
 	if (pio == 255)
@@ -140,15 +141,12 @@ static void ali14xx_tune_drive(struct at
 
 	/* stuff timing parameters into controller registers */
 	drive_num = (drive->channel->index << 1) + drive->select.b.unit;
-	save_flags(flags);	/* all CPUs */
-	cli();			/* all CPUs */
 	outb_p(reg_on, base_port);
 	out_reg(param1, reg_tab[drive_num].reg1);
 	out_reg(param2, reg_tab[drive_num].reg2);
 	out_reg(param3, reg_tab[drive_num].reg3);
 	out_reg(param4, reg_tab[drive_num].reg4);
 	outb_p(reg_off, base_port);
-	restore_flags(flags);	/* all CPUs */
 }
 
 /*
drivers/ide/cs5530.c +3 -3
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/cs5530.c linux/drivers/ide/cs5530.c
@@ -227,8 +227,8 @@ static unsigned int __init pci_init_cs55
 		return 0;
 	}
 
-	save_flags(flags);
-	cli();	/* all CPUs (there should only be one CPU with this chipset) */
+	local_irq_save(flags); /* There should only be one CPU with this
+				  chipset. */
 
 	/*
 	 * Enable BusMaster and MemoryWriteAndInvalidate for the cs5530:
@@ -274,7 +274,7 @@ static unsigned int __init pci_init_cs55
 	pci_write_config_byte(master_0, 0x42, 0x00);
 	pci_write_config_byte(master_0, 0x43, 0xc1);
 
-	restore_flags(flags);
+	local_irq_restore(flags);
 
 	return 0;
 }
drivers/ide/dtc2278.c +2 -5
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/dtc2278.c linux/drivers/ide/dtc2278.c
@@ -66,21 +66,18 @@ static void sub22 (char b, char c)
 	}
 }
 
+/* Assumes IRQ's are disabled or at least that no other process will
+   attempt to access the IDE registers concurrently. */
 static void tune_dtc2278(struct ata_device *drive, u8 pio)
 {
-	unsigned long flags;
-
 	pio = ata_timing_mode(drive, XFER_PIO | XFER_EPIO) - XFER_PIO_0;
 
 	if (pio >= 3) {
-		save_flags(flags);	/* all CPUs */
-		cli();			/* all CPUs */
 		/*
 		 * This enables PIO mode4 (3?) on the first interface
 		 */
 		sub22(1,0xc3);
 		sub22(0,0xa0);
-		restore_flags(flags);	/* all CPUs */
 	} else {
 		/* we don't know how to set it back again.. */
 	}
drivers/ide/ht6560b.c +3 -12
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/ht6560b.c linux/drivers/ide/ht6560b.c
@@ -249,12 +249,8 @@ static u8 ht_pio2timings(struct ata_devi
  */
 static void ht_set_prefetch(struct ata_device *drive, u8 state)
 {
-	unsigned long flags;
 	int t = HT_PREFETCH_MODE << 8;
 
-	save_flags (flags);	/* all CPUs */
-	cli();		        /* all CPUs */
-
 	/*
 	 *  Prefetch mode and unmask irq seems to conflict
 	 */
@@ -267,16 +263,16 @@ static void ht_set_prefetch(struct ata_d
 		drive->channel->no_unmask = 0;
 	}
 
-	restore_flags (flags);	/* all CPUs */
-
 #ifdef DEBUG
 	printk("ht6560b: drive %s prefetch mode %sabled\n", drive->name, (state ? "en" : "dis"));
 #endif
 }
 
+/* Assumes IRQ's are disabled or at least that no other process will attempt to
+ * access the IDE registers concurrently.
+ */
 static void tune_ht6560b(struct ata_device *drive, u8 pio)
 {
-	unsigned long flags;
 	u8 timing;
 
 	switch (pio) {
@@ -288,14 +284,9 @@ static void tune_ht6560b(struct ata_devi
 
 	timing = ht_pio2timings(drive, pio);
 
-	save_flags (flags);	/* all CPUs */
-	cli();		        /* all CPUs */
-
 	drive->drive_data &= 0xff00;
 	drive->drive_data |= timing;
 
-	restore_flags (flags);	/* all CPUs */
-
 #ifdef DEBUG
 	printk("ht6560b: drive %s tuned to pio mode %#x timing=%#x\n", drive->name, pio, timing);
 #endif
drivers/ide/ide-cd.c +2 -2
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/ide-cd.c linux/drivers/ide/ide-cd.c
@@ -2915,7 +2915,7 @@ int ide_cdrom_cleanup(struct ata_device 
 	struct cdrom_info *info = drive->driver_data;
 	struct cdrom_device_info *devinfo = &info->devinfo;
 
-	if (ide_unregister_subdriver (drive))
+	if (ata_unregister_device(drive))
 		return 1;
 	if (info->buffer != NULL)
 		kfree(info->buffer);
@@ -2974,7 +2974,7 @@ static void ide_cdrom_attach(struct ata_
 		printk(KERN_ERR "%s: Can't allocate a cdrom structure\n", drive->name);
 		return;
 	}
-	if (ide_register_subdriver (drive, &ide_cdrom_driver)) {
+	if (ata_register_device(drive, &ide_cdrom_driver)) {
 		printk(KERN_ERR "%s: Failed to register the driver with ide.c\n", drive->name);
 		kfree (info);
 		return;
drivers/ide/ide-disk.c +3 -3
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/ide-disk.c linux/drivers/ide/ide-disk.c
@@ -1279,7 +1279,7 @@ static int idedisk_cleanup(struct ata_de
 			printk (KERN_INFO "%s: Write Cache FAILED Flushing!\n",
 				drive->name);
 	}
-	ret = ide_unregister_subdriver(drive);
+	ret = ata_unregister_device(drive);
 
 	/* FIXME: This is killing the kernel with BUG 185 at asm/spinlocks.h
 	 * horribly.  Check whatever we did REGISTER the device properly
@@ -1471,8 +1471,8 @@ static void idedisk_attach(struct ata_de
 	if (req[0] != '\0' && strcmp(req, "ide-disk"))
 		return;
 
-	if (ide_register_subdriver(drive, &idedisk_driver)) {
-		printk (KERN_ERR "ide-disk: %s: Failed to register the driver with ide.c\n", drive->name);
+	if (ata_register_device(drive, &idedisk_driver)) {
+		printk(KERN_ERR "%s: Failed to register the driver with ide.c\n", drive->name);
 		return;
 	}
 
drivers/ide/ide-floppy.c +3 -3
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/ide-floppy.c linux/drivers/ide/ide-floppy.c
@@ -1723,10 +1723,10 @@ static int idefloppy_cleanup(struct ata_
 {
 	idefloppy_floppy_t *floppy = drive->driver_data;
 
-	if (ide_unregister_subdriver (drive))
+	if (ata_unregister_device(drive))
 		return 1;
 	drive->driver_data = NULL;
-	kfree (floppy);
+	kfree(floppy);
 	return 0;
 }
 
@@ -1780,7 +1780,7 @@ static void idefloppy_attach(struct ata_
 				drive->name);
 		return;
 	}
-	if (ide_register_subdriver(drive, &idefloppy_driver)) {
+	if (ata_register_device(drive, &idefloppy_driver)) {
 		printk(KERN_ERR "ide-floppy: %s: Failed to register the driver with ide.c\n", drive->name);
 		kfree (floppy);
 		return;
drivers/ide/ide-tape.c +13 -396

449 lines not on this page · raw message

drivers/ide/it8172.c +0 -3
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/it8172.c linux/drivers/ide/it8172.c
@@ -89,10 +89,7 @@ static void it8172_tune_drive (struct at
 	    drive_enables |= 0x0006;
     }
 
-    save_flags(flags);
-    cli();
 	pci_write_config_word(dev, master_port, master_data);
-    restore_flags(flags);
 }
 
 #if defined(CONFIG_BLK_DEV_IDEDMA) && defined(CONFIG_IT8172_TUNING)
drivers/ide/main.c +8 -17
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/main.c linux/drivers/ide/main.c
@@ -365,7 +365,7 @@ void ide_unregister(struct ata_channel *
 				if (ata_ops(drive)->cleanup(drive))
 					goto abort;
 			} else
-				ide_unregister_subdriver(drive);
+				ata_unregister_device(drive);
 		}
 	}
 	ch->present = 0;
@@ -1037,10 +1037,7 @@ done:
 
 /****************************************************************************/
 
-/*
- * This is in fact registering a device not a driver.
- */
-int ide_register_subdriver(struct ata_device *drive, struct ata_operations *driver)
+int ata_register_device(struct ata_device *drive, struct ata_operations *driver)
 {
 	unsigned long flags;
 
@@ -1052,12 +1049,9 @@ int ide_register_subdriver(struct ata_de
 		return 1;
 	}
 
-	/* FIXME: This will be pushed to the drivers! Thus allowing us to
-	 * save one parameter here and to separate this out.
-	 */
 	drive->driver = driver;
-
 	spin_unlock_irqrestore(&ide_lock, flags);
+
 	/* Default autotune or requested autotune */
 	if (drive->autotune != 2) {
 		struct ata_channel *ch = drive->channel;
@@ -1071,11 +1065,13 @@ int ide_register_subdriver(struct ata_de
 			 *   PARANOIA!!!
 			 */
 
+			spin_lock_irqsave(ch->lock, flags);
 			udma_enable(drive, 0, 0);
 			ch->udma_setup(drive, ch->modes_map);
 #ifdef CONFIG_BLK_DEV_IDE_TCQ_DEFAULT
 			udma_tcq_enable(drive, 1);
 #endif
+			spin_unlock_irqrestore(ch->lock, flags);
 		}
 
 		/* Only CD-ROMs and tape drives support DSC overlap.  But only
@@ -1103,13 +1099,8 @@ int ide_register_subdriver(struct ata_de
  *
  * FIXME: Check whatever we maybe don't call it twice!.
  */
-int ide_unregister_subdriver(struct ata_device *drive)
+int ata_unregister_device(struct ata_device *drive)
 {
-#if 0
-	if (__MOD_IN_USE(ata_ops(drive)->owner))
-		return 1;
-#endif
-
 	if (drive->usage || drive->busy || !ata_ops(drive))
 		return 1;
 
@@ -1181,8 +1172,8 @@ EXPORT_SYMBOL(ide_lock);
 
 devfs_handle_t ide_devfs_handle;
 
-EXPORT_SYMBOL(ide_register_subdriver);
-EXPORT_SYMBOL(ide_unregister_subdriver);
+EXPORT_SYMBOL(ata_register_device);
+EXPORT_SYMBOL(ata_unregister_device);
 EXPORT_SYMBOL(ata_revalidate);
 EXPORT_SYMBOL(ide_register_hw);
 EXPORT_SYMBOL(ide_unregister);
drivers/ide/opti621.c +4 -7
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/ide/opti621.c linux/drivers/ide/opti621.c
@@ -244,13 +244,15 @@ static void compute_clocks(int pio, pio_
 
 }
 
-/* Main tune procedure, called from tuneproc. */
+/* Main tune procedure, called from tuneproc.
+   Assumes IRQ's are disabled or at least that no other process will
+   attempt to access the IDE registers concurrently.
+*/
 static void opti621_tune_drive(struct ata_device *drive, u8 pio)
 {
 	/* primary and secondary drives share some registers,
 	 * so we have to program both drives
 	 */
-	unsigned long flags;
 	u8 pio1, pio2;
 	pio_clocks_t first, second;
 	int ax, drdy;
@@ -281,9 +283,6 @@ static void opti621_tune_drive(struct at
 		hwif->name, ax, second.data_time, second.recovery_time, drdy);
 #endif
 
-	save_flags(flags);	/* all CPUs */
-	cli();			/* all CPUs */
-
 	reg_base = hwif->io_ports[IDE_DATA_OFFSET];
 	outb(0xc0, reg_base+CNTRL_REG);	/* allow Register-B */
 	outb(0xff, reg_base+5);		/* hmm, setupvic.exe does this ;-) */
@@ -306,8 +305,6 @@ static void opti621_tune_drive(struct at
 
 	write_reg(misc, MISC_REG);	/* set address setup, DRDY timings,   */
 					/*  and read prefetch for both drives */
-
-	restore_flags(flags);	/* all CPUs */
 }
 
 /*
drivers/ide/qd65xx.c +12 -66

208 lines not on this page · raw message

drivers/scsi/ide-scsi.c +5 -27
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/drivers/scsi/ide-scsi.c linux/drivers/scsi/ide-scsi.c
@@ -1,33 +1,12 @@
 /*
  * Copyright (C) 1996 - 1999 Gadi Oxman <[email protected]>
- */
-/*
+ *
  * Emulation of a SCSI host adapter for IDE ATAPI devices.
  *
  * With this driver, one can use the Linux SCSI drivers instead of the
  * native IDE ATAPI drivers.
- *
- * Ver 0.1   Dec  3 96   Initial version.
- * Ver 0.2   Jan 26 97   Fixed bug in cleanup_module() and added emulation
- *                        of MODE_SENSE_6/MODE_SELECT_6 for cdroms. Thanks
- *                        to Janos Farkas for pointing this out.
- *                       Avoid using bitfields in structures for m68k.
- *                       Added Scatter/Gather and DMA support.
- * Ver 0.4   Dec  7 97   Add support for ATAPI PD/CD drives.
- *                       Use variable timeout for each command.
- * Ver 0.5   Jan  2 98   Fix previous PD/CD support.
- *                       Allow disabling of SCSI-6 to SCSI-10 transformation.
- * Ver 0.6   Jan 27 98   Allow disabling of SCSI command translation layer
- *                        for access through /dev/sg.
- *                       Fix MODE_SENSE_6/MODE_SELECT_6/INQUIRY translation.
- * Ver 0.7   Dec 04 98   Ignore commands where lun != 0 to avoid multiple
- *                        detection of devices with CONFIG_SCSI_MULTI_LUN
- * Ver 0.8   Feb 05 99   Optical media need translation too. Reverse 0.7.
- * Ver 0.9   Jul 04 99   Fix a bug in SG_SET_TRANSFORM.
  */
 
-#define IDESCSI_VERSION "0.9"
-
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/string.h>
@@ -495,9 +474,8 @@ static void idescsi_release(struct inode
 static Scsi_Host_Template template;
 static int idescsi_cleanup (struct ata_device *drive)
 {
-	if (ide_unregister_subdriver (drive)) {
+	if (ata_unregister_device(drive))
 		return 1;
-	}
 	scsi_unregister_host(&template);
 
 	return 0;
@@ -762,7 +740,7 @@ static void idescsi_attach(struct ata_de
 
 	host = scsi_register(&template, sizeof(idescsi_scsi_t));
 	if (!host) {
-		printk (KERN_ERR
+		printk(KERN_ERR
 			"ide-scsi: %s: Can't allocate a scsi host structure\n",
 			drive->name);
 		return;
@@ -771,8 +749,8 @@ static void idescsi_attach(struct ata_de
 	host->max_lun = drive->last_lun + 1;
 	host->max_id = 1;
 
-	if (ide_register_subdriver(drive, &ata_ops)) {
-		printk (KERN_ERR "ide-scsi: %s: Failed to register the driver with ide.c\n", drive->name);
+	if (ata_register_device(drive, &ata_ops)) {
+		printk(KERN_ERR "ide-scsi: %s: Failed to register the driver with ide.c\n", drive->name);
 		scsi_unregister(host);
 		return;
 	}
include/linux/ide.h +7 -7
diff -durNp -X /tmp/diff.X8zbex linux-2.5.29/include/linux/ide.h linux/include/linux/ide.h
@@ -1146,23 +1146,23 @@ extern struct block_device_operations id
  */
 extern int ideprobe_init(void);
 #ifdef CONFIG_BLK_DEV_IDEDISK
-extern int idedisk_init (void);
+extern int idedisk_init(void);
 #endif
 #ifdef CONFIG_BLK_DEV_IDECD
-extern int ide_cdrom_init (void);
+extern int ide_cdrom_init(void);
 #endif
 #ifdef CONFIG_BLK_DEV_IDETAPE
-extern int idetape_init (void);
+extern int idetape_init(void);
 #endif
 #ifdef CONFIG_BLK_DEV_IDEFLOPPY
-extern int idefloppy_init (void);
+extern int idefloppy_init(void);
 #endif
 #ifdef CONFIG_BLK_DEV_IDESCSI
-extern int idescsi_init (void);
+extern int idescsi_init(void);
 #endif
 
-extern int ide_register_subdriver(struct ata_device *, struct ata_operations *);
-extern int ide_unregister_subdriver(struct ata_device *drive);
+extern int ata_register_device(struct ata_device *, struct ata_operations *);
+extern int ata_unregister_device(struct ata_device *drive);
 extern int ata_revalidate(kdev_t i_rdev);
 extern void ide_driver_module(void);
 

Binary files linux-2.5.29/scripts/docproc and linux/scripts/docproc differ Binary files linux-2.5.29/scripts/lxdialog/lxdialog and linux/scripts/lxdialog/lxdialog differ

#10 lore raw

Re: [PATCH] 2.5.29 IDE 109

Martin. The CS5530 one seems unneeded looking at the databook. Try the patch below instead, which removes the irq lock and uses the proper kernel functions to enable MWI and master.

I'm not sure I like the fact you've deleted the ide-tape documentation. IDE tape is a pretty tricky thing, especially all the command handling weirdnesses. How about moving it into Changelog.idetape if you dont want it in the code itself ?

drivers/ide/cs5530.c +4 -7
diff -u --exclude-from /usr/src/exclude --new-file --recursive linux-2.5.29/drivers/ide/cs5530.c linux-2.5.29-ac1/drivers/ide/cs5530.c
@@ -218,6 +218,7 @@
 			}
 		}
 	}
+
 	if (!master_0) {
 		printk("%s: unable to locate PCI MASTER function\n", dev->name);
 		return 0;
@@ -227,15 +228,13 @@
 		return 0;
 	}
 
-	save_flags(flags);
-	cli();	/* all CPUs (there should only be one CPU with this chipset) */
-
 	/*
 	 * Enable BusMaster and MemoryWriteAndInvalidate for the cs5530:
 	 * -->  OR 0x14 into 16-bit PCI COMMAND reg of function 0 of the cs5530
 	 */
-	pci_read_config_word (cs5530_0, PCI_COMMAND, &pcicmd);
-	pci_write_config_word(cs5530_0, PCI_COMMAND, pcicmd | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE);
+	 
+	pci_set_master(cs5530_0);
+	pci_set_mwi(cs5530_0);
 
 	/*
 	 * Set PCI CacheLineSize to 16-bytes:
@@ -274,8 +273,6 @@
 	pci_write_config_byte(master_0, 0x42, 0x00);
 	pci_write_config_byte(master_0, 0x43, 0xc1);
 
-	restore_flags(flags);
-
 	return 0;
 }
 
#11 lore raw

Re: [PATCH] 2.5.29 IDE 109

Quoted 3 lines · Alan Cox

Martin. The CS5530 one seems unneeded looking at the databook. Try the patch below instead, which removes the irq lock and uses the proper kernel functions to enable MWI and master.

Thanks for reaffirmation. This will be already in the upcomming 110.

Quoted 4 lines

I'm not sure I like the fact you've deleted the ide-tape documentation. IDE tape is a pretty tricky thing, especially all the command handling weirdnesses. How about moving it into Changelog.idetape if you dont want it in the code itself ?

The interresting parts I have moved over to ide.txt in Documentation. The "inner workings" part was:

a) ehm, very very terse in style.

b) not quite revealing the reality.

I decided that it would be better to have no docu then misguiding docu. In esp. the description of DSC handling was not adequate.

The "history of the human race" kind of documentation was certainly
not worth it, becouse: kernel release -> bandwidth consumption ->
energy production -> environmental pollution -> not good for this
planet and not of much value for the developer reading it. I checked the contents in first place ;-). I tried to preserve credentials of course.