rpms/kernel/devel linux-2.6-firewire-git-pending.patch,1.12,1.13

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Fri Mar 7 06:47:18 UTC 2008


Author: jwilson

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12350

Modified Files:
	linux-2.6-firewire-git-pending.patch 
Log Message:
Minor tweak to firewire-git-pending patch

linux-2.6-firewire-git-pending.patch:

Index: linux-2.6-firewire-git-pending.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-firewire-git-pending.patch,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- linux-2.6-firewire-git-pending.patch	6 Mar 2008 05:31:30 -0000	1.12
+++ linux-2.6-firewire-git-pending.patch	7 Mar 2008 06:46:59 -0000	1.13
@@ -532,6 +532,9 @@
  	}
  
  	init_completion(&orb->done);
+
+
+
 Per the SBP-2 specification, all SBP-2 target devices must have a BUSY_TIMEOUT
 register. Per the 1394-1995 specification, the retry_limt portion of the
 register should be set to 0x0 initially, and set on the target by a logged in
@@ -558,32 +561,25 @@
 
 ---
 
- drivers/firewire/fw-sbp2.c |   34 ++++++++++++++++++++++++++++++----
- 1 files changed, 30 insertions(+), 4 deletions(-)
+Update: use CSR_BUSY_TIMEOUT from fw-transaction.h instead of needlessly
+        creating an SBP2_BUSY_TIMEOUT
+
+ drivers/firewire/fw-sbp2.c |   31 +++++++++++++++++++++++++++----
+ 1 files changed, 27 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
-index 9813642..05559bb 100644
+index d6d62c6..fbf5b7a 100644
 --- a/drivers/firewire/fw-sbp2.c
 +++ b/drivers/firewire/fw-sbp2.c
-@@ -174,6 +174,7 @@ struct sbp2_target {
+@@ -173,6 +173,7 @@ struct sbp2_target {
  #define SBP2_ORB_TIMEOUT		2000U	/* Timeout in ms */
  #define SBP2_ORB_NULL			0x80000000
  #define SBP2_MAX_SG_ELEMENT_LENGTH	0xf000
-+#define SBP2_RETRY_LIMIT		0xf
++#define SBP2_RETRY_LIMIT		0xf	/* 15 retries */
  
  /* Unit directory keys */
  #define SBP2_CSR_UNIT_CHARACTERISTICS	0x3a
-@@ -192,6 +193,9 @@ struct sbp2_target {
- #define SBP2_LOGICAL_UNIT_RESET		0xe
- #define SBP2_TARGET_RESET_REQUEST	0xf
- 
-+/* Offset to transaction layer BUSY_TIMEOUT register (SBP-2 spec, seciton 6.2 */
-+#define SBP2_BUSY_TIMEOUT		0x210
-+
- /* Offsets for command block agent registers */
- #define SBP2_AGENT_STATE		0x00
- #define SBP2_AGENT_RESET		0x04
-@@ -811,6 +815,30 @@ static void sbp2_target_put(struct sbp2_target *tgt)
+@@ -800,6 +801,30 @@ static void sbp2_target_put(struct sbp2_target *tgt)
  	kref_put(&tgt->kref, sbp2_release_target);
  }
  
@@ -601,12 +597,12 @@
 +	struct fw_transaction t;
 +	static u32 busy_timeout;
 +
-+	/* FIXME: should we try to set cycle_limit and second_limit too? */
++	/* FIXME: we should try to set dual-phase cycle_limit too */
 +	busy_timeout = cpu_to_be32(SBP2_RETRY_LIMIT);
 +
 +	fw_send_request(device->card, &t, TCODE_WRITE_QUADLET_REQUEST,
 +			lu->tgt->node_id, lu->generation, device->max_speed,
-+			CSR_REGISTER_BASE + SBP2_BUSY_TIMEOUT, &busy_timeout,
++			CSR_REGISTER_BASE + CSR_BUSY_TIMEOUT, &busy_timeout,
 +			sizeof(busy_timeout), complete_set_busy_timeout, &done);
 +	wait_for_completion(&done);
 +}
@@ -614,7 +610,7 @@
  static void sbp2_reconnect(struct work_struct *work);
  
  static void sbp2_login(struct work_struct *work)
-@@ -862,10 +890,8 @@ static void sbp2_login(struct work_struct *work)
+@@ -851,10 +876,8 @@ static void sbp2_login(struct work_struct *work)
  	fw_notify("%s: logged in to LUN %04x (%d retries)\n",
  		  tgt->bus_id, lu->lun, lu->retries);
  
@@ -628,7 +624,7 @@
  	PREPARE_DELAYED_WORK(&lu->work, sbp2_reconnect);
  	sbp2_agent_reset(lu);
 
-
+---
 
 Try to write dual-phase retry protocol limits to BUSY_TIMEOUT register.
 - The dual-phase retry protocol is optional to implement, and if not 
@@ -645,24 +641,26 @@
 Signed-off-by: Jarod Wilson <jwilson at redhat.com>
 ---
 
+Update: refresh for updated patch 1/2 using CSR_BUSY_TIMEOUT
+
  drivers/firewire/fw-sbp2.c |   22 +++++++++++++++++++---
  1 files changed, 19 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
-index 05559bb..5adb38c 100644
+index fbf5b7a..763f653 100644
 --- a/drivers/firewire/fw-sbp2.c
 +++ b/drivers/firewire/fw-sbp2.c
-@@ -174,7 +174,8 @@ struct sbp2_target {
+@@ -173,7 +173,8 @@ struct sbp2_target {
  #define SBP2_ORB_TIMEOUT		2000U	/* Timeout in ms */
  #define SBP2_ORB_NULL			0x80000000
  #define SBP2_MAX_SG_ELEMENT_LENGTH	0xf000
--#define SBP2_RETRY_LIMIT		0xf
+-#define SBP2_RETRY_LIMIT		0xf	/* 15 retries */
 +#define SBP2_RETRY_LIMIT		0xf		/* 15 retries */
 +#define SBP2_CYCLE_LIMIT		(0xc8 << 12)	/* 200 125us cycles */
  
  /* Unit directory keys */
  #define SBP2_CSR_UNIT_CHARACTERISTICS	0x3a
-@@ -822,6 +823,22 @@ complete_set_busy_timeout(struct fw_card *card, int rcode,
+@@ -808,6 +809,22 @@ complete_set_busy_timeout(struct fw_card *card, int rcode,
  	complete(done);
  }
  
@@ -685,16 +683,13 @@
  static void sbp2_set_busy_timeout(struct sbp2_logical_unit *lu)
  {
  	struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
-@@ -829,8 +846,7 @@ static void sbp2_set_busy_timeout(struct sbp2_logical_unit *lu)
+@@ -815,8 +832,7 @@ static void sbp2_set_busy_timeout(struct sbp2_logical_unit *lu)
  	struct fw_transaction t;
  	static u32 busy_timeout;
  
--	/* FIXME: should we try to set cycle_limit and second_limit too? */
+-	/* FIXME: we should try to set dual-phase cycle_limit too */
 -	busy_timeout = cpu_to_be32(SBP2_RETRY_LIMIT);
 +	busy_timeout = cpu_to_be32(SBP2_CYCLE_LIMIT | SBP2_RETRY_LIMIT);
  
  	fw_send_request(device->card, &t, TCODE_WRITE_QUADLET_REQUEST,
  			lu->tgt->node_id, lu->generation, device->max_speed,
-
-
-




More information about the fedora-extras-commits mailing list