-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCSI Status not checked or made available after SCSI Command #15
Comments
I thought i should add that every Windows SPTI sample code I've seen calls DeviceIoControl(), then checks that the return value is True and that ScsiStatus is 0 to determine that the command was successful. It is possible for DeviceIoControl() to return True, but SccsiStatus NOT be zero. In this case the command is treated as unsuccessful. Here is one such example from the Windows Drive DevKit |
The interface for |
Can you try the changes in |
Windows and Linux both support returning a status value for the scsi device after a scsi command is attempted.
This is separate to the sense data and is not currently handled by smartie.
On Linux this value comes from 'SGIOHeader.status'.
On Windows this value comes from 'SCSIPassThroughDirect.scsi_status'
The values returned by Windows and Linux are different, but they could be mapped onto matching values when returned by smartie. It looks like you aready have the Linux values in "scsi/structures.py" under "class StatusCode(enum.IntEnum):"
The values for Windows can be gotten from:
https://github.com/9176324/WinDDK/blob/master/7600.16385.1/inc/ddk/scsi.h
They are:
If you are already making changes to 'issue_command()' to return a tuple that now includes the data size, perhaps you could also add the scsi status to the tuple.
The text was updated successfully, but these errors were encountered: