From: Jeff Garzik <jeff@garzik.org>
To: Tejun Heo <htejun@gmail.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
linux-ide@vger.kernel.org, petr@vmware.com
Subject: Re: [PATCH #upstream-fixes 2/2 UPDATED] libata-scsi: improve rbuf handling for simulated commands
Date: Tue, 29 Apr 2008 02:18:26 -0400 [thread overview]
Message-ID: <4816BDB2.7000000@garzik.org> (raw)
In-Reply-To: <48158F73.7010104@gmail.com>
Tejun Heo wrote:
> Buffer length handling in simulated commands is error-prone and full
> of bugs. There are a number of places where necessary length checks
> are missing and if the output buffer is passed in as sglist, nothing
> works.
>
> This patch adds a static buffer ata_scsi_rbuf which is sufficiently
> large to handle the larges output from simulated commands (4k
> currently), let all simulte functions write to the buffer and removes
> all length checks as we know that there always is enough buffer space.
> Copying in (for ATAPI inquiry fix up) and out are handled by
> sg_copy_to/from_buffer() behind ata_scsi_rbuf_get/put() interface
> which handles sglist properly.
>
> This patch is inspired from buffer length check fix patch from Petr
> Vandrovec.
>
> Updated to use sg_copy_to/from_buffer() as suggested by FUJITA
> Tomonori.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Petr Vandrovec <petr@vmware.com>
> Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
> drivers/ata/libata-scsi.c | 446
applied 1-2
prev parent reply other threads:[~2008-04-29 6:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-28 8:16 [PATCH #upstream-fixes 1/2] libata-scsi: clean up inquiry / mode sense related functions Tejun Heo
2008-04-28 8:17 ` [PATCH #upstream-fixes 2/2] libata-scsi: improve rbuf handling for simulated commands Tejun Heo
2008-04-28 8:23 ` Petr Vandrovec
2008-04-28 8:37 ` FUJITA Tomonori
2008-04-28 8:48 ` [PATCH #upstream-fixes 2/2 UPDATED] " Tejun Heo
2008-04-29 6:18 ` Jeff Garzik [this message]
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=4816BDB2.7000000@garzik.org \
--to=jeff@garzik.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=htejun@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=petr@vmware.com \
/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).