All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.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 07:35:22 -0500	[thread overview]
Message-ID: <437B278A.6050201@pobox.com> (raw)
In-Reply-To: <20051116080759.GD22807@htj.dyndns.org>

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.


> @@ -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.

	Jeff



       reply	other threads:[~2005-11-16 12:35 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 ` Jeff Garzik [this message]
2005-11-16 13:24   ` [PATCH 4/5] sil24: add ATAPI support Tejun Heo

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=437B278A.6050201@pobox.com \
    --to=jgarzik@pobox.com \
    --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 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.