I have just been through this same issue and finally have it resolved. I will try to outline all the steps required, but if I miss one I apologize.
To start off all of the answers can be found by following the errors in the make.log, but for a novice (like myself) the log is quite confusing. I started by following this guide which worked on previous versions of Ubuntu Server. The first thing that must be corrected is the location of version.h. This is found in this error:
Code:
grep: /lib/modules/3.8.0-25-generic/build/include/linux/version.h: No such file or directory
This issue is referred to here. To correct this change the following in /usr/src/rr2680-1.9/inc/linux_32mpa/Makefile.def
Change this:
Code:
MAJOR := $(shell expr `grep LINUX_VERSION_CODE $(KERNELDIR)/include/linux/version.h | cut -d\ -f3` / 65536 % 65536)
MINOR := $(shell expr `grep LINUX_VERSION_CODE $(KERNELDIR)/include/linux/version.h | cut -d\ -f3` / 256 % 256)
To this:
Code:
MAJOR := $(shell expr `grep LINUX_VERSION_CODE $(KERNELDIR)/include/generated/uapi/linux/version.h | cut -d\ -f3` / 65536 % 65536)
MINOR := $(shell expr `grep LINUX_VERSION_CODE $(KERNELDIR)/include/generated/uapi/linux/version.h | cut -d\ -f3` / 256 % 256)
Next we get these errors:
Code:
/var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c: In function ‘scsicmd_buf_get’:
/var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:452:39: error: ‘KM_BIO_SRC_IRQ’ undeclared (first use in this function)
/var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:452:39: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/rr2680/1.9/build/product/rr2680/linux/.build/osm_linux.c:452:2: error: too many arguments to function ‘kmap_atomic’
I found an indirect solution on a website that I have forgotten, that refereed to a different card. In this case the main issue is with 'kmap_atomic' which is a kernel function that has changed the number of parameters that it takes. It used to take two now it takes one, hence the error. The solution is remove the second parameter from all instances of this function. Luckily this seems to be unneeded as all occurrences have the constant 'HPT_KMAP_TYPE' as the second parameter. Here are the changes:
In /usr/src/rr2680-1.9/osm/linux/osm_linux.c change these lines:
Code:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
struct scatterlist *sg;
sg = scsi_sglist(cmd);
kunmap_atomic((char *)buf - sg->offset, HPT_KMAP_TYPE);
#else
if (cmd->use_sg) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
kunmap_atomic((char *)buf - ((struct scatterlist *)cmd->request_buffer)->offset, HPT_KMAP_TYPE);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
struct scatterlist *sg = (struct scatterlist *) cmd->request_buffer;
if (sg->page)
kunmap_atomic((char *)buf - sg->offset, HPT_KMAP_TYPE);
To this:
Code:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
struct scatterlist *sg;
sg = scsi_sglist(cmd);
kunmap_atomic((char *)buf - sg->offset);
#else
if (cmd->use_sg) {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
kunmap_atomic((char *)buf - ((struct scatterlist *)cmd->request_buffer)->offset);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,18)
struct scatterlist *sg = (struct scatterlist *) cmd->request_buffer;
if (sg->page)
kunmap_atomic((char *)buf - sg->offset);
Then in /usr/src/rr2680-1.9/osm/linux/os_linux.c
Code:
kunmap_atomic(ptr, HPT_KMAP_TYPE);
To this:
Code:
kunmap_atomic(ptr);
Finally just for good measure I removed this line from /usr/src/rr2680-1.9/osm/linux/osm_linux.h
Code:
#define HPT_KMAP_TYPE KM_BIO_SRC_IRQ
After that just build and install and you are all set. Like I said at the beginning I may have missed a step, but I believe this is all that must be changed. Once you have it all sorted out, make sure you keep a copy of all the files in /usr/src/rr2680-1.9 so you won't have to go through this the next time you upgrade.
Bookmarks