From b807cc8402996d93e2ea8f19f531588050bb6baf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 19 Mar 2014 21:54:54 -0700 Subject: [PATCH] 3.10-stable patches added patches: libata-add-ata_horkage_broken_fpdma_aa-quirk-for-seagate-momentus-spinpoint-m8-2ba30001.patch nfs-fix-a-delegation-callback-race.patch nfsv4-nfs4_stateid_is_current-should-return-true-for-an-invalid-stateid.patch spi-spi-ath79-fix-initial-gpio-cs-line-setup.patch --- ...agate-momentus-spinpoint-m8-2ba30001.patch | 36 ++++++++++++++ .../nfs-fix-a-delegation-callback-race.patch | 49 +++++++++++++++++++ ...d-return-true-for-an-invalid-stateid.patch | 40 +++++++++++++++ queue-3.10/series | 4 ++ ...ath79-fix-initial-gpio-cs-line-setup.patch | 44 +++++++++++++++++ 5 files changed, 173 insertions(+) create mode 100644 queue-3.10/libata-add-ata_horkage_broken_fpdma_aa-quirk-for-seagate-momentus-spinpoint-m8-2ba30001.patch create mode 100644 queue-3.10/nfs-fix-a-delegation-callback-race.patch create mode 100644 queue-3.10/nfsv4-nfs4_stateid_is_current-should-return-true-for-an-invalid-stateid.patch create mode 100644 queue-3.10/spi-spi-ath79-fix-initial-gpio-cs-line-setup.patch diff --git a/queue-3.10/libata-add-ata_horkage_broken_fpdma_aa-quirk-for-seagate-momentus-spinpoint-m8-2ba30001.patch b/queue-3.10/libata-add-ata_horkage_broken_fpdma_aa-quirk-for-seagate-momentus-spinpoint-m8-2ba30001.patch new file mode 100644 index 00000000000..ced71654dfe --- /dev/null +++ b/queue-3.10/libata-add-ata_horkage_broken_fpdma_aa-quirk-for-seagate-momentus-spinpoint-m8-2ba30001.patch @@ -0,0 +1,36 @@ +From b28a613e9138e4b3a64649bd60b13436f4b4b49b Mon Sep 17 00:00:00 2001 +From: Michele Baldessari +Date: Fri, 7 Mar 2014 16:34:29 +0000 +Subject: libata: add ATA_HORKAGE_BROKEN_FPDMA_AA quirk for Seagate Momentus SpinPoint M8 (2BA30001) + +From: Michele Baldessari + +commit b28a613e9138e4b3a64649bd60b13436f4b4b49b upstream. + +Via commit 87809942d3fa "libata: add ATA_HORKAGE_BROKEN_FPDMA_AA quirk +for Seagate Momentus SpinPoint M8" we added a quirk for disks named +"ST1000LM024 HN-M101MBB" with firmware revision "2AR10001". + +As reported on https://bugzilla.redhat.com/show_bug.cgi?id=1073901, +we need to also add firmware revision 2BA30001 as it is broken as well. + +Reported-by: Nicholas +Signed-off-by: Michele Baldessari +Tested-by: Guilherme Amadio +Signed-off-by: Tejun Heo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/libata-core.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/ata/libata-core.c ++++ b/drivers/ata/libata-core.c +@@ -4152,6 +4152,7 @@ static const struct ata_blacklist_entry + + /* Seagate Momentus SpinPoint M8 seem to have FPMDA_AA issues */ + { "ST1000LM024 HN-M101MBB", "2AR10001", ATA_HORKAGE_BROKEN_FPDMA_AA }, ++ { "ST1000LM024 HN-M101MBB", "2BA30001", ATA_HORKAGE_BROKEN_FPDMA_AA }, + + /* Blacklist entries taken from Silicon Image 3124/3132 + Windows driver .inf file - also several Linux problem reports */ diff --git a/queue-3.10/nfs-fix-a-delegation-callback-race.patch b/queue-3.10/nfs-fix-a-delegation-callback-race.patch new file mode 100644 index 00000000000..23ef1b9081b --- /dev/null +++ b/queue-3.10/nfs-fix-a-delegation-callback-race.patch @@ -0,0 +1,49 @@ +From 755a48a7a4eb05b9c8424e3017d947b2961a60e0 Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Sun, 2 Mar 2014 22:03:12 -0500 +Subject: NFS: Fix a delegation callback race + +From: Trond Myklebust + +commit 755a48a7a4eb05b9c8424e3017d947b2961a60e0 upstream. + +The clean-up in commit 36281caa839f ended up removing a NULL pointer check +that is needed in order to prevent an Oops in +nfs_async_inode_return_delegation(). + +Reported-by: "Yan, Zheng" +Link: http://lkml.kernel.org/r/5313E9F6.2020405@intel.com +Fixes: 36281caa839f (NFSv4: Further clean-ups of delegation stateid validation) +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/delegation.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +--- a/fs/nfs/delegation.c ++++ b/fs/nfs/delegation.c +@@ -656,16 +656,19 @@ int nfs_async_inode_return_delegation(st + + rcu_read_lock(); + delegation = rcu_dereference(NFS_I(inode)->delegation); ++ if (delegation == NULL) ++ goto out_enoent; + +- if (!clp->cl_mvops->match_stateid(&delegation->stateid, stateid)) { +- rcu_read_unlock(); +- return -ENOENT; +- } ++ if (!clp->cl_mvops->match_stateid(&delegation->stateid, stateid)) ++ goto out_enoent; + nfs_mark_return_delegation(server, delegation); + rcu_read_unlock(); + + nfs_delegation_run_state_manager(clp); + return 0; ++out_enoent: ++ rcu_read_unlock(); ++ return -ENOENT; + } + + static struct inode * diff --git a/queue-3.10/nfsv4-nfs4_stateid_is_current-should-return-true-for-an-invalid-stateid.patch b/queue-3.10/nfsv4-nfs4_stateid_is_current-should-return-true-for-an-invalid-stateid.patch new file mode 100644 index 00000000000..a9f8283d82e --- /dev/null +++ b/queue-3.10/nfsv4-nfs4_stateid_is_current-should-return-true-for-an-invalid-stateid.patch @@ -0,0 +1,40 @@ +From e1253be0ece1a95a02c7f5843194877471af8179 Mon Sep 17 00:00:00 2001 +From: Trond Myklebust +Date: Wed, 5 Mar 2014 08:44:23 -0500 +Subject: NFSv4: nfs4_stateid_is_current should return 'true' for an invalid stateid + +From: Trond Myklebust + +commit e1253be0ece1a95a02c7f5843194877471af8179 upstream. + +When nfs4_set_rw_stateid() can fails by returning EIO to indicate that +the stateid is completely invalid, then it makes no sense to have it +trigger a retry of the READ or WRITE operation. Instead, we should just +have it fall through and attempt a recovery. + +This fixes an infinite loop in which the client keeps replaying the same +bad stateid back to the server. + +Reported-by: Andy Adamson +Link: http://lkml.kernel.org/r/1393954269-3974-1-git-send-email-andros@netapp.com +Signed-off-by: Trond Myklebust +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/nfs4proc.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/fs/nfs/nfs4proc.c ++++ b/fs/nfs/nfs4proc.c +@@ -3607,8 +3607,9 @@ static bool nfs4_stateid_is_current(nfs4 + { + nfs4_stateid current_stateid; + +- if (nfs4_set_rw_stateid(¤t_stateid, ctx, l_ctx, fmode)) +- return false; ++ /* If the current stateid represents a lost lock, then exit */ ++ if (nfs4_set_rw_stateid(¤t_stateid, ctx, l_ctx, fmode) == -EIO) ++ return true; + return nfs4_stateid_match(stateid, ¤t_stateid); + } + diff --git a/queue-3.10/series b/queue-3.10/series index 4eaac711914..ce4ff211049 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -45,3 +45,7 @@ acpi-resources-ignore-invalid-acpi-device-resources.patch tracing-do-not-add-event-files-for-modules-that-fail-tracepoints.patch firewire-net-fix-use-after-free.patch firewire-don-t-use-prepare_delayed_work.patch +libata-add-ata_horkage_broken_fpdma_aa-quirk-for-seagate-momentus-spinpoint-m8-2ba30001.patch +spi-spi-ath79-fix-initial-gpio-cs-line-setup.patch +nfs-fix-a-delegation-callback-race.patch +nfsv4-nfs4_stateid_is_current-should-return-true-for-an-invalid-stateid.patch diff --git a/queue-3.10/spi-spi-ath79-fix-initial-gpio-cs-line-setup.patch b/queue-3.10/spi-spi-ath79-fix-initial-gpio-cs-line-setup.patch new file mode 100644 index 00000000000..13d987fda83 --- /dev/null +++ b/queue-3.10/spi-spi-ath79-fix-initial-gpio-cs-line-setup.patch @@ -0,0 +1,44 @@ +From 61d1cf163c8653934cc8cd5d0b2a562d0990c265 Mon Sep 17 00:00:00 2001 +From: Gabor Juhos +Date: Sun, 2 Mar 2014 20:54:42 +0100 +Subject: spi: spi-ath79: fix initial GPIO CS line setup + +From: Gabor Juhos + +commit 61d1cf163c8653934cc8cd5d0b2a562d0990c265 upstream. + +The 'ath79_spi_setup_cs' function initializes the chip +select line of a given SPI device in order to make sure +that the device is inactive. + +If the SPI_CS_HIGH bit is set for a given device, it +means that the CS line of that device is active HIGH +so it must be set to LOW initially. In case of GPIO +CS lines, the 'ath79_spi_setup_cs' function does the +opposite of that due to the wrong GPIO flags. + +Fix the code to use the correct GPIO flags. + +Reported-by: Ronald Wahl +Signed-off-by: Gabor Juhos +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/spi/spi-ath79.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/spi/spi-ath79.c ++++ b/drivers/spi/spi-ath79.c +@@ -132,9 +132,9 @@ static int ath79_spi_setup_cs(struct spi + + flags = GPIOF_DIR_OUT; + if (spi->mode & SPI_CS_HIGH) +- flags |= GPIOF_INIT_HIGH; +- else + flags |= GPIOF_INIT_LOW; ++ else ++ flags |= GPIOF_INIT_HIGH; + + status = gpio_request_one(cdata->gpio, flags, + dev_name(&spi->dev)); -- 2.47.3