From: Greg Kroah-Hartman Date: Sun, 8 Dec 2013 20:05:52 +0000 (-0800) Subject: 3.4-stable patches X-Git-Tag: v3.4.74~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=edc00244e22bb414ece03bc2b585c7e58e8fc2b9;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: 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 --- diff --git a/queue-3.4/scsi-enclosure-fix-warn_on-in-dual-path-device-removing.patch b/queue-3.4/scsi-enclosure-fix-warn_on-in-dual-path-device-removing.patch new file mode 100644 index 00000000000..7969042e669 --- /dev/null +++ b/queue-3.4/scsi-enclosure-fix-warn_on-in-dual-path-device-removing.patch @@ -0,0 +1,47 @@ +From a1470c7bf3a4676e62e4c0fb204e339399eb5c59 Mon Sep 17 00:00:00 2001 +From: James Bottomley +Date: Fri, 15 Nov 2013 14:58:00 -0800 +Subject: SCSI: enclosure: fix WARN_ON in dual path device removing + +From: James Bottomley + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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.4/scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch b/queue-3.4/scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch new file mode 100644 index 00000000000..b6f90f3add8 --- /dev/null +++ b/queue-3.4/scsi-hpsa-do-not-discard-scsi-status-on-aborted-commands.patch @@ -0,0 +1,33 @@ +From 2e311fbabdc23b7eaec77313dc3b9a151a5407b5 Mon Sep 17 00:00:00 2001 +From: "Stephen M. Cameron" +Date: Mon, 23 Sep 2013 13:33:41 -0500 +Subject: SCSI: hpsa: do not discard scsi status on aborted commands + +From: "Stephen M. Cameron" + +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 +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/hpsa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/hpsa.c ++++ b/drivers/scsi/hpsa.c +@@ -1219,7 +1219,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.4/scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch b/queue-3.4/scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch new file mode 100644 index 00000000000..b4f93557ae0 --- /dev/null +++ b/queue-3.4/scsi-hpsa-return-0-from-driver-probe-function-on-success-not-1.patch @@ -0,0 +1,50 @@ +From 88bf6d62db4393fa03a58bada9d746312d5b496f Mon Sep 17 00:00:00 2001 +From: "Stephen M. Cameron" +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" + +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 +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/hpsa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/hpsa.c ++++ b/drivers/scsi/hpsa.c +@@ -4466,7 +4466,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.4/scsi-libsas-fix-usage-of-ata_tf_to_fis.patch b/queue-3.4/scsi-libsas-fix-usage-of-ata_tf_to_fis.patch new file mode 100644 index 00000000000..e38b948586e --- /dev/null +++ b/queue-3.4/scsi-libsas-fix-usage-of-ata_tf_to_fis.patch @@ -0,0 +1,44 @@ +From ae5fbae0ccd982dfca0ce363036ed92f5b13f150 Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 22 Oct 2013 18:35:19 -0700 +Subject: SCSI: libsas: fix usage of ata_tf_to_fis + +From: Dan Williams + +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 +Reported-by: Praveen Murali +Tested-by: Praveen Murali +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + 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); diff --git a/queue-3.4/series b/queue-3.4/series index 7cb1d26f8f2..bf44d9d70a0 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -3,3 +3,7 @@ crypto-ccm-fix-handling-of-zero-plaintext-when-computing-mac.patch crypto-authenc-find-proper-iv-address-in-ablkcipher-callback.patch asoc-wm8990-mark-the-register-map-as-dirty-when-powering-down.patch asoc-wm8731-fix-dsp-mode-configuration.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