Skip to content

Commit 44a5a59

Browse files
David JefferyLinus Torvalds
authored andcommitted
[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.
1 parent d31bb16 commit 44a5a59

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

drivers/scsi/ips.c

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,7 +1445,8 @@ ips_info(struct Scsi_Host *SH) {
14451445
bp = &buffer[0];
14461446
memset(bp, 0, sizeof(buffer));
14471447

1448-
sprintf(bp, "%s%s%s", "IBM PCI ServeRAID ", IPS_VERSION_HIGH, IPS_VERSION_LOW );
1448+
sprintf(bp, "%s%s%s Build %d", "IBM PCI ServeRAID ",
1449+
IPS_VERSION_HIGH, IPS_VERSION_LOW, IPS_BUILD_IDENT );
14491450

14501451
if (ha->ad_type > 0 &&
14511452
ha->ad_type <= MAX_ADAPTER_NAME) {
@@ -1590,6 +1591,7 @@ static int
15901591
ips_make_passthru(ips_ha_t *ha, Scsi_Cmnd *SC, ips_scb_t *scb, int intr) {
15911592
ips_passthru_t *pt;
15921593
int length = 0;
1594+
int ret;
15931595

15941596
METHOD_TRACE("ips_make_passthru", 1);
15951597

@@ -1656,9 +1658,11 @@ ips_make_passthru(ips_ha_t *ha, Scsi_Cmnd *SC, ips_scb_t *scb, int intr) {
16561658
}
16571659

16581660
if(ha->device_id == IPS_DEVICEID_COPPERHEAD &&
1659-
pt->CoppCP.cmd.flashfw.op_code == IPS_CMD_RW_BIOSFW)
1660-
return ips_flash_copperhead(ha, pt, scb);
1661-
1661+
pt->CoppCP.cmd.flashfw.op_code == IPS_CMD_RW_BIOSFW) {
1662+
ret = ips_flash_copperhead(ha, pt, scb);
1663+
ips_scmd_buf_write(SC, ha->ioctl_data, sizeof(ips_passthru_t));
1664+
return ret;
1665+
}
16621666
if (ips_usrcmd(ha, pt, scb))
16631667
return (IPS_SUCCESS);
16641668
else
@@ -2082,6 +2086,9 @@ ips_host_info(ips_ha_t *ha, char *ptr, off_t offset, int len) {
20822086
copy_info(&info, "\tDriver Version : %s%s\n",
20832087
IPS_VERSION_HIGH, IPS_VERSION_LOW);
20842088

2089+
copy_info(&info, "\tDriver Build : %d\n",
2090+
IPS_BUILD_IDENT);
2091+
20852092
copy_info(&info, "\tMax Physical Devices : %d\n",
20862093
ha->enq->ucMaxPhysicalDevices);
20872094
copy_info(&info, "\tMax Active Commands : %d\n",
@@ -6464,6 +6471,8 @@ static void ips_version_check(ips_ha_t *ha, int intr) {
64646471
uint8_t BiosVersion[ IPS_COMPAT_ID_LENGTH + 1];
64656472
int MatchError;
64666473
int rc;
6474+
char BiosString[10];
6475+
char FirmwareString[10];
64676476

64686477
METHOD_TRACE("ips_version_check", 1);
64696478

@@ -6496,28 +6505,30 @@ static void ips_version_check(ips_ha_t *ha, int intr) {
64966505
MatchError = 0;
64976506

64986507
if (strncmp(FirmwareVersion, Compatable[ ha->nvram->adapter_type ], IPS_COMPAT_ID_LENGTH) != 0)
6499-
{
6500-
if (ips_cd_boot == 0)
6501-
printk(KERN_WARNING "Warning: Adapter %d Firmware Compatible Version is %s, but should be %s\n",
6502-
ha->host_num, FirmwareVersion, Compatable[ ha->nvram->adapter_type ]);
65036508
MatchError = 1;
6504-
}
65056509

65066510
if (strncmp(BiosVersion, IPS_COMPAT_BIOS, IPS_COMPAT_ID_LENGTH) != 0)
6507-
{
6508-
if (ips_cd_boot == 0)
6509-
printk(KERN_WARNING "Warning: Adapter %d BIOS Compatible Version is %s, but should be %s\n",
6510-
ha->host_num, BiosVersion, IPS_COMPAT_BIOS);
65116511
MatchError = 1;
6512-
}
65136512

65146513
ha->nvram->versioning = 1; /* Indicate the Driver Supports Versioning */
65156514

65166515
if (MatchError)
65176516
{
65186517
ha->nvram->version_mismatch = 1;
6519-
if (ips_cd_boot == 0)
6520-
printk(KERN_WARNING "Warning ! ! ! ServeRAID Version Mismatch\n");
6518+
if (ips_cd_boot == 0)
6519+
{
6520+
strncpy(&BiosString[0], ha->nvram->bios_high, 4);
6521+
strncpy(&BiosString[4], ha->nvram->bios_low, 4);
6522+
BiosString[8] = 0;
6523+
6524+
strncpy(&FirmwareString[0], ha->enq->CodeBlkVersion, 8);
6525+
FirmwareString[8] = 0;
6526+
6527+
printk(KERN_WARNING "Warning ! ! ! ServeRAID Version Mismatch\n");
6528+
printk(KERN_WARNING "Bios = %s, Firmware = %s, Device Driver = %s%s\n",
6529+
BiosString, FirmwareString, IPS_VERSION_HIGH, IPS_VERSION_LOW );
6530+
printk(KERN_WARNING "These levels should match to avoid possible compatibility problems.\n" );
6531+
}
65216532
}
65226533
else
65236534
{

drivers/scsi/ips.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,7 @@ typedef struct {
12211221
#define IPS_VER_BUILD 00
12221222
#define IPS_VER_BUILD_STRING "00"
12231223
#define IPS_VER_STRING "5.99.00"
1224+
#define IPS_BUILD_IDENT 1132
12241225

12251226
/* Version numbers for various adapters */
12261227
#define IPS_VER_SERVERAID1 "2.25.01"

0 commit comments

Comments
 (0)