Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125150
b: refs/heads/master
c: 991cb26
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Jan 2, 2009
1 parent 4573604 commit 66f04a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 93c164af19f608c5f737eb9bed8cb4de3a872329
refs/heads/master: 991cb26a6ad287c3bc6555c41e830590a23910c4
8 changes: 7 additions & 1 deletion trunk/drivers/ide/ide-atapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
#define debug_log(fmt, args...) do {} while (0)
#endif

static inline int dev_is_idecd(ide_drive_t *drive)
{
return (drive->media == ide_cdrom || drive->media == ide_optical) &&
!(drive->dev_flags & IDE_DFLAG_SCSI);
}

/*
* Check whether we can support a device,
* based on the ATAPI IDENTIFY command results.
Expand Down Expand Up @@ -577,7 +583,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,

if (scsi)
tf_flags = 0;
else if (drive->media == ide_cdrom || drive->media == ide_optical)
else if (dev_is_idecd(drive))
tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
else
tf_flags = IDE_TFLAG_OUT_DEVICE;
Expand Down

0 comments on commit 66f04a3

Please sign in to comment.