From: davej@codemonkey.org.uk
To: alan@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: ide-scsi quirk.
Date: Mon, 24 Mar 2003 16:41:53 +0000 [thread overview]
Message-ID: <200303241642.h2OGg535008290@deviant.impure.org.uk> (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.
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/scsi/ide-scsi.c linux-2.5/drivers/scsi/ide-scsi.c
--- bk-linus/drivers/scsi/ide-scsi.c 2003-02-04 12:58:09.000000000 +0000
+++ linux-2.5/drivers/scsi/ide-scsi.c 2003-03-17 23:42:33.000000000 +0000
@@ -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;
}
next reply other threads:[~2003-03-24 16:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-24 16:41 davej [this message]
2003-03-24 17:30 ` ide-scsi quirk Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200303241642.h2OGg535008290@deviant.impure.org.uk \
--to=davej@codemonkey.org.uk \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.