[PATCH 2.6.17-rc5-mm2 11/18] ieee1394: extend lowlevel API for address range properties

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

 



Host adapter hardware imposes certain restrictions and features on
address ranges.  Instead of hard-wiring such ranges into the ieee1394
core or even into protocol drivers, let lowlevel drivers specify
these ranges via struct hpsb_host.

Patch "ohci1394: set address range properties" must be applied too,
else hpsb_allocate_and_register_addrspace() won't work properly.

Signed-off-by: Stefan Richter <[email protected]>

Index: linux-2.6.17-rc5-mm2/drivers/ieee1394/hosts.h
===================================================================
--- linux-2.6.17-rc5-mm2.orig/drivers/ieee1394/hosts.h	2006-06-01 20:55:43.000000000 +0200
+++ linux-2.6.17-rc5-mm2/drivers/ieee1394/hosts.h	2006-06-01 20:55:45.000000000 +0200
@@ -73,6 +73,8 @@ struct hpsb_host {
 	unsigned int config_roms;
 
 	struct list_head addr_space;
+	u64 low_addr_space;	/* upper bound of physical DMA area */
+	u64 middle_addr_space;	/* upper bound of posted write area */
 };
 
 
Index: linux-2.6.17-rc5-mm2/drivers/ieee1394/highlevel.c
===================================================================
--- linux-2.6.17-rc5-mm2.orig/drivers/ieee1394/highlevel.c	2006-06-01 20:55:04.000000000 +0200
+++ linux-2.6.17-rc5-mm2/drivers/ieee1394/highlevel.c	2006-06-01 20:55:45.000000000 +0200
@@ -312,8 +312,10 @@ u64 hpsb_allocate_and_register_addrspace
 		return retval;
 	}
 
+	/* default range,
+	 * avoids controller's posted write area (see OHCI 1.1 clause 1.5) */
 	if (start == ~0ULL && end == ~0ULL) {
-		start = CSR1212_ALL_SPACE_BASE + 0xffff00000000ULL;  /* ohci1394.c limit */
+		start = host->middle_addr_space;
 		end = CSR1212_ALL_SPACE_END;
 	}
 


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux