- Removed mention of primary/secondary adapters in some error
screens since multi-initiator RAID is not supported and the messages will just cause confusion. - iprconfig: During disk hotplug, wait for sd devices to show up. Fixes errors getting logged by iprconfig during hotplug. - iprconfig: Fix cancel path on concurrent add/remove of disks - Don't display current bus width and speed for SAS disks - Fix scoping bug caught by gcc 4.0. - Stop iprupdate from continually logging errors for adapters with backlevel adapter firmware.
This commit is contained in:
parent
29d900e27e
commit
4c5eeb2ffc
7 changed files with 109 additions and 77 deletions
68
iprconfig.c
68
iprconfig.c
|
|
@ -1853,15 +1853,18 @@ static char *disk_details(char *body, struct ipr_dev *dev)
|
|||
rc = ipr_query_resource_state(dev, &res_state);
|
||||
|
||||
if (!rc) {
|
||||
if (ntohl(res_state.gscsi.data_path_width) == 16)
|
||||
body = add_line_to_body(body, _("Wide Enabled"), _("Yes"));
|
||||
else
|
||||
body = add_line_to_body(body, _("Wide Enabled"), _("No"));
|
||||
sprintf(buffer, "%d MB/s",
|
||||
(ntohl(res_state.gscsi.data_xfer_rate) *
|
||||
ntohl(res_state.gscsi.data_path_width))/(10 * 8));
|
||||
if (res_state.gscsi.data_xfer_rate != 0xffffffff)
|
||||
body = add_line_to_body(body, _("Current Bus Throughput"), buffer);
|
||||
if (is_spi(dev->ioa)) {
|
||||
if (ntohl(res_state.gscsi.data_path_width) == 16)
|
||||
body = add_line_to_body(body, _("Wide Enabled"), _("Yes"));
|
||||
else
|
||||
body = add_line_to_body(body, _("Wide Enabled"), _("No"));
|
||||
|
||||
sprintf(buffer, "%d MB/s",
|
||||
(ntohl(res_state.gscsi.data_xfer_rate) *
|
||||
ntohl(res_state.gscsi.data_path_width))/(10 * 8));
|
||||
if (res_state.gscsi.data_xfer_rate != 0xffffffff)
|
||||
body = add_line_to_body(body, _("Current Bus Throughput"), buffer);
|
||||
}
|
||||
}
|
||||
|
||||
body = add_line_to_body(body, "", NULL);
|
||||
|
|
@ -3108,7 +3111,7 @@ int raid_start_complete()
|
|||
ipr_dev = get_dev_from_handle(status_record->resource_handle);
|
||||
if ((ipr_dev) && (ipr_dev->scsi_dev_data)) {
|
||||
device_available = 1;
|
||||
ipr_init_dev(ipr_dev);
|
||||
ipr_init_new_dev(ipr_dev);
|
||||
if (ipr_get_dev_attr(ipr_dev, &attr)) {
|
||||
syslog(LOG_ERR, _("Unable to read queue_depth"));
|
||||
} else {
|
||||
|
|
@ -4666,30 +4669,34 @@ int process_conc_maint(i_container *i_con, int action)
|
|||
if (!rc) {
|
||||
if (action == IPR_VERIFY_CONC_REMOVE) {
|
||||
rc = process_conc_maint(i_con, IPR_WAIT_CONC_REMOVE);
|
||||
dev_rcd = ipr_dev->dev_rcd;
|
||||
getmaxyx(stdscr,max_y,max_x);
|
||||
move(max_y-1,0);
|
||||
printw(_("Operation in progress - please wait"));
|
||||
refresh();
|
||||
if (!rc) {
|
||||
dev_rcd = ipr_dev->dev_rcd;
|
||||
getmaxyx(stdscr,max_y,max_x);
|
||||
move(max_y-1,0);
|
||||
printw(_("Operation in progress - please wait"));
|
||||
refresh();
|
||||
|
||||
ipr_write_dev_attr(ipr_dev, "delete", "1");
|
||||
evaluate_device(ipr_dev, ipr_dev->ioa, 0);
|
||||
ipr_del_zeroed_dev(ipr_dev);
|
||||
ipr_write_dev_attr(ipr_dev, "delete", "1");
|
||||
evaluate_device(ipr_dev, ipr_dev->ioa, 0);
|
||||
ipr_del_zeroed_dev(ipr_dev);
|
||||
}
|
||||
} else if (action == IPR_VERIFY_CONC_ADD) {
|
||||
rc = process_conc_maint(i_con, IPR_WAIT_CONC_ADD);
|
||||
getmaxyx(stdscr,max_y,max_x);
|
||||
move(max_y-1,0);
|
||||
printw(_("Operation in progress - please wait"));
|
||||
refresh();
|
||||
ipr_scan(ioa, res_addr.bus, res_addr.target, res_addr.lun);
|
||||
if (!rc) {
|
||||
getmaxyx(stdscr,max_y,max_x);
|
||||
move(max_y-1,0);
|
||||
printw(_("Operation in progress - please wait"));
|
||||
refresh();
|
||||
ipr_scan(ioa, res_addr.bus, res_addr.target, res_addr.lun);
|
||||
|
||||
while (time--) {
|
||||
check_current_config(false);
|
||||
if ((ipr_dev = get_dev_from_addr(&res_addr))) {
|
||||
ipr_init_dev(ipr_dev);
|
||||
break;
|
||||
while (time--) {
|
||||
check_current_config(false);
|
||||
if ((ipr_dev = get_dev_from_addr(&res_addr))) {
|
||||
ipr_init_new_dev(ipr_dev);
|
||||
break;
|
||||
}
|
||||
sleep(5);
|
||||
}
|
||||
sleep(5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5189,8 +5196,7 @@ static int dev_init_complete(u8 num_devs)
|
|||
if (!dev->do_init)
|
||||
continue;
|
||||
|
||||
ioa = dev->ioa
|
||||
;
|
||||
ioa = dev->ioa;
|
||||
if (dev->new_block_size != ioa->af_block_size && ipr_is_gscsi(dev->dev)) {
|
||||
ipr_write_dev_attr(dev->dev, "rescan", "1");
|
||||
ipr_init_dev(dev->dev);
|
||||
|
|
|
|||
18
iprconfig.h
18
iprconfig.h
|
|
@ -304,8 +304,6 @@ s_node n_raid_stop_fail = {
|
|||
"reported to the system. Retry the operation.\n"),
|
||||
__("o The disks are missing.\n"),
|
||||
__("o The disks are currently in use.\n"), /* xxx? */
|
||||
__("o You attempting to perform this operation on a secondary IOA. "
|
||||
"Retry the operation on the primary IOA.\n"),
|
||||
"" }
|
||||
};
|
||||
|
||||
|
|
@ -358,8 +356,6 @@ s_node n_raid_start_fail = {
|
|||
__("o Not all disks attached to an advanced function IOA have "
|
||||
"reported to the system. Retry the operation.\n"),
|
||||
__("o The disks are missing.\n"),
|
||||
__("o You attempting to perform this operation on a secondary IOA. "
|
||||
"Retry the operation on the primary IOA.\n"),
|
||||
"" }
|
||||
};
|
||||
|
||||
|
|
@ -423,8 +419,6 @@ s_node n_raid_include_fail = {
|
|||
__("o Not all disks attached to an advanced function IOA have"
|
||||
"reported to the system. Retry the operation.\n"),
|
||||
__("o The disks are missing.\n"),
|
||||
__("o You attempting to perform this operation on a secondary IOA. "
|
||||
"Retry the operation on the primary IOA.\n"),
|
||||
"" }
|
||||
};
|
||||
|
||||
|
|
@ -454,8 +448,6 @@ s_node n_configure_raid_include_fail = {
|
|||
"capacity than the smallest device in the disk array and "
|
||||
"be formatted correctly\n"),
|
||||
__("o The disk is not supported for the requested operation\n"),
|
||||
__("o You attempting to perform this operation on a secondary IOA. "
|
||||
"Retry the operation on the primary IOA.\n"),
|
||||
"" }
|
||||
};
|
||||
|
||||
|
|
@ -500,8 +492,6 @@ s_node n_af_include_fail = {
|
|||
"reported to the system. Retry the operation.\n"),
|
||||
__("o The disks are missing.\n"),
|
||||
__("o The disks are currently in use.\n"), /* xxx */
|
||||
__("o You attempting to perform this operation on a secondary IOA. "
|
||||
"Retry the operation on the primary IOA.\n"),
|
||||
"" }
|
||||
};
|
||||
|
||||
|
|
@ -521,8 +511,6 @@ s_node n_af_remove_fail = {
|
|||
"reported to the system. Retry the operation.\n"),
|
||||
__("o The disks are missing.\n"),
|
||||
__("o The disks are currently in use.\n"),
|
||||
__("o You attempting to perform this operation on a secondary IOA. "
|
||||
"Retry the operation on the primary IOA.\n"),
|
||||
"" }
|
||||
};
|
||||
|
||||
|
|
@ -541,8 +529,6 @@ s_node n_add_hot_spare_fail = {
|
|||
__("o Not all disks attached to an advanced function IOA have "
|
||||
"reported to the system. Retry the operation.\n"),
|
||||
__("o The disks are missing.\n"),
|
||||
__("o You attempting to perform this operation on a secondary IOA. "
|
||||
"Retry the operation on the primary IOA.\n"),
|
||||
"" }
|
||||
};
|
||||
|
||||
|
|
@ -562,8 +548,6 @@ s_node n_remove_hot_spare_fail = {
|
|||
"reported to the system. Retry the operation.\n"),
|
||||
__("o The disks are missing.\n"),
|
||||
__("o The disks are currently in use.\n"),
|
||||
__("o You attempting to perform this operation on a secondary IOA. "
|
||||
"Retry the operation on the primary IOA.\n"),
|
||||
"" }
|
||||
};
|
||||
|
||||
|
|
@ -891,8 +875,6 @@ s_node n_raid_rebuild_fail = {
|
|||
__("o Not all disks attached to an IOA have reported to the "
|
||||
"system. Retry the operation.\n"),
|
||||
__("o The disk is not supported for the requested operation.\n"),
|
||||
__("o You attempting to perform this operation on a secondary IOA. "
|
||||
"Retry the operation on the primary IOA.\n"),
|
||||
"" }
|
||||
};
|
||||
|
||||
|
|
|
|||
65
iprlib.c
65
iprlib.c
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Header: /cvsroot/iprdd/iprutils/iprlib.c,v 1.66 2005/03/08 16:25:59 brking Exp $
|
||||
* $Header: /cvsroot/iprdd/iprutils/iprlib.c,v 1.67 2005/03/25 22:21:02 brking Exp $
|
||||
*/
|
||||
|
||||
#ifndef iprlib_h
|
||||
|
|
@ -2738,10 +2738,30 @@ int get_scsi_dev_data(struct scsi_dev_data **scsi_dev_ref)
|
|||
return num_devs;
|
||||
}
|
||||
|
||||
static int wait_for_dev(char *name)
|
||||
{
|
||||
int fd, delay;
|
||||
|
||||
for (delay = 3, fd = 0; delay; delay--) {
|
||||
fd = open(name, O_RDWR);
|
||||
if (fd != -1) {
|
||||
close(fd);
|
||||
break;
|
||||
}
|
||||
|
||||
syslog_dbg("Waiting for %s to show up\n", name);
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
if (fd == -1)
|
||||
syslog_dbg("Failed to open %s.\n", name);
|
||||
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
static void get_sg_names(int num_devs)
|
||||
{
|
||||
int i, fd;
|
||||
int sg_delay = 3;
|
||||
int i;
|
||||
struct sysfs_class *sysfs_device_class;
|
||||
struct dlist *class_devices;
|
||||
struct sysfs_class_device *class_device;
|
||||
|
|
@ -2770,21 +2790,8 @@ static void get_sg_names(int num_devs)
|
|||
sysfs_device_device->name)) {
|
||||
sprintf(scsi_dev_table[i].gen_name, _PATH_DEV"%s",
|
||||
class_device->name);
|
||||
for (sg_delay = 3, fd = 0; sg_delay && ipr_sg_required; sg_delay--) {
|
||||
fd = open(scsi_dev_table[i].gen_name, O_RDWR);
|
||||
if (fd != -1) {
|
||||
close(fd);
|
||||
break;
|
||||
}
|
||||
|
||||
syslog_dbg("Waiting for %s to show up\n",
|
||||
scsi_dev_table[i].gen_name);
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
if (fd == -1)
|
||||
syslog_dbg("Failed to open %s. %d %d\n", scsi_dev_table[i].gen_name,
|
||||
sg_delay, ipr_sg_required);
|
||||
if (ipr_sg_required)
|
||||
wait_for_dev(scsi_dev_table[i].gen_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -4841,6 +4848,28 @@ void ipr_init_dev(struct ipr_dev *dev)
|
|||
};
|
||||
}
|
||||
|
||||
void ipr_init_new_dev(struct ipr_dev *dev)
|
||||
{
|
||||
if (!dev->scsi_dev_data)
|
||||
return;
|
||||
|
||||
switch (dev->scsi_dev_data->type) {
|
||||
case TYPE_DISK:
|
||||
wait_for_dev(dev->dev_name);
|
||||
break;
|
||||
case IPR_TYPE_ADAPTER:
|
||||
if (&dev->ioa->ioa != dev)
|
||||
break;
|
||||
case IPR_TYPE_AF_DISK:
|
||||
wait_for_dev(dev->gen_name);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
};
|
||||
|
||||
ipr_init_dev(dev);
|
||||
}
|
||||
|
||||
void ipr_init_ioa(struct ipr_ioa *ioa)
|
||||
{
|
||||
int i = 0;
|
||||
|
|
|
|||
5
iprlib.h
5
iprlib.h
|
|
@ -12,7 +12,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Header: /cvsroot/iprdd/iprutils/iprlib.h,v 1.51 2005/03/08 16:25:59 brking Exp $
|
||||
* $Header: /cvsroot/iprdd/iprutils/iprlib.h,v 1.52 2005/03/25 22:21:02 brking Exp $
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
|
|
@ -49,7 +49,6 @@
|
|||
#include <paths.h>
|
||||
#include <bits/sockaddr.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <sys/capability.h>
|
||||
|
||||
#define IPR_DASD_UCODE_USRLIB 0
|
||||
#define IPR_DASD_UCODE_ETC 1
|
||||
|
|
@ -186,7 +185,6 @@ extern int ipr_debug;
|
|||
extern int ipr_force;
|
||||
extern int ipr_sg_required;
|
||||
extern int polling_mode;
|
||||
extern char *hotplug_dir;
|
||||
extern char *tool_name;
|
||||
extern struct sysfs_dev *head_zdev;
|
||||
extern struct sysfs_dev *tail_zdev;
|
||||
|
|
@ -1370,6 +1368,7 @@ int get_ses_firmware_image_list(struct ipr_dev *, struct ipr_fw_images **);
|
|||
void ipr_update_ioa_fw(struct ipr_ioa *, struct ipr_fw_images *, int);
|
||||
void ipr_update_disk_fw(struct ipr_dev *, struct ipr_fw_images *, int);
|
||||
void ipr_init_dev(struct ipr_dev *);
|
||||
void ipr_init_new_dev(struct ipr_dev *);
|
||||
void ipr_init_ioa(struct ipr_ioa *);
|
||||
int device_supported(struct ipr_dev *);
|
||||
struct ipr_dev *get_dev_from_addr(struct ipr_res_addr *res_addr);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Header: /cvsroot/iprdd/iprutils/iprupdate.c,v 1.20 2005/03/08 16:25:59 brking Exp $
|
||||
* $Header: /cvsroot/iprdd/iprutils/iprupdate.c,v 1.21 2005/03/25 22:21:02 brking Exp $
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
|
|
@ -81,7 +81,8 @@ static void update_ioa_fw(struct ipr_ioa *ioa, int force)
|
|||
rc = get_ioa_firmware_image_list(ioa, &list);
|
||||
|
||||
if (rc < 1) {
|
||||
ipr_log_ucode_error(ioa);
|
||||
if (ioa->should_init)
|
||||
ipr_log_ucode_error(ioa);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Summary: Utilities for the IBM Power Linux RAID adapters
|
||||
Name: iprutils
|
||||
Version: 2.0.14
|
||||
Version: 2.0.14.1
|
||||
Release: 1
|
||||
License: CPL
|
||||
Group: System Environment/Base
|
||||
|
|
@ -51,6 +51,21 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%{_sysconfdir}/init.d/*
|
||||
|
||||
%changelog
|
||||
* Mon Mar 25 2005 Brian King <brking@us.ibm.com> 2.0.14.1
|
||||
- Removed mention of primary/secondary adapters in some error
|
||||
screens since multi-initiator RAID is not supported and the
|
||||
messages will just cause confusion.
|
||||
* Mon Mar 24 2005 Brian King <brking@us.ibm.com>
|
||||
- iprconfig: During disk hotplug, wait for sd devices to show
|
||||
up. Fixes errors getting logged by iprconfig during hotplug.
|
||||
* Mon Mar 23 2005 Brian King <brking@us.ibm.com>
|
||||
- iprconfig: Fix cancel path on concurrent add/remove of disks
|
||||
- Don't display current bus width and speed for SAS disks
|
||||
* Mon Mar 21 2005 Brian King <brking@us.ibm.com>
|
||||
- Fix scoping bug caught by gcc 4.0.
|
||||
* Fri Mar 18 2005 Brian King <brking@us.ibm.com>
|
||||
- Stop iprupdate from continually logging errors for adapters with
|
||||
backlevel adapter firmware.
|
||||
* Mon Mar 7 2005 Brian King <brking@us.ibm.com> 2.0.14
|
||||
- Add support for non-interactive array creation and deletion through
|
||||
iprconfig.
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
IPR_MAJOR_RELEASE=2
|
||||
IPR_MINOR_RELEASE=0
|
||||
IPR_FIX_LEVEL=14
|
||||
IPR_FIX_LEVEL=14.1
|
||||
IPR_RELEASE=1
|
||||
IPR_FIX_DATE=(March 9, 2005)
|
||||
IPR_FIX_DATE=(March 25, 2005)
|
||||
|
||||
IPR_VERSION_STR=$(IPR_MAJOR_RELEASE).$(IPR_MINOR_RELEASE).$(IPR_FIX_LEVEL) $(IPR_FIX_DATE)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue