linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, alan@lxorguk.ukuu.org.uk, lkml@rtr.ca,
	forrest.zhao@intel.com, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 02/17] libata-link: add PMP related ATA constants
Date: Sat, 8 Jul 2006 14:45:35 +0900	[thread overview]
Message-ID: <11523375353295-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11523375353473-git-send-email-htejun@gmail.com>

Add Port Multiplier related ATA constants and macros.  Some of these
will be used by ata_link implementation.

Signed-off-by: Tejun Heo <htejun@gmail.com>

---

 include/linux/ata.h |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

4681138079e48198ac890673c23d58a57a4743b4
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 3671af8..26494bb 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -154,6 +154,8 @@ enum {
 	ATA_CMD_READ_NATIVE_MAX	= 0xF8,
 	ATA_CMD_READ_NATIVE_MAX_EXT = 0x27,
 	ATA_CMD_READ_LOG_EXT	= 0x2f,
+	ATA_CMD_PMP_READ	= 0xE4,
+	ATA_CMD_PMP_WRITE	= 0xE8,
 
 	/* READ_LOG_EXT pages */
 	ATA_LOG_SATA_NCQ	= 0x10,
@@ -190,6 +192,28 @@ enum {
 						   0=to device, 1=to host */
 	ATAPI_CDB_LEN		= 16,
 
+	/* PMP stuff */
+	SATA_PMP_MAX_PORTS	= 15,
+	SATA_PMP_CTRL_PORT	= 15,
+
+	SATA_PMP_GSCR_DWORDS	= 128,
+	SATA_PMP_GSCR_PROD_ID	= 0,
+	SATA_PMP_GSCR_REV	= 1,
+	SATA_PMP_GSCR_PORT_INFO	= 2,
+	SATA_PMP_GSCR_ERROR	= 32,
+	SATA_PMP_GSCR_ERROR_EN	= 33,
+	SATA_PMP_GSCR_FEAT	= 64,
+	SATA_PMP_GSCR_FEAT_EN	= 96,
+
+	SATA_PMP_PSCR_STATUS	= 0,
+	SATA_PMP_PSCR_ERROR	= 1,
+	SATA_PMP_PSCR_CONTROL	= 2,
+
+	SATA_PMP_FEAT_BIST	= (1 << 0),
+	SATA_PMP_FEAT_PMREQ	= (1 << 1),
+	SATA_PMP_FEAT_DYNSSC	= (1 << 2),
+	SATA_PMP_FEAT_NOTIFY	= (1 << 3),
+
 	/* cable types */
 	ATA_CBL_NONE		= 0,
 	ATA_CBL_PATA40		= 1,
@@ -366,4 +390,9 @@ static inline int lba_48_ok(u64 block, u
 	return ((block + n_block - 1) < ((u64)1 << 48)) && (n_block <= 65536);
 }
 
+#define sata_pmp_gscr_vendor(gscr)	((gscr)[SATA_PMP_GSCR_PROD_ID] & 0xffff)
+#define sata_pmp_gscr_devid(gscr)	((gscr)[SATA_PMP_GSCR_PROD_ID] >> 16)
+#define sata_pmp_gscr_rev(gscr)		(((gscr)[SATA_PMP_GSCR_REV] >> 8) & 0xff)
+#define sata_pmp_gscr_ports(gscr)	((gscr)[SATA_PMP_GSCR_PORT_INFO] & 0xf)
+
 #endif /* __LINUX_ATA_H__ */
-- 
1.3.2



  parent reply	other threads:[~2006-07-08  5:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08  5:45 [PATCHSET 1/3] implement ata_link, take 2 Tejun Heo
2006-07-08  5:45 ` [PATCH 03/17] libata-link: introduce ata_link Tejun Heo
2006-07-19 20:26   ` Jeff Garzik
2006-07-24  6:19     ` Tejun Heo
2006-07-08  5:45 ` Tejun Heo [this message]
2006-07-19 20:24   ` [PATCH 02/17] libata-link: add PMP related ATA constants Jeff Garzik
2006-07-08  5:45 ` [PATCH 01/17] libata-link: separate out ata_eh_handle_dev_fail() Tejun Heo
2006-07-08  5:45 ` [PATCH 06/17] libata-link: linkify EH action helpers Tejun Heo
2006-07-08  5:45 ` [PATCH 07/17] libata-link: linkify reset Tejun Heo
2006-07-08  5:45 ` [PATCH 04/17] libata-link: implement and use link/device iterators Tejun Heo
2006-07-08  5:45 ` [PATCH 05/17] libata-link: linkify PHY-related functions Tejun Heo
2006-07-08  5:45 ` [PATCH 08/17] libata-link: linkify config/EH related functions Tejun Heo
2006-07-08  5:45 ` [PATCH 12/17] libata-link: add PMP links Tejun Heo
2006-07-08  5:45 ` [PATCH 09/17] libata-link: separate out link initialization functions Tejun Heo
2006-07-08  5:45 ` [PATCH 11/17] libata-link: implement ata_link_abort() Tejun Heo
2006-07-08  5:45 ` [PATCH 13/17] libata-link: update ata_scsi_error() to handle PMP links Tejun Heo
2006-07-08  5:45 ` [PATCH 10/17] libata-link: implement link->reset_tries Tejun Heo
2006-07-08  5:45 ` [PATCH 15/17] libata-link: update EH to deal with PMP links Tejun Heo
2006-07-08  5:45 ` [PATCH 16/17] libata-link: update hotplug to handle " Tejun Heo
2006-07-08  5:45 ` [PATCH 17/17] libata-link: update Power Management " Tejun Heo
2006-07-19 20:29   ` Jeff Garzik
2006-07-08  5:45 ` [PATCH 14/17] libata-link: update ata_dev_configure() to deal with " 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=11523375353295-git-send-email-htejun@gmail.com \
    --to=htejun@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=forrest.zhao@intel.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=lkml@rtr.ca \
    /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).