Skip to content

Commit

Permalink
[libata] SCSI: clean up R/W recovery mode page
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Garzik committed Oct 12, 2007
1 parent 00bd020 commit 24f7568
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/ata/libata-scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,10 @@ static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel,
#define ALL_SUB_MPAGES 0xff


static const u8 def_rw_recovery_mpage[] = {
static const u8 def_rw_recovery_mpage[RW_RECOVERY_MPAGE_LEN] = {
RW_RECOVERY_MPAGE,
RW_RECOVERY_MPAGE_LEN - 2,
(1 << 7) | /* AWRE, sat-r06 say it shall be 0 */
(1 << 6), /* ARRE (auto read reallocation) */
(1 << 7), /* AWRE */
0, /* read retry count */
0, 0, 0, 0,
0, /* write retry count */
Expand Down

0 comments on commit 24f7568

Please sign in to comment.