From: <bva...@us...> - 2012-07-29 16:47:04
|
Revision: 4442 http://scst.svn.sourceforge.net/scst/?rev=4442&view=rev Author: bvassche Date: 2012-07-29 16:46:58 +0000 (Sun, 29 Jul 2012) Log Message: ----------- qla2x00t: Port to RHEL 6.1/6.2/6.3 (merge r4303 and r4419 from trunk) Revision Links: -------------- http://scst.svn.sourceforge.net/scst/?rev=4303&view=rev http://scst.svn.sourceforge.net/scst/?rev=4419&view=rev Modified Paths: -------------- branches/2.2.x/qla2x00t/qla_attr.c branches/2.2.x/qla2x00t/qla_os.c Property Changed: ---------------- branches/2.2.x/qla2x00t/ Property changes on: branches/2.2.x/qla2x00t ___________________________________________________________________ Modified: svn:mergeinfo - /trunk/qla2x00t:3583,3910,4099-4101,4311,4380,4418,4420 + /trunk/qla2x00t:3583,3910,4099-4101,4303,4311,4380,4418-4420 Modified: branches/2.2.x/qla2x00t/qla_attr.c =================================================================== --- branches/2.2.x/qla2x00t/qla_attr.c 2012-07-29 16:28:23 UTC (rev 4441) +++ branches/2.2.x/qla2x00t/qla_attr.c 2012-07-29 16:46:58 UTC (rev 4442) @@ -14,6 +14,10 @@ #include "qla2x_tgt.h" #include <linux/ctype.h> +#ifndef RHEL_RELEASE_VERSION +#define RHEL_RELEASE_VERSION(maj, min) 0 +#endif + static int qla24xx_vport_disable(struct fc_vport *, bool); /* SYSFS attributes --------------------------------------------------------- */ @@ -537,7 +541,9 @@ #endif /* CONFIG_SCSI_QLA2XXX_TARGET */ static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_read_fw_dump( #else qla2x00_sysfs_read_fw_dump(struct file *file, @@ -563,7 +569,9 @@ } static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_write_fw_dump( #else qla2x00_sysfs_write_fw_dump(struct file *file, @@ -621,7 +629,9 @@ }; static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_read_nvram( #else qla2x00_sysfs_read_nvram(struct file *file, @@ -649,7 +659,9 @@ } static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_write_nvram( #else qla2x00_sysfs_write_nvram(struct file *file, @@ -709,7 +721,9 @@ }; static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_read_optrom( #else qla2x00_sysfs_read_optrom(struct file *file, @@ -734,7 +748,9 @@ } static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_write_optrom( #else qla2x00_sysfs_write_optrom(struct file *file, @@ -769,7 +785,9 @@ }; static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_write_optrom_ctl( #else qla2x00_sysfs_write_optrom_ctl(struct file *file, @@ -926,7 +944,9 @@ }; static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_read_vpd( #else qla2x00_sysfs_read_vpd(struct file *file, @@ -954,7 +974,9 @@ } static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_write_vpd( #else qla2x00_sysfs_write_vpd(struct file *file, @@ -987,7 +1009,9 @@ }; static ssize_t -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 1)) qla2x00_sysfs_read_sfp( #else qla2x00_sysfs_read_sfp(struct file *file, Modified: branches/2.2.x/qla2x00t/qla_os.c =================================================================== --- branches/2.2.x/qla2x00t/qla_os.c 2012-07-29 16:28:23 UTC (rev 4441) +++ branches/2.2.x/qla2x00t/qla_os.c 2012-07-29 16:46:58 UTC (rev 4442) @@ -20,6 +20,10 @@ #include "qla2x_tgt.h" +#ifndef RHEL_RELEASE_VERSION +#define RHEL_RELEASE_VERSION(maj, min) 0 +#endif + /* * Driver version */ @@ -143,7 +147,10 @@ static int qla2xxx_eh_bus_reset(struct scsi_cmnd *); static int qla2xxx_eh_host_reset(struct scsi_cmnd *); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) && !defined(CONFIG_SUSE_KERNEL) +#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)) static int qla2x00_change_queue_depth(struct scsi_device *, int); #else static int qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth, @@ -1195,7 +1202,10 @@ sdev->hostdata = NULL; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) && !defined(CONFIG_SUSE_KERNEL) +#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)) static int qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth) @@ -1204,7 +1214,7 @@ return sdev->queue_depth; } -#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) */ +#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)) */ static void qla2x00_handle_queue_full(struct scsi_device *sdev, int qdepth) { @@ -1257,7 +1267,7 @@ return sdev->queue_depth; } -#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) && !defined(CONFIG_SUSE_KERNEL) */ +#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)) */ static int qla2x00_change_queue_type(struct scsi_device *sdev, int tag_type) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |