Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82085
b: refs/heads/master
c: 481c8c6
h: refs/heads/master
i:
  82083: cc36863
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 1, 2008
1 parent 34b4ad3 commit 0e18fb5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 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: f18f960c5c1568fa2f720e2cb31d6c1af9ea1e1a
refs/heads/master: 481c8c6476f86d7e92435764ba710315d644a45e
17 changes: 9 additions & 8 deletions trunk/drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2416,19 +2416,20 @@ int ide_cdrom_get_capabilities(ide_drive_t *drive, struct atapi_capabilities_pag
static
void ide_cdrom_update_speed (ide_drive_t *drive, struct atapi_capabilities_page *cap)
{
u16 curspeed, maxspeed;

/* The ACER/AOpen 24X cdrom has the speed fields byte-swapped */
if (!drive->id->model[0] &&
!strncmp(drive->id->fw_rev, "241N", 4)) {
CDROM_STATE_FLAGS(drive)->current_speed =
(le16_to_cpu(cap->curspeed) + (176/2)) / 176;
CDROM_CONFIG_FLAGS(drive)->max_speed =
(le16_to_cpu(cap->maxspeed) + (176/2)) / 176;
curspeed = le16_to_cpu(cap->curspeed);
maxspeed = le16_to_cpu(cap->maxspeed);
} else {
CDROM_STATE_FLAGS(drive)->current_speed =
(be16_to_cpu(cap->curspeed) + (176/2)) / 176;
CDROM_CONFIG_FLAGS(drive)->max_speed =
(be16_to_cpu(cap->maxspeed) + (176/2)) / 176;
curspeed = be16_to_cpu(cap->curspeed);
maxspeed = be16_to_cpu(cap->maxspeed);
}

CDROM_STATE_FLAGS(drive)->current_speed = (curspeed + (176/2)) / 176;
CDROM_CONFIG_FLAGS(drive)->max_speed = (maxspeed + (176/2)) / 176;
}

static
Expand Down

0 comments on commit 0e18fb5

Please sign in to comment.