From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Borislav Petkov <bbpetkov@yahoo.de>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH 3/32] ide-tape: remove struct idetape_request_sense_result_t
Date: Sun, 27 Jan 2008 16:19:05 +0100 [thread overview]
Message-ID: <200801271619.06013.bzolnier@gmail.com> (raw)
In-Reply-To: <1201423312-2460-4-git-send-email-bbpetkov@yahoo.de>
On Sunday 27 January 2008, Borislav Petkov wrote:
> Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
> ---
> drivers/ide/ide-tape.c | 83 +++++++++++++++--------------------------------
> 1 files changed, 27 insertions(+), 56 deletions(-)
applied with minor changes
> diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
> index 3bedeb8..173ac0d 100644
> --- a/drivers/ide/ide-tape.c
> +++ b/drivers/ide/ide-tape.c
[...]
> /*
> - * If error was the result of a zero-length read or write command,
> - * with sense key=5, asc=0x22, ascq=0, let it slide. Some drives
> - * (i.e. Seagate STT3401A Travan) don't support 0-length read/writes.
> + * If error was the result of a zero-length read or write command, with
> + * sense key=5, asc=0x22, ascq=0, let it slide. Some drives (i.e.
> + * Seagate STT3401A Travan) don't support 0-length read/writes.
> */
This chunk is unnecessary, I dropped it.
> if ((pc->c[0] == IDETAPE_READ_CMD || pc->c[0] == IDETAPE_WRITE_CMD)
> - && pc->c[4] == 0 && pc->c[3] == 0 && pc->c[2] == 0) { /* length==0 */
> - if (result->sense_key == 5) {
> + /* length==0 */
> + && pc->c[4] == 0 && pc->c[3] == 0 && pc->c[2] == 0) {
> + if (tape->sense_key == 5) {
> /* don't report an error, everything's ok */
> pc->error = 0;
> /* don't retry read/write */
> set_bit(PC_ABORT, &pc->flags);
> }
> }
> - if (pc->c[0] == IDETAPE_READ_CMD && result->filemark) {
> + if (pc->c[0] == IDETAPE_READ_CMD && !!(sense[2] & 0x80)) {
needless "!!" removed
> pc->error = IDETAPE_ERROR_FILEMARK;
> set_bit(PC_ABORT, &pc->flags);
> }
> if (pc->c[0] == IDETAPE_WRITE_CMD) {
> - if (result->eom ||
> - (result->sense_key == 0xd && result->asc == 0x0 &&
> - result->ascq == 0x2)) {
> + if (!!(sense[2] & 0x40) ||
ditto
next prev parent reply other threads:[~2008-01-27 19:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-27 8:41 [PATCH 0/32] ide-tape redux v1 Borislav Petkov
2008-01-27 8:41 ` [PATCH 1/32] ide-tape: move historical changelog to Documentation/ide/ChangeLog.ide-tape.1995-2002 Borislav Petkov
2008-01-27 15:18 ` Bartlomiej Zolnierkiewicz
2008-01-27 8:41 ` [PATCH 2/32] ide-tape: remove dead code Borislav Petkov
2008-01-27 8:41 ` [PATCH 3/32] ide-tape: remove struct idetape_request_sense_result_t Borislav Petkov
2008-01-27 15:19 ` Bartlomiej Zolnierkiewicz [this message]
2008-01-27 8:41 ` [PATCH 4/32] ide-tape: remove struct idetape_mode_parameter_header_t Borislav Petkov
2008-01-27 15:25 ` Bartlomiej Zolnierkiewicz
2008-01-27 8:41 ` [PATCH 5/32] ide-tape: remove IDETAPE_DEBUG_INFO Borislav Petkov
2008-01-27 19:45 ` [PATCH 0/32] ide-tape redux v1 Bartlomiej Zolnierkiewicz
2008-01-28 5:43 ` Borislav Petkov
2008-01-30 0:29 ` Bartlomiej Zolnierkiewicz
2008-02-01 8:21 ` Borislav Petkov
2008-01-28 15:54 ` Bartlomiej Zolnierkiewicz
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=200801271619.06013.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=bbpetkov@yahoo.de \
--cc=linux-ide@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).