Commit graph

323 commits

Author SHA1 Message Date
Wen Xiong
eea97da1c4 iprutils: fix_for_lsvpd_disk_location
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
2012-10-24 09:57:35 -05:00
Wen Xiong
8e137ae057 iprutils: fix platform location for disk
This patch fixes the plaform location for hard disk.

signed-off-by: wenxiong@linux.vnet.ibm.com
2012-09-25 12:06:54 -05:00
Wen Xiong
a2054cecc1 iprutils: Add the support for optical devices.
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
2012-09-16 19:23:25 -05:00
Wen Xiong
4cc0564e70 iprutils: Platform Location Fix for 32bit adapter
This patch fixes "Platform Location" for 32bit adapter.

Signed-off-by: wenxiong@linux.vnet.ibm.com
2012-09-13 12:31:38 -05:00
Wen Xiong
44607dc8d7 iprutils: Update version information for 2.3.12 release
Update version information for 2.3.12 release.

Signed-off-by: wenxiong@linux.vnet.ibm.com
2012-09-05 14:26:57 -05:00
Wen Xiong
f2f6944780 iprutils: suspend/resume utility for BlueHawk
---

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
2012-09-05 14:21:40 -05:00
Kleber Sacilotto de Souza
8b3fa7e1ae iprutils: Fix raid array delete
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
2012-07-25 16:14:12 -03:00
Kleber Sacilotto de Souza
37690cdc9d iprutils: update the version information for the 2.3.11 release
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
2012-06-12 14:48:02 -03:00
Wen Xiong
babc930efc iprutils: Fix physical location error if disk is vses disk.
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>
2012-06-12 14:36:47 -03:00
Jesse Larrew
86412f593d iprconfig: get location code when SES page 4 is unavailable
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>
2012-06-12 12:17:31 -03:00
Kleber Sacilotto de Souza
fa41364175 iprutils: fix IOA asymmetric access mode change
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>
2012-06-12 11:45:06 -03:00
Kleber Sacilotto de Souza
271477f0b4 iprutils: fix add_string_to_body() for non-interactive interface
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>
2012-06-12 11:44:26 -03:00
Wen Xiong
aabd94611a Fix wrong status on an array for the secondary controller. 2012-06-07 08:23:42 -05:00
Wen Xiong
bc1cc0af76 iprutils: fix buffer overflow in disk details
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>
2012-05-31 09:08:03 -03:00
Wen Xiong
a04fea567c iprutils: fix deleting an array logs I/O errors.
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>
2012-05-15 11:47:37 -03:00
Kleber Sacilotto de Souza
8c94ac7a4f iprutils: update the version information for the 2.3.10 release
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
2012-04-02 16:58:23 -03:00
Kleber Sacilotto de Souza
0ba5480aed iprutils: add a flag to raid create command for known zeroed drives
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>
2012-04-02 16:48:25 -03:00
Kleber Sacilotto de Souza
c01c06ef7b iprutils: fix SES microcode image version on CLI
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>
2012-04-02 16:47:48 -03:00
Kleber Sacilotto de Souza
e58916871b iprutils: fix SES microcode update failures
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>
2012-04-02 16:47:28 -03:00
Wayne Boyer
da1bc02ae8 iprutils: add new chip details entries
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>
2012-04-02 16:43:45 -03:00
Wayne Boyer
0340e527ab iprutils: fix GUI version of raid consistency check
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>
2012-04-02 16:42:35 -03:00
Wen Xiong
385045c6fe iprutils: Add display sas path detail for 64bit adapter.
The patch added display sas path detail for 64bit adapter.

Signed-off-by : Wen Xiong <wenxiong@linux.vent.ibm.com>
2012-04-02 16:36:59 -03:00
Wen Xiong
b22375dee4 iprutils: Old drawers don't support query page 4 for physical location
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>
2012-04-02 16:35:58 -03:00
Wen Xiong
e95329be85 iprutils: If the disk in a RAID, iprutils itself has to delete sysfs name for secondary adapter.
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>
2012-04-02 16:35:06 -03:00
Wen Xiong
1bf6f84d72 iprutils: Sometimes receive diag failed at first time after update adapter firmware.
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>
2012-04-02 16:34:10 -03:00
Wen Xiong
bb8999073b iprutils: Fix header problem when query-remove/add-device
This patch fixed the header probelm when query-remove/add-device in iprconfig
command lines.

Signed-off-by : Wen Xiong <wenxiong@linux.vent.ibm.com>
2012-04-02 16:33:29 -03:00
Wen Xiong
b9877ba149 iprutils: Support not physical remove disk.
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>
2012-04-02 16:32:34 -03:00
Wen Xiong
a2192d0d5d iprutils: Support concurrent maintenance for 64bit adapter.
Add support concurrent maintenance for 64bit adapter.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
2012-04-02 16:31:46 -03:00
Wen Xiong
9fe38d5e6a iprutils: Fix a bug in suspend/resume device bus.
Fix a bug in suspend/resume device bus.

Signed-off-by : Wen Xiong <wenxiong@linux.vent.ibm.com>
2012-04-02 16:30:18 -03:00
Wen Xiong
b8acef1e54 iprutils: Add structures and functions for query resource paths aliases
Add query resource pathes aliases for 64bit adapter.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
2012-04-02 16:29:35 -03:00
Wen Xiong
efecaa8423 iprutils: Change README for concurrent maintenance command line
This patch updates README for cocurrent maintenance command lines-
identify-slot/add-slot/remove-slot.

Signed-off-by : Wen Xiong <wenxiong@linux.vent.ibm.com>
2012-04-02 16:28:52 -03:00
Wen Xiong
940b568c65 iprutils: Change concurrent maintenance GUI to 3 ways toggle
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>
2012-04-02 16:28:04 -03:00
Wen Xiong
240b13966b iprutils: Display Hardware Location Code for disk/expander
Add to disply hardware location code when display hardware status
for disk/expander.

Signed-off-by : Wen Xiong <wenxiong@linux.vent.ibm.com>
2012-04-02 16:24:50 -03:00
Kleber Sacilotto de Souza
ebd1142d30 iprutils: update the version information for the 2.3.9 release
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
2011-12-16 12:17:01 -02:00
Wayne Boyer
66c8db9e97 iprutils: update queue depth values
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>
2011-12-16 12:08:41 -02:00
Wayne Boyer
876b294062 iprutils: fix compile warning
Fix a compile warning and clean up some screen_driver calls.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
2011-12-16 12:06:23 -02:00
Wayne Boyer
8f48451085 iprutils: fix raid consistency check for 64 bit adapters
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>
2011-12-16 12:05:33 -02:00
Wayne Boyer
2eec0959a4 iprutils: set allow_restart to zero before raid delete
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>
2011-12-16 12:04:30 -02:00
Wayne Boyer
9fbb440872 iprutils: use C4 inquiry page for DRAM size
If the C4 inquiry page is available use that for the DRAM size.

Signed-off-by: Wayne Boyer <wayneb@linux.vnet.ibm.com>
2011-12-16 12:01:35 -02:00
Kleber Sacilotto de Souza
d52d46aef1 iprutils: fix disks and arrays status
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>
2011-12-16 11:55:44 -02:00
Kleber Sacilotto de Souza
ea98944a9a iprutils: update the version information for the 2.3.8 release
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
2011-11-24 14:45:52 -02:00
Kleber Sacilotto de Souza
a7317765ab iprutils: remove unnecessary call to find_dev()
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>
2011-11-24 14:39:32 -02:00
Kleber Sacilotto de Souza
1b23b72223 iprutils: fix check for hotspare devices
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>
2011-11-24 14:38:37 -02:00
Wayne Boyer
d0a996f9f2 iprutils: only use primary adapter for initialize and format disk task
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>
2011-11-24 14:36:40 -02:00
Wayne Boyer
5d85405313 iprutils: bump up number of command status records
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>
2011-11-24 14:34:25 -02:00
Wayne Boyer
2299307b34 iprutils: add support for FPGA updates
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>
2011-11-24 14:32:40 -02:00
Kleber Sacilotto de Souza
a1bcd6711b iprutils: update the version information for the 2.3.7 release 2011-08-18 21:41:48 -03:00
Wayne Boyer
059dedc48f iprutils: fix query command status functionality
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>
2011-08-18 21:35:41 -03:00
Wayne Boyer
a0a3e991d5 iprutils: increase buffer size for new adapter config data
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>
2011-08-18 21:35:24 -03:00
Kleber Sacilotto de Souza
df182ee2c7 iprutils: fix display details for array devices
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>
2011-08-18 21:33:53 -03:00