diff -ur --exclude-from /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.0-ac9/drivers/block/cpqarray.c linux/drivers/block/cpqarray.c
--- /opt/kernel/linux-2.4.0-ac9/drivers/block/cpqarray.c	Sun Jan 14 04:46:38 2001
+++ linux/drivers/block/cpqarray.c	Mon Jan 15 02:35:31 2001
@@ -142,23 +142,7 @@
 static int ida_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, unsigned long arg);
 static int ida_ctlr_ioctl(int ctlr, int dsk, ida_ioctl_t *io);
 
-static void do_ida_request(int i);
-/*
- * This is a hack.  This driver eats a major number for each controller, and
- * sets blkdev[xxx].request_fn to each one of these so the real request
- * function knows what controller its working with.
- */
-#define DO_IDA_REQUEST(x) { do_ida_request(x); }
-
-static void do_ida_request0(request_queue_t * q) DO_IDA_REQUEST(0);
-static void do_ida_request1(request_queue_t * q) DO_IDA_REQUEST(1);
-static void do_ida_request2(request_queue_t * q) DO_IDA_REQUEST(2);
-static void do_ida_request3(request_queue_t * q) DO_IDA_REQUEST(3);
-static void do_ida_request4(request_queue_t * q) DO_IDA_REQUEST(4);
-static void do_ida_request5(request_queue_t * q) DO_IDA_REQUEST(5);
-static void do_ida_request6(request_queue_t * q) DO_IDA_REQUEST(6);
-static void do_ida_request7(request_queue_t * q) DO_IDA_REQUEST(7);
-
+static void do_ida_request(request_queue_t *q);
 static void start_io(ctlr_info_t *h);
 
 static inline void addQ(cmdlist_t **Qptr, cmdlist_t *c);
@@ -336,7 +320,7 @@
 		iounmap(hba[i]->vaddr);
 		unregister_blkdev(MAJOR_NR+i, hba[i]->devname);
 		del_timer(&hba[i]->timer);
-		blk_cleanup_queue(BLK_DEFAULT_QUEUE(MAJOR_NR + i));
+		blk_cleanup_queue(&hba[i]->queue);
 		remove_proc_entry(hba[i]->devname, proc_array);
 		kfree(hba[i]->cmd_pool);
 		kfree(hba[i]->cmd_pool_bits);
@@ -367,12 +351,7 @@
  */
 int __init cpqarray_init(void)
 {
-	void (*request_fns[MAX_CTLR])(request_queue_t *) = {
-		do_ida_request0, do_ida_request1,
-		do_ida_request2, do_ida_request3,
-		do_ida_request4, do_ida_request5,
-		do_ida_request6, do_ida_request7,
-	};
+	request_queue_t *q;
 	int i,j;
 	int num_cntlrs_reg = 0;
 
@@ -497,9 +476,10 @@
 		ida_procinit(i);
 #endif
 
-		blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR + i), 
-			request_fns[i]);		
-		blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR + i), 0);
+		q = &hba[i]->queue;
+		q->queuedata = hba[i];
+		blk_init_queue(q, do_ida_request);
+		blk_queue_headactive(q, 0);
 		blksize_size[MAJOR_NR+i] = ida_blocksizes + (i*256);
 		hardsect_size[MAJOR_NR+i] = ida_hardsizes + (i*256);
 		read_ahead[MAJOR_NR+i] = READ_AHEAD;
@@ -871,17 +851,26 @@
  * are in here (either via the dummy do_ida_request functions or by being
  * called from the interrupt handler
  */
-static void do_ida_request(int ctlr)
+static void do_ida_request(request_queue_t *q)
 {
-	ctlr_info_t *h = hba[ctlr];
+	ctlr_info_t *h = q->queuedata;
 	cmdlist_t *c;
 	int seg, sect;
 	char *lastdataend;
-	struct list_head * queue_head;
+	struct list_head * queue_head = &q->queue_head;
 	struct buffer_head *bh;
 	struct request *creq;
 
-	queue_head = &blk_dev[MAJOR_NR+ctlr].request_queue.queue_head;
+	if (!q)
+		BUG();
+	if (!h)
+		BUG();
+
+	if (q->plugged) {
+		printk("ida: touching first request while plugged\n");
+		start_io(h);
+		return;
+	}
 
 	if (list_empty(queue_head))
 	{
@@ -890,18 +879,13 @@
 	}
 
 	creq = blkdev_entry_next_request(queue_head);
-	if (creq->rq_status == RQ_INACTIVE)
-	{	
-                start_io(h);
-                return;
-        }
+	if (creq->rq_status != RQ_ACTIVE)
+		BUG();
 
-
-	if (ctlr != MAJOR(creq->rq_dev)-MAJOR_NR ||
-		ctlr > nr_ctlr || h == NULL) 
+	if (h->ctlr != MAJOR(creq->rq_dev)-MAJOR_NR || h->ctlr > nr_ctlr)
 	{
 		printk(KERN_WARNING "doreq cmd for %d, %x at %p\n",
-				ctlr, creq->rq_dev, creq);
+				h->ctlr, creq->rq_dev, creq);
 		complete_buffers(creq->bh, 0);
 		start_io(h);
                 return;
@@ -915,12 +899,12 @@
 
 	bh = creq->bh;
 
-	c->ctlr = ctlr;
+	c->ctlr = h->ctlr;
 	c->hdr.unit = MINOR(creq->rq_dev) >> NWD_SHIFT;
 	c->hdr.size = sizeof(rblk_t) >> 2;
 	c->size += sizeof(rblk_t);
 
-	c->req.hdr.blk = ida[(ctlr<<CTLR_SHIFT) + MINOR(creq->rq_dev)].start_sect + creq->sector;
+	c->req.hdr.blk = ida[(h->ctlr<<CTLR_SHIFT) + MINOR(creq->rq_dev)].start_sect + creq->sector;
 	c->bh = bh;
 DBGPX(
 	if (bh == NULL)
@@ -962,13 +946,11 @@
 	 * mark this request as done and ready the next one.
          */
 	if (creq->nr_sectors) {
-DBGPX(
 		if (bh==NULL) {
-			printk("sector=%d, nr_sectors=%d, sect=%d, seg=%d\n",
+			printk("sector=%ld, nr_sectors=%ld, sect=%d, seg=%d\n",
 				creq->sector, creq->nr_sectors, sect, seg);
-			panic("mother...");
+			panic("ida: buffer list mismatch");
 		}
-);
 		creq->bh = bh->b_reqnext;
 		bh->b_reqnext = NULL;
 DBGPX(		printk("More to do on same request %p\n", creq); );
@@ -1115,7 +1097,7 @@
 	/*
 	 * See if we can queue up some more IO
 	 */
-	do_ida_request(h->ctlr);
+	do_ida_request(&h->queue);
 	spin_unlock_irqrestore(&io_request_lock, flags);
 }
 
diff -ur --exclude-from /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.0-ac9/drivers/block/cpqarray.h linux/drivers/block/cpqarray.h
--- /opt/kernel/linux-2.4.0-ac9/drivers/block/cpqarray.h	Mon Dec 11 21:50:39 2000
+++ linux/drivers/block/cpqarray.h	Mon Jan 15 02:35:31 2001
@@ -114,6 +114,8 @@
 	unsigned int nr_frees;
 	struct timer_list timer;
 	unsigned int misc_tflags;
+
+	request_queue_t queue;
 };
 #endif
 
diff -ur --exclude-from /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.0-ac9/drivers/block/ll_rw_blk.c linux/drivers/block/ll_rw_blk.c
--- /opt/kernel/linux-2.4.0-ac9/drivers/block/ll_rw_blk.c	Sun Jan 14 04:46:38 2001
+++ linux/drivers/block/ll_rw_blk.c	Mon Jan 15 02:37:14 2001
@@ -634,16 +634,17 @@
 	req->q = NULL;
 
 	/*
-	 * we've released enough buffers to start I/O again
-	 */
-	if (atomic_read(&queued_sectors) < low_queued_sectors &&
-	    waitqueue_active(&blk_buffers_wait))
-		wake_up(&blk_buffers_wait);
-
-	/*
-	 * Request may not have originated from ll_rw_blk
+	 * Request may not have originated from ll_rw_blk. if not,
+	 * asumme it has free buffers and check waiters
 	 */
 	if (q) {
+		/*
+		 * we've released enough buffers to start I/O again
+		 */
+		if (waitqueue_active(&blk_buffers_wait)
+		    && atomic_read(&queued_sectors) < low_queued_sectors)
+			wake_up(&blk_buffers_wait);
+
 		if (!list_empty(&q->request_freelist[rw])) {
 			blk_refill_freelist(q, rw);
 			list_add(&req->table, &q->request_freelist[rw]);
@@ -838,10 +839,9 @@
 	}
 		
 	/*
-	 * Grab a free request from the freelist. Read first try their
-	 * own queue - if that is empty, we steal from the write list.
-	 * Writes must block if the write list is empty, and read aheads
-	 * are not crucial.
+	 * Grab a free request from the freelist - if that is empty, check
+	 * if we are doing read ahead and abort instead of blocking for
+	 * a free slot.
 	 */
 get_rq:
 	if (freereq) {
@@ -928,10 +928,8 @@
 
 	if (blk_size[major]) {
 		unsigned long maxsector = (blk_size[major][MINOR(bh->b_rdev)] << 1) + 1;
-		unsigned int sector, count;
-
-		count = bh->b_size >> 9;
-		sector = bh->b_rsector;
+		unsigned long sector = bh->b_rsector;
+		unsigned int count = bh->b_size >> 9;
 
 		if (maxsector < count || maxsector - count < sector) {
 			bh->b_state &= (1 << BH_Lock) | (1 << BH_Mapped);
@@ -942,7 +940,7 @@
 				   when mounting a device. */
 				printk(KERN_INFO
 				       "attempt to access beyond end of device\n");
-				printk(KERN_INFO "%s: rw=%d, want=%d, limit=%d\n",
+				printk(KERN_INFO "%s: rw=%d, want=%ld, limit=%d\n",
 				       kdevname(bh->b_rdev), rw,
 				       (sector + count)>>1,
 				       blk_size[major][MINOR(bh->b_rdev)]);
@@ -975,7 +973,7 @@
 
 /**
  * submit_bh: submit a buffer_head to the block device later for I/O
- * @rw: whether to %READ or %WRITE, or mayve to %READA (read ahead)
+ * @rw: whether to %READ or %WRITE, or maybe to %READA (read ahead)
  * @bh: The &struct buffer_head which describes the I/O
  *
  * submit_bh() is very similar in purpose to generic_make_request(), and
@@ -998,7 +996,7 @@
 	 * further remap this.
 	 */
 	bh->b_rdev = bh->b_dev;
-	bh->b_rsector = bh->b_blocknr * (bh->b_size>>9);
+	bh->b_rsector = bh->b_blocknr * (bh->b_size >> 9);
 
 	generic_make_request(rw, bh);
 
@@ -1073,8 +1071,7 @@
 
 	/* Verify requested block sizes. */
 	for (i = 0; i < nr; i++) {
-		struct buffer_head *bh;
-		bh = bhs[i];
+		struct buffer_head *bh = bhs[i];
 		if (bh->b_size != correct_size) {
 			printk(KERN_NOTICE "ll_rw_block: device %s: "
 			       "only %d-char blocks implemented (%u)\n",
@@ -1091,8 +1088,7 @@
 	}
 
 	for (i = 0; i < nr; i++) {
-		struct buffer_head *bh;
-		bh = bhs[i];
+		struct buffer_head *bh = bhs[i];
 
 		/*
 		 * don't lock any more buffers if we are above the high
diff -ur --exclude-from /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.0-ac9/drivers/ide/ide-probe.c linux/drivers/ide/ide-probe.c
--- /opt/kernel/linux-2.4.0-ac9/drivers/ide/ide-probe.c	Sun Jan 14 04:46:38 2001
+++ linux/drivers/ide/ide-probe.c	Tue Jan  9 23:50:58 2001
@@ -652,8 +652,6 @@
 		hwgroup = match->hwgroup;
 	} else {
 		hwgroup = kmalloc(sizeof(ide_hwgroup_t), GFP_KERNEL);
-		if (!hwgroup)
-			return 1;
 		memset(hwgroup, 0, sizeof(ide_hwgroup_t));
 		hwgroup->hwif     = hwif->next = hwif;
 		hwgroup->rq       = NULL;
Only in linux/drivers/net/hamradio/soundmodem: gentbl
Only in linux/drivers/net/hamradio/soundmodem: sm_tbl_afsk1200.h
Only in linux/drivers/net/hamradio/soundmodem: sm_tbl_afsk2400_7.h
Only in linux/drivers/net/hamradio/soundmodem: sm_tbl_afsk2400_8.h
Only in linux/drivers/net/hamradio/soundmodem: sm_tbl_afsk2666.h
Only in linux/drivers/net/hamradio/soundmodem: sm_tbl_fsk9600.h
Only in linux/drivers/net/hamradio/soundmodem: sm_tbl_hapn4800.h
Only in linux/drivers/net/hamradio/soundmodem: sm_tbl_psk4800.h
Only in linux/fs/proc: kcore.c~
diff -ur --exclude-from /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.0-ac9/fs/proc/proc_misc.c linux/fs/proc/proc_misc.c
--- /opt/kernel/linux-2.4.0-ac9/fs/proc/proc_misc.c	Sun Jan 14 04:46:40 2001
+++ linux/fs/proc/proc_misc.c	Mon Jan 15 02:35:31 2001
@@ -135,6 +135,7 @@
 	return proc_calc_metrics(page, start, off, count, eof, len);
 }
 
+extern atomic_t queued_sectors;
 static int meminfo_read_proc(char *page, char **start, off_t off,
 				 int count, int *eof, void *data)
 {
@@ -175,7 +176,8 @@
                 "LowTotal:     %8lu kB\n"
                 "LowFree:      %8lu kB\n"
                 "SwapTotal:    %8lu kB\n"
-                "SwapFree:     %8lu kB\n",
+                "SwapFree:     %8lu kB\n"
+		"MemQueued:    %8u kB\n",
                 K(i.totalram),
                 K(i.freeram),
                 K(i.sharedram),
@@ -190,7 +192,8 @@
                 K(i.totalram-i.totalhigh),
                 K(i.freeram-i.freehigh),
                 K(i.totalswap),
-                K(i.freeswap));
+                K(i.freeswap),
+		atomic_read(&queued_sectors) / 2);
 
 	return proc_calc_metrics(page, start, off, count, eof, len);
 #undef B
diff -ur --exclude-from /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.0-ac9/include/linux/blk.h linux/include/linux/blk.h
--- /opt/kernel/linux-2.4.0-ac9/include/linux/blk.h	Sun Jan 14 04:46:40 2001
+++ linux/include/linux/blk.h	Mon Jan 15 02:35:31 2001
@@ -319,7 +319,7 @@
 
 #define DEVICE_NAME "ida"
 #define TIMEOUT_VALUE (25*HZ)
-#define DEVICE_REQUEST do_ida_request0
+#define DEVICE_REQUEST do_ida_request
 #define DEVICE_NR(device) (MINOR(device) >> 4)
 
 #endif /* MAJOR_NR == whatever */
diff -ur --exclude-from /home/axboe/cdrom/exclude /opt/kernel/linux-2.4.0-ac9/include/linux/blkdev.h linux/include/linux/blkdev.h
--- /opt/kernel/linux-2.4.0-ac9/include/linux/blkdev.h	Sun Jan 14 04:46:40 2001
+++ linux/include/linux/blkdev.h	Mon Jan 15 02:35:31 2001
@@ -23,7 +23,7 @@
 	int elevator_sequence;
 	struct list_head table;
 
-	volatile int rq_status;	/* should split this into a few status bits */
+	int rq_status;		/* should split this into a few status bits */
 #define RQ_INACTIVE		(-1)
 #define RQ_ACTIVE		1
 #define RQ_SCSI_BUSY		0xffff
