Commit 3bc8070f authored by Salyzyn, Mark's avatar Salyzyn, Mark Committed by James Bottomley

[SCSI] aacraid: SMC vendor identification

Due to an internal limit associated with the AdapterTypeText field,
SMC required a product ID that overloaded the combined vendor and
product ID. A decision was made to ship the SMC products without a
vendor string dropping the defacto space that used to delineate vendor
and product to boot. To correct this, we needed to adjust the code in
the driver to parse out the vendor and product strings for the
adapter. We match of 'AOC' in the AdapterTypeText, if so we set the
vendor to SMC and place the entire AdapterTypeText into the product
field.

This only affects the cosmetic presentation of the Adapter vendor and
product in the logs and in sysfs.
Signed-off-by: default avatarMark Salyzyn <aacraid@adaptec.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 0995ad38
...@@ -716,16 +716,21 @@ static void setinqstr(struct aac_dev *dev, void *data, int tindex) ...@@ -716,16 +716,21 @@ static void setinqstr(struct aac_dev *dev, void *data, int tindex)
if (dev->supplement_adapter_info.AdapterTypeText[0]) { if (dev->supplement_adapter_info.AdapterTypeText[0]) {
char * cp = dev->supplement_adapter_info.AdapterTypeText; char * cp = dev->supplement_adapter_info.AdapterTypeText;
int c = sizeof(str->vid); int c;
while (*cp && *cp != ' ' && --c) if ((cp[0] == 'A') && (cp[1] == 'O') && (cp[2] == 'C'))
++cp; inqstrcpy("SMC", str->vid);
c = *cp; else {
*cp = '\0'; c = sizeof(str->vid);
inqstrcpy (dev->supplement_adapter_info.AdapterTypeText, while (*cp && *cp != ' ' && --c)
str->vid); ++cp;
*cp = c; c = *cp;
while (*cp && *cp != ' ') *cp = '\0';
++cp; inqstrcpy (dev->supplement_adapter_info.AdapterTypeText,
str->vid);
*cp = c;
while (*cp && *cp != ' ')
++cp;
}
while (*cp == ' ') while (*cp == ' ')
++cp; ++cp;
/* last six chars reserved for vol type */ /* last six chars reserved for vol type */
......
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