This patch fixes the platform location for hard disk. Now platform location
for hard disk is combined location of ses and physical location slot number.
signed-off-by: wenxiong@linux.vnet.ibm.com
This patch adds the support for optical devices and also fix some format
issues for 32 bit adapter GUI interfaces.
signed-off-by: wenxiong@linux.vnet.ibm.com
---
This patch implemented suspend/resume utility for BlueHawk drawer according to
BlueHawk Concurrent Maintenance Workbook. The patch included support for both
of GUI and command line interfaces.
Signed-off-by: wenxiong@linux.vnet.ibm.com
There is an issue with older kernel versions that iprconfig is not able
to delete a raid array. This patch fix the problem by sending a
START_STOP_STOP command before deleting the device.
Signed-off-by: wenxiong@linux.vnet.ibm.com
If a disk is a virtual ses disk inside power system, iprconfig can't report
correct physical location code for it. This patch fixed the issue.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
If SES page 4 is not supported on a system, the physical location
code of a drive can still be determined using information from page 7.
Page 7 specifies the location code from the planar down to the device
(i.e. "-Pn[-Cn]-Dn"). On PAPR platforms, the planar location label is
preceded only by the unit label (i.e. "Uxxxx.xxx.xxxxxxx-"). For
convenience, we determine the unit label by copying it from the
location label of the drive's I/O adapter. If the platform doesn't
support SES page 7 either, no location information is printed.
Note: the buffer length is 1 byte larger than it needs to be in
order to compensate for the fact that
ipr_strncpy_0(dest, src, length) actually writes length+1 bytes to
dest.
Signed-off-by: Jesse Larrew <jlarrew@linux.vnet.ibm.com>
In some situations, iprconfig can fail to change the IOA asymmetric access mode
if the saved mode in /etc/ipr/ config file is different than the current mode.
This patch removes the refusal to change the mode, keeping the warning message
when this inconsistency is detected.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
If add_string_to_body() is called when a non-interactive command is being run
it will fail to get the number of columns from the ncurses API. This issue
is currently affecting the reclaim cache CLI commands.
This patch fix this issue by using the TIOCGWINSZ ioctl to get the terminal
window size, and if it fails (e.g. on some console environments) the column
size is set to the default value of 80.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Function get_drive_phy_loc_with_ses_phy_loc() has a potential buffer overflow
when assembling a buffer with the physical location of drive and ses devices.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
The patch changed iprconfig's array delete logic. SCSI mid-layer will issue the
STOP UNIT on the device team down.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
When RAID arrays are created using the command line interface the array can
take a long time to be created since the state of the disks are not known.
This time can be shortened if the drives are formatted beforehand, however,
on the command line interface the information that the drives are known to be
zeroed can not be kept by the utility. This patch adds a "-z" flag to the
raid-create CLI command to inform the utility that the drives are known to be
zeroed.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
When updating the firmware of a SES device, the iprconfig CLI cannot get the
right version of the image file being used, causing the utility to show a wrong
version on the system log and report an error code even when the update actually
succeeded. The GUI update process works correctly.
This patch fixes this problem by calling the appropriate procedure when updating
SES devices to get the version from the image file.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
On some device configurations the microcode update of a SES device can fail
with the message:
Write buffer using sg device failed. rc=1, SK: 6 ASC: 29 ASCQ: 0
This error translates to Unit Attention, Device Bus Reset. This is a normal
response and this error need to be tolerated.
This patch retries the write buffer command for SES devices (currently 5
times).
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
This patch adds the chip details entries for CRoC-FPGA and CRoCodile-ASIC.
It also removes an unused entry for Scamp-E.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
The previous fix for the raid consistency check functionality wasn't quite
correct for the GUI version of the command. It incorrectly used the vset
record instead of the array record. This patch changes the code back to
using the array record.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
This patch fixes the issue if old drawers don't support query page 4 for
physical location, will display pci_address/bus/target/lun.
Signed-off-by : Wen Xiong <wenxiong@linux.vent.ibm.com>
This patch fixed the problem if the disk in a RAID, iprutils has to delete sysfs
name for secondary adapter.
Signed-off-by : Wen Xiong <wenxiong@linux.vent.ibm.com>
After updating adapter firmware, sometimes receive diag failed at the first time
since SES drawer is not ready yet. Basically this is a error path checking.
Signed-off-by : Wen Xiong <wenxiong@linux.vent.ibm.com>
The patch is added to support if customer follows the remove sequences but not
remove disk physically. iprutils will add it back automatically.
Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
This patch changes concurrent maintenance GUI to 3 ways toggler, also change
"platform location" as parameter for identify-slot/add-slot/remove-slot
commands.
Signed-off-by : Wen Xiong <wenxiong@linux.vent.ibm.com>
This patch updates queue depth values to the currently accepted values for
SAS JBOD disks and for arrays on 64 bit adapters.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
The raid consistency check routines need to use the array record in order to
work correctly. This patch fixes the routines to do the right thing.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
When an adapter gets reset the allow_restart flag gets set to "1" for
the attached arrays. This flag needs to be cleared before an array
can be deleted.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
The status of Advanced Function disks connected to a SIS64 adapter is always
displayed as 'Active', as well as for non-optimized RAID arrays. This patch sets
the status of non-optimized SIS64 disks to 'Remote' and non-optimized arrays to
'Non-Optimized'.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
On show_details() the function find_dev() is called twice in a row.
Removed the second unnecessary call.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
The ipr_is_hot_spare() function can potencially return false positives when
casting an ipr_array_record struct as an ipr_dev_record. This patch adds a
check to make sure the device struct is a device record before checking the
is_hot_spare flag.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Only present disks that are attached to the primary adapter as candidates for
the initialize and format operation.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
In testing with the Cubic-R adapter and Homerun storage drawer, we observed a
case where the call to ipr_query_command_status() from the get_status() routine
is returning more than 100 records.
The fix is to bump up the number of ipr_cmd_status_records to 250 for now.
Also, the num_records field is really 16 bits.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
This patch adds support for updating the FPGA and flash back DRAM images
on adapters that use them.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
Fix the ipr_cmd_status_record structure to include fields for
the SIS 64 adapters. Fix the for_each_cmd_status definition
such that it can handle boths types of records.
Change get_dev_from_addr so that it takes an ioa pointer as
an argument. This ensures that the correct (usually primary)
adapter is being used. Also include looking for vset records
in this routine. This will only be applicable for SIS 64
adapters.
Add a retry loop to raid_start_complete() around the section
where ipr_init_new_dev() is called. Then for a device of
TYPE_DISK, ipr_init_new_dev() will only call wait_for_dev()
if there is a device name available. Otherwise it will
return back to raid_start_complete() and retry after
another call to check_current_config.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
With the maximum number of devices attached to one of the new
SIS64 adapters, the configuration data can reach 182896 bytes.
The maximum size is caluculated by adding up the following:
1 header at 8 bytes
240 array records at 192 bytes
512 vset records at 192 bytes
240 device records at 160 bytes
1 capability header at 8 bytes
4 capability records at 24 bytes
8 + 240 * 192 + 512 * 192 + 240 * 160 + 8 + 4 * 24 = 182896
The fix is to bump up the size of IPR_QAC_BUFFER_SIZE to 200000,
which solves the problem and gives some room for any future growth.
IPR_SIS32_QAC_BUFFER_SIZE is defined with the old value of 16000 for
the legacy adapters.
Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
The command show-details doesn't show the correct information when the device
provided is an array. This patch makes the necessary changes to fix this issue.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>