From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
Jean Delvare <khali@linux-fr.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [38/46] i2c: Hide probe errors caused by ACPI resource conflicts
Date: Fri, 16 Oct 2009 10:10:31 -0700 [thread overview]
Message-ID: <20091016171206.776466941@linux.site> (raw)
In-Reply-To: <20091016171422.GA13339@kroah.com>
[-- Attachment #1: i2c-hide-probe-errors-caused-by-acpi-resource-conflicts.patch --]
[-- Type: text/plain, Size: 4021 bytes --]
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jean Delvare <khali@linux-fr.org>
commit 18669eabde2ff5fc446e72e043f0539059763438 upstream.
When an ACPI resource conflict is detected, error messages are already
printed by ACPI. There's no point in causing the driver core to print
more error messages, so return one of the error codes for which no
message is printed.
This fixes bug #14293:
http://bugzilla.kernel.org/show_bug.cgi?id=14293
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/i2c/busses/i2c-amd756.c | 2 +-
drivers/i2c/busses/i2c-amd8111.c | 4 +++-
drivers/i2c/busses/i2c-i801.c | 4 +++-
drivers/i2c/busses/i2c-isch.c | 2 +-
drivers/i2c/busses/i2c-piix4.c | 4 ++--
drivers/i2c/busses/i2c-sis96x.c | 2 +-
drivers/i2c/busses/i2c-viapro.c | 2 +-
7 files changed, 12 insertions(+), 8 deletions(-)
--- a/drivers/i2c/busses/i2c-amd756.c
+++ b/drivers/i2c/busses/i2c-amd756.c
@@ -364,7 +364,7 @@ static int __devinit amd756_probe(struct
error = acpi_check_region(amd756_ioport, SMB_IOSIZE,
amd756_driver.name);
if (error)
- return error;
+ return -ENODEV;
if (!request_region(amd756_ioport, SMB_IOSIZE, amd756_driver.name)) {
dev_err(&pdev->dev, "SMB region 0x%x already in use!\n",
--- a/drivers/i2c/busses/i2c-amd8111.c
+++ b/drivers/i2c/busses/i2c-amd8111.c
@@ -376,8 +376,10 @@ static int __devinit amd8111_probe(struc
smbus->size = pci_resource_len(dev, 0);
error = acpi_check_resource_conflict(&dev->resource[0]);
- if (error)
+ if (error) {
+ error = -ENODEV;
goto out_kfree;
+ }
if (!request_region(smbus->base, smbus->size, amd8111_driver.name)) {
error = -EBUSY;
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -732,8 +732,10 @@ static int __devinit i801_probe(struct p
}
err = acpi_check_resource_conflict(&dev->resource[SMBBAR]);
- if (err)
+ if (err) {
+ err = -ENODEV;
goto exit;
+ }
err = pci_request_region(dev, SMBBAR, i801_driver.name);
if (err) {
--- a/drivers/i2c/busses/i2c-isch.c
+++ b/drivers/i2c/busses/i2c-isch.c
@@ -281,7 +281,7 @@ static int __devinit sch_probe(struct pc
return -ENODEV;
}
if (acpi_check_region(sch_smba, SMBIOSIZE, sch_driver.name))
- return -EBUSY;
+ return -ENODEV;
if (!request_region(sch_smba, SMBIOSIZE, sch_driver.name)) {
dev_err(&dev->dev, "SMBus region 0x%x already in use!\n",
sch_smba);
--- a/drivers/i2c/busses/i2c-piix4.c
+++ b/drivers/i2c/busses/i2c-piix4.c
@@ -168,7 +168,7 @@ static int __devinit piix4_setup(struct
}
if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name))
- return -EBUSY;
+ return -ENODEV;
if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) {
dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n",
@@ -259,7 +259,7 @@ static int __devinit piix4_setup_sb800(s
piix4_smba = ((smba_en_hi << 8) | smba_en_lo) & 0xffe0;
if (acpi_check_region(piix4_smba, SMBIOSIZE, piix4_driver.name))
- return -EBUSY;
+ return -ENODEV;
if (!request_region(piix4_smba, SMBIOSIZE, piix4_driver.name)) {
dev_err(&PIIX4_dev->dev, "SMBus region 0x%x already in use!\n",
--- a/drivers/i2c/busses/i2c-sis96x.c
+++ b/drivers/i2c/busses/i2c-sis96x.c
@@ -280,7 +280,7 @@ static int __devinit sis96x_probe(struct
retval = acpi_check_resource_conflict(&dev->resource[SIS96x_BAR]);
if (retval)
- return retval;
+ return -ENODEV;
/* Everything is happy, let's grab the memory and set things up. */
if (!request_region(sis96x_smbus_base, SMB_IOSIZE,
--- a/drivers/i2c/busses/i2c-viapro.c
+++ b/drivers/i2c/busses/i2c-viapro.c
@@ -365,7 +365,7 @@ static int __devinit vt596_probe(struct
found:
error = acpi_check_region(vt596_smba, 8, vt596_driver.name);
if (error)
- return error;
+ return -ENODEV;
if (!request_region(vt596_smba, 8, vt596_driver.name)) {
dev_err(&pdev->dev, "SMBus region 0x%x already in use!\n",
next prev parent reply other threads:[~2009-10-16 17:21 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20091016170953.128828149@linux.site>
2009-10-16 17:14 ` [00/46] 2.6.31.5-stable review Greg KH
2009-10-16 17:09 ` [01/46] SCSI: Retry ADD_TO_MLQUEUE return value for EH commands Greg KH
2009-10-16 17:09 ` [02/46] SCSI: Fix protection scsi_data_buffer leak Greg KH
2009-10-16 17:09 ` [03/46] SCSI: sg: Free data buffers after calling blk_rq_unmap_user Greg KH
2009-10-16 17:09 ` [04/46] ARM: pxa: workaround errata #37 by not using half turbo switching Greg KH
2009-10-16 17:09 ` [05/46] tracing/filters: Fix memory leak when setting a filter Greg KH
2009-10-16 17:09 ` [06/46] x86/paravirt: Use normal calling sequences for irq enable/disable Greg KH
2009-10-16 17:10 ` [07/46] USB: ftdi_sio: remove tty->low_latency Greg KH
2009-10-16 17:10 ` [08/46] USB: ftdi_sio: remove unused rx_byte counter Greg KH
2009-10-16 17:10 ` [09/46] USB: ftdi_sio: clean up read completion handler Greg KH
2009-10-16 17:10 ` [10/46] USB: ftdi_sio: re-implement read processing Greg KH
2009-10-16 17:10 ` [11/46] USB: pl2303: fix error characters not being reported to ldisc Greg KH
2009-10-16 17:10 ` [12/46] USB: digi_acceleport: Fix broken unthrottle Greg KH
2009-10-16 17:10 ` [13/46] USB: serial: dont call release without attach Greg KH
2009-10-16 17:10 ` [14/46] USB: option: Toshiba G450 device id Greg KH
2009-10-16 17:10 ` [15/46] USB: ipaq: fix oops when device is plugged in Greg KH
2009-10-16 17:10 ` [16/46] USB: cp210x: Add support for the DW700 UART Greg KH
2009-10-16 17:10 ` [17/46] USB: Fix throttling in generic usbserial driver Greg KH
2009-10-16 17:10 ` [18/46] USB: storage: When a device returns no sense data, call it a Hardware Error Greg KH
2009-10-16 17:10 ` [19/46] arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0 Greg KH
2009-10-16 17:10 ` [20/46] intel-iommu: Cope with broken HP DC7900 BIOS Greg KH
2009-10-16 17:10 ` [21/46] futex: Detect mismatched requeue targets Greg KH
2009-10-16 17:10 ` [22/46] futex: Fix wakeup race by setting TASK_INTERRUPTIBLE before queue_me() Greg KH
2009-10-16 17:10 ` [23/46] tpm-fixup-pcrs-sysfs-file-update Greg KH
2009-10-16 17:10 ` [24/46] TPM: fix pcrread Greg KH
2009-10-16 17:10 ` [25/46] Bluetooth: Disconnect HIDRAW devices on disconnect Greg KH
2009-10-16 17:10 ` [26/46] Bluetooth: Add extra device reference counting for connections Greg KH
2009-10-16 17:10 ` [27/46] Bluetooth: Let HIDP grab the device reference " Greg KH
2009-10-16 17:10 ` [28/46] connector: Keep the skb in cn_callback_data Greg KH
2009-10-16 17:10 ` [29/46] connector: Provide the senders credentials to the callback Greg KH
2009-10-16 17:10 ` [30/46] connector: Removed the destruct_data callback since it is always kfree_skb() Greg KH
2009-10-16 17:10 ` [31/46] dm/connector: Only process connector packages from privileged processes Greg KH
2009-10-16 17:10 ` [32/46] dst/connector: Disallow unpliviged users to configure dst Greg KH
2009-10-16 17:10 ` [33/46] pohmelfs/connector: Disallow unpliviged users to configure pohmelfs Greg KH
2009-10-16 17:10 ` [34/46] uvesafb/connector: Disallow unpliviged users to send netlink packets Greg KH
2009-10-16 17:10 ` [35/46] e1000e: swap max hw supported frame size between 82574 and 82583 Greg KH
2009-10-16 17:10 ` [36/46] MAINTAINERS: Fix Riku Voipios address Greg KH
2009-10-16 17:10 ` [37/46] macintosh: Dont assume i2c device probing always succeeds Greg KH
2009-10-16 17:10 ` Greg KH [this message]
2009-10-16 17:10 ` [39/46] ALSA: " Greg KH
2009-10-16 17:10 ` [40/46] bsdacct: switch credentials for writing to the accounting file Greg KH
2009-10-16 17:10 ` [41/46] sysfs: Allow sysfs_notify_dirent to be called from interrupt context Greg KH
2009-10-16 17:10 ` [42/46] Staging: rt2860sta: prevent a panic when disabling when associated Greg KH
2009-10-16 17:10 ` [43/46] usb-storage: Workaround devices with bogus sense size Greg KH
2009-10-16 17:10 ` [44/46] iwlwifi: incorrect method used for finding valid OTP blocks Greg KH
2009-10-16 17:10 ` [45/46] mac80211: fix vlan and optimise RX Greg KH
2009-10-16 17:10 ` [46/46] tty: Make flush_to_ldisc() locking more robust Greg KH
2009-10-16 17:57 ` [00/46] 2.6.31.5-stable review Massimo Cetra
2009-10-16 18:03 ` Greg KH
2009-10-17 5:20 ` Massimo Cetra
2009-11-05 23:12 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091016171206.776466941@linux.site \
--to=gregkh@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable-review@kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox