rpms/kernel/devel kernel.spec, 1.410, 1.411 linux-2.6-firewire-git-pending.patch, 1.2, 1.3
Jarod Wilson (jwilson)
fedora-extras-commits at redhat.com
Sun Feb 10 19:34:48 UTC 2008
Author: jwilson
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27783
Modified Files:
kernel.spec linux-2.6-firewire-git-pending.patch
Log Message:
* Sun Feb 10 2008 Jarod Wilson <jwilson at redhat.com>
- firewire-core: improve logging of device connections
- firewire-sbp2: handle device reconnections more smoothly
- firewire-sbp2: disconnect and re-login when scsi probes
fails due to a bus reset
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.410
retrieving revision 1.411
diff -u -r1.410 -r1.411
--- kernel.spec 8 Feb 2008 21:52:17 -0000 1.410
+++ kernel.spec 10 Feb 2008 19:34:11 -0000 1.411
@@ -1798,6 +1798,12 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
%changelog
+* Sun Feb 10 2008 Jarod Wilson <jwilson at redhat.com>
+- firewire-core: improve logging of device connections
+- firewire-sbp2: handle device reconnections more smoothly
+- firewire-sbp2: disconnect and re-login when scsi probes
+ fails due to a bus reset
+
* Fri Feb 08 2008 Chuck Ebbert <cebbert at redhat.com>
- Restore futex patch that was dropped from 2.6.24.1
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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- linux-2.6-firewire-git-pending.patch 6 Feb 2008 05:23:33 -0000 1.2
+++ linux-2.6-firewire-git-pending.patch 10 Feb 2008 19:34:11 -0000 1.3
@@ -1095,3 +1095,124 @@
-=====-==--- --=- ---==
http://arcgraph.de/sr/
+Since "fw-sbp2: fix I/O errors during reconnect", a Scsi_Host will be
+blocked as soon as a command failed due to bus generation change. Now
+we also block it when fw-core signalled a bus reset via sbp2_update.
+This will avoid some command failures and retries (but not all because
+commands are injected from tasklet context while sbp2_update runs from
+workqueue thread context).
+
+Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
+---
+ drivers/firewire/fw-sbp2.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: linux/drivers/firewire/fw-sbp2.c
+===================================================================
+--- linux.orig/drivers/firewire/fw-sbp2.c
++++ linux/drivers/firewire/fw-sbp2.c
+@@ -1135,6 +1135,7 @@ static void sbp2_update(struct fw_unit *
+ * Iteration over tgt->lu_list is therefore safe here.
+ */
+ list_for_each_entry(lu, &tgt->lu_list, link) {
++ sbp2_conditionally_block(lu);
+ lu->retries = 0;
+ sbp2_queue_work(lu, 0);
+ }
+
+--
+Stefan Richter
+-=====-==--- --=- --==-
+http://arcgraph.de/sr/
+
+
+fw-sbp2 is unable to reconnect while performing __scsi_add_device
+because there is only a single workqueue thread context available for
+both at the moment. This should be fixed eventually.
+
+An actual failure of __scsi_add_device is easy to handle, but an
+incomplete execution of __scsi_add_device with an sdev returned would
+remain undetected and leave the SBP-2 target unusable.
+
+Therefore we use a workaround: If there was a bus reset during
+__scsi_add_device (i.e. during the SCSI probe), we remove the new sdev
+immediately, log out, and attempt login and SCSI probe again.
+
+Signed-off-by: Stefan Richter <stefanr at s5r6.in-berlin.de>
+Signed-off-by: Jarod Wilson <jwilson at redhat.com>
+---
+
+The previous patch "firewire: fw-sbp2: retry login if scsi_device was
+offlined early" should be folded into this one before upstream
+submission.
+
+ drivers/firewire/fw-sbp2.c | 43 ++++++++++++++++---------------------
+ 1 file changed, 19 insertions(+), 24 deletions(-)
+
+Index: linux/drivers/firewire/fw-sbp2.c
+===================================================================
+--- linux.orig/drivers/firewire/fw-sbp2.c
++++ linux/drivers/firewire/fw-sbp2.c
+@@ -824,36 +824,31 @@ 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)) {
+- /*
+- * The most frequent cause for __scsi_add_device() to fail
+- * is a bus reset while sending the SCSI INQUIRY. Try again.
+- */
++ /*
++ * 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 or leave us with an
++ * unusable sdev. As a workaround we check for this and retry the
++ * whole login and SCSI probing.
++ */
++
++ if (IS_ERR(sdev))
+ 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.
+- */
+- scsi_device_put(sdev);
++ scsi_device_put(sdev);
++
++ smp_rmb(); /* get current card generation */
++ if (generation != device->card->generation) {
+ scsi_remove_device(sdev);
+ goto out_logout_login;
+-
+- } else {
+- /*
+- * Can you believe it? Everything went well.
+- */
+- lu->sdev = sdev;
+- smp_wmb(); /* We need lu->sdev when we want to block lu. */
+- atomic_dec(&lu->tgt->dont_block);
+- scsi_device_put(sdev);
+- goto out;
+ }
+
++ /* Everything went well. */
++ lu->sdev = sdev;
++ smp_wmb(); /* We need lu->sdev when we want to block lu. */
++ atomic_dec(&lu->tgt->dont_block);
++ goto out;
++
+ out_logout_login:
+ smp_rmb(); /* generation may have changed */
+ generation = device->generation;
+
+--
+Stefan Richter
+-=====-==--- --=- -=---
+http://arcgraph.de/sr/
+
+
More information about the fedora-extras-commits
mailing list