From: Neerav Parikh <[email protected]> The HBA API Port Attributes like PortSpeed and PortSupportedSpeed are expected to be bitmasks. But, if for example a given port's supported speeds are 1 Gbit and 10 Gbit then the value for the PortSupportedSpeed comes out as "5" that is currently being used for HBA_PORTSPEED_NOT_NEGOTIATED.
As per the common HBA API Specification Phase 2 the value for the HBA_PORTSPEED_NOT_NEGOTIATED is defined as 1<<15. This patch is to update the HBA_PORTSPEED_NOT_NEGOTIATED value as per specification. Signed-off-by: Neerav Parikh <[email protected]> Tested-by: Ross Brattain <[email protected]> --- Makefile.am | 3 ++- hbaapi2.2.patch | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index 704031d..e5ef066 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,10 +12,11 @@ dist_sysconf_DATA = hba.conf dist_noinst_DATA = HBAAPILIB.c HBAAPI.pc.in libHBAAPI.spec hbaapi2.2.patch hbaapilib.c: ${srcdir}/HBAAPILIB.c ${srcdir}/hbaapi2.2.patch + patch < hbaapi2.2.patch cp ${srcdir}/HBAAPILIB.c $@ - patch $@ < ${srcdir}/hbaapi2.2.patch clean-local: + -patch -R -N -r - < hbaapi2.2.patch -rm -f hbaapilib.c -if [ ${abs_srcdir} != ${abs_builddir} ]; then \ rm -f hba.conf; \ diff --git a/hbaapi2.2.patch b/hbaapi2.2.patch index 706ac34..9c9e5a8 100644 --- a/hbaapi2.2.patch +++ b/hbaapi2.2.patch @@ -149,3 +149,11 @@ sizeof(HBA_ADAPTERCALLBACK_ELEM)); #endif RELEASE_MUTEX_RETURN(&_hbaapi_LL_mutex, HBA_STATUS_ERROR); +--- ./hbaapi.h 2011-05-19 10:34:37.429915878 -0700 ++++ ./hbaapi.h 2011-05-19 10:36:47.658915907 -0700 +@@ -234,7 +234,7 @@ + #define HBA_PORTSPEED_1GBIT 1 /* 1 GBit/sec */ + #define HBA_PORTSPEED_2GBIT 2 /* 2 GBit/sec */ + #define HBA_PORTSPEED_10GBIT 4 /* 10 GBit/sec */ +-#define HBA_PORTSPEED_NOT_NEGOTIATED 5 /* Speed not established */ ++#define HBA_PORTSPEED_NOT_NEGOTIATED (1 << 15) /* Speed not established */ _______________________________________________ devel mailing list [email protected] https://lists.open-fcoe.org/mailman/listinfo/devel
