GetPayloadVerCmd:Fix ErrCode IncorrectPayloadType

The error code 0x82 is returned for session less channels in
Get Payload Version command. The correct error code is
0x80 Payload type not available on given channel.

Tested:
Channels configured as multi-session:
The channels 1,2,3,4 are configurated for LAN ports (eth0-3).

Channels configured as session-less:
The channel 0 for IPMB, channel 8 for INTRABMC and
channel 0xf for system interface

Case 1: Response for session less channels 0,8 and 0xf

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x00 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                              cmd=0x4f rsp=0x80): Unknown (0x80)

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x08 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                              cmd=0x4f rsp=0x80): Unknown (0x80)

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x0f 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                              cmd=0x4f rsp=0x80): Unknown (0x80)

Case 2: Response for channels 1,2,3,4 (LAN) and 0xE (Present I/F)

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x01 0x00
Response: 10

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x02 0x00
Response:  10

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x03 0x00
Response:  10

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x04 0x00
Response:  10

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x0E 0x00
Response:  10

Case 3: Response for unconfigured channels 5,6,7,9,0xA,0xB,0xC and 0xD

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x05 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                    cmd=0x4f rsp=0xcc): Invalid data field in request

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x06 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                    cmd=0x4f rsp=0xcc): Invalid data field in request

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x07 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                    cmd=0x4f rsp=0xcc): Invalid data field in request

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x09 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                    cmd=0x4f rsp=0xcc): Invalid data field in request

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x0a 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                    cmd=0x4f rsp=0xcc): Invalid data field in request

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x0b 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                    cmd=0x4f rsp=0xcc): Invalid data field in request

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x0c 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                    cmd=0x4f rsp=0xcc): Invalid data field in request

Command: ipmitool -I lanplus -H <BMC IP> -U <user> -P <passwd> -C 17
                              raw 0x06 0x4F 0x0d 0x00
Response: Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0
                    cmd=0x4f rsp=0xcc): Invalid data field in request

Signed-off-by: Manoj Ashok <amanoj@ami.com>
Change-Id: Ib0a57bc007194620f8a12a5f30512265c011f85e
1 file changed