Re: [PATCH] ide-atapi: use drive->waiting_for_dma

From: Sergei Shtylyov
Date: Sun Aug 24 2008 - 07:41:39 EST


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@xxxxxxxxx>

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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/