Skip to contentSkip to conversation

ide-scsi quirk.

PATCH [email protected] 2 participants 2 messages Mar 24, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

Alan,
as mentioned a few weeks back, something similar to this went into 2.4 (I munged this one a bit).

It deals with the issue of DMA starting before the drive is ready iirc.

drivers/scsi/ide-scsi.c +5 -0
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/scsi/ide-scsi.c linux-2.5/drivers/scsi/ide-scsi.c
@@ -78,6 +78,7 @@ typedef struct idescsi_pc_s {
 #define PC_DMA_IN_PROGRESS		0	/* 1 while DMA in progress */
 #define PC_WRITING			1	/* Data direction */
 #define PC_TRANSFORM			2	/* transform SCSI commands */
+#define PC_DMA_OK			4	/* Use DMA */
 
 /*
  *	SCSI command transformation layer
@@ -494,6 +495,10 @@ static ide_startstop_t idescsi_transfer_
 	ide_set_handler(drive, &idescsi_pc_intr, get_timeout(pc), NULL);
 	/* Send the actual packet */
 	atapi_output_bytes(drive, scsi->pc->c, 12);
+	if (test_bit (PC_DMA_OK, &pc->flags)) {
+		set_bit (PC_DMA_IN_PROGRESS, &pc->flags);
+		(void) (HWIF(drive)->ide_dma_begin(drive));
+	}
 	return ide_started;
 }
 
#1 lore raw
Quoted 5 lines

as mentioned a few weeks back, something similar to this went into 2.4 (I munged this one a bit).

It deals with the issue of DMA starting before the drive is ready iirc.

Thats the least of the 2.5 ide-scsi problems, but yes its probably one to add