Targets as a problem with editing FRUs (like ipmitool ....
fru edit 0 field b 0 "blahblah") where the header (multirecord area offset) is
not correctly updated.
It is supposed to modify the header offset to muti-record area if any of
the three previous areas has been edited.
Remark: this has to occur before the new header crc is calculated.
Thats the reson the modification is not close to the actual movement of the
data. Maybe it would be nicer to change the order in the code here. But
I do not want to add undesired behaviour, thus keeping a clear and small
patch.
"ipmitool sel add" always sets the Generator ID field of the generated SEL entry
to 0x0000.
Looking at the IPMI spec v2, §13.2, this is questionable. The value 0 would be
read as a HW-generated event from IPMB with slave address 0, which is the
broadcast or ["general call"]http://www.i2c-bus.org/addressing/ address.
The spec says that the Generator ID should be "Software ID if event was
generated from system software", and goes on to say that bit 0 should be set to
1 and bit 1-7 should be set to the Software ID for software-generated events.
SEL entries generated by ipmitool will usually be software-generated.
Out of the SWIDs defined in §5.5 of the IPMI spec, "System management Software"
or "OEM" would match ipmitool's use best, thus it would make sense to set the
generator ID field to 0x0041 or 0x0061. I am using 0x0041 here.
Signed-off-by: Martin Wilck <martin.wilck@ts.fujitsu.com>
Boards equipped with 'dumb' Intel MAC can do only SOL. IPMITool performs
several autodetection requests before initiating SOL, which are not
recognized by the boards. With each request retried 5 times it takes
about 30 seconds to establish SOL. This patch resolves the problem.
'picmg policy set' command uses too restrictive input values check
which allow setting/clearing only the Activation Locked Bit (#0).
This patch fixes the check to allow setting/clearing Deactivation
Locked Bit (#1) as well.
'picmg led cap' command expects FRU LED Capabilities response
length 5 bytes minimum (excluding the completion code byte),
while it is only 4 bytes long. This patch makes the command
expect 4 bytes instead.
Redundant call for find_lan_channel() for several 'lan' commands
produces misguiding error output. Those commands require expicit
specification of the channel number and calling to find_lan_channel()
for them is useless. For the rest 'lan' commands which allow
ommiting of the channels number, the find_lan_channel() is called
additionally.
Commit implements '-4' and '-6' switch in order to enforce IPv4 or IPv6
connection. In order to do so, struct ipmi_intf has been extended to carry
ai_family flag.
Editing a fru without resizing it caused the checksum being incorrect and not
being updated. This fix changes this, so the checksum is now being correctly
calculated and written to the right place.
The current USB plugin doesn't find my IPMI channel:
# ipmitool -I usb mc info
Error in USB session setup
Unable to setup interface usb
Error loading interface usb
This is beacuse I have more than 8 scsi-generic devices that identify
as AMI:
# grep -c ^AMI /proc/scsi/sg/device_strs
13
So we end up hitting the max in FindG2CDROM, and abort without finding
the actual IPMI endpoint (on my system, this is /dev/sg11).
This change bumps that maximum up to 16.
However, that means we hit another bug in scsiProbeNew, where if
we hit the end of the file without completely filling the array,
we return with an error. This change handles the EOF condition
gracefully instead.
Also, fp is never going to become NULL; we don't need to check for that
condition.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Commit adds a work-around for some BMCs which return ccode 0xCC when user is
disabled. However, this isn't reason to stop listing users as this ccode is
perceived as being "normal".
When 0xCC is returned, empty user name will be printed instead of bailing out.
... because people without VITA support don't care about errors related to VITA
discovery. This has been suggested as a part of the ticket and "copied" after
PICMG discovery.
This feature request is for adding support for USB Medium as an interface in
IPMITool. AMI BMC (OEM feature) provides Virtual USB devices in the host as
part of its feature list. IPMITool can use this 'Virtual USB device' as a
medium for Inband communication with BMC.
Just like any other interface, use can just give 'ipmitool -I usb xxxx' to
communicate with the BMC via USB Interface.
The 'bufLength' variable holds a constant chunk size. If the actual
data length is less than the 'bufLength', then it crashes IPMITool. The
code was already there to calculate the remaining data length, but was
not used in memcpy(). We changed it to use the 'count' variable which
holds the proper available data length.
Commit for: Viswanathan Swaminathan
Request/response matching for bridged and double-bridged requests is broken.
This patch reworks the sending and command construction code, and fixes the
response matching problems.
Since the polling code is retried several times, it was moved into a separate
function in order to make the code more readable.
Commit for: Dmitry Bazhenov
1. my_addr is not set if an interface does not expose set_my_addr.
Currently, the only interface which requires some special handling to set
my_addr is OpenIPMI. But changing of my_addr still needed for other interfaces.
So, we must set it regardless of presence of set_my_addr().
2. Since set_my_addr() for serial interfaces only sets my_addr, we remove them
as redundand.
3. Bridging is enabled when either trasit_addr or target_addr is not 0.
Currentle transit_addr is not regarded.
4. target_lun does not relate to briging. It is needed for "raw" command. We
set it regardles of bridging.
Commit for: Dmitry Bazhenov
When bridging is used (-t specifies an address which is different from 20h),
presession command must go to BMC_SLAVE_ADDR, not to target_addr.
BMC_SLAVE_ADDR is always used as the responder address in outer Send Message
request, when message is forwarded. Use the same approach for non-bridged
commands.
Commit for: Dmitry Bazhenov
When closing, LAN and LAN+ interfaces do not do proper cleaning of request
entries. Some pointers remain non NULL. This may cause bad memory references.
Commit for: Dmitry Bazhenov
Negative value returned by serial_read_line() function was not properly
recognized, since the storage type was unsigned. This caused ipmitool crash in
some sutuations. This patch fixes the problem.
Commit for: Dmitry Bazhenov
Return codes of functions should be either used or evaluated - always. This
merge is necessary for shell scripting to, eg. signal there was an error during
execution.
Currently, interface-management code in the ipmitool does not allow safe
interface re-opening (i.e. closing and opening again). It is because the session
is allocated in the interface setup callback while is freed in the close
callback. So, normal re-opening of the interface, which can be required for
example durng the HPM.1 upgrade, leads to segmentation fault. That's why in the
ipmi_hpmfwupg.c instead of normal closing interface, directly access the
interface data for subsequent re-opening.
Commit for Dmitry Bazhenov
In older GCC versions when an element in an anonymous unions/structures are
addressed by name, gcc must use -fms-extensions.
Change-Id: Id80617ad9336c7a02fbe613b58e3f337fa4baeee
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.xx.bhuvaragan@ericsson.com>