linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix sp5100_tco watchdog driver regression
@ 2017-04-01 10:06 Zoltán Böszörményi
  2017-04-01 10:06 ` [PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking Zoltán Böszörményi
                   ` (3 more replies)
  0 siblings, 4 replies; 37+ messages in thread
From: Zoltán Böszörményi @ 2017-04-01 10:06 UTC (permalink / raw)
  To: linux-usb, linux-watchdog, linux-i2c
  Cc: linux-kernel, Zoltán Böszörményi

Three drivers are accessing the same I/O ports (0xcd6 / 0xcd7) on
AMD SB800 based machines without synchronization or with excluding
each other out:
* the USB quirk for isochronous transfers on SB800 (no locking)
* sp5100_tco (request_region)
* i2c-piix4 (request_region)

Historically, the sp5100_tco watchdog driver used request_region()
for these I/O ports but an i2c-piix4 improvement for SB800 in
Linux 4.4-rc4 also added a request_region() call. Because of this
and the load order of these drivers, this caused a regression and
the watchdog function became non-functional. The commit that caused
the regression is:

commit 2fee61d22e606fc99ade9079fda15fdee83ec33e
Author: Christian Fetzer <fetzer.ch@gmail.com>
Date:   Thu Nov 19 20:13:48 2015 +0100

    i2c: piix4: Add support for multiplexed main adapter in SB800

I was informed by Guenter Roeck <linux@roeck-us.net> that the
alternative, i.e. using request_muxed_region() can fail, either
because of a resource allocation failure, which is quite possible
with long uptimes, or because there are no guarantees that an as yet
unknown driver would also use request_muxed_region() consistently.

Because of this, a common mutex across these driver was chosen to
synchronize I/O port accesses and request_region() calls are removed
from both i2c-piix4 and sp5100_tco to make the code uniform.

This patch series implements this and restores the watchdog function.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>

 drivers/i2c/busses/i2c-piix4.c | 59 ++++++++++++--------------------------
 drivers/usb/host/pci-quirks.c  | 14 ++++++---
 drivers/watchdog/sp5100_tco.c  | 24 +++++++---------
 drivers/watchdog/sp5100_tco.h  | 10 ++++---
 include/linux/sb800.h          | 15 ++++++++++
 5 files changed, 61 insertions(+), 61 deletions(-)

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2017-07-14 11:36 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <<20170401110223.12056-1-zboszor@pr.hu>
2017-04-03  7:51 ` [PATCH 0/3 v2] Fix regression in the sp5100_tco driver Zoltan Boszormenyi
2017-04-03  7:51   ` [PATCH 1/3 v2] usb: pci-quirks: Add a common mutex for the I/O port pair of SB800 Zoltan Boszormenyi
2017-06-20 14:12     ` [1/3, " Guenter Roeck
2017-04-03  7:51   ` [PATCH 2/3 v2] i2c: i2c-piix4: Use the common mutex Zoltan Boszormenyi
2017-04-19 18:43     ` Wolfram Sang
2017-04-03  7:51   ` [PATCH 3/3 v2] watchdog: sp5100_tco: " Zoltan Boszormenyi
2017-06-21  3:53   ` [PATCH 0/5 v3] Fix sp5100_tco watchdog driver regression Zoltán Böszörményi
2017-06-21  3:53     ` [PATCH 1/5] Extend the request_region() infrastructure Zoltán Böszörményi
2017-06-21  3:53     ` [PATCH 2/5] Modify behaviour of request_*muxed_region() Zoltán Böszörményi
2017-06-21  3:53     ` [PATCH 3/5] usb: pci-quirks: Protect the I/O port pair of SB800 Zoltán Böszörményi
2017-06-21  3:53     ` [PATCH 4/5] i2c: i2c-piix4: Use request_declared_muxed_region() Zoltán Böszörményi
2017-06-21  3:53     ` [PATCH 5/5] watchdog: sp5100_tco: " Zoltán Böszörményi
2017-06-21 15:09       ` Guenter Roeck
2017-06-22 13:21     ` [PATCH 0/5 v4] Fix sp5100_tco watchdog driver regression Zoltán Böszörményi
2017-06-22 13:21       ` [PATCH 1/5 v2] Extend the request_region() infrastructure Zoltán Böszörményi
2017-07-14  8:33         ` Boszormenyi Zoltan
2017-06-22 13:21       ` [PATCH 2/5 v2] Modify behaviour of request_*muxed_region() Zoltán Böszörményi
2017-07-08 15:37         ` [2/5,v2] " Guenter Roeck
2017-06-22 13:21       ` [PATCH 3/5 v4] usb: pci-quirks: Protect the I/O port pair of SB800 Zoltán Böszörményi
2017-07-14  8:34         ` Boszormenyi Zoltan
2017-07-14 11:36           ` Greg Kroah-Hartman
2017-06-22 13:21       ` [PATCH 4/5 v4] i2c: i2c-piix4: Use request_declared_muxed_region() Zoltán Böszörményi
2017-06-22 13:21       ` [PATCH 5/5 v4] watchdog: sp5100_tco: " Zoltán Böszörményi
2017-07-14  8:34         ` Boszormenyi Zoltan
2017-07-06  7:50       ` [PATCH 0/5 v4] Fix sp5100_tco watchdog driver regression Boszormenyi Zoltan
     [not found]         ` <CAETC-g-0ZYiD=j_sAtYpfr0t-rciiTx3ruvpGuwEud+nbbpiBg@mail.gmail.com>
     [not found]           ` <CAETC-g_YF7TWv+LNrNQrX9AY_-iepCeE0EmCKWYF4VyQzRY+UQ@mail.gmail.com>
2017-07-07  2:26             ` Marcelo "Marc" Ranolfi
2017-04-01 10:06 [PATCH 0/3] " Zoltán Böszörményi
2017-04-01 10:06 ` [PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking Zoltán Böszörményi
2017-04-01 10:06 ` [PATCH 3/3] watchdog: sp5100_tco: Synchronize I/O port accesses Zoltán Böszörményi
2017-04-01 11:02 ` [PATCH 0/3, resend] Fix sp5100_tco watchdog driver regression Zoltan Boszormenyi
2017-04-01 11:02   ` [PATCH 1/3] usb: pci-quirks: Add a header for SB800 I/O ports and mutex for locking Zoltan Boszormenyi
2017-04-01 13:59     ` Greg KH
2017-04-01 14:40       ` Alan Stern
2017-04-01 15:09         ` Boszormenyi Zoltan
2017-04-01 15:07       ` Boszormenyi Zoltan
2017-04-01 11:02   ` [PATCH 3/3] watchdog: sp5100_tco: Synchronize I/O port accesses Zoltan Boszormenyi
2017-04-01 11:08 ` [PATCH 2/3] i2c: i2c-piix4: Synchronize I/O port accesses with the SB800 USB quirk Zoltan Boszormenyi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).