From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: "linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>
Subject: Re: [PATCH 4/5] sil24: add ATAPI support
Date: Wed, 16 Nov 2005 22:24:52 +0900 [thread overview]
Message-ID: <437B3324.7030605@gmail.com> (raw)
In-Reply-To: <437B278A.6050201@pobox.com>
Jeff Garzik wrote:
> Tejun Heo wrote:
>
>> + case ATA_PROT_ATAPI:
>> + case ATA_PROT_ATAPI_DMA:
>> + case ATA_PROT_ATAPI_NODATA:
>> + prb = &cb->atapi.prb;
>> + sge = cb->atapi.sge;
>> + memset(cb->atapi.cdb, 0, 32);
>> + memcpy(cb->atapi.cdb, qc->cdb, ap->cdb_len);
>> +
>> + if (unlikely((ap->cdb_len == 16) ^ pp->cdb16)) {
>> + pp->cdb16 = ap->cdb_len == 16;
>> + if (pp->cdb16)
>> + writel(PORT_CS_CDB16, port + PORT_CTRL_STAT);
>> + else
>> + writel(PORT_CS_CDB16, port + PORT_CTRL_CLR);
>> + }
>
>
> NAK:
> * you should set PORT_CS_CDB16 from ->dev_config(), not needlessly test
> inside the fast path
> * thus, no need to cache cdb16 flag. just tell the hardware once, and
> then everybody agrees on the correct value.
>
Oh.. I didn't know about ->dev_config(). Thanks for pointing out.
>
>> @@ -772,6 +802,9 @@ static int sil24_port_start(struct ata_p
>>
>> ap->private_data = pp;
>>
>> + /* default to 12byte CDB */
>> + writel(PORT_CS_CDB16, port + PORT_CTRL_CLR);
>> +
>> return 0;
>
>
> If you set it in ->dev_config(), this should go away.
Sure.
--
tejun
prev parent reply other threads:[~2005-11-16 13:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20051116080759.GD22807@htj.dyndns.org>
2005-11-16 12:35 ` [PATCH 4/5] sil24: add ATAPI support Jeff Garzik
2005-11-16 13:24 ` Tejun Heo [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=437B3324.7030605@gmail.com \
--to=htejun@gmail.com \
--cc=jgarzik@pobox.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 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.