public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: JBottomley@parallels.com
Cc: stable@kernel.org, linux-scsi@vger.kernel.org,
	Jacek Danecki <jacek.danecki@intel.com>
Subject: [PATCH 2/9] isci: fix 32-bit operation when CONFIG_HIGHMEM64G=n
Date: Fri, 29 Jul 2011 17:16:45 -0700	[thread overview]
Message-ID: <20110730001645.28430.89776.stgit@localhost6.localdomain6> (raw)
In-Reply-To: <20110730001320.28430.53496.stgit@localhost6.localdomain6>

The unsolicited frame control infrastructure requires a table of dma
addresses for the hardware to lookup the frame buffer location by an
index.  The hardware expects the elements of this table to be 64-bit
quantities, so we cannot reference these elements as dma_addr_t.  All
unsolicited frame protocols are affected, particularly SATA-PIO and SMP
which prevented direct-attached SATA drives and expander-attached drives
to not be discovered.

Cc: <stable@kernel.org>
Reported-by: Jacek Danecki <jacek.danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/scsi/isci/unsolicited_frame_control.c |    2 +-
 drivers/scsi/isci/unsolicited_frame_control.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/isci/unsolicited_frame_control.c b/drivers/scsi/isci/unsolicited_frame_control.c
index e9e1e2a..16f88ab 100644
--- a/drivers/scsi/isci/unsolicited_frame_control.c
+++ b/drivers/scsi/isci/unsolicited_frame_control.c
@@ -72,7 +72,7 @@ int sci_unsolicited_frame_control_construct(struct isci_host *ihost)
 	 */
 	buf_len = SCU_MAX_UNSOLICITED_FRAMES * SCU_UNSOLICITED_FRAME_BUFFER_SIZE;
 	header_len = SCU_MAX_UNSOLICITED_FRAMES * sizeof(struct scu_unsolicited_frame_header);
-	size = buf_len + header_len + SCU_MAX_UNSOLICITED_FRAMES * sizeof(dma_addr_t);
+	size = buf_len + header_len + SCU_MAX_UNSOLICITED_FRAMES * sizeof(uf_control->address_table.array[0]);
 
 	/*
 	 * The Unsolicited Frame buffers are set at the start of the UF
diff --git a/drivers/scsi/isci/unsolicited_frame_control.h b/drivers/scsi/isci/unsolicited_frame_control.h
index 31cb950..75d8966 100644
--- a/drivers/scsi/isci/unsolicited_frame_control.h
+++ b/drivers/scsi/isci/unsolicited_frame_control.h
@@ -214,7 +214,7 @@ struct sci_uf_address_table_array {
 	 * starting address of the UF address table.
 	 * 64-bit pointers are required by the hardware.
 	 */
-	dma_addr_t *array;
+	u64 *array;
 
 	/**
 	 * This field specifies the physical address location for the UF


  parent reply	other threads:[~2011-07-30  0:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-30  0:16 [GIT PATCH 0/9] isci updates for 3.1 Dan Williams
2011-07-30  0:16 ` [PATCH 1/9] isci: fix sata response handling Dan Williams
2011-07-30  0:16 ` Dan Williams [this message]
2011-07-30  0:16 ` [PATCH 3/9] isci: change sas phy timeouts from 54us to 59us Dan Williams
2011-07-30  0:16 ` [PATCH 4/9] isci: Update MAINTAINERS entry for the isci driver Dan Williams
2011-07-30  0:17 ` [PATCH 5/9] isci: Adding documentation to API change and fixup sysfs registration Dan Williams
2011-07-30  0:17 ` [PATCH 6/9] isci: Leave requests alone if already terminating Dan Williams
2011-07-30  0:17 ` [PATCH 7/9] isci: dynamic interrupt coalescing Dan Williams
2011-07-30  0:17 ` [PATCH 8/9] isci: fix event-get pointer increment Dan Williams
2011-07-30  0:17 ` [PATCH 9/9] isci: add version number Dan Williams
2011-07-30 16:55   ` Stefan Richter
2011-08-01 16:24     ` Dan Williams
2011-08-01 17:38       ` Stefan Richter
2011-08-01 17:54         ` James Bottomley
2011-08-01 18:29           ` Stefan Richter
2011-08-01 18:40             ` Stefan Richter

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=20110730001645.28430.89776.stgit@localhost6.localdomain6 \
    --to=dan.j.williams@intel.com \
    --cc=JBottomley@parallels.com \
    --cc=jacek.danecki@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=stable@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