linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Lord <liml@rtr.ca>
To: Jeff Garzik <jgarzik@pobox.com>,
	IDE/ATA development list <linux-ide@vger.kernel.org>
Subject: [PATCH 07/14] sata_mv Use hqtag instead of ioid
Date: Thu, 24 Jan 2008 16:00:55 -0500	[thread overview]
Message-ID: <4798FC87.3080102@rtr.ca> (raw)
In-Reply-To: <4798FB68.70400@rtr.ca>

sata_mv Use hqtag instead of ioid.

Simplify tag handling by using the cid/hqtag field instead of ioid,
as recommended by Marvell.

Signed-off-by: Mark Lord <mlord@pobox.com>

--- old/drivers/ata/sata_mv.c	2008-01-24 12:07:16.000000000 -0500
+++ new/drivers/ata/sata_mv.c	2008-01-24 12:35:14.000000000 -0500
@@ -132,15 +132,12 @@
 
 	CRQB_FLAG_READ		= (1 << 0),
 	CRQB_TAG_SHIFT		= 1,
-	CRQB_IOID_SHIFT		= 6,	/* CRQB Gen-II/IIE IO Id shift */
 	CRQB_HOSTQ_SHIFT	= 17,	/* CRQB Gen-II/IIE HostQueTag shift */
 	CRQB_CMD_ADDR_SHIFT	= 8,
 	CRQB_CMD_CS		= (0x2 << 11),
 	CRQB_CMD_LAST		= (1 << 15),
 
 	CRPB_FLAG_STATUS_SHIFT	= 8,
-	CRPB_IOID_SHIFT_6	= 5,	/* CRPB Gen-II IO Id shift */
-	CRPB_IOID_SHIFT_7	= 7,	/* CRPB Gen-IIE IO Id shift */
 
 	EPRD_FLAG_END_OF_TBL	= (1 << 31),
 
@@ -1252,7 +1249,6 @@
 		flags |= CRQB_FLAG_READ;
 	WARN_ON(MV_MAX_Q_DEPTH <= qc->tag);
 	flags |= qc->tag << CRQB_TAG_SHIFT;
-	flags |= qc->tag << CRQB_IOID_SHIFT;	/* 50xx appears to ignore this*/
 
 	/* get current queue index from software */
 	in_index = pp->req_idx & MV_MAX_Q_DEPTH_MASK;
@@ -1345,8 +1341,7 @@
 
 	WARN_ON(MV_MAX_Q_DEPTH <= qc->tag);
 	flags |= qc->tag << CRQB_TAG_SHIFT;
-	flags |= qc->tag << CRQB_IOID_SHIFT;	/* "I/O Id" is -really-
-						   what we use as our tag */
+	flags |= qc->tag << CRQB_HOSTQ_SHIFT;
 
 	/* get current queue index from software */
 	in_index = pp->req_idx & MV_MAX_Q_DEPTH_MASK;
@@ -1587,13 +1582,8 @@
 		 * support for queueing.  this works transparently for
 		 * queued and non-queued modes.
 		 */
-		else if (IS_GEN_II(hpriv))
-			tag = (le16_to_cpu(pp->crpb[out_index].id)
-				>> CRPB_IOID_SHIFT_6) & 0x3f;
-
-		else /* IS_GEN_IIE */
-			tag = (le16_to_cpu(pp->crpb[out_index].id)
-				>> CRPB_IOID_SHIFT_7) & 0x3f;
+		else
+			tag = le16_to_cpu(pp->crpb[out_index].id) & 0x1f;
 
 		qc = ata_qc_from_tag(ap, tag);
 

  parent reply	other threads:[~2008-01-24 21:00 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-24 20:56 [PATCH 00/12] sata_mv NCQ support Mark Lord
2008-01-24 20:57 ` [PATCH 01/14] sata_mv EH fixes Mark Lord
2008-01-26  4:09   ` Jeff Garzik
2008-01-24 20:57 ` [PATCH 02/14] sata_mv Mask transient IRQs Mark Lord
2008-01-26  4:10   ` Jeff Garzik
2008-01-26 15:11     ` Mark Lord
2008-01-24 20:58 ` [PATCH 03/14] sata_mv Clear queue indexes on chip restart Mark Lord
2008-01-24 20:59 ` [PATCH 04/14] sata_mv rename base to port_mmio Mark Lord
2008-01-26  4:11   ` Jeff Garzik
2008-01-24 20:59 ` [PATCH 05/14] sata_mv Fix EDMA configuration Mark Lord
2008-01-26  4:17   ` Jeff Garzik
2008-01-26 15:12     ` Mark Lord
2008-01-24 21:00 ` [PATCH 06/14] sata_mv Add want_ncq parameter for " Mark Lord
2008-01-26  4:18   ` Jeff Garzik
2008-01-24 21:00 ` Mark Lord [this message]
2008-01-26  4:19   ` [PATCH 07/14] sata_mv Use hqtag instead of ioid Jeff Garzik
2008-01-26 15:14     ` Mark Lord
2008-01-24 21:01 ` [PATCH 08/14] sata_mv Ignore response status LSB on NCQ Mark Lord
2008-01-24 21:01 ` [PATCH 09/14] sata_mv Restrict max_sectors to 8-bits on GenII NCQ Mark Lord
2008-01-26  4:21   ` Jeff Garzik
2008-01-24 21:02 ` [PATCH 10/14] sata_mv Use DMA memory pools for hardware memory tables Mark Lord
2008-01-26  4:25   ` Jeff Garzik
2008-01-26 15:18     ` Mark Lord
2008-01-26 15:30       ` Mark Lord
2008-01-26 15:45         ` Jeff Garzik
2008-01-26 18:27           ` Mark Lord
2008-01-26 15:20     ` Mark Lord
2008-01-24 21:02 ` [PATCH 11/12] sata_mv Introduce per-tag SG tables Mark Lord
2008-01-26  4:26   ` Jeff Garzik
2008-01-24 21:03 ` [PATCH 12/14] sata_mv Enable NCQ operation Mark Lord
2008-01-26  4:26   ` Jeff Garzik
2008-01-24 21:03 ` [PATCH 13/14] sata_mv No soft resets Mark Lord
2008-01-26  4:28   ` Jeff Garzik
2008-01-26 15:21     ` Mark Lord
2008-01-24 21:04 ` [PATCH 14/14] sata_mv Comments and version bump Mark Lord
2008-01-25 19:38   ` [PATCH 14/14] sata_mv Comments and version bump (v.2) Mark Lord
2008-01-24 21:06 ` [PATCH 00/12] sata_mv NCQ support Mark Lord
2008-01-25  0:04 ` [PATCH 15/14] " Mark Lord
2008-01-25  0:08   ` Tejun Heo
2008-01-26  4:28   ` Jeff Garzik
2008-01-26  4:14 ` [PATCH 00/12] " Jeff Garzik

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=4798FC87.3080102@rtr.ca \
    --to=liml@rtr.ca \
    --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 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).