From: Gunther Mayer <gunther.mayer@gmx.net>
To: Andre Hedrick <andre@linux-ide.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] IDE PIO write Fix #2
Date: Mon, 20 May 2002 08:48:15 +0200 [thread overview]
Message-ID: <3CE89C2F.20ED671B@gmx.net> (raw)
In-Reply-To: <Pine.LNX.4.10.10205191826310.8582-100000@master.linux-ide.org>
Hi Andre,
1)
I follow your arguments regarding BUSY_STAT handled earlier.
2)
Can you explain, why the code looks at "rq->current_nr_sectors==1" ?
In ATA-4 there is no special handling for "single-sector-transfer" or
"last-sector-transfer".
Andre Hedrick wrote:
> Hi Gunther,
>
> If you isolate that single section of code you are correct!
> However taking into the entire state diagram handler, you are wrong.
>
> Your issue of BUSY_STAT is addressed long before we even consider
> transferring a sector. Additionally since we exit the state diagram after
> the last interrupt and check status we have met the requirements.
> DRIVE_READY exclusive to BUSY_STAT.
>
> Also note, my code base properly attempts to rewind the one whole sector
> on a media failure, this works since it is single sector transfers.
> Also note it is perfectly safe for partial completions and updating to the
> upper layers.
>
> /*
> * Handler for command with PIO data-out phase WRITE
> */
> ide_startstop_t task_out_intr (ide_drive_t *drive)
> {
> byte stat = INB(drive, IDE_STATUS_REG);
> struct request *rq = HWGROUP(drive)->rq;
> char *pBuf = NULL;
> unsigned long flags;
>
> if (!OK_STAT(stat,DRIVE_READY,drive->bad_wstat)) {
> DTF("%s: WRITE attempting to recover last " \
> "sector counter status=0x%02x\n",
> drive->name, stat);
> rq->current_nr_sectors++;
> return DRIVER(drive)->error(drive, "task_out_intr", stat);
> }
> /*
> * Safe to update request for partial completions.
> * We have a good STATUS CHECK!!!
> */
> if (!rq->current_nr_sectors)
> if (!DRIVER(drive)->end_request(drive, 1))
> return ide_stopped;
> if ((rq->current_nr_sectors==1) ^ (stat & DRQ_STAT)) {
>
...
next prev parent reply other threads:[~2002-05-20 7:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-14 2:41 [PATCH] IDE PIO write Fix #2 tomita
2002-05-14 9:20 ` Martin Dalecki
2002-05-14 19:29 ` Linus Torvalds
2002-05-15 5:47 ` Andre Hedrick
2002-05-15 9:47 ` Martin Dalecki
2002-05-17 19:24 ` Gunther Mayer
2002-05-20 1:41 ` Andre Hedrick
2002-05-20 6:48 ` Gunther Mayer [this message]
2002-05-20 20:26 ` 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=3CE89C2F.20ED671B@gmx.net \
--to=gunther.mayer@gmx.net \
--cc=andre@linux-ide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox