+ ieee1394-ohci1394-set-address-range-properties.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     ieee1394: ohci1394: set address range properties

has been added to the -mm tree.  Its filename is

     ieee1394-ohci1394-set-address-range-properties.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: ieee1394: ohci1394: set address range properties
From: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>


This patch supplies the API extension introduced by patch "ieee1394: extend
lowlevel API for address range properties" with proper addresses.

Like in patch ''ohci1394, sbp2: fix "scsi_add_device failed" with PL-3507
based devices'', 1 TeraByte is chosen as physical upper bound.  This leaves a
window for the middle address range.  This choice is only relevant for
adapters which actually have a programmable pysical upper bound register. 
(Only ALi and Fujitsu adapters are known for this.  Most adapters have a fixed
bound at 4 GB.) The middle address range is suitable for posted writes.

AFAICS, PCILynx does not support physical DMA nor posted writes, at least as
programmed under Linux.  Therefore no equivalent change in the pcilynx driver
is necessary.  There is also a an out-of-tree driver for GP2Lynx.  I assume
this hardware does not support these OHCI features either.

Signed-off-by: Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx>
Cc: Jody McIntyre <scjody@xxxxxxxxxxxxxx>
Cc: Ben Collins <bcollins@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/ieee1394/ohci1394.c |   11 ++++++++++-
 drivers/ieee1394/ohci1394.h |   10 ++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff -puN drivers/ieee1394/ohci1394.c~ieee1394-ohci1394-set-address-range-properties drivers/ieee1394/ohci1394.c
--- 25/drivers/ieee1394/ohci1394.c~ieee1394-ohci1394-set-address-range-properties	Fri Jun  2 14:44:02 2006
+++ 25-akpm/drivers/ieee1394/ohci1394.c	Fri Jun  2 14:44:02 2006
@@ -553,7 +553,8 @@ static void ohci_initialize(struct ti_oh
 	 * register content.
 	 * To actually enable physical responses is the job of our interrupt
 	 * handler which programs the physical request filter. */
-	reg_write(ohci, OHCI1394_PhyUpperBound, 0x01000000);
+	reg_write(ohci, OHCI1394_PhyUpperBound,
+		  OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED >> 16);
 
 	DBGMSG("physUpperBoundOffset=%08x",
 	       reg_read(ohci, OHCI1394_PhyUpperBound));
@@ -3414,6 +3415,14 @@ static int __devinit ohci1394_pci_probe(
 	host->csr.max_rec = (reg_read(ohci, OHCI1394_BusOptions) >> 12) & 0xf;
 	host->csr.lnk_spd = reg_read(ohci, OHCI1394_BusOptions) & 0x7;
 
+	if (phys_dma) {
+		host->low_addr_space =
+			(u64) reg_read(ohci, OHCI1394_PhyUpperBound) << 16;
+		if (!host->low_addr_space)
+			host->low_addr_space = OHCI1394_PHYS_UPPER_BOUND_FIXED;
+	}
+	host->middle_addr_space = OHCI1394_MIDDLE_ADDRESS_SPACE;
+
 	/* Tell the highlevel this host is ready */
 	if (hpsb_add_host(host))
 		FAIL(-ENOMEM, "Failed to register host with highlevel");
diff -puN drivers/ieee1394/ohci1394.h~ieee1394-ohci1394-set-address-range-properties drivers/ieee1394/ohci1394.h
--- 25/drivers/ieee1394/ohci1394.h~ieee1394-ohci1394-set-address-range-properties	Fri Jun  2 14:44:02 2006
+++ 25-akpm/drivers/ieee1394/ohci1394.h	Fri Jun  2 14:44:02 2006
@@ -443,6 +443,16 @@ static inline u32 reg_read(const struct 
 
 #define OHCI1394_TCODE_PHY               0xE
 
+/* Node offset map (phys DMA area, posted write area).
+ * The value of OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED may be modified but must
+ * be lower than OHCI1394_MIDDLE_ADDRESS_SPACE.
+ * OHCI1394_PHYS_UPPER_BOUND_FIXED and OHCI1394_MIDDLE_ADDRESS_SPACE are
+ * constants given by the OHCI spec.
+ */
+#define OHCI1394_PHYS_UPPER_BOUND_FIXED		0x000100000000ULL /* 4 GB */
+#define OHCI1394_PHYS_UPPER_BOUND_PROGRAMMED	0x010000000000ULL /* 1 TB */
+#define OHCI1394_MIDDLE_ADDRESS_SPACE		0xffff00000000ULL
+
 void ohci1394_init_iso_tasklet(struct ohci1394_iso_tasklet *tasklet,
 			       int type,
 			       void (*func)(unsigned long),
_

Patches currently in -mm which might be from stefanr@xxxxxxxxxxxxxxxxx are

ieee1394-ohci1394c-function-calls-without.patch
ieee1394-sbp2-make-tsb42aa9-workaround-specific.patch
ieee1394-raw1394-fix-whitespace-after-x86_64.patch
ieee1394-ieee1394-ohci1394-cycletoolong.patch
ieee1394-ieee1394-support-for-slow-links-or-slow.patch
ieee1394-ieee1394-save-ram-by-using-a-single.patch
ieee1394-sbp2-remove-manipulation-of-inquiry.patch
ieee1394-sbp2-log-number-of-supported-concurrent.patch
ieee1394-ieee1394-extend-lowlevel-api-for.patch
ieee1394-ohci1394-set-address-range-properties.patch
ieee1394-ohci1394-make-phys_dma-parameter.patch
ieee1394-sbp2-sbp2-remove-ohci1394-specific.patch
ieee1394-sbp2-fix-s800-transfers-if-phys_dma-is.patch
ieee1394-update-feature-removal-of-obsolete.patch
ieee1394-sbp2-provide-helptext-for.patch
ieee1394-sbp2-use-__attribute__packed-for.patch
ieee1394-speed-up-of-dma_region_sync_for_cpu.patch
ieee1394_core-switch-to-kthread-api.patch
eth1394-endian-fixes.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux