Compilation for kernel 2.6.24

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@292 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Stanislaw Gruszka
2008-02-19 10:12:12 +00:00
parent d512dabf27
commit 0d9a7ade1a
4 changed files with 13 additions and 5 deletions

View File

@@ -350,7 +350,7 @@ static int isp_qlogic_ext_ioctl(struct inode *, struct file *, unsigned int, uns
dev_t isp_dev;
struct cdev isp_cdev = {
.kobj = { .name = ISP_NAME, } ,
.kobj = { .k_name = ISP_NAME, } ,
.owner = THIS_MODULE
};
ISP_CLASS *isp_class;

View File

@@ -544,7 +544,7 @@ isplinux_scsi_probe_done(Scsi_Cmnd *Cmnd)
} else {
struct scatterlist *sg;
sg = (struct scatterlist *) Cmnd->request_buffer;
iqd = page_address(sg->page) + sg->offset;
iqd = page_address(sg_page(sg)) + sg->offset;
}
sdp->isp_devparam[XS_TGT(Cmnd)].goal_flags &= ~(DPARM_TQING|DPARM_SYNC|DPARM_WIDE);
if (iqd[7] & 0x2) {
@@ -1826,7 +1826,7 @@ isp_lcl_respond(ispsoftc_t *isp, void *aep, tmd_cmd_t *tmd)
xact = &isp->isp_osinfo.auxinfo[i].xact;
dp = &isp->isp_osinfo.auxinfo[i].sg;
MEMZERO(dp, sizeof (*dp));
dp->page = virt_to_page(isp->isp_osinfo.inqdata);
sg_assign_page(dp, virt_to_page(isp->isp_osinfo.inqdata));
dp->offset = offset_in_page(isp->isp_osinfo.inqdata);
dp->length = DEFAULT_INQSIZE;

View File

@@ -183,6 +183,14 @@ typedef struct scsi_host_template Scsi_Host_Template;
#undef max
#endif
#ifndef DECLARE_MUTEX_LOCKED
#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
#define sg_page(_sg) ((_sg)->page)
#define sg_assign_page(_sg, _pg) ((_sg)->page = (_pg))
#endif
/*
* Normally this should be taken care of by typedefs,

View File

@@ -167,7 +167,7 @@ struct bus {
ini_t * list[HASH_WIDTH]; /* hash list of known initiators */
struct scst_tgt * scst_tgt;
hba_register_t * unreg_hp; /* help to synchronize low level and SCST unregistration */
int enable; /* is target mode enabled in low level driver, one bit per channel */
unsigned long enable; /* is target mode enabled in low level driver, one bit per channel */
int need_reg; /* before SCST registration */
struct tasklet_struct tasklet;
spinlock_t tmds_lock;
@@ -204,7 +204,7 @@ DECLARE_MUTEX_LOCKED(scsi_thread_entry_exit_semaphore);
static spinlock_t scsi_target_lock = SPIN_LOCK_UNLOCKED;
static int scsi_target_thread_exit = 0;
static int schedule_flags = 0;
static unsigned long schedule_flags = 0;
#define SF_ADD_INITIATORS 0
#define SF_REGISTER_SCST 1
#define SF_UNREGISTER_SCST 2