Make qla2x00t cleanly compile on RHEL 6.2 (merge r4303 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@5034 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-10-05 17:30:11 +00:00
parent 4c535bc499
commit 85c4e7cf02
2 changed files with 30 additions and 16 deletions

View File

@@ -543,7 +543,7 @@ static DEVICE_ATTR(port_database,
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_read_fw_dump(
#else
qla2x00_sysfs_read_fw_dump(struct file *file,
@@ -571,7 +571,7 @@ qla2x00_sysfs_read_fw_dump(struct file *file,
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_write_fw_dump(
#else
qla2x00_sysfs_write_fw_dump(struct file *file,
@@ -631,7 +631,7 @@ static struct bin_attribute sysfs_fw_dump_attr = {
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_read_nvram(
#else
qla2x00_sysfs_read_nvram(struct file *file,
@@ -661,7 +661,7 @@ qla2x00_sysfs_read_nvram(struct file *file,
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_write_nvram(
#else
qla2x00_sysfs_write_nvram(struct file *file,
@@ -723,7 +723,7 @@ static struct bin_attribute sysfs_nvram_attr = {
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_read_optrom(
#else
qla2x00_sysfs_read_optrom(struct file *file,
@@ -750,7 +750,7 @@ qla2x00_sysfs_read_optrom(struct file *file,
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_write_optrom(
#else
qla2x00_sysfs_write_optrom(struct file *file,
@@ -787,7 +787,7 @@ static struct bin_attribute sysfs_optrom_attr = {
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_write_optrom_ctl(
#else
qla2x00_sysfs_write_optrom_ctl(struct file *file,
@@ -946,7 +946,7 @@ static struct bin_attribute sysfs_optrom_ctl_attr = {
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_read_vpd(
#else
qla2x00_sysfs_read_vpd(struct file *file,
@@ -976,7 +976,7 @@ qla2x00_sysfs_read_vpd(struct file *file,
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_write_vpd(
#else
qla2x00_sysfs_write_vpd(struct file *file,
@@ -1011,7 +1011,7 @@ static struct bin_attribute sysfs_vpd_attr = {
static ssize_t
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_read_sfp(
#else
qla2x00_sysfs_read_sfp(struct file *file,
@@ -1100,7 +1100,14 @@ qla2x00_wait_for_passthru_completion(struct scsi_qla_host *ha)
}
static ssize_t
qla2x00_sysfs_read_ct(struct kobject *kobj,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_read_ct(
#else
qla2x00_sysfs_read_ct(struct file *file,
#endif
struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf,
loff_t off, size_t count)
@@ -1123,7 +1130,14 @@ qla2x00_sysfs_read_ct(struct kobject *kobj,
}
static ssize_t
qla2x00_sysfs_write_ct(struct kobject *kobj,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
qla2x00_sysfs_write_ct(
#else
qla2x00_sysfs_write_ct(struct file *file,
#endif
struct kobject *kobj,
struct bin_attribute *bin_attr,
char *buf,
loff_t off, size_t count)

View File

@@ -153,7 +153,7 @@ static int qla2xxx_eh_host_reset(struct scsi_cmnd *);
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) && \
!defined(CONFIG_SUSE_KERNEL) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
static int qla2x00_change_queue_depth(struct scsi_device *, int);
#else
static int qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth,
@@ -1208,7 +1208,7 @@ qla2xxx_slave_destroy(struct scsi_device *sdev)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) && \
!defined(CONFIG_SUSE_KERNEL) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2))
static int
qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth)
@@ -1217,7 +1217,7 @@ qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth)
return sdev->queue_depth;
}
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) && !defined(CONFIG_SUSE_KERNEL) && (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) */
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) && !defined(CONFIG_SUSE_KERNEL) && (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2)) */
static void qla2x00_handle_queue_full(struct scsi_device *sdev, int qdepth)
{
@@ -1270,7 +1270,7 @@ qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
return sdev->queue_depth;
}
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) && !defined(CONFIG_SUSE_KERNEL) && (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) */
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) && !defined(CONFIG_SUSE_KERNEL) && (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 2)) */
static int
qla2x00_change_queue_type(struct scsi_device *sdev, int tag_type)