mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 00:29:50 +00:00
ide-atapi: assign taskfile flags per device type
There should be no functional change resulting from this patch. Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
12469ac0c1
commit
f9476b96b5
@ -544,6 +544,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
|
|||||||
{
|
{
|
||||||
struct ide_atapi_pc *pc = drive->pc;
|
struct ide_atapi_pc *pc = drive->pc;
|
||||||
ide_hwif_t *hwif = drive->hwif;
|
ide_hwif_t *hwif = drive->hwif;
|
||||||
|
u32 tf_flags;
|
||||||
u16 bcount;
|
u16 bcount;
|
||||||
u8 scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI);
|
u8 scsi = !!(drive->dev_flags & IDE_DFLAG_SCSI);
|
||||||
|
|
||||||
@ -574,8 +575,14 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout,
|
|||||||
if (!drive->dma)
|
if (!drive->dma)
|
||||||
pc->flags &= ~PC_FLAG_DMA_OK;
|
pc->flags &= ~PC_FLAG_DMA_OK;
|
||||||
|
|
||||||
ide_pktcmd_tf_load(drive, scsi ? 0 : IDE_TFLAG_OUT_DEVICE, bcount,
|
if (scsi)
|
||||||
drive->dma);
|
tf_flags = 0;
|
||||||
|
else if (drive->media == ide_cdrom || drive->media == ide_optical)
|
||||||
|
tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
|
||||||
|
else
|
||||||
|
tf_flags = IDE_TFLAG_OUT_DEVICE;
|
||||||
|
|
||||||
|
ide_pktcmd_tf_load(drive, tf_flags, bcount, drive->dma);
|
||||||
|
|
||||||
/* Issue the packet command */
|
/* Issue the packet command */
|
||||||
if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
|
if (drive->atapi_flags & IDE_AFLAG_DRQ_INTERRUPT) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user