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.

This attached patch is against current scsi-misc-2.6.

ObligatoryDisclaimer: Please accept my condolences regarding Outlook's handling 
of patch attachments, use the attachment, not the inline patch.

Signed-off-by: Mark Salyzyn <[EMAIL PROTECTED]>

 drivers/scsi/aacraid/aachba.c |   25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff -ru a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
--- a/drivers/scsi/aacraid/aachba.c     2008-01-11 16:28:15.129189613 -0500
+++ b/drivers/scsi/aacraid/aachba.c     2008-01-11 16:31:22.032344801 -0500
@@ -716,16 +716,21 @@

        if (dev->supplement_adapter_info.AdapterTypeText[0]) {
                char * cp = dev->supplement_adapter_info.AdapterTypeText;
-               int c = sizeof(str->vid);
-               while (*cp && *cp != ' ' && --c)
-                       ++cp;
-               c = *cp;
-               *cp = '\0';
-               inqstrcpy (dev->supplement_adapter_info.AdapterTypeText,
-                 str->vid);
-               *cp = c;
-               while (*cp && *cp != ' ')
-                       ++cp;
+               int c;
+               if ((cp[0] == 'A') && (cp[1] == 'O') && (cp[2] == 'C'))
+                       inqstrcpy("SMC", str->vid);
+               else {
+                       c = sizeof(str->vid);
+                       while (*cp && *cp != ' ' && --c)
+                               ++cp;
+                       c = *cp;
+                       *cp = '\0';
+                       inqstrcpy (dev->supplement_adapter_info.AdapterTypeText,
+                         str->vid);
+                       *cp = c;
+                       while (*cp && *cp != ' ')
+                               ++cp;
+               }
                while (*cp == ' ')
                        ++cp;
                /* last six chars reserved for vol type */

Sincerely -- Mark Salyzyn

Attachment: aacraid_SMC_vid.patch
Description: aacraid_SMC_vid.patch

Reply via email to