Commit 44a5a59c authored by David Jeffery's avatar David Jeffery Committed by Linus Torvalds

[PATCH] ips driver 4/4: error messages

This small patch does 2 things.  It reworks the firmware/driver
versioning messages to make them more understandable, and it
fixes one case where the 64bit addressing changes caused
error/success to not be properly reported to the serveraid tools.
parent d31bb16c
...@@ -1445,7 +1445,8 @@ ips_info(struct Scsi_Host *SH) { ...@@ -1445,7 +1445,8 @@ ips_info(struct Scsi_Host *SH) {
bp = &buffer[0]; bp = &buffer[0];
memset(bp, 0, sizeof(buffer)); memset(bp, 0, sizeof(buffer));
sprintf(bp, "%s%s%s", "IBM PCI ServeRAID ", IPS_VERSION_HIGH, IPS_VERSION_LOW ); sprintf(bp, "%s%s%s Build %d", "IBM PCI ServeRAID ",
IPS_VERSION_HIGH, IPS_VERSION_LOW, IPS_BUILD_IDENT );
if (ha->ad_type > 0 && if (ha->ad_type > 0 &&
ha->ad_type <= MAX_ADAPTER_NAME) { ha->ad_type <= MAX_ADAPTER_NAME) {
...@@ -1590,6 +1591,7 @@ static int ...@@ -1590,6 +1591,7 @@ static int
ips_make_passthru(ips_ha_t *ha, Scsi_Cmnd *SC, ips_scb_t *scb, int intr) { ips_make_passthru(ips_ha_t *ha, Scsi_Cmnd *SC, ips_scb_t *scb, int intr) {
ips_passthru_t *pt; ips_passthru_t *pt;
int length = 0; int length = 0;
int ret;
METHOD_TRACE("ips_make_passthru", 1); METHOD_TRACE("ips_make_passthru", 1);
...@@ -1656,9 +1658,11 @@ ips_make_passthru(ips_ha_t *ha, Scsi_Cmnd *SC, ips_scb_t *scb, int intr) { ...@@ -1656,9 +1658,11 @@ ips_make_passthru(ips_ha_t *ha, Scsi_Cmnd *SC, ips_scb_t *scb, int intr) {
} }
if(ha->device_id == IPS_DEVICEID_COPPERHEAD && if(ha->device_id == IPS_DEVICEID_COPPERHEAD &&
pt->CoppCP.cmd.flashfw.op_code == IPS_CMD_RW_BIOSFW) pt->CoppCP.cmd.flashfw.op_code == IPS_CMD_RW_BIOSFW) {
return ips_flash_copperhead(ha, pt, scb); ret = ips_flash_copperhead(ha, pt, scb);
ips_scmd_buf_write(SC, ha->ioctl_data, sizeof(ips_passthru_t));
return ret;
}
if (ips_usrcmd(ha, pt, scb)) if (ips_usrcmd(ha, pt, scb))
return (IPS_SUCCESS); return (IPS_SUCCESS);
else else
...@@ -2082,6 +2086,9 @@ ips_host_info(ips_ha_t *ha, char *ptr, off_t offset, int len) { ...@@ -2082,6 +2086,9 @@ ips_host_info(ips_ha_t *ha, char *ptr, off_t offset, int len) {
copy_info(&info, "\tDriver Version : %s%s\n", copy_info(&info, "\tDriver Version : %s%s\n",
IPS_VERSION_HIGH, IPS_VERSION_LOW); IPS_VERSION_HIGH, IPS_VERSION_LOW);
copy_info(&info, "\tDriver Build : %d\n",
IPS_BUILD_IDENT);
copy_info(&info, "\tMax Physical Devices : %d\n", copy_info(&info, "\tMax Physical Devices : %d\n",
ha->enq->ucMaxPhysicalDevices); ha->enq->ucMaxPhysicalDevices);
copy_info(&info, "\tMax Active Commands : %d\n", copy_info(&info, "\tMax Active Commands : %d\n",
...@@ -6464,6 +6471,8 @@ static void ips_version_check(ips_ha_t *ha, int intr) { ...@@ -6464,6 +6471,8 @@ static void ips_version_check(ips_ha_t *ha, int intr) {
uint8_t BiosVersion[ IPS_COMPAT_ID_LENGTH + 1]; uint8_t BiosVersion[ IPS_COMPAT_ID_LENGTH + 1];
int MatchError; int MatchError;
int rc; int rc;
char BiosString[10];
char FirmwareString[10];
METHOD_TRACE("ips_version_check", 1); METHOD_TRACE("ips_version_check", 1);
...@@ -6496,28 +6505,30 @@ static void ips_version_check(ips_ha_t *ha, int intr) { ...@@ -6496,28 +6505,30 @@ static void ips_version_check(ips_ha_t *ha, int intr) {
MatchError = 0; MatchError = 0;
if (strncmp(FirmwareVersion, Compatable[ ha->nvram->adapter_type ], IPS_COMPAT_ID_LENGTH) != 0) if (strncmp(FirmwareVersion, Compatable[ ha->nvram->adapter_type ], IPS_COMPAT_ID_LENGTH) != 0)
{
if (ips_cd_boot == 0)
printk(KERN_WARNING "Warning: Adapter %d Firmware Compatible Version is %s, but should be %s\n",
ha->host_num, FirmwareVersion, Compatable[ ha->nvram->adapter_type ]);
MatchError = 1; MatchError = 1;
}
if (strncmp(BiosVersion, IPS_COMPAT_BIOS, IPS_COMPAT_ID_LENGTH) != 0) if (strncmp(BiosVersion, IPS_COMPAT_BIOS, IPS_COMPAT_ID_LENGTH) != 0)
{
if (ips_cd_boot == 0)
printk(KERN_WARNING "Warning: Adapter %d BIOS Compatible Version is %s, but should be %s\n",
ha->host_num, BiosVersion, IPS_COMPAT_BIOS);
MatchError = 1; MatchError = 1;
}
ha->nvram->versioning = 1; /* Indicate the Driver Supports Versioning */ ha->nvram->versioning = 1; /* Indicate the Driver Supports Versioning */
if (MatchError) if (MatchError)
{ {
ha->nvram->version_mismatch = 1; ha->nvram->version_mismatch = 1;
if (ips_cd_boot == 0) if (ips_cd_boot == 0)
printk(KERN_WARNING "Warning ! ! ! ServeRAID Version Mismatch\n"); {
strncpy(&BiosString[0], ha->nvram->bios_high, 4);
strncpy(&BiosString[4], ha->nvram->bios_low, 4);
BiosString[8] = 0;
strncpy(&FirmwareString[0], ha->enq->CodeBlkVersion, 8);
FirmwareString[8] = 0;
printk(KERN_WARNING "Warning ! ! ! ServeRAID Version Mismatch\n");
printk(KERN_WARNING "Bios = %s, Firmware = %s, Device Driver = %s%s\n",
BiosString, FirmwareString, IPS_VERSION_HIGH, IPS_VERSION_LOW );
printk(KERN_WARNING "These levels should match to avoid possible compatibility problems.\n" );
}
} }
else else
{ {
......
...@@ -1221,6 +1221,7 @@ typedef struct { ...@@ -1221,6 +1221,7 @@ typedef struct {
#define IPS_VER_BUILD 00 #define IPS_VER_BUILD 00
#define IPS_VER_BUILD_STRING "00" #define IPS_VER_BUILD_STRING "00"
#define IPS_VER_STRING "5.99.00" #define IPS_VER_STRING "5.99.00"
#define IPS_BUILD_IDENT 1132
/* Version numbers for various adapters */ /* Version numbers for various adapters */
#define IPS_VER_SERVERAID1 "2.25.01" #define IPS_VER_SERVERAID1 "2.25.01"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment