Skip to contentSkip to conversation

Linux-2.5.24

PATCH In review Linus Torvalds 3 participants 4 messages Jun 20, 2002 – Jun 29, 2002

lore
Share & tools
lore
#0 lore raw

Hmm. I'm making ready to leave for the kernel summit and OLS, and so are apparently other people - since I was mailbombed by various patches in the last few days.

However, now it's too late - I'm leaving early tomorrow morning, and anybody who left their pre-OLS sync this late is just _too_ late. Phththhthh..

Big sound merges, NTFS merge, IrDA, IPv6, SCSI drivers, you name it. Rusty "it's two l's, dammit!" Russell sent in about a million of his trivial patches, hopefully they got somewhat correctly attributed and merged.

Oh, and IDE 93 should undo the damage of IDE 92.

See you in a week,

Linus

-----

Summary of changes from v2.5.23 to v2.5.24
============================================

<[email protected]>:
o 2.5.23 i2c updates 1-4

<[email protected]>:
o fix lots of warnings about 'struct tty_driver'

<[email protected]>:
o ACPI warning fix
o Re: nbd.c warning fix

<[email protected]>:
o Fix bashisms in scripts_patch-kernel

<[email protected]>:
o 2.5.23: missing tqueue.h in cpia_pp.c

<[email protected]>:
o tons of small patches through Rusty 'TRIVIAL' Russell

<[email protected]>:
o typo in jazz_esp.c
o typo in smt.h
o Typo in radeonfb.c printk()

<[email protected]>:
o Make the find command ignore BitKeeper files throughout

<[email protected]>:
o More __builtin_expect() cleanup in favour

<[email protected]>:
o Fusion driver update

<[email protected]>:
o Convert cm206 to a tasklet

<[email protected]>:
o buddy system comment
o convert BAD_RANGE() to an inline function
o beautify nr_free_pages()
o remove unnecessary headers from mm_page_alloc.c
o remove unnecessary parentheses from expand()

Adrian Bunk <[email protected]>:
o Patch to fix all known linux/tqueue.h compile errors

Andi Kleen <[email protected]>:
o Another RAID-5 XOR assembly fix

Andreas Dilger <[email protected]>:
o TRIVIAL EPERM -> EACCESS

Andrey Panin <[email protected]>:
o add unlikely() into add_timer()

Anton Altaparmakov <[email protected]>:
o NTFS: 2.0.9 release. Decompression engine now uses a single buffer and other cleanups
o NTFS: Fix typo
o NTFS: 2.0.10 - There can only be 2^32 - 1 inodes on an NTFS volume

Benjamin LaHaise <[email protected]>:
o export default_wake_function

Dave Jones <[email protected]>:
o udpated 3ware driver from vendor

Dave Kleikamp <[email protected]>:
o Fix races in JFS threads
o JFS: Yet another truncation fix
o JFS does not need to set i_version. It is never used
o Exclusive access to JFS journal devices
o JFS: recalc_sigpending has no argument
o JFS: fix fsync
o JFS: Use new list_move function

David Mosberger <[email protected]>:
o nasty bug in free_pgtables() (for ia64)

David S. Miller <[email protected]>:
o Sparc64: Update for CPU hotplugging changes
o drivers/net/sungem.c: Include linux/tqueue.h
o drivers/md/md.c: Fix typo, struct dname --> dev_name_t

Edward Peng <[email protected]>:
o dl2k gige net driver update

Greg Kroah-Hartman <[email protected]>:
o drivers/hotplug/cpqphp.h must include tqueue.h

Ingo Molnar <[email protected]>:
o this patch fixes the migration init to correctly work with the new hot-pluggable CPU enumeration method, and the possibility to not boot on CPU#0.
o small UP optimisation from Mikael Pettersson and James Bottomley, modified

Jaroslav Kysela <[email protected]>:
o ALSA update

Jean Tourrilhes <[email protected]>:
o IrDA update 1/2: cache-wait-data fixes
o IrDA update 2/2: big header and initcall cleanup

Jeff Garzik <[email protected]>:
o Update 8139cp net driver to support NIC-specific statistic dumps
o Update 8139 net drivers for the following fixes
o Add extended attribute syscall numbers to alpha port
o Add NIC-specific stats and register dumping to 8139too net driver

Jens Axboe <[email protected]>:
o uninline elv_next_request()

Kai Germaschewski <[email protected]>:
o kbuild: Link netfilter from parent dirs
o kbuild: clean up net/802/Makefile
o kbuild: clean up generated files in net/802
o kbuild: improve net/khttpd file generation
o Make net_dev_init() an __initcall
o kbuild: clean up drivers/scsi firmware generation, part 1
o kbuild: cleanup drivers/scsi firmware generation, part 2
o kbuild: cleanup drivers/scsi firmware generation, part 3
o kbuild: Introduce $(obj), $(src)
o kbuild: Shipped file fixes
o kbuild: Revert automatically building modules
o ISDN: Make ISA-only drivers depend on CONFIG_ISA
o kbuild: Fix net/llc/Makefile
o kbuild: Add $(obj), $(src) for generated files
o ISDN: Small fixes from -dj
o ISDN: Add #include <linux/tqueue.h>
o ISDN: Add drivers/isdn/hisax/avma1_cs.c from 2.4
o ISDN: Add #include <linux/init.h> to drivers/isdn/hisax/avma1_cs.c
o ISDN: s/ioremap_nocache/ioremap/g

Linus Torvalds <[email protected]>:
o Fix UP compile by having the trivial cpu_online_map
o Don't remove zero-sized files. Some of them might be real
o Fix up various odds and ends after big merges
o Linux version 2.5.24

Martin Dalecki <[email protected]>:
o IDE 93

Neil Brown <[email protected]>:
o Don't lock array for START_ARRAY
o Md sync: Remove compiler warning that revealed a bug
o Make ITERATE_MDDEV work on non-SMP

Robert Kuebel <[email protected]>:
o 3c509.c - 2_2
o namespace.c - compiler warning

Robert Love <[email protected]>:
o preempt-safe do_softirq
o mark 3 variables as __initdata

Rusty Russell <[email protected]>:
o Futex bugfixes
o Async Futex
o Fix SMP compilation with 'multiquad' driver
o trivial: reiserfs whitespace
o Trivial TAP_TUN patch to remove minmax macros

Stelian Pop <[email protected]>:
o include <linux/tqueue.h> in pcmcia drivers
o export ioremap_nocache to modules

Stephen Rothwell <[email protected]>:
o make kstack_depth_to_print and some APM stuff static
o dup_task_struct can be static
o ext2 statics
o ipv6 statics
o Consolidate sys_pause

#1 lore raw

PATCH 1/1 2.5.24 IDE 94

Fri Jun 21 02:23:13 CEST 2002 ide-clean-94

- Synchronize with 2.5.24

- Integrate work on ATAPI unification by Bartłomiej:

generic ATAPI hit #1 against 2.5.22:

- move generic ATAPI structs from ide/ide-floppy.c and ide/ide-tape.c to include/atapi.h (this has a nice side effect of making ide-tape a bit more endianness aware)

- remove IDEFLOPPY_MIN/MAX() macros, use generic ones

- Unify ioctl handling with generic ide_raw_taskfile().

- Extend the scope of IDE_DMA bit setting in udma_init() and udma_stop() to be a more encompassing. This should solve the "DMA in progress" problems.

drivers/ide/ide.c +83 -93
diff -urN linux-2.5.24/drivers/ide/ide.c linux/drivers/ide/ide.c
@@ -563,7 +563,7 @@
 		memset(&args, 0, sizeof(args));
 		args.taskfile.sector_count = drive->sect;
 		args.cmd = WIN_RESTORE;
-		ide_raw_taskfile(drive, &args);
+		ide_raw_taskfile(drive, &args, NULL);
 		printk(KERN_INFO "%s: done!\n", drive->name);
 	}
 
@@ -834,86 +834,6 @@
 	return NULL;
 }
 
