From: Jens Axboe <axboe@suse.de>
To: Douglas Gilbert <dougg@torque.net>
Cc: Jeff Garzik <jgarzik@pobox.com>,
linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: error processing + rw 6 byte fix
Date: Sat, 27 Aug 2005 09:17:33 +0200 [thread overview]
Message-ID: <20050827071729.GL4018@suse.de> (raw)
In-Reply-To: <430FF537.7010705@torque.net>
On Sat, Aug 27 2005, Douglas Gilbert wrote:
> Jeff Garzik wrote:
> > Does the attached look OK to everybody?
> >
>
> Jeff,
> Yes.
>
> And after an exchange with Jens, it would probably be
> safer to map transfer_length=0 for READ_10 and READ_16
> (as well as WRITE_10 and WRITE_16) to a nop on the ATA
> side. Otherwise an ATA disk may attempt to transfer 2**16
> sectors. [Only READ_6 and WRITE_6 have the quirky "0 means
> 256" definition, in the larger commands "0 means 0".]
Yes, that part needs to be added as well. Jeff, the below looks good for
the READ/WRITE_6 case.
> > if (scsicmd[0] == READ_6 || scsicmd[0] == WRITE_6) {
> > qc->nsect = tf->nsect = scsicmd[4];
> > + if (!qc->nsect) {
> > + qc->nsect = 256;
> > + if (lba48)
> > + tf->hob_nsect = 1;
> > + }
> > +
> > tf->lbal = scsicmd[3];
> > tf->lbam = scsicmd[2];
> > tf->lbah = scsicmd[1] & 0x1f; /* mask out reserved bits */
>
>
--
Jens Axboe
next prev parent reply other threads:[~2005-08-27 7:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-22 9:02 [PATCH] libata: error processing + rw 6 byte fix Douglas Gilbert
2005-08-22 19:10 ` Jeff Garzik
2005-08-23 12:14 ` Douglas Gilbert
2005-08-27 3:31 ` Jeff Garzik
2005-08-23 7:13 ` Jens Axboe
2005-08-23 12:33 ` Douglas Gilbert
2005-08-23 12:44 ` Jens Axboe
2005-08-27 3:26 ` Jeff Garzik
2005-08-27 5:08 ` Douglas Gilbert
2005-08-27 7:17 ` Jens Axboe [this message]
2005-08-27 8:20 ` Jeff Garzik
2005-08-27 10:01 ` Jens Axboe
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=20050827071729.GL4018@suse.de \
--to=axboe@suse.de \
--cc=dougg@torque.net \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@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.