Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1187864
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.1 14/65] Disable write buffering on Toshiba ToPIC95 |
| Date | Sun, 19 Jul 2015 21:50:02 +0200 |
| Message-ID | <pO2L0-3Yv-15@gated-at.bofh.it> (permalink) |
| References | <pO28i-3ee-9@gated-at.bofh.it> |
| X-Original-To | linux-kernel@vger.kernel.org |
| X-Mailer | git-send-email 2.4.6 |
| User-Agent | quilt/0.64 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 71 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, "Ryan C. Underwood" <nemesis@icequake.net>, Dominik Brodowski <linux@dominikbrodowski.net> |
| X-Original-Date | Sun, 19 Jul 2015 12:07:33 -0700 |
| X-Original-Message-ID | <20150719190809.973631086@linuxfoundation.org> |
| X-Original-References | <20150719190809.469715936@linuxfoundation.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1187864 |
Show key headers only | View raw
4.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ryan Underwood <nemesis@icequake.net>
commit 2fb22a8042fe96b4220843f79241c116d90922c4 upstream.
Disable write buffering on the Toshiba ToPIC95 if it is enabled by
somebody (it is not supposed to be a power-on default according to
the datasheet). On the ToPIC95, practically no 32-bit Cardbus card
will work under heavy load without locking up the whole system if
this is left enabled. I tried about a dozen. It does not affect
16-bit cards. This is similar to the O2 bugs in early controller
revisions it seems.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=55961
Signed-off-by: Ryan C. Underwood <nemesis@icequake.net>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/pcmcia/topic.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
--- a/drivers/pcmcia/topic.h
+++ b/drivers/pcmcia/topic.h
@@ -104,6 +104,9 @@
#define TOPIC_EXCA_IF_CONTROL 0x3e /* 8 bit */
#define TOPIC_EXCA_IFC_33V_ENA 0x01
+#define TOPIC_PCI_CFG_PPBCN 0x3e /* 16-bit */
+#define TOPIC_PCI_CFG_PPBCN_WBEN 0x0400
+
static void topic97_zoom_video(struct pcmcia_socket *sock, int onoff)
{
struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
@@ -138,6 +141,7 @@ static int topic97_override(struct yenta
static int topic95_override(struct yenta_socket *socket)
{
u8 fctrl;
+ u16 ppbcn;
/* enable 3.3V support for 16bit cards */
fctrl = exca_readb(socket, TOPIC_EXCA_IF_CONTROL);
@@ -146,6 +150,18 @@ static int topic95_override(struct yenta
/* tell yenta to use exca registers to power 16bit cards */
socket->flags |= YENTA_16BIT_POWER_EXCA | YENTA_16BIT_POWER_DF;
+ /* Disable write buffers to prevent lockups under load with numerous
+ Cardbus cards, observed on Tecra 500CDT and reported elsewhere on the
+ net. This is not a power-on default according to the datasheet
+ but some BIOSes seem to set it. */
+ if (pci_read_config_word(socket->dev, TOPIC_PCI_CFG_PPBCN, &ppbcn) == 0
+ && socket->dev->revision <= 7
+ && (ppbcn & TOPIC_PCI_CFG_PPBCN_WBEN)) {
+ ppbcn &= ~TOPIC_PCI_CFG_PPBCN_WBEN;
+ pci_write_config_word(socket->dev, TOPIC_PCI_CFG_PPBCN, ppbcn);
+ dev_info(&socket->dev->dev, "Disabled ToPIC95 Cardbus write buffers.\n");
+ }
+
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.1 00/65] 4.1.3-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:40 +0200 [PATCH 4.1 43/65] regmap: Fix possible shift overflow in regmap_field_init() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:40 +0200 [PATCH 4.1 22/65] ALSA: hda - Add a fixup for Dell E7450 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:40 +0200 [PATCH 4.1 39/65] mm: kmemleak: allow safe memory scanning during kmemleak disabling Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:40 +0200 [PATCH 4.1 04/65] kernfs: Add support for always empty directories. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:40 +0200 [PATCH 4.1 15/65] ALSA: pcm: Fix pcm_class sysfs output Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:50 +0200 [PATCH 4.1 16/65] ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:50 +0200 [PATCH 4.1 17/65] ALSA: hda - set proper caps for newer AMD hda audio in KB/KV Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:50 +0200 [PATCH 4.1 13/65] ipr: Increase default adapter init stage change timeout Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:50 +0200 [PATCH 4.1 11/65] gpio: rcar: Check for irq_set_irq_wake() failures Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:50 +0200 [PATCH 4.1 14/65] Disable write buffering on Toshiba ToPIC95 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:50 +0200 [PATCH 4.1 12/65] rcu: Correctly handle non-empty Tiny RCU callback list with none ready Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:50 +0200 [PATCH 4.1 18/65] ALSA: hda - Disable widget power-save for VIA codecs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:50 +0200 [PATCH 4.1 10/65] gpio: crystalcove: set IRQCHIP_SKIP_SET_WAKE for the irqchip Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2015-07-19 21:50 +0200 Re: [PATCH 4.1 00/65] 4.1.3-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2015-07-20 19:20 +0200
csiph-web