-
-/*
- * Feed commands to a drive until it barfs.  Called with queue lock held and
- * busy channel.
- */
-static void queue_commands(struct ata_device *drive)
-{
-	struct ata_channel *ch = drive->channel;
-	ide_startstop_t startstop = -1;
-
-	for (;;) {
-		struct request *rq = NULL;
-
-		if (!test_bit(IDE_BUSY, ch->active))
-			printk(KERN_ERR "%s: error: not busy while queueing!\n", drive->name);
-
-		/* Abort early if we can't queue another command. for non
-		 * tcq, ata_can_queue is always 1 since we never get here
-		 * unless the drive is idle.
-		 */
-		if (!ata_can_queue(drive)) {
-			if (!ata_pending_commands(drive))
-				clear_bit(IDE_BUSY, ch->active);
-			break;
-		}
-
-		drive->sleep = 0;
-
-		if (test_bit(IDE_DMA, ch->active)) {
-			printk(KERN_ERR "%s: error: DMA in progress...\n", drive->name);
-			break;
-		}
-
-		/* There's a small window between where the queue could be
-		 * replugged while we are in here when using tcq (in which
-		 * case the queue is probably empty anyways...), so check
-		 * and leave if appropriate. When not using tcq, this is
-		 * still a severe BUG!
-		 */
-		if (blk_queue_plugged(&drive->queue)) {
-			BUG_ON(!drive->using_tcq);
-			break;
-		}
-
-		if (!(rq = elv_next_request(&drive->queue))) {
-			if (!ata_pending_commands(drive))
-				clear_bit(IDE_BUSY, ch->active);
-			drive->rq = NULL;
-			break;
-		}
-
-		/* If there are queued commands, we can't start a non-fs
-		 * request (really, a non-queuable command) until the
-		 * queue is empty.
-		 */
-		if (!(rq->flags & REQ_CMD) && ata_pending_commands(drive))
-			break;
-
-		drive->rq = rq;
-
-		ide__sti();	/* allow other IRQs while we start this request */
-		startstop = start_request(drive, rq);
-
-		/* command started, we are busy */
-		if (startstop == ide_started)
-			break;
-
-		/* start_request() can return either ide_stopped (no command
-		 * was started), ide_started (command started, don't queue
-		 * more), or ide_released (command started, try and queue
-		 * more).
-		 */
-#if 0
-		if (startstop == ide_stopped)
-			set_bit(IDE_BUSY, &hwgroup->flags);
-#endif
-
-	}
-}
-
 /*
  * Issue a new request.
  * Caller must have already done spin_lock_irqsave(channel->lock, ...)
@@ -926,6 +846,8 @@
 	while (!test_and_set_bit(IDE_BUSY, channel->active)) {
 		struct ata_channel *ch;
 		struct ata_device *drive;
+		struct request *rq = NULL;
+		int i;
 
 		/* this will clear IDE_BUSY, if appropriate */
 		drive = choose_urgent_device(channel);
@@ -935,23 +857,92 @@
 
 		ch = drive->channel;
 
-		/* Disable intrerrupts from the drive on the previous channel.
-		 *
-		 * FIXME: This should be only done if we are indeed sharing the same
-		 * interrupt line with it.
-		 *
-		 * FIXME: check this! It appears to act on the current channel!
+		/* Make sure that all drives on channels sharing the IRQ line
+		 * with us won't generate IRQ's during our activity.
 		 */
-		if (ch != channel && channel->sharing_irq && ch->irq == channel->irq)
-			ata_irq_enable(drive, 0);
+		for (i = 0; i < MAX_HWIFS; ++i) {
+			struct ata_channel *tmp = &ide_hwifs[i];
+			int j;
+
+			if (!tmp->present)
+				continue;
+
+			if (ch == tmp || ch->irq != tmp->irq)
+				continue;
+
+			/* Only care if there is any drive on the channel in
+			 * question.
+			 */
+			for (j = 0;  j < MAX_DRIVES; ++j) {
+				struct ata_device * drive = &tmp->drives[j];
+				if (drive->present)
+					ata_irq_enable(drive, 0);
+			}
+		}
 
 		/* Remember the last drive we where acting on.
 		 */
 		ch->drive = drive;
 
-		queue_commands(drive);
-	}
+		/*
+		 * Feed commands to a drive until it barfs.
+		 */
+
+		do {
+			if (!test_bit(IDE_BUSY, ch->active))
+				printk(KERN_ERR "%s: error: not busy while queueing!\n", drive->name);
+
+			/* Abort early if we can't queue another command. for
+			 * non tcq, ata_can_queue is always 1 since we never
+			 * get here unless the drive is idle.
+			 */
+			if (!ata_can_queue(drive)) {
+				if (!ata_pending_commands(drive))
+					clear_bit(IDE_BUSY, ch->active);
+				break;
+			}
+
+			drive->sleep = 0;
+
+			if (test_bit(IDE_DMA, ch->active)) {
+				printk(KERN_ERR "%s: error: DMA in progress...\n", drive->name);
+				break;
+			}
+
+			/* There's a small window between where the queue could
+			 * be replugged while we are in here when using tcq (in
+			 * which case the queue is probably empty anyways...),
+			 * so check and leave if appropriate. When not using
+			 * tcq, this is still a severe BUG!
+			 */
+			if (blk_queue_plugged(&drive->queue)) {
+				BUG_ON(!drive->using_tcq);
+				break;
+			}
 
+			if (!(rq = elv_next_request(&drive->queue))) {
+				if (!ata_pending_commands(drive))
+					clear_bit(IDE_BUSY, ch->active);
+				drive->rq = NULL;
+				break;
+			}
+
+			/* If there are queued commands, we can't start a
+			 * non-fs request (really, a non-queuable command)
+			 * until the queue is empty.
+			 */
+			if (!(rq->flags & REQ_CMD) && ata_pending_commands(drive))
+				break;
+
+			drive->rq = rq;
+
+			ide__sti();	/* allow other IRQs while we start this request */
+			/* command started, we are busy */
+		} while (ide_started != start_request(drive, rq));
+		/* make sure the BUSY bit is set */
+		/* FIXME: perhaps there is some place where we miss to set it? */
+		set_bit(IDE_BUSY, ch->active);
+	}
 }
 
 void do_ide_request(request_queue_t *q)
@@ -1234,8 +1225,7 @@
 		} else {
 			printk("%s: %s: huh? expected NULL handler on exit\n", drive->name, __FUNCTION__);
 		}
-	} else if (startstop == ide_released)
-		queue_commands(drive);
+	}
 
 out_lock:
 	spin_unlock_irqrestore(ch->lock, flags);
drivers/ide/ide-disk.c +253 -235

631 lines not on this page · raw message

drivers/ide/ide-floppy.c +16 -283

387 lines not on this page · raw message

drivers/ide/ide-pmac.c +1 -1
diff -urN linux-2.5.24/drivers/ide/ide-pmac.c linux/drivers/ide/ide-pmac.c
@@ -1491,7 +1491,7 @@
 	set_bit(IDE_DMA, drive->channel->active);
 //	if (drive->waiting_for_dma >= DMA_WAIT_TIMEOUT) {
 //		printk(KERN_WARNING "ide%d, timeout waiting \
-				for dbdma command stop\n", ix);
+//				for dbdma command stop\n", ix);
 		return 1;
 	}
 	udelay(1);
drivers/ide/ide-tape.c +15 -175

286 lines not on this page · raw message

drivers/ide/ide-taskfile.c +4 -4
diff -urN linux-2.5.24/drivers/ide/ide-taskfile.c linux/drivers/ide/ide-taskfile.c
@@ -242,7 +242,7 @@
 /*
  * Invoked on completion of a special REQ_SPECIAL command.
  */
-ide_startstop_t ata_special_intr(struct ata_device *drive, struct
+static ide_startstop_t special_intr(struct ata_device *drive, struct
 		request *rq) {
 
 	struct ata_taskfile *ar = rq->special;
@@ -292,15 +292,16 @@
 	return ret;
 }
 
-int ide_raw_taskfile(struct ata_device *drive, struct ata_taskfile *ar)
+int ide_raw_taskfile(struct ata_device *drive, struct ata_taskfile *ar, char *buf)
 {
 	struct request req;
 
 	ar->command_type = IDE_DRIVE_TASK_NO_DATA;
-	ar->XXX_handler = ata_special_intr;
+	ar->XXX_handler = special_intr;
 
 	memset(&req, 0, sizeof(req));
 	req.flags = REQ_SPECIAL;
+	req.buffer = buf;
 	req.special = ar;
 
 	return ide_do_drive_cmd(drive, &req, ide_wait);
@@ -310,5 +311,4 @@
 EXPORT_SYMBOL(ide_do_drive_cmd);
 EXPORT_SYMBOL(ata_read);
 EXPORT_SYMBOL(ata_write);
-EXPORT_SYMBOL(ata_special_intr);
 EXPORT_SYMBOL(ide_raw_taskfile);
drivers/ide/ioctl.c +1 -10
diff -urN linux-2.5.24/drivers/ide/ioctl.c linux/drivers/ide/ioctl.c
@@ -47,7 +47,6 @@
 	u8 *argbuf = vals;
 	int argsize = 4;
 	struct ata_taskfile args;
-	struct request req;
 
 	/* Second phase.
 	 */
@@ -80,15 +79,7 @@
 
 	/* Issue ATA command and wait for completion.
 	 */
-	args.command_type = IDE_DRIVE_TASK_NO_DATA;
-	args.XXX_handler = ata_special_intr;
-
-	memset(&req, 0, sizeof(req));
-	req.flags = REQ_SPECIAL;
-	req.special = &args;
-
-	req.buffer = argbuf + 4;
-	err = ide_do_drive_cmd(drive, &req, ide_wait);
+	err = ide_raw_taskfile(drive, &args, argbuf + 4);
 
 	argbuf[0] = drive->status;
 	argbuf[1] = args.taskfile.feature;
drivers/ide/tcq.c +4 -4
diff -urN linux-2.5.24/drivers/ide/tcq.c linux/drivers/ide/tcq.c
@@ -441,7 +441,7 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = 0x01;
 	args.cmd = WIN_NOP;
-	ide_raw_taskfile(drive, &args);
+	ide_raw_taskfile(drive, &args, NULL);
 	if (args.taskfile.feature & ABRT_ERR)
 		return 1;
 
@@ -469,7 +469,7 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = SETFEATURES_EN_WCACHE;
 	args.cmd = WIN_SETFEATURES;
-	if (ide_raw_taskfile(drive, &args)) {
+	if (ide_raw_taskfile(drive, &args, NULL)) {
 		printk("%s: failed to enable write cache\n", drive->name);
 		return 1;
 	}
@@ -481,7 +481,7 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = SETFEATURES_DIS_RI;
 	args.cmd = WIN_SETFEATURES;
-	if (ide_raw_taskfile(drive, &args)) {
+	if (ide_raw_taskfile(drive, &args, NULL)) {
 		printk("%s: disabling release interrupt fail\n", drive->name);
 		return 1;
 	}
@@ -493,7 +493,7 @@
 	memset(&args, 0, sizeof(args));
 	args.taskfile.feature = SETFEATURES_EN_SI;
 	args.cmd = WIN_SETFEATURES;
-	if (ide_raw_taskfile(drive, &args)) {
+	if (ide_raw_taskfile(drive, &args, NULL)) {
 		printk("%s: enabling service interrupt fail\n", drive->name);
 		return 1;
 	}
include/linux/atapi.h +281 -0

290 lines not on this page · raw message

include/linux/ide.h +11 -29
diff -urN linux-2.5.24/include/linux/ide.h linux/include/linux/ide.h
@@ -658,31 +658,7 @@
 extern void ata_read(struct ata_device *, void *, unsigned int);
 extern void ata_write(struct ata_device *, void *, unsigned int);
 
-/*
- * Special Flagged Register Validation Caller
- */
-
-/*
- * for now, taskfile requests are special :/
- */
-static inline char *ide_map_rq(struct request *rq, unsigned long *flags)
-{
-	if (rq->bio)
-		return bio_kmap_irq(rq->bio, flags) + ide_rq_offset(rq);
-	else
-		return rq->buffer + ((rq)->nr_sectors - (rq)->current_nr_sectors) * SECTOR_SIZE;
-}
-
-static inline void ide_unmap_rq(struct request *rq, char *to,
-				unsigned long *flags)
-{
-	if (rq->bio)
-		bio_kunmap_irq(to, flags);
-}
-
-extern ide_startstop_t ata_special_intr(struct ata_device *, struct request *);
-extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *);
-
+extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *, char *);
 extern void ide_fix_driveid(struct hd_driveid *id);
 extern int ide_config_drive_speed(struct ata_device *, byte);
 extern byte eighty_ninty_three(struct ata_device *);
@@ -756,9 +732,12 @@
 
 static inline int udma_stop(struct ata_device *drive)
 {
+	int ret;
+
+	ret = drive->channel->udma_stop(drive);
 	clear_bit(IDE_DMA, drive->channel->active);
 
-	return drive->channel->udma_stop(drive);
+	return ret;
 }
 
 /*
@@ -766,9 +745,12 @@
  */
 static inline ide_startstop_t udma_init(struct ata_device *drive, struct request *rq)
 {
-	int ret = drive->channel->udma_init(drive, rq);
-	if (ret == ide_started)
-		set_bit(IDE_DMA, drive->channel->active);
+	int ret;
+
+	set_bit(IDE_DMA, drive->channel->active);
+	ret = drive->channel->udma_init(drive, rq);
+	if (ret != ide_started)
+		clear_bit(IDE_DMA, drive->channel->active);
 
 	return ret;
 }
#2 lore raw

Re: [PATCH] 2.5.24 IDE 94

Hi,
after applying this patch I get the following error after some time of audiocd ripping with cdparanoia:
hdd: packet command error: status=0x51 [ drive ready,seek complete,error]
hdd: packet command error: error=0x51
ATAPI device hdd:
Error: Illegal request -- (Sense key=0x05)
Illegal mode for this track or incompatible medium -- (asc=0x64, ascq=0x00)
The failed "Request Sense" packet command was:
"03 00 00 00 12 00 00 00 00 00 00 00 "

cdparanoia doesn't respond after this anymore and only a reboot can make the cdrom driver work again before this patch I got freezes when ripping audio data from cds (nothing in syslog)

ide-cd is compiled as module, the other ide stuff is compiled directly into the kernel
The IDE controller is a "VIA Technologies, Inc. Bus Master IDE (rev 06)" and the cdrom drive a "TOSHIBA DVD-ROM SD-M1612, ATAPI CD/DVD-ROM" drive at udma-2 but I had this with another cdrom drive, too

This behaviour is completely reproducable

Bye

#3 lore raw

Re: [PATCH] 2.5.24 IDE 94

Quoted 13 lines · On Fri, 28 Jun 2002 19:17:05 +0200 Sebastian Droege <[email protected]>…

Hi,
after applying this patch I get the following error after some time of audiocd ripping with cdparanoia:
hdd: packet command error: status=0x51 [ drive ready,seek complete,error]
hdd: packet command error: error=0x51
ATAPI device hdd:
Error: Illegal request -- (Sense key=0x05)
Illegal mode for this track or incompatible medium -- (asc=0x64, ascq=0x00)
The failed "Request Sense" packet command was:
"03 00 00 00 12 00 00 00 00 00 00 00 "

cdparanoia doesn't respond after this anymore and only a reboot can make the cdrom driver work again before this patch I got freezes when ripping audio data from cds (nothing in syslog)

Quoted 6 lines

ide-cd is compiled as module, the other ide stuff is compiled directly into the kernel
The IDE controller is a "VIA Technologies, Inc. Bus Master IDE (rev 06)" and the cdrom drive a "TOSHIBA DVD-ROM SD-M1612, ATAPI CD/DVD-ROM" drive at udma-2 but I had this with another cdrom drive, too

This behaviour is completely reproducable

Bye

After more testing I found 3 possible errors, which can happen while cd ripping...
-the system freezes completely
-cdparanoia gets unkillable and I first have to reboot to use the cdrom drive again (sometimes I got the error from my previous mail) -I get the error from my previous mail and everything works fine
This happens with ide-cd as module or directly compiled into the kernel

It is nearly impossible to rip one complete cd

Bye