aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2015-03-27 11:46:32 -0400
committerTejun Heo <tj@kernel.org>2015-03-27 11:59:22 -0400
commit8ae720449fca4b1d0294c0a0204c0c45556a3e61 (patch)
tree0f8f30c1e6d2cd875ec4c6bbbf386e8c87c27981 /drivers/ata
parent825e2d878319faf75a0cd432fa92f290f6ffd130 (diff)
libata: whitespace fixes in ata_to_sense_error()
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-scsi.c61
1 files changed, 40 insertions, 21 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index fd9be1756f0d..25d8b648ad38 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -849,40 +849,59 @@ static void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk,
849 /* Based on the 3ware driver translation table */ 849 /* Based on the 3ware driver translation table */
850 static const unsigned char sense_table[][4] = { 850 static const unsigned char sense_table[][4] = {
851 /* BBD|ECC|ID|MAR */ 851 /* BBD|ECC|ID|MAR */
852 {0xd1, ABORTED_COMMAND, 0x00, 0x00}, // Device busy Aborted command 852 {0xd1, ABORTED_COMMAND, 0x00, 0x00},
853 // Device busy Aborted command
853 /* BBD|ECC|ID */ 854 /* BBD|ECC|ID */
854 {0xd0, ABORTED_COMMAND, 0x00, 0x00}, // Device busy Aborted command 855 {0xd0, ABORTED_COMMAND, 0x00, 0x00},
856 // Device busy Aborted command
855 /* ECC|MC|MARK */ 857 /* ECC|MC|MARK */
856 {0x61, HARDWARE_ERROR, 0x00, 0x00}, // Device fault Hardware error 858 {0x61, HARDWARE_ERROR, 0x00, 0x00},
859 // Device fault Hardware error
857 /* ICRC|ABRT */ /* NB: ICRC & !ABRT is BBD */ 860 /* ICRC|ABRT */ /* NB: ICRC & !ABRT is BBD */
858 {0x84, ABORTED_COMMAND, 0x47, 0x00}, // Data CRC error SCSI parity error 861 {0x84, ABORTED_COMMAND, 0x47, 0x00},
862 // Data CRC error SCSI parity error
859 /* MC|ID|ABRT|TRK0|MARK */ 863 /* MC|ID|ABRT|TRK0|MARK */
860 {0x37, NOT_READY, 0x04, 0x00}, // Unit offline Not ready 864 {0x37, NOT_READY, 0x04, 0x00},
865 // Unit offline Not ready
861 /* MCR|MARK */ 866 /* MCR|MARK */
862 {0x09, NOT_READY, 0x04, 0x00}, // Unrecovered disk error Not ready 867 {0x09, NOT_READY, 0x04, 0x00},
868 // Unrecovered disk error Not ready
863 /* Bad address mark */ 869 /* Bad address mark */
864 {0x01, MEDIUM_ERROR, 0x13, 0x00}, // Address mark not found Address mark not found for data field 870 {0x01, MEDIUM_ERROR, 0x13, 0x00},
865 /* TRK0 */ 871 // Address mark not found for data field
866 {0x02, HARDWARE_ERROR, 0x00, 0x00}, // Track 0 not found Hardware error 872 /* TRK0 - Track 0 not found */
873 {0x02, HARDWARE_ERROR, 0x00, 0x00},
874 // Hardware error
867 /* Abort: 0x04 is not translated here, see below */ 875 /* Abort: 0x04 is not translated here, see below */
868 /* Media change request */ 876 /* Media change request */
869 {0x08, NOT_READY, 0x04, 0x00}, // Media change request FIXME: faking offline 877 {0x08, NOT_READY, 0x04, 0x00},
870 /* SRV/IDNF */ 878 // FIXME: faking offline
871 {0x10, ILLEGAL_REQUEST, 0x21, 0x00}, // ID not found Logical address out of range 879 /* SRV/IDNF - ID not found */
872 /* MC */ 880 {0x10, ILLEGAL_REQUEST, 0x21, 0x00},
873 {0x20, UNIT_ATTENTION, 0x28, 0x00}, // Media Changed Not ready to ready change, medium may have changed 881 // Logical address out of range
874 /* ECC */ 882 /* MC - Media Changed */
875 {0x40, MEDIUM_ERROR, 0x11, 0x04}, // Uncorrectable ECC error Unrecovered read error 883 {0x20, UNIT_ATTENTION, 0x28, 0x00},
884 // Not ready to ready change, medium may have changed
885 /* ECC - Uncorrectable ECC error */
886 {0x40, MEDIUM_ERROR, 0x11, 0x04},
887 // Unrecovered read error
876 /* BBD - block marked bad */ 888 /* BBD - block marked bad */
877 {0x80, MEDIUM_ERROR, 0x11, 0x04}, // Block marked bad Medium error, unrecovered read error 889 {0x80, MEDIUM_ERROR, 0x11, 0x04},
890 // Block marked bad Medium error, unrecovered read error
878 {0xFF, 0xFF, 0xFF, 0xFF}, // END mark 891 {0xFF, 0xFF, 0xFF, 0xFF}, // END mark
879 }; 892 };
880 static const unsigned char stat_table[][4] = { 893 static const unsigned char stat_table[][4] = {
881 /* Must be first because BUSY means no other bits valid */ 894 /* Must be first because BUSY means no other bits valid */
882 {0x80, ABORTED_COMMAND, 0x47, 0x00}, // Busy, fake parity for now 895 {0x80, ABORTED_COMMAND, 0x47, 0x00},
883 {0x20, HARDWARE_ERROR, 0x44, 0x00}, // Device fault, internal target failure 896 // Busy, fake parity for now
884 {0x08, ABORTED_COMMAND, 0x47, 0x00}, // Timed out in xfer, fake parity for now 897 {0x40, ILLEGAL_REQUEST, 0x21, 0x04},
885 {0x04, RECOVERED_ERROR, 0x11, 0x00}, // Recovered ECC error Medium error, recovered 898 // Device ready, unaligned write command
899 {0x20, HARDWARE_ERROR, 0x44, 0x00},
900 // Device fault, internal target failure
901 {0x08, ABORTED_COMMAND, 0x47, 0x00},
902 // Timed out in xfer, fake parity for now
903 {0x04, RECOVERED_ERROR, 0x11, 0x00},
904 // Recovered ECC error Medium error, recovered
886 {0xFF, 0xFF, 0xFF, 0xFF}, // END mark 905 {0xFF, 0xFF, 0xFF, 0xFF}, // END mark
887 }; 906 };
888 907