]> localhost Git - SCSI2SD.git/commitdiff
Fix for VMS 5.5-2 for incorrect Inquiry command allocation lengths
authorMichael McMaster <michael@codesrc.com>
Mon, 2 Dec 2019 09:43:05 +0000 (19:43 +1000)
committerMichael McMaster <michael@codesrc.com>
Mon, 2 Dec 2019 09:43:05 +0000 (19:43 +1000)
CHANGELOG
software/SCSI2SD/src/inquiry.c
software/include/scsi2sd.h
software/scsi2sd-util/ConfigUtil.cc

index 255acb671844792935f307f1e0d9373a80e80126..aa5c126c153d2c66e694cc9275fe94e475725f4e 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,9 @@
+20191202               4.x.x
+       - Fix to prevent sending floppy geometry mode page when not configured as
+       a floppy (Thanks Landon Rodgers)
+       - Fix for VMS 5.5-2 Inquiry allocation lengths. Requires setting "vms" quirk
+       mode in the XML config (Thanks Landon Rodgers)
+
 20190610               4.8.3
        - Improve XEBEC controller support
        - Add Flexible Disk Drive Geometry SCSI MODE page
index 463b8ea89c94d89054671f0ee74812f54f8fbb50..3b84c524adcec38879983e458765bee2e7635442 100755 (executable)
@@ -1,4 +1,5 @@
 //     Copyright (C) 2013 Michael McMaster <michael@codesrc.com>
+//     Copyright (C) 2019 Landon Rodgers  <g.landon.rodgers@gmail.com>
 //
 //     This file is part of SCSI2SD.
 //
@@ -213,6 +214,13 @@ void scsiInquiry()
 
        if (scsiDev.phase == DATA_IN)
        {
+               // VAX workaround
+               if (allocationLength == 255 &&
+                       (scsiDev.target->cfg->quirks & CONFIG_QUIRKS_VMS))
+               {
+                       allocationLength = 254;
+               }
+
                // "real" hard drives send back exactly allocationLenth bytes, padded
                // with zeroes. This only seems to happen for Inquiry responses, and not
                // other commands that also supply an allocation length such as Mode Sense or
index fc92714beddbde7c816d5fd7881297c5437308af..e9e44e2b5a7b095e19bd554e877b9fa63b2b0c7a 100755 (executable)
@@ -131,7 +131,8 @@ typedef enum
        CONFIG_QUIRKS_NONE = 0,
        CONFIG_QUIRKS_APPLE = 1,
        CONFIG_QUIRKS_OMTI = 2,
-       CONFIG_QUIRKS_XEBEC = 4
+       CONFIG_QUIRKS_XEBEC = 4,
+       CONFIG_QUIRKS_VMS = 8
 } CONFIG_QUIRKS;
 
 typedef enum
index a11f1fc6739de25d77a4dd06c08c7dd6ce48f3b5..f08fa3ca528ce5aeef2df489076c79633e64cf97 100755 (executable)
@@ -251,6 +251,7 @@ ConfigUtil::toXML(const TargetConfig& config)
                "       apple\t\tReturns Apple-specific mode pages\n" <<
                "       omti\t\tOMTI host non-standard link control\n" <<
                "       xebec\t\tXEBEC ignore step options in control byte\n" <<
+               "       vms\t\tVMS output max 254 bytes inquiry data\n" <<
                "       ********************************************************* -->\n" <<
                "       <quirks>";
        if (config.quirks == CONFIG_QUIRKS_APPLE)
@@ -265,6 +266,10 @@ ConfigUtil::toXML(const TargetConfig& config)
        {
                s << "xebec";
        }
+       else if (config.quirks == CONFIG_QUIRKS_VMS)
+       {
+               s << "vms";
+       }
 
        s <<
                        "</quirks>\n" <<
@@ -527,6 +532,10 @@ parseTarget(wxXmlNode* node)
                                {
                                        result.quirks |= CONFIG_QUIRKS_XEBEC;
                                }
+                               else if (quirk == "vms")
+                               {
+                                       result.quirks |= CONFIG_QUIRKS_VMS;
+                               }
                        }
                }
                else if (child->GetName() == "deviceType")