Skip to content
Snippets Groups Projects
Commit a8263355 authored by chrfranke's avatar chrfranke
Browse files

Linux: Add workaround for Adaptec series 2, 5 and 5Z controllers

with firmware >= 17380.  Patch was provided by Phil Wilson.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2993 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 2a2ec88a
No related branches found
No related tags found
No related merge requests found
...@@ -43,6 +43,10 @@ NOTES FOR FUTURE RELEASES: see TODO file. ...@@ -43,6 +43,10 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] Linux: Add workaround for Adaptec series 2, 5 and 5Z controllers
with firmware >= 17380. Patch was provided by Phil Wilson, see:
http://linux.adaptec.com/2009/07/24/using-smartmontools-538-with-series-255z-controllers-with-firmware-17380-onwards
[CF] configure.in: Add '-fno-strict-aliasing' to CXXFLAGS if supported. [CF] configure.in: Add '-fno-strict-aliasing' to CXXFLAGS if supported.
This suppresses gcc 4.4.1 warnings on Linux and avoids possible This suppresses gcc 4.4.1 warnings on Linux and avoids possible
unsafe optimizations (ticket #23). unsafe optimizations (ticket #23).
......
...@@ -493,6 +493,7 @@ int linux_ata_device::ata_command_interface(smart_command_set command, int selec ...@@ -493,6 +493,7 @@ int linux_ata_device::ata_command_interface(smart_command_set command, int selec
#define SG_IO_RESP_SENSE_LEN 64 /* large enough see buffer */ #define SG_IO_RESP_SENSE_LEN 64 /* large enough see buffer */
#define LSCSI_DRIVER_MASK 0xf /* mask out "suggestions" */ #define LSCSI_DRIVER_MASK 0xf /* mask out "suggestions" */
#define LSCSI_DRIVER_SENSE 0x8 /* alternate CHECK CONDITION indication */ #define LSCSI_DRIVER_SENSE 0x8 /* alternate CHECK CONDITION indication */
#define LSCSI_DID_ERROR 0x7 /* Need to work around aacraid driver quirk */
#define LSCSI_DRIVER_TIMEOUT 0x6 #define LSCSI_DRIVER_TIMEOUT 0x6
#define LSCSI_DID_TIME_OUT 0x3 #define LSCSI_DID_TIME_OUT 0x3
#define LSCSI_DID_BUS_BUSY 0x2 #define LSCSI_DID_BUS_BUSY 0x2
...@@ -617,7 +618,10 @@ static int sg_io_cmnd_io(int dev_fd, struct scsi_cmnd_io * iop, int report, ...@@ -617,7 +618,10 @@ static int sg_io_cmnd_io(int dev_fd, struct scsi_cmnd_io * iop, int report,
(LSCSI_DID_TIME_OUT == io_hdr.host_status)) (LSCSI_DID_TIME_OUT == io_hdr.host_status))
return -ETIMEDOUT; return -ETIMEDOUT;
else else
return -EIO; /* catch all */ /* Check for DID_ERROR - workaround for aacraid driver quirk */
if (LSCSI_DID_ERROR != io_hdr.host_status) {
return -EIO; /* catch all if not DID_ERR */
}
} }
if (0 != masked_driver_status) { if (0 != masked_driver_status) {
if (LSCSI_DRIVER_TIMEOUT == masked_driver_status) if (LSCSI_DRIVER_TIMEOUT == masked_driver_status)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment