From: Jens Axboe <axboe@suse.de>
To: Andre Hedrick <andre@linuxdiskcert.org>
Cc: john e weber <john@worldwideweber.org>, linux-kernel@vger.kernel.org
Subject: Re: DO NOT USE IT (Re: linux-2.5.3-pre1 and IDE Driver Trouble) FATAL
Date: Thu, 17 Jan 2002 08:36:22 +0100 [thread overview]
Message-ID: <20020117083622.J13372@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.33.0201091206030.2530-100000@worldwideweber.org> <Pine.LNX.4.10.10201161259270.29434-100000@master.linux-ide.org>
In-Reply-To: <Pine.LNX.4.10.10201161259270.29434-100000@master.linux-ide.org>
[-- Attachment #1: Type: text/plain, Size: 978 bytes --]
On Wed, Jan 16 2002, Andre Hedrick wrote:
>
>
> This is a problem that is bigger than simplely issueing a simple
> setfeatures non-data-pio command. All of the PIO data-phases are broken.
> Nothing works but DMA, and there is no reason it should fail.
>
> Something has gone totally wrong between the 2.5.1 patch submitted to it
> being applied for the creation of 2.5.3-pre1.
>
> If the driver falls out of DMA, DEADBOX!!!!
> There is a conflict of BIO and ACB and it is very fatal.
>
> Therefore I will have to withdraw the patch and resubmit with the legacy
> data-path added back so the kernel development can continue.
>
> The only kernel in the development series known to work is 2.5.1.
> However it appears that several people can not successfully use this
> CodeBase either.
2.5.1 still requires at least this patch to be closer to correct, I
haven't verified if it does the trick completely though. For 2.5.3-pre1,
more work needs to be done.
--
Jens Axboe
[-- Attachment #2: ide-map-1 --]
[-- Type: text/plain, Size: 4145 bytes --]
--- /opt/kernel/linux-2.5.3-pre1/drivers/ide/ide-taskfile.c Wed Jan 16 02:25:35 2002
+++ drivers/ide/ide-taskfile.c Thu Jan 17 00:29:27 2002
@@ -723,6 +723,7 @@
byte io_32bit = drive->io_32bit;
struct request *rq = HWGROUP(drive)->rq;
char *pBuf = NULL;
+ unsigned long flags;
if (!OK_STAT(stat,DATA_READY,BAD_R_STAT)) {
if (stat & (ERR_STAT|DRQ_STAT)) {
@@ -735,11 +736,12 @@
}
}
DTF("stat: %02x\n", stat);
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);
DTF("Read: %p, rq->current_nr_sectors: %d\n", pBuf, (int) rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_input_data(drive, pBuf, SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
if (--rq->current_nr_sectors <= 0) {
@@ -809,6 +811,7 @@
byte io_32bit = drive->io_32bit;
struct request *rq = HWGROUP(drive)->rq;
char *pBuf = NULL;
+ unsigned long flags;
if (!OK_STAT(stat,DATA_READY,BAD_R_STAT)) {
if (stat & (ERR_STAT|DRQ_STAT)) {
@@ -834,10 +837,11 @@
*/
nsect = 1;
while (rq->current_nr_sectors) {
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);
DTF("Multiread: %p, nsect: %d, rq->current_nr_sectors: %ld\n", pBuf, nsect, rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_input_data(drive, pBuf, nsect * SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors -= nsect;
@@ -849,12 +853,13 @@
#endif /* ALTSTAT_SCREW_UP */
nsect = (rq->current_nr_sectors > msect) ? msect : rq->current_nr_sectors;
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);
DTF("Multiread: %p, nsect: %d , rq->current_nr_sectors: %ld\n",
pBuf, nsect, rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_input_data(drive, pBuf, nsect * SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors -= nsect;
@@ -913,6 +918,7 @@
byte io_32bit = drive->io_32bit;
struct request *rq = HWGROUP(drive)->rq;
char *pBuf = NULL;
+ unsigned long flags;
if (!rq->current_nr_sectors) {
ide_end_request(1, HWGROUP(drive));
@@ -924,10 +930,11 @@
}
if ((rq->current_nr_sectors==1) ^ (stat & DRQ_STAT)) {
rq = HWGROUP(drive)->rq;
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);
DTF("write: %p, rq->current_nr_sectors: %d\n", pBuf, (int) rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_output_data(drive, pBuf, SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors--;
@@ -961,6 +968,7 @@
struct request *rq = HWGROUP(drive)->rq;
ide_hwgroup_t *hwgroup = HWGROUP(drive);
char *pBuf = NULL;
+ unsigned long flags;
/*
* (ks/hs): Handle last IRQ on multi-sector transfer,
@@ -994,10 +1002,11 @@
if (!msect) {
nsect = 1;
while (rq->current_nr_sectors) {
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_unmap_buffer(rq, &flags);
DTF("Multiwrite: %p, nsect: %d, rq->current_nr_sectors: %ld\n", pBuf, nsect, rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_output_data(drive, pBuf, nsect * SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors -= nsect;
@@ -1009,11 +1018,12 @@
#endif /* ALTSTAT_SCREW_UP */
nsect = (rq->current_nr_sectors > msect) ? msect : rq->current_nr_sectors;
- pBuf = rq->buffer + ((rq->nr_sectors - rq->current_nr_sectors) * SECTOR_SIZE);
+ pBuf = ide_map_buffer(rq, &flags);
DTF("Multiwrite: %p, nsect: %d , rq->current_nr_sectors: %ld\n",
pBuf, nsect, rq->current_nr_sectors);
drive->io_32bit = 0;
taskfile_output_data(drive, pBuf, nsect * SECTOR_WORDS);
+ ide_unmap_buffer(pBuf, &flags);
drive->io_32bit = io_32bit;
rq->errors = 0;
rq->current_nr_sectors -= nsect;
next prev parent reply other threads:[~2002-01-17 7:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20020107202033.18893.qmail@web10007.mail.yahoo.com>
2002-01-16 19:56 ` linux-2.5.3-pre1 and IDE Driver Trouble john e weber
2002-01-16 21:07 ` DO NOT USE IT (Re: linux-2.5.3-pre1 and IDE Driver Trouble) FATAL Andre Hedrick
2002-01-17 7:36 ` Jens Axboe [this message]
[not found] <20020118010443.GB5550@schmorp.de>
2002-01-18 1:31 ` Andre Hedrick
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=20020117083622.J13372@suse.de \
--to=axboe@suse.de \
--cc=andre@linuxdiskcert.org \
--cc=john@worldwideweber.org \
--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.