From: Jeff Garzik <jeff@garzik.org>
To: Daniel Beichl <daniel_beichl@gmx.net>
Cc: Tejun Heo <htejun@gmail.com>, linux-ide@vger.kernel.org
Subject: Re: [PATCH] Re: 2.6.19.1, sata_sil: sata dvd writer doesn't work
Date: Thu, 24 May 2007 23:23:53 -0400 [thread overview]
Message-ID: <465656C9.4020209@garzik.org> (raw)
In-Reply-To: <463F634E.2070103@gmx.net>
Daniel Beichl wrote:
> +static int sil_check_atapi_dma(struct ata_queued_cmd *qc)
> +{
> + /* limit atapi commands less than 60bytes to pio as certain sil */
> + /* chips seem to have trouble to perform dma for these commands */
> + if ( (qc->scsicmd != NULL) &&
> + (qc->scsicmd->sc_data_direction == DMA_TO_DEVICE) &&
> + (qc->scsicmd->request_bufflen < 60) )
> + {
> + ata_dev_printk( qc->dev, KERN_INFO, "reducing cmd %02x (direction=%d, len=%d) to pio\n",
> + qc->cdb[0],
> + qc->scsicmd->sc_data_direction,
> + qc->scsicmd->request_bufflen );
> + /* do not allow dma */
> + return -1;
> + }
> +
> + /* allow dma */
> + return 0;
Comments:
1) Return values are zero or one for this hook
2) There are two data bundling methods in SCSI: single-buffer and
scatterlist. Further, SCSI is deprecating single-buffer method in favor
of always using a scatterlist. Your patch needs to support scatterlist.
Here is an example test found in libata-scsi.c that illustrates how
SCSI-aware code tests for and uses this:
if (cmd->use_sg) {
qc->__sg = (struct scatterlist *) cmd->request_buffer;
3) You need to always include a signoff line:
http://linux.yyz.us/patch-format.html
Jeff
prev parent reply other threads:[~2007-05-25 3:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <46362672.7080103@gmx.net>
[not found] ` <4636EA85.40809@t-online.de>
[not found] ` <46371628.9060905@gmail.com>
[not found] ` <46379CA1.601@t-online.de>
[not found] ` <463AEAF9.3000103@gmail.com>
2007-05-04 17:32 ` [PATCH] Re: 2.6.19.1, sata_sil: sata dvd writer doesn't work Harald Dunkel
2007-05-07 10:29 ` Tejun Heo
2007-05-07 18:21 ` Harald Dunkel
2007-05-08 14:27 ` Tejun Heo
2007-05-09 17:37 ` Harald Dunkel
2007-05-10 13:00 ` Tejun Heo
2007-05-10 20:27 ` Harald Dunkel
2007-05-11 8:33 ` Tejun Heo
2007-05-15 17:38 ` Harald Dunkel
2007-06-06 4:38 ` Harald Dunkel
2007-06-19 7:24 ` Tejun Heo
[not found] ` <4636DCA9.9050803@gmail.com>
[not found] ` <4636FBB7.3030605@gmx.net>
[not found] ` <463AE631.9030701@gmail.com>
2007-05-04 18:18 ` Daniel Beichl
2007-05-07 8:24 ` Tejun Heo
[not found] ` <463F634E.2070103@gmx.net>
2007-05-08 14:42 ` Tejun Heo
2007-05-08 14:51 ` Alan Cox
2007-05-08 14:52 ` Tejun Heo
2007-05-25 3:23 ` 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=465656C9.4020209@garzik.org \
--to=jeff@garzik.org \
--cc=daniel_beichl@gmx.net \
--cc=htejun@gmail.com \
--cc=linux-ide@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).