Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 114180
b: refs/heads/master
c: 35c1375
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 13, 2008
1 parent d79ae75 commit bf80d42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ea1031cf92b8b8bfbe796d8e8d38b68300475d2
refs/heads/master: 35c137531245118962eb40a550661afe317bec03
11 changes: 5 additions & 6 deletions trunk/drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,14 +686,13 @@ static int set_addressing(ide_drive_t *drive, int arg)
if (arg < 0 || arg > 2)
return -EINVAL;

drive->addressing = 0;

if (drive->hwif->host_flags & IDE_HFLAG_NO_LBA48)
return 0;

if (ata_id_lba48_enabled(drive->id) == 0)
if (arg && ((drive->hwif->host_flags & IDE_HFLAG_NO_LBA48) ||
ata_id_lba48_enabled(drive->id) == 0))
return -EIO;

if (arg == 2)
arg = 0;

drive->addressing = arg;

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ struct ide_drive_s {
unsigned sleeping : 1; /* 1=sleeping & sleep field valid */
unsigned post_reset : 1;
unsigned udma33_warned : 1;
unsigned addressing : 2; /* 0=28-bit, 1=48-bit, 2=48-bit doing 28-bit */
unsigned addressing : 1; /* 0=28-bit, 1=48-bit */
unsigned wcache : 1; /* status of write cache */
unsigned nowerr : 1; /* used for ignoring ATA_DF */

Expand Down

0 comments on commit bf80d42

Please sign in to comment.