2002-10-07 23:30:52

by Adam Kropelin

[permalink] [raw]
Subject: [PATCH] 2.5.41: cpqarray compile fixes

cpqarray in 2.5.41 needs the patch below to compile.

--Adam

--- linux-2.5.41/drivers/block/cpqarray.c Mon Oct 7 18:26:32 2002
+++ linux-2.5.41-fix/drivers/block/cpqarray.c Mon Oct 7 19:25:48 2002
@@ -355,7 +355,7 @@
}
num_cntlrs_reg++;
for (j=0; j<NWD; j++) {
- ida_gendisk[i][j] = disk_alloc();
+ ida_gendisk[i][j] = alloc_disk();
if (!ida_gendisk[i][j])
goto Enomem2;
}
@@ -437,7 +437,6 @@
}
return 0;
}
-}

/*
* Find the controller and initialize it


2002-10-07 23:34:23

by Alexander Viro

[permalink] [raw]
Subject: Re: [PATCH] 2.5.41: cpqarray compile fixes



On Mon, 7 Oct 2002, Adam Kropelin wrote:

> cpqarray in 2.5.41 needs the patch below to compile.

Yeah, and more than that. Same typo is in cciss, rd.c sets ->first_minor to
0 for all units and HD_IRQ definition is needed if CONFIG_BLK_DEV_HD is
defined.

diff -urN C41-rd/drivers/block/cciss.c C41-disk_add/drivers/block/cciss.c
--- C41-rd/drivers/block/cciss.c Mon Oct 7 15:55:57 2002
+++ C41-disk_add/drivers/block/cciss.c Mon Oct 7 16:45:41 2002
@@ -2274,7 +2274,7 @@
struct gendisk *disk[NWD];
int i, n;
for (n = 0; n < NWD; n++) {
- disk[n] = disk_alloc();
+ disk[n] = alloc_disk();
if (!disk[n])
goto out;
}
diff -urN C41-rd/drivers/block/cpqarray.c C41-disk_add/drivers/block/cpqarray.c
--- C41-rd/drivers/block/cpqarray.c Mon Oct 7 15:55:57 2002
+++ C41-disk_add/drivers/block/cpqarray.c Mon Oct 7 16:45:29 2002
@@ -355,7 +355,7 @@
}
num_cntlrs_reg++;
for (j=0; j<NWD; j++) {
- ida_gendisk[i][j] = disk_alloc();
+ ida_gendisk[i][j] = alloc_disk();
if (!ida_gendisk[i][j])
goto Enomem2;
}
diff -urN C41-HD_IRQ/drivers/block/rd.c C41-rd/drivers/block/rd.c
--- C41-HD_IRQ/drivers/block/rd.c Mon Oct 7 15:55:57 2002
+++ C41-rd/drivers/block/rd.c Mon Oct 7 16:40:43 2002
@@ -459,7 +459,7 @@
/* rd_size is given in kB */
rd_length[i] = rd_size << 10;
disk->major = MAJOR_NR;
- disk->first_minor = 0;
+ disk->first_minor = i;
disk->minor_shift = 0;
disk->fops = &rd_bd_op;
sprintf(disk->disk_name, "rd%d", i);
diff -urN C41-0/drivers/ide/legacy/hd.c C41-HD_IRQ/drivers/ide/legacy/hd.c
--- C41-0/drivers/ide/legacy/hd.c Mon Oct 7 15:55:58 2002
+++ C41-HD_IRQ/drivers/ide/legacy/hd.c Mon Oct 7 16:35:19 2002
@@ -50,8 +50,6 @@
#define DEVICE_NR(device) (minor(device)>>6)
#include <linux/blk.h>

-#define HD_IRQ 14 /* the standard disk interrupt */
-
#ifdef __arm__
#undef HD_IRQ
#endif
diff -urN C41-0/include/linux/hdreg.h C41-HD_IRQ/include/linux/hdreg.h
--- C41-0/include/linux/hdreg.h Wed Sep 18 00:52:23 2002
+++ C41-HD_IRQ/include/linux/hdreg.h Mon Oct 7 16:35:19 2002
@@ -8,6 +8,8 @@

/* ide.c has its own port definitions in "ide.h" */

+#define HD_IRQ 14
+
/* Hd controller regs. Ref: IBM AT Bios-listing */
#define HD_DATA 0x1f0 /* _CTL when writing */
#define HD_ERROR 0x1f1 /* see err-bits */

2002-10-08 00:44:21

by Adam Kropelin

[permalink] [raw]
Subject: Re: [PATCH] 2.5.41: cpqarray compile fixes

On Mon, Oct 07, 2002 at 07:39:46PM -0400, Alexander Viro wrote:
>
> On Mon, 7 Oct 2002, Adam Kropelin wrote:
> > cpqarray in 2.5.41 needs the patch below to compile.
>
> Yeah, and more than that. Same typo is in cciss, rd.c sets ->first_minor to
> 0 for all units and HD_IRQ definition is needed if CONFIG_BLK_DEV_HD is
> defined.

Don't forget the second part of that patch ;) Also I've verified cpqarray still
needs the queue plugging fixed in order to not deadlock here. The stopgap patch
I sent you the other day still works for now. I'll work up a better fix soon.

--Adam