lkml.org 
[lkml]   [2008]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] ide-atapi: use drive->waiting_for_dma
    Hello.

    Borislav Petkov wrote:

    > .. and remove PC_FLAG_DMA_IN_PROGRESS. There should
    > be no functionality change resulting from this patch.
    >
    > Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
    >

    Unfortunately, this 'patch doesnt look right...

    > diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
    > index a1d8c35..09ac062 100644
    > --- a/drivers/ide/ide-atapi.c
    > +++ b/drivers/ide/ide-atapi.c
    >
    [...]
    > @@ -303,7 +303,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
    > debug_log("Packet command completed, %d bytes transferred\n",
    > pc->xferred);
    >
    > - pc->flags &= ~PC_FLAG_DMA_IN_PROGRESS;
    > + drive->waiting_for_dma = 0;
    >

    Must've been already cleared by the dma_end() method called from this
    function.

    > @@ -347,8 +347,8 @@ cmd_finished:
    > return ide_stopped;
    > }
    >
    > - if (pc->flags & PC_FLAG_DMA_IN_PROGRESS) {
    > - pc->flags &= ~PC_FLAG_DMA_IN_PROGRESS;
    > + if (drive->waiting_for_dma) {
    > + drive->waiting_for_dma = 0;
    >

    Same here...

    > @@ -528,7 +528,7 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
    >
    > /* Begin DMA, if necessary */
    > if (pc->flags & PC_FLAG_DMA_OK) {
    > - pc->flags |= PC_FLAG_DMA_IN_PROGRESS;
    > + drive->waiting_for_dma = 1;
    >

    This flag must've been already set by the dma_setup() method called
    from ide_issue_pc().

    MBR, Sergei




    \
     
     \ /
      Last update: 2008-08-24 13:43    [W:4.390 / U:0.908 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site