aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-09-21 07:54:49 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-12 14:55:40 -0400
commit24f756866676b40446e361c1f87738707161da93 (patch)
tree2709ec5b4bb5f0e9c980621e7a1a2b97bdcd7a93
parent00bd02027fc4a5cf92a3e538896b3642b40515df (diff)
[libata] SCSI: clean up R/W recovery mode page
Clear ARRE, we don't do auto-reallocation on reads, just on writes. Also, hardcode the size of the array using RW_RECOVERY_MPAGE_LEN, following the style of the surrounding code. Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r--drivers/ata/libata-scsi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 553488015e49..d482b589a18a 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -71,11 +71,10 @@ static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
71#define ALL_SUB_MPAGES 0xff 71#define ALL_SUB_MPAGES 0xff
72 72
73 73
74static const u8 def_rw_recovery_mpage[] = { 74static const u8 def_rw_recovery_mpage[RW_RECOVERY_MPAGE_LEN] = {
75 RW_RECOVERY_MPAGE, 75 RW_RECOVERY_MPAGE,
76 RW_RECOVERY_MPAGE_LEN - 2, 76 RW_RECOVERY_MPAGE_LEN - 2,
77 (1 << 7) | /* AWRE, sat-r06 say it shall be 0 */ 77 (1 << 7), /* AWRE */
78 (1 << 6), /* ARRE (auto read reallocation) */
79 0, /* read retry count */ 78 0, /* read retry count */
80 0, 0, 0, 0, 79 0, 0, 0, 0,
81 0, /* write retry count */ 80 0, /* write retry count */