Re: megaraid2 compilation failure in 2.4

From: Matt Domsch
Date: Fri Oct 10 2003 - 07:59:32 EST


> cc -D__KERNEL__ -I/home/mroos/compile/linux-2.4/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2
> -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE
> -DMODVERSIONS -include /home/mroos/compile/linux-2.4/include/linux/modversions.h  -nostdinc -iwithprefix include
> -DKBUILD_BASENAME=megaraid2  -c -o megaraid2.o megaraid2.c
>
> megaraid2.c: In function `mega_find_card':
> megaraid2.c:403: error: structure has no member named `lock'

Looks like the "no host lock" patch didn't get submitted/applied. 2.4.x stock
still uses io_request_lock. Thanks for catching this.
ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-2.00.9/megaraid-2009-wo-hostlock.patch.gz
ftp://ftp.lsil.com/pub/linux-megaraid/drivers/version-2.00.9/megaraid-2009-wo-hostlock.patch.gz.sig
has the patch to switch it back to using io_request_lock:

diff -Naur linux/drivers/scsi/megaraid2.c linux/drivers/scsi/megaraid2.c
--- linux/drivers/scsi/megaraid2.c 2003-09-09 15:31:43.000000000 -0400
+++ linux/drivers/scsi/megaraid2.c 2003-09-09 15:32:03.000000000 -0400
@@ -398,9 +398,7 @@
// replace adapter->lock with io_request_lock for kernels w/o
// per host lock and delete the line which tries to initialize
// the lock in host structure.
- adapter->host_lock = &adapter->lock;
-
- host->lock = adapter->host_lock;
+ adapter->host_lock = &io_request_lock;

host->cmd_per_lun = max_cmd_per_lun;
host->max_sectors = max_sectors_per_io;



> megaraid2.c:618: warning: integer constant is too large for "long" type

/* Set the Mode of addressing to 64 bit if we can */
if((adapter->flag & BOARD_64BIT)&&(sizeof(dma_addr_t) == 8)) {
pci_set_dma_mask(pdev, 0xffffffffffffffff);
adapter->has_64bit_addr = 1;

Aside from missing the ULL piece on the end, this is expected when dma_addr_t is 32 bits, so it's harmless.

Thanks,
Matt

--
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/