Skip to content

Commit

Permalink
Changes as sugested by loganfre
Browse files Browse the repository at this point in the history
  • Loading branch information
samhamilton committed Aug 8, 2013
1 parent 6f4aee6 commit 7c0e984
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
9 changes: 9 additions & 0 deletions dkms.conf
@@ -0,0 +1,9 @@
MAKE="make -C product/rr2680/linux/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="make -C product/rr2680/linux/ clean"
BUILT_MODULE_NAME=rr2680
DEST_MODULE_LOCATION=/kernel/drivers/scsi/
BUILT_MODULE_LOCATION=product/rr2680/linux/
PACKAGE_NAME=rr2680
PACKAGE_VERSION=1.8

This comment has been minimized.

Copy link
@lfreijo

lfreijo Aug 8, 2013

I used PACKAGE_VERSION=1.9

AUTOINSTALL=yes
REMAKE_INITRD=yes
4 changes: 2 additions & 2 deletions inc/linux_32mpa/Makefile.def
Expand Up @@ -73,8 +73,8 @@ ifndef KERNELDIR
KERNELDIR := /lib/modules/$(shell uname -r)/build
endif

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)
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)
KERNEL_VER := $(MAJOR).$(MINOR)

ifeq ($(KERNEL_VER),)
Expand Down
2 changes: 1 addition & 1 deletion osm/linux/os_linux.c
Expand Up @@ -213,7 +213,7 @@ void *os_kmap_sgptr(PSG psg)
void os_kunmap_sgptr(void *ptr)
{
if ((HPT_UPTR)ptr >= (HPT_UPTR)high_memory)
kunmap_atomic(ptr, HPT_KMAP_TYPE);
kunmap_atomic(ptr);
}
#else
void *os_kmap_sgptr(PSG psg) { return psg->addr._logical; }
Expand Down
6 changes: 3 additions & 3 deletions osm/linux/osm_linux.c
Expand Up @@ -479,16 +479,16 @@ static inline void scsicmd_buf_put(struct scsi_cmnd *cmd, void *buf)
#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);
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, HPT_KMAP_TYPE);
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, HPT_KMAP_TYPE);
kunmap_atomic((char *)buf - sg->offset);
#endif
}

Expand Down
1 change: 0 additions & 1 deletion osm/linux/osm_linux.h
Expand Up @@ -176,7 +176,6 @@ typedef void irqreturn_t;
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#define HPT_KMAP_TYPE KM_BIO_SRC_IRQ
#define HPT_FIND_PCI_DEVICE pci_get_device
#else
#define HPT_KMAP_TYPE KM_BH_IRQ
Expand Down

2 comments on commit 7c0e984

@lfreijo
Copy link

@lfreijo lfreijo commented on 7c0e984 Aug 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like what I did, only change is PACKAGE_VERSION=1.9 in dkms.conf

@lfreijo
Copy link

@lfreijo lfreijo commented on 7c0e984 Aug 8, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see another occurrence at 452 in osm_linux.c .

Please sign in to comment.