]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Dec 2013 20:05:38 +0000 (12:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Dec 2013 20:05:38 +0000 (12:05 -0800)
added patches:
scsi-bfa-fix-crash-when-symb-name-set-for-offline-vport.patch
scsi-enclosure-fix-warn_on-in-dual-path-device-removing.patch
scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch
scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch
scsi-libsas-fix-usage-of-ata_tf_to_fis.patch

queue-3.10/scsi-bfa-fix-crash-when-symb-name-set-for-offline-vport.patch [new file with mode: 0644]
queue-3.10/scsi-enclosure-fix-warn_on-in-dual-path-device-removing.patch [new file with mode: 0644]
queue-3.10/scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch [new file with mode: 0644]
queue-3.10/scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch [new file with mode: 0644]
queue-3.10/scsi-libsas-fix-usage-of-ata_tf_to_fis.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/scsi-bfa-fix-crash-when-symb-name-set-for-offline-vport.patch b/queue-3.10/scsi-bfa-fix-crash-when-symb-name-set-for-offline-vport.patch
new file mode 100644 (file)
index 0000000..409db4e
--- /dev/null
@@ -0,0 +1,79 @@
+From 22a08538dca5c0630226f1c0c58dccd12e463d22 Mon Sep 17 00:00:00 2001
+From: Vijaya Mohan Guvva <vmohan@brocade.com>
+Date: Thu, 21 Nov 2013 01:37:49 -0800
+Subject: SCSI: bfa: Fix crash when symb name set for offline vport
+
+From: Vijaya Mohan Guvva <vmohan@brocade.com>
+
+commit 22a08538dca5c0630226f1c0c58dccd12e463d22 upstream.
+
+This patch fixes a crash when tried setting symbolic name for an offline
+vport through sysfs. Crash is due to uninitialized pointer lport->ns,
+which gets initialized only on linkup (port online).
+
+Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
+Signed-off-by: James Bottomley <JBottomley@Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/bfa/bfa_fcs.h       |    1 +
+ drivers/scsi/bfa/bfa_fcs_lport.c |   14 +++++++++++---
+ drivers/scsi/bfa/bfad_attr.c     |    7 ++-----
+ 3 files changed, 14 insertions(+), 8 deletions(-)
+
+--- a/drivers/scsi/bfa/bfa_fcs.h
++++ b/drivers/scsi/bfa/bfa_fcs.h
+@@ -299,6 +299,7 @@ wwn_t bfa_fcs_lport_get_rport(struct bfa
+ struct bfa_fcs_lport_s *bfa_fcs_lookup_port(struct bfa_fcs_s *fcs,
+                                           u16 vf_id, wwn_t lpwwn);
++void bfa_fcs_lport_set_symname(struct bfa_fcs_lport_s *port, char *symname);
+ void bfa_fcs_lport_get_info(struct bfa_fcs_lport_s *port,
+                           struct bfa_lport_info_s *port_info);
+ void bfa_fcs_lport_get_attr(struct bfa_fcs_lport_s *port,
+--- a/drivers/scsi/bfa/bfa_fcs_lport.c
++++ b/drivers/scsi/bfa/bfa_fcs_lport.c
+@@ -1097,6 +1097,17 @@ bfa_fcs_lport_init(struct bfa_fcs_lport_
+       bfa_sm_send_event(lport, BFA_FCS_PORT_SM_CREATE);
+ }
++void
++bfa_fcs_lport_set_symname(struct bfa_fcs_lport_s *port,
++                              char *symname)
++{
++      strcpy(port->port_cfg.sym_name.symname, symname);
++
++      if (bfa_sm_cmp_state(port, bfa_fcs_lport_sm_online))
++              bfa_fcs_lport_ns_util_send_rspn_id(
++                      BFA_FCS_GET_NS_FROM_PORT(port), NULL);
++}
++
+ /*
+  *  fcs_lport_api
+  */
+@@ -4950,9 +4961,6 @@ bfa_fcs_lport_ns_util_send_rspn_id(void
+       u8 *psymbl = &symbl[0];
+       int len;
+-      if (!bfa_sm_cmp_state(port, bfa_fcs_lport_sm_online))
+-              return;
+-
+       /* Avoid sending RSPN in the following states. */
+       if (bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_offline) ||
+           bfa_sm_cmp_state(ns, bfa_fcs_lport_ns_sm_plogi_sending) ||
+--- a/drivers/scsi/bfa/bfad_attr.c
++++ b/drivers/scsi/bfa/bfad_attr.c
+@@ -610,11 +610,8 @@ bfad_im_vport_set_symbolic_name(struct f
+               return;
+       spin_lock_irqsave(&bfad->bfad_lock, flags);
+-      if (strlen(sym_name) > 0) {
+-              strcpy(fcs_vport->lport.port_cfg.sym_name.symname, sym_name);
+-              bfa_fcs_lport_ns_util_send_rspn_id(
+-                      BFA_FCS_GET_NS_FROM_PORT((&fcs_vport->lport)), NULL);
+-      }
++      if (strlen(sym_name) > 0)
++              bfa_fcs_lport_set_symname(&fcs_vport->lport, sym_name);
+       spin_unlock_irqrestore(&bfad->bfad_lock, flags);
+ }
diff --git a/queue-3.10/scsi-enclosure-fix-warn_on-in-dual-path-device-removing.patch b/queue-3.10/scsi-enclosure-fix-warn_on-in-dual-path-device-removing.patch
new file mode 100644 (file)
index 0000000..7969042
--- /dev/null
@@ -0,0 +1,47 @@
+From a1470c7bf3a4676e62e4c0fb204e339399eb5c59 Mon Sep 17 00:00:00 2001
+From: James Bottomley <JBottomley@Parallels.com>
+Date: Fri, 15 Nov 2013 14:58:00 -0800
+Subject: SCSI: enclosure: fix WARN_ON in dual path device removing
+
+From: James Bottomley <JBottomley@Parallels.com>
+
+commit a1470c7bf3a4676e62e4c0fb204e339399eb5c59 upstream.
+
+Bug report from: wenxiong@linux.vnet.ibm.com
+
+The issue is happened in dual controller configuration. We got the
+sysfs warnings when rmmod the ipr module.
+
+enclosure_unregister() in drivers/msic/enclosure.c, call device_unregister()
+for each componment deivce, device_unregister() ->device_del()->kobject_del()
+->sysfs_remove_dir(). In sysfs_remove_dir(), set kobj->sd = NULL.
+
+For each componment device,
+enclosure_component_release()->enclosure_remove_links()->sysfs_remove_link()
+in which checking kobj->sd again, it has been set as NULL when doing
+device_unregister. So we saw all these sysfs WARNING.
+
+Tested-by: wenxiong@linux.vnet.ibm.com
+Signed-off-by: James Bottomley <JBottomley@Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/misc/enclosure.c |    7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/drivers/misc/enclosure.c
++++ b/drivers/misc/enclosure.c
+@@ -198,6 +198,13 @@ static void enclosure_remove_links(struc
+ {
+       char name[ENCLOSURE_NAME_SIZE];
++      /*
++       * In odd circumstances, like multipath devices, something else may
++       * already have removed the links, so check for this condition first.
++       */
++      if (!cdev->dev->kobj.sd)
++              return;
++
+       enclosure_link_name(cdev, name);
+       sysfs_remove_link(&cdev->dev->kobj, name);
+       sysfs_remove_link(&cdev->cdev.kobj, "device");
diff --git a/queue-3.10/scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch b/queue-3.10/scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch
new file mode 100644 (file)
index 0000000..d219ad4
--- /dev/null
@@ -0,0 +1,33 @@
+From 2e311fbabdc23b7eaec77313dc3b9a151a5407b5 Mon Sep 17 00:00:00 2001
+From: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
+Date: Mon, 23 Sep 2013 13:33:41 -0500
+Subject: SCSI: hpsa: do not discard scsi status on aborted commands
+
+From: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
+
+commit 2e311fbabdc23b7eaec77313dc3b9a151a5407b5 upstream.
+
+We inadvertantly discarded the scsi status for aborted commands.
+For some commands (e.g. reads from tape drives) these can't be retried,
+and if we discarded the scsi status, the scsi mid layer couldn't notice
+anything was wrong and the error was not reported.
+
+Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
+Signed-off-by: James Bottomley <JBottomley@Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/hpsa.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/scsi/hpsa.c
++++ b/drivers/scsi/hpsa.c
+@@ -1265,7 +1265,7 @@ static void complete_scsi_command(struct
+                                       "has check condition: aborted command: "
+                                       "ASC: 0x%x, ASCQ: 0x%x\n",
+                                       cp, asc, ascq);
+-                              cmd->result = DID_SOFT_ERROR << 16;
++                              cmd->result |= DID_SOFT_ERROR << 16;
+                               break;
+                       }
+                       /* Must be some other type of check condition */
diff --git a/queue-3.10/scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch b/queue-3.10/scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch
new file mode 100644 (file)
index 0000000..634a5a4
--- /dev/null
@@ -0,0 +1,50 @@
+From 88bf6d62db4393fa03a58bada9d746312d5b496f Mon Sep 17 00:00:00 2001
+From: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
+Date: Fri, 1 Nov 2013 11:02:25 -0500
+Subject: SCSI: hpsa: return 0 from driver probe function on success, not 1
+
+From: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
+
+commit 88bf6d62db4393fa03a58bada9d746312d5b496f upstream.
+
+A return value of 1 is interpreted as an error.  See pci_driver.
+in local_pci_probe().  If you're wondering how this ever could
+have worked, it's because it used to be the case that only return
+values less than zero were interpreted as failure.  But even in
+the current kernel if the driver registers its various entry
+points with the kernel, and then returns a value which is
+interpreted as failure, those registrations aren't undone, so
+the driver still mostly works.  However, the driver's remove
+function wouldn't be called on rmmod, and pci power management
+functions wouldn't work.  In the case of Smart Array, since it
+has a battery backed cache (or else no cache) even if the driver
+is not shut down properly as long as there is no outstanding
+i/o, nothing too bad happens, which is why it took so long to
+notice.
+
+Requesting backport to stable because the change to pci-driver.c
+which requires driver probe functions to return 0 occurred between
+2.6.35 and 2.6.36 (the pci power management breakage) and again
+between 3.7 and 3.8 (pci_dev->driver getting set to NULL in
+local_pci_probe() preventing driver remove function from being
+called on rmmod.)
+
+Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
+Signed-off-by: James Bottomley <JBottomley@Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/hpsa.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/scsi/hpsa.c
++++ b/drivers/scsi/hpsa.c
+@@ -4904,7 +4904,7 @@ reinit_after_soft_reset:
+       hpsa_hba_inquiry(h);
+       hpsa_register_scsi(h);  /* hook ourselves into SCSI subsystem */
+       start_controller_lockup_detector(h);
+-      return 1;
++      return 0;
+ clean4:
+       hpsa_free_sg_chain_blocks(h);
diff --git a/queue-3.10/scsi-libsas-fix-usage-of-ata_tf_to_fis.patch b/queue-3.10/scsi-libsas-fix-usage-of-ata_tf_to_fis.patch
new file mode 100644 (file)
index 0000000..e38b948
--- /dev/null
@@ -0,0 +1,44 @@
+From ae5fbae0ccd982dfca0ce363036ed92f5b13f150 Mon Sep 17 00:00:00 2001
+From: Dan Williams <dan.j.williams@intel.com>
+Date: Tue, 22 Oct 2013 18:35:19 -0700
+Subject: SCSI: libsas: fix usage of ata_tf_to_fis
+
+From: Dan Williams <dan.j.williams@intel.com>
+
+commit ae5fbae0ccd982dfca0ce363036ed92f5b13f150 upstream.
+
+Since commit 110dd8f19df5 "[SCSI] libsas: fix scr_read/write users and
+update the libata documentation" we have been passing pmp=1 and is_cmd=0
+to ata_tf_to_fis().  Praveen reports that eSATA attached drives do not
+discover correctly.  His investigation found that the BIOS was passing
+pmp=0 while Linux was passing pmp=1 and failing to discover the drives.
+Update libsas to follow the libata example of pulling the pmp setting
+from the ata_link and correct is_cmd to be 1 since all tf's submitted
+through ->qc_issue are commands.  Presumably libsas lldds do not care
+about is_cmd as they have sideband mechanisms to perform link
+management.
+
+http://marc.info/?l=linux-scsi&m=138179681726990
+
+[jejb: checkpatch fix]
+Signed-off-by: Dan Williams <dan.j.williams@intel.com>
+Reported-by: Praveen Murali <pmurali@logicube.com>
+Tested-by: Praveen Murali <pmurali@logicube.com>
+Signed-off-by: James Bottomley <JBottomley@Parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/libsas/sas_ata.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/scsi/libsas/sas_ata.c
++++ b/drivers/scsi/libsas/sas_ata.c
+@@ -211,7 +211,7 @@ static unsigned int sas_ata_qc_issue(str
+               qc->tf.nsect = 0;
+       }
+-      ata_tf_to_fis(&qc->tf, 1, 0, (u8*)&task->ata_task.fis);
++      ata_tf_to_fis(&qc->tf, qc->dev->link->pmp, 1, (u8 *)&task->ata_task.fis);
+       task->uldd_task = qc;
+       if (ata_is_atapi(qc->tf.protocol)) {
+               memcpy(task->ata_task.atapi_packet, qc->cdb, qc->dev->cdb_len);
index f42a4941253a261794dbbe2bb6eb362e107a8491..5a3ab406e2f1460395846771eadf6170783cf279 100644 (file)
@@ -18,3 +18,8 @@ asoc-wm8731-fix-dsp-mode-configuration.patch
 vfs-fix-subtle-use-after-free-of-pipe_inode_info.patch
 can-sja1000-fix-pre-post-_irq-handling-and-irq-handler-return-value.patch
 can-c_can-don-t-call-pm_runtime_get_sync-from-interrupt-context.patch
+scsi-bfa-fix-crash-when-symb-name-set-for-offline-vport.patch
+scsi-enclosure-fix-warn_on-in-dual-path-device-removing.patch
+scsi-libsas-fix-usage-of-ata_tf_to_fis.patch
+scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch
+scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch