rpms/kernel/devel linux-2.6-epoll-lockdep-annotation.patch, NONE, 1.1 linux-2.6-firewire-git-pending.patch, NONE, 1.1 kernel.spec, 1.388, 1.389 linux-2.6-firewire-git-update.patch, 1.4, 1.5 linux-2.6-firewire-use-device-orb-timeout.patch, 1.2, NONE

Jarod Wilson (jwilson) fedora-extras-commits at redhat.com
Mon Jan 28 22:38:06 UTC 2008


Author: jwilson

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

Modified Files:
	kernel.spec linux-2.6-firewire-git-update.patch 
Added Files:
	linux-2.6-epoll-lockdep-annotation.patch 
	linux-2.6-firewire-git-pending.patch 
Removed Files:
	linux-2.6-firewire-use-device-orb-timeout.patch 
Log Message:
* Mon Jan 28 2008 Jarod Wilson <jwilson at redhat.com>
- Update firewire with latest pending bits
- Add epoll lockdep annotation (#323411)


linux-2.6-epoll-lockdep-annotation.patch:

--- NEW FILE linux-2.6-epoll-lockdep-annotation.patch ---
Index: linux-2.6/fs/eventpoll.c
===================================================================
--- linux-2.6.orig/fs/eventpoll.c
+++ linux-2.6/fs/eventpoll.c
@@ -353,7 +353,7 @@ static void ep_poll_safewake(struct poll
 	spin_unlock_irqrestore(&psw->lock, flags);
 
 	/* Do really wake up now */
-	wake_up(wq);
+	wake_up_nested(wq, 1 + wake_nests);
 
 	/* Remove the current task from the list */
 	spin_lock_irqsave(&psw->lock, flags);
Index: linux-2.6/include/linux/wait.h
===================================================================
--- linux-2.6.orig/include/linux/wait.h
+++ linux-2.6/include/linux/wait.h
@@ -161,6 +161,22 @@ wait_queue_head_t *FASTCALL(bit_waitqueu
 #define	wake_up_locked(x)		__wake_up_locked((x), TASK_UNINTERRUPTIBLE | TASK_INTERRUPTIBLE)
 #define wake_up_interruptible_sync(x)   __wake_up_sync((x),TASK_INTERRUPTIBLE, 1)
 
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+/*
+ * macro to avoid include hell
+ */
+#define wake_up_nested(x, s)						\
+do {									\
+	unsigned long flags;						\
+									\
+	spin_lock_irqsave_nested(&(x)->lock, flags, (s));		\
+	wake_up_locked(x); 						\
+	spin_unlock_irqrestore(&(x)->lock, flags);			\
+} while (0)
+#else
+#define wake_up_nested(x, s)		wake_up(x)
+#endif
+
 #define __wait_event(wq, condition) 					\
 do {									\
 	DEFINE_WAIT(__wait);						\


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

--- NEW FILE linux-2.6-firewire-git-pending.patch ---
#
# Patches under review and/or pending inclusion in the linux1394-git
# tree, which we think we're going to want...
#

If a device is being unplugged while fw-sbp2 had a login or reconnect on
schedule, it would take about half a minute to shut the fw_unit down:

Jan 27 18:34:54 stein firewire_sbp2: logged in to fw2.0 LUN 0000 (0 retries)
<unplug>
Jan 27 18:34:59 stein firewire_sbp2: sbp2_scsi_abort
Jan 27 18:34:59 stein scsi 25:0:0:0: Device offlined - not ready after error recovery
Jan 27 18:35:01 stein firewire_sbp2: orb reply timed out, rcode=0x11
Jan 27 18:35:06 stein firewire_sbp2: orb reply timed out, rcode=0x11
Jan 27 18:35:12 stein firewire_sbp2: orb reply timed out, rcode=0x11
Jan 27 18:35:17 stein firewire_sbp2: orb reply timed out, rcode=0x11
Jan 27 18:35:22 stein firewire_sbp2: orb reply timed out, rcode=0x11
Jan 27 18:35:27 stein firewire_sbp2: orb reply timed out, rcode=0x11
Jan 27 18:35:32 stein firewire_sbp2: orb reply timed out, rcode=0x11
Jan 27 18:35:32 stein firewire_sbp2: failed to login to fw2.0 LUN 0000
Jan 27 18:35:32 stein firewire_sbp2: released fw2.0

After this patch, typically only a few seconds spent in __scsi_add_device
remain:

Jan 27 19:05:50 stein firewire_sbp2: logged in to fw2.0 LUN 0000 (0 retries)
<unplug>
Jan 27 19:05:56 stein firewire_sbp2: sbp2_scsi_abort
Jan 27 19:05:56 stein scsi 33:0:0:0: Device offlined - not ready after error recovery
Jan 27 19:05:56 stein firewire_sbp2: released fw2.0

The benefit of this is negligible on simple setups.  But on buses with
several devices, we should avoid any unnecessary blockade of fw-sbp2's
workqueue thread.

Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
Signed-off-by: Jarod Wilson <jwilson at redhat.com>
---
 drivers/firewire/fw-sbp2.c |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

Index: linux/drivers/firewire/fw-sbp2.c
===================================================================
--- linux.orig/drivers/firewire/fw-sbp2.c
+++ linux/drivers/firewire/fw-sbp2.c
@@ -499,6 +499,9 @@ sbp2_send_management_orb(struct sbp2_log
 	unsigned int timeout;
 	int retval = -ENOMEM;
 
+	if (function == SBP2_LOGOUT_REQUEST && fw_device_is_shutdown(device))
+		return 0;
+
 	orb = kzalloc(sizeof(*orb), GFP_ATOMIC);
 	if (orb == NULL)
 		return -ENOMEM;
@@ -619,16 +622,13 @@ static void sbp2_release_target(struct k
 	struct sbp2_logical_unit *lu, *next;
 	struct Scsi_Host *shost =
 		container_of((void *)tgt, struct Scsi_Host, hostdata[0]);
-	struct fw_device *device = fw_device(tgt->unit->device.parent);
 
 	list_for_each_entry_safe(lu, next, &tgt->lu_list, link) {
 		if (lu->sdev)
 			scsi_remove_device(lu->sdev);
 
-		if (!fw_device_is_shutdown(device))
-			sbp2_send_management_orb(lu, tgt->node_id,
-					lu->generation, SBP2_LOGOUT_REQUEST,
-					lu->login_id, NULL);
+		sbp2_send_management_orb(lu, tgt->node_id, lu->generation,
+				SBP2_LOGOUT_REQUEST, lu->login_id, NULL);
 
 		fw_core_remove_address_handler(&lu->address_handler);
 		list_del(&lu->link);
@@ -673,6 +673,9 @@ static void sbp2_login(struct work_struc
 	struct sbp2_login_response response;
 	int generation, node_id, local_node_id;
 
+	if (fw_device_is_shutdown(device))
+		goto out;
+
 	generation    = device->generation;
 	smp_rmb();    /* node_id must not be older than generation */
 	node_id       = device->node_id;
@@ -968,6 +971,9 @@ static void sbp2_reconnect(struct work_s
 	struct fw_device *device = fw_device(unit->device.parent);
 	int generation, node_id, local_node_id;
 
+	if (fw_device_is_shutdown(device))
+		goto out;
+
 	generation    = device->generation;
 	smp_rmb();    /* node_id must not be older than generation */
 	node_id       = device->node_id;

-- 
Stefan Richter
-=====-==--- ---= ==-==
http://arcgraph.de/sr/


There is a race between shutdown and creation of devices:  fw-core may
attempt to add a device with the same name of an already existing
device.  http://bugzilla.kernel.org/show_bug.cgi?id=9828

Impact of the bug:  Happens rarely, forces the user to unplug and replug
the new device to get it working.

The fix moves deregistration of the minor number and device_unregister()
into a common rw_sem protected section.

We also move the ref count increment from fw_device_op_open into an
rw_sem protected section with the lookup of the device, so that the
device pointer can't become invalid between lookup and usage.

Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
Signed-off-by: Jarod Wilson <jwilson at redhat.com>
---
 drivers/firewire/fw-cdev.c   |    6 ++++--
 drivers/firewire/fw-device.c |   10 ++++++----
 2 files changed, 10 insertions(+), 6 deletions(-)

Index: linux/drivers/firewire/fw-device.c
===================================================================
--- linux.orig/drivers/firewire/fw-device.c
+++ linux/drivers/firewire/fw-device.c
@@ -614,10 +614,12 @@ struct fw_device *fw_device_from_devt(de
 {
 	struct fw_device *device;
 
 	down_read(&idr_rwsem);
 	device = idr_find(&fw_device_idr, MINOR(devt));
+	if (device)
+		fw_device_get(device);
 	up_read(&idr_rwsem);
 
 	return device;
 }
 
@@ -625,17 +627,17 @@ static void fw_device_shutdown(struct wo
 {
 	struct fw_device *device =
 		container_of(work, struct fw_device, work.work);
 	int minor = MINOR(device->device.devt);
 
-	down_write(&idr_rwsem);
-	idr_remove(&fw_device_idr, minor);
-	up_write(&idr_rwsem);
-
 	fw_device_cdev_remove(device);
 	device_for_each_child(&device->device, NULL, shutdown_unit);
+
+	down_write(&idr_rwsem);
 	device_unregister(&device->device);
+	idr_remove(&fw_device_idr, minor);
+	up_write(&idr_rwsem);
 }
 
 static struct device_type fw_device_type = {
 	.release	= fw_device_release,
 };
Index: linux/drivers/firewire/fw-cdev.c
===================================================================
--- linux.orig/drivers/firewire/fw-cdev.c
+++ linux/drivers/firewire/fw-cdev.c
@@ -112,14 +112,16 @@ static int fw_device_op_open(struct inod
 	device = fw_device_from_devt(inode->i_rdev);
 	if (device == NULL)
 		return -ENODEV;
 
 	client = kzalloc(sizeof(*client), GFP_KERNEL);
-	if (client == NULL)
+	if (client == NULL) {
+		fw_device_put(device);
 		return -ENOMEM;
+	}
 
-	client->device = fw_device_get(device);
+	client->device = device;
 	INIT_LIST_HEAD(&client->event_list);
 	INIT_LIST_HEAD(&client->resource_list);
 	spin_lock_init(&client->lock);
 	init_waitqueue_head(&client->wait);
 

-- 
Stefan Richter
-=====-==--- ---= ==-==
http://arcgraph.de/sr/


Scenario:  Process A keeps the character device file of node N open.
N is being unplugged.  File /dev/fwN won't be destroyed as long as A
doesn't close it.  Now, process B opens /dev/fwN as well.  Previously
it would succeed but be unable to do any IO on it of course.  With this
patch, process B's open() will fail immediately with -ENODEV.

Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
Signed-off-by: Jarod Wilson <jwilson at redhat.com>
---
 drivers/firewire/fw-device.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Index: linux/drivers/firewire/fw-device.c
===================================================================
--- linux.orig/drivers/firewire/fw-device.c
+++ linux/drivers/firewire/fw-device.c
@@ -616,8 +616,12 @@ struct fw_device *fw_device_from_devt(de
 
 	down_read(&idr_rwsem);
 	device = idr_find(&fw_device_idr, MINOR(devt));
-	if (device)
-		fw_device_get(device);
+	if (device) {
+		if (fw_device_is_shutdown(device))
+			device = NULL;
+		else
+			fw_device_get(device);
+	}
 	up_read(&idr_rwsem);
 
 	return device;

-- 
Stefan Richter
-=====-==--- ---= ==-==
http://arcgraph.de/sr/




Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.388
retrieving revision 1.389
diff -u -r1.388 -r1.389
--- kernel.spec	28 Jan 2008 18:58:11 -0000	1.388
+++ kernel.spec	28 Jan 2008 22:37:22 -0000	1.389
@@ -656,7 +656,10 @@
 
 # linux1394 git patches
 Patch2200: linux-2.6-firewire-git-update.patch
-Patch2201: linux-2.6-firewire-use-device-orb-timeout.patch
+Patch2201: linux-2.6-firewire-git-pending.patch
+
+# epoll lockdep annotation (bz #323411)
+Patch2205: linux-2.6-epoll-lockdep-annotation.patch
 
 # make USB EHCI driver respect "nousb" parameter
 Patch2300: linux-2.6-usb-ehci-hcd-respect-nousb.patch
@@ -1188,7 +1191,13 @@
 
 # linux1394 git patches
 ApplyPatch linux-2.6-firewire-git-update.patch
-ApplyPatch linux-2.6-firewire-use-device-orb-timeout.patch
+C=$(wc -l $RPM_SOURCE_DIR/linux-2.6-firewire-git-pending.patch | awk '{print $1}')
+if [ "$C" -gt 10 ]; then
+ApplyPatch linux-2.6-firewire-git-pending.patch
+fi
+
+# epoll lockdep annotation (bz #323411)
+ApplyPatch linux-2.6-epoll-lockdep-annotation.patch
 
 # usb video
 ApplyPatch linux-2.6-uvcvideo.patch
@@ -1761,6 +1770,10 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
 
 %changelog
+* Mon Jan 28 2008 Jarod Wilson <jwilson at redhat.com>
+- Update firewire with latest pending bits
+- Add epoll lockdep annotation (#323411)
+
 * Mon Jan 28 2008 Eric Sandeen <sandeen at redhat.com>
 - Update ext4 patch to latest stable patch queue
 

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

Index: linux-2.6-firewire-git-update.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-firewire-git-update.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- linux-2.6-firewire-git-update.patch	25 Jan 2008 18:07:30 -0000	1.4
+++ linux-2.6-firewire-git-update.patch	28 Jan 2008 22:37:22 -0000	1.5
@@ -789,29 +789,58 @@
  
  	reg_write(ohci, OHCI1394_IsoRecvIntMaskSet, ~0);
 diff -Naurp linux-2.6-git/drivers/firewire/fw-sbp2.c firewire-git/drivers/firewire/fw-sbp2.c
---- linux-2.6-git/drivers/firewire/fw-sbp2.c	2008-01-01 22:50:33.000000000 -0500
-+++ firewire-git/drivers/firewire/fw-sbp2.c	2008-01-25 12:42:11.000000000 -0500
-@@ -150,11 +150,16 @@ struct sbp2_target {
- 	struct list_head lu_list;
+--- linux-2.6-git/drivers/firewire/fw-sbp2.c	2008-01-28 10:57:54.000000000 -0500
++++ firewire-git/drivers/firewire/fw-sbp2.c	2008-01-28 10:58:18.000000000 -0500
+@@ -140,26 +140,32 @@ struct sbp2_logical_unit {
+ struct sbp2_target {
+ 	struct kref kref;
+ 	struct fw_unit *unit;
++	struct list_head lu_list;
+ 
+ 	u64 management_agent_address;
+ 	int directory_id;
+ 	int node_id;
+ 	int address_high;
+-
+-	unsigned workarounds;
+-	struct list_head lu_list;
++	unsigned int workarounds;
++	unsigned int mgt_orb_timeout;
  };
  
 -#define SBP2_MAX_SG_ELEMENT_LENGTH	0xf000
 -#define SBP2_MAX_SECTORS		255	/* Max sectors supported */
+-#define SBP2_ORB_TIMEOUT		2000	/* Timeout in ms */
+-
 +/*
 + * Per section 7.4.8 of the SBP-2 spec, a mgt_ORB_timeout value can be
-+ * provided in the config rom.  A high timeout value really only matters
-+ * on initial login, where we'll just use 20s rather than hassling with
-+ * reading the config rom, since it really wouldn't buy us much.
++ * provided in the config rom. Most devices do provide a value, which
++ * we'll use for login management orbs, but with some sane limits.
 + */
-+#define SBP2_LOGIN_ORB_TIMEOUT		20000	/* Timeout in ms */
- #define SBP2_ORB_TIMEOUT		2000	/* Timeout in ms */
--
++#define SBP2_MIN_LOGIN_ORB_TIMEOUT	5000U	/* Timeout in ms */
++#define SBP2_MAX_LOGIN_ORB_TIMEOUT	40000U	/* Timeout in ms */
++#define SBP2_ORB_TIMEOUT		2000U	/* Timeout in ms */
  #define SBP2_ORB_NULL			0x80000000
 +#define SBP2_MAX_SG_ELEMENT_LENGTH	0xf000
  
  #define SBP2_DIRECTION_TO_MEDIA		0x0
  #define SBP2_DIRECTION_FROM_MEDIA	0x1
-@@ -489,6 +494,7 @@ sbp2_send_management_orb(struct sbp2_log
+ 
+ /* Unit directory keys */
++#define SBP2_CSR_UNIT_CHARACTERISTICS	0x3a
+ #define SBP2_CSR_FIRMWARE_REVISION	0x3c
+ #define SBP2_CSR_LOGICAL_UNIT_NUMBER	0x14
+ #define SBP2_CSR_LOGICAL_UNIT_DIRECTORY	0xd4
+@@ -288,7 +294,7 @@ struct sbp2_command_orb {
+ static const struct {
+ 	u32 firmware_revision;
+ 	u32 model;
+-	unsigned workarounds;
++	unsigned int workarounds;
+ } sbp2_workarounds_table[] = {
+ 	/* DViCO Momobay CX-1 with TSB42AA9 bridge */ {
+ 		.firmware_revision	= 0x002800,
+@@ -489,6 +495,7 @@ sbp2_send_management_orb(struct sbp2_log
  {
  	struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
  	struct sbp2_management_orb *orb;
@@ -819,7 +848,7 @@
  	int retval = -ENOMEM;
  
  	orb = kzalloc(sizeof(*orb), GFP_ATOMIC);
-@@ -516,9 +522,13 @@ sbp2_send_management_orb(struct sbp2_log
+@@ -516,9 +523,13 @@ sbp2_send_management_orb(struct sbp2_log
  	orb->request.status_fifo.low  = lu->address_handler.offset;
  
  	if (function == SBP2_LOGIN_REQUEST) {
@@ -829,13 +858,13 @@
 -			MANAGEMENT_ORB_RECONNECT(0);
 +			MANAGEMENT_ORB_RECONNECT(2) |
 +			MANAGEMENT_ORB_EXCLUSIVE(sbp2_param_exclusive_login);
-+		timeout = SBP2_LOGIN_ORB_TIMEOUT;
++		timeout = lu->tgt->mgt_orb_timeout;
 +	} else {
 +		timeout = SBP2_ORB_TIMEOUT;
  	}
  
  	fw_memcpy_to_be32(&orb->request, &orb->request, sizeof(orb->request));
-@@ -535,8 +545,7 @@ sbp2_send_management_orb(struct sbp2_log
+@@ -535,8 +546,7 @@ sbp2_send_management_orb(struct sbp2_log
  	sbp2_send_orb(&orb->base, lu, node_id, generation,
  		      lu->tgt->management_agent_address);
  
@@ -845,7 +874,7 @@
  
  	retval = -EIO;
  	if (sbp2_cancel_orbs(lu) == 0) {
-@@ -608,13 +617,17 @@ static void sbp2_release_target(struct k
+@@ -608,13 +618,17 @@ static void sbp2_release_target(struct k
  	struct sbp2_logical_unit *lu, *next;
  	struct Scsi_Host *shost =
  		container_of((void *)tgt, struct Scsi_Host, hostdata[0]);
@@ -865,7 +894,7 @@
  		fw_core_remove_address_handler(&lu->address_handler);
  		list_del(&lu->link);
  		kfree(lu);
-@@ -628,6 +641,21 @@ static void sbp2_release_target(struct k
+@@ -628,6 +642,21 @@ static void sbp2_release_target(struct k
  
  static struct workqueue_struct *sbp2_wq;
  
@@ -887,7 +916,7 @@
  static void sbp2_reconnect(struct work_struct *work);
  
  static void sbp2_login(struct work_struct *work)
-@@ -643,22 +671,19 @@ static void sbp2_login(struct work_struc
+@@ -643,22 +672,19 @@ static void sbp2_login(struct work_struc
  	struct sbp2_login_response response;
  	int generation, node_id, local_node_id;
  
@@ -918,17 +947,100 @@
  	}
  
  	lu->generation        = generation;
-@@ -700,7 +725,8 @@ static void sbp2_login(struct work_struc
+@@ -689,18 +715,47 @@ static void sbp2_login(struct work_struc
+ 	sdev = __scsi_add_device(shost, 0, 0,
+ 				 scsilun_to_int(&eight_bytes_lun), lu);
+ 	if (IS_ERR(sdev)) {
+-		sbp2_send_management_orb(lu, node_id, generation,
+-				SBP2_LOGOUT_REQUEST, lu->login_id, NULL);
+ 		/*
+-		 * Set this back to sbp2_login so we fall back and
+-		 * retry login on bus reset.
++		 * The most frequent cause for __scsi_add_device() to fail
++		 * is a bus reset while sending the SCSI INQUIRY.  Try again.
++		 */
++		goto out_logout_login;
++
++	} else if (sdev->sdev_state == SDEV_OFFLINE) {
++		/*
++		 * FIXME:  We are unable to perform reconnects while in
++		 * sbp2_login().  Therefore __scsi_add_device() will get
++		 * into trouble if a bus reset happens in parallel.
++		 * It will either fail (that's OK, see above) or take sdev
++		 * offline.  Here is a crude workaround for the latter.
+ 		 */
+-		PREPARE_DELAYED_WORK(&lu->work, sbp2_login);
++		scsi_device_put(sdev);
++		scsi_remove_device(sdev);
++		goto out_logout_login;
++
+ 	} else {
++		/*
++		 * Can you believe it?  Everything went well.
++		 */
  		lu->sdev = sdev;
  		scsi_device_put(sdev);
++		goto out;
  	}
 -	kref_put(&lu->tgt->kref, sbp2_release_target);
++
++ out_logout_login:
++	smp_rmb(); /* generation may have changed */
++	generation = device->generation;
++	smp_rmb(); /* node_id must not be older than generation */
++
++	sbp2_send_management_orb(lu, device->node_id, generation,
++				 SBP2_LOGOUT_REQUEST, lu->login_id, NULL);
++	/*
++	 * If a bus reset happened, sbp2_update will have requeued
++	 * lu->work already.  Reset the work from reconnect to login.
++	 */
++	PREPARE_DELAYED_WORK(&lu->work, sbp2_login);
 + out:
 +	sbp2_target_put(lu->tgt);
  }
  
  static int sbp2_add_logical_unit(struct sbp2_target *tgt, int lun_entry)
-@@ -865,18 +891,13 @@ static int sbp2_probe(struct device *dev
+@@ -750,6 +805,7 @@ static int sbp2_scan_unit_dir(struct sbp
+ {
+ 	struct fw_csr_iterator ci;
+ 	int key, value;
++	unsigned int timeout;
+ 
+ 	fw_csr_iterator_init(&ci, directory);
+ 	while (fw_csr_iterator_next(&ci, &key, &value)) {
+@@ -772,6 +828,21 @@ static int sbp2_scan_unit_dir(struct sbp
+ 			*firmware_revision = value;
+ 			break;
+ 
++		case SBP2_CSR_UNIT_CHARACTERISTICS:
++			/* the timeout value is stored in 500ms units */
++			timeout = ((unsigned int) value >> 8 & 0xff) * 500;
++			timeout = max(timeout, SBP2_MIN_LOGIN_ORB_TIMEOUT);
++			tgt->mgt_orb_timeout =
++				  min(timeout, SBP2_MAX_LOGIN_ORB_TIMEOUT);
++
++			if (timeout > tgt->mgt_orb_timeout)
++				fw_notify("%s: config rom contains %ds "
++					  "management ORB timeout, limiting "
++					  "to %ds\n", tgt->unit->device.bus_id,
++					  timeout / 1000,
++					  tgt->mgt_orb_timeout / 1000);
++			break;
++
+ 		case SBP2_CSR_LOGICAL_UNIT_NUMBER:
+ 			if (sbp2_add_logical_unit(tgt, value) < 0)
+ 				return -ENOMEM;
+@@ -790,7 +861,7 @@ static void sbp2_init_workarounds(struct
+ 				  u32 firmware_revision)
+ {
+ 	int i;
+-	unsigned w = sbp2_param_workarounds;
++	unsigned int w = sbp2_param_workarounds;
+ 
+ 	if (w)
+ 		fw_notify("Please notify linux1394-devel at lists.sourceforge.net "
+@@ -865,18 +936,13 @@ static int sbp2_probe(struct device *dev
  
  	get_device(&unit->device);
  
@@ -950,7 +1062,7 @@
  	return -ENOMEM;
  
   fail_shost_put:
-@@ -889,7 +910,7 @@ static int sbp2_remove(struct device *de
+@@ -889,7 +955,7 @@ static int sbp2_remove(struct device *de
  	struct fw_unit *unit = fw_unit(dev);
  	struct sbp2_target *tgt = unit->device.driver_data;
  
@@ -959,7 +1071,7 @@
  	return 0;
  }
  
-@@ -901,9 +922,10 @@ static void sbp2_reconnect(struct work_s
+@@ -901,9 +967,10 @@ static void sbp2_reconnect(struct work_s
  	struct fw_device *device = fw_device(unit->device.parent);
  	int generation, node_id, local_node_id;
  
@@ -973,7 +1085,7 @@
  
  	if (sbp2_send_management_orb(lu, node_id, generation,
  				     SBP2_RECONNECT_REQUEST,
-@@ -915,10 +937,8 @@ static void sbp2_reconnect(struct work_s
+@@ -915,10 +982,8 @@ static void sbp2_reconnect(struct work_s
  			lu->retries = 0;
  			PREPARE_DELAYED_WORK(&lu->work, sbp2_login);
  		}
@@ -986,7 +1098,7 @@
  	}
  
  	lu->generation        = generation;
-@@ -930,8 +950,8 @@ static void sbp2_reconnect(struct work_s
+@@ -930,8 +995,8 @@ static void sbp2_reconnect(struct work_s
  
  	sbp2_agent_reset(lu);
  	sbp2_cancel_orbs(lu);
@@ -997,7 +1109,7 @@
  }
  
  static void sbp2_update(struct fw_unit *unit)
-@@ -947,8 +967,7 @@ static void sbp2_update(struct fw_unit *
+@@ -947,8 +1012,7 @@ static void sbp2_update(struct fw_unit *
  	 */
  	list_for_each_entry(lu, &tgt->lu_list, link) {
  		lu->retries = 0;
@@ -1007,7 +1119,7 @@
  	}
  }
  
-@@ -1103,9 +1122,9 @@ sbp2_map_scatterlist(struct sbp2_command
+@@ -1103,9 +1167,9 @@ sbp2_map_scatterlist(struct sbp2_command
  	 * elements larger than 65535 bytes, some IOMMUs may merge sg elements
  	 * during DMA mapping, and Linux currently doesn't prevent this.
  	 */
@@ -1020,6 +1132,15 @@
  		while (sg_len) {
  			/* FIXME: This won't get us out of the pinch. */
  			if (unlikely(j >= ARRAY_SIZE(orb->page_table))) {
+@@ -1158,7 +1222,7 @@ static int sbp2_scsi_queuecommand(struct
+ 	struct sbp2_logical_unit *lu = cmd->device->hostdata;
+ 	struct fw_device *device = fw_device(lu->tgt->unit->device.parent);
+ 	struct sbp2_command_orb *orb;
+-	unsigned max_payload;
++	unsigned int max_payload;
+ 	int retval = SCSI_MLQUEUE_HOST_BUSY;
+ 
+ 	/*
 diff -Naurp linux-2.6-git/drivers/firewire/fw-topology.c firewire-git/drivers/firewire/fw-topology.c
 --- linux-2.6-git/drivers/firewire/fw-topology.c	2008-01-01 22:50:33.000000000 -0500
 +++ firewire-git/drivers/firewire/fw-topology.c	2008-01-25 12:41:22.000000000 -0500


--- linux-2.6-firewire-use-device-orb-timeout.patch DELETED ---




More information about the fedora-extras-commits mailing list