From 6d2b2cedadbc417eee20f4c869757ebd33aa4e2f Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 17 Sep 2008 16:52:28 +0000 Subject: [PATCH] -Retry get channel authentication capabilities command without the IPMI 2.0 bit if the first one receives '0xCC'. The x336 BMC, for one, checks the values of the 'reserved' bits instead of ignoring them. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2188 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/ipmi.pm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 784e478ef..ab6cf052b 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -4259,6 +4259,34 @@ sub getchanauthcap { } $code = $response[20]; + if ($code == 0xcc) { + #Despite the fact that the IPMI 1.5 spec declared the high bits to be + #reserved, some 1.5 BMCs checked the value anyway (erroneously) + #This retries with the IPMI 2.0 bit cleared + @data = ($rqsa,$seqlun,0x38,0x0e,0x04); + @rn = ($rssa,$netfun); + $length = (scalar @data)+4; + + @msg = ( + @rmcp, + $auth, + @seqnum, + @session_id, + $length, + $rssa, + $netfun, + dochksum(\@rn), + @data, + dochksum(\@data) + ); + + ($error,@response) = domsg($sock,\@msg,$timeout,0); + + if($error) { + return($error); + } + $code = $response[20]; + } if($code != 0x00) { $error = $codes{$code}; if(!$error) {