From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Greg KH <gregkh@linuxfoundation.org>,
"Ren, Yongjie" <yongjie.ren@intel.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Subject: [ 82/85] xen/pciback: Fix proper FLR steps.
Date: Wed, 12 Sep 2012 16:37:05 -0700 [thread overview]
Message-ID: <20120912233550.272400422@linuxfoundation.org> (raw)
In-Reply-To: <20120912233541.747973832@linuxfoundation.org>
From: Greg KH <gregkh@linuxfoundation.org>
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
commit 80ba77dfbce85f2d1be54847de3c866de1b18a9a upstream.
When we do FLR and save PCI config we did it in the wrong order.
The end result was that if a PCI device was unbind from
its driver, then binded to xen-pciback, and then back to its
driver we would get:
> lspci -s 04:00.0
04:00.0 Ethernet controller: Intel Corporation 82574L Gigabit Network Connection
13:42:12 # 4 :~/
> echo "0000:04:00.0" > /sys/bus/pci/drivers/pciback/unbind
> modprobe e1000e
e1000e: Intel(R) PRO/1000 Network Driver - 2.0.0-k
e1000e: Copyright(c) 1999 - 2012 Intel Corporation.
e1000e 0000:04:00.0: Disabling ASPM L0s L1
e1000e 0000:04:00.0: enabling device (0000 -> 0002)
xen: registering gsi 48 triggering 0 polarity 1
Already setup the GSI :48
e1000e 0000:04:00.0: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
e1000e: probe of 0000:04:00.0 failed with error -2
This fixes it by first saving the PCI configuration space, then
doing the FLR.
Reported-by: Ren, Yongjie <yongjie.ren@intel.com>
Reported-and-Tested-by: Tobias Geiger <tobias.geiger@vido.info>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/xen/xen-pciback/pci_stub.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -353,16 +353,16 @@ static int __devinit pcistub_init_device
if (err)
goto config_release;
- dev_dbg(&dev->dev, "reseting (FLR, D3, etc) the device\n");
- __pci_reset_function_locked(dev);
-
/* We need the device active to save the state. */
dev_dbg(&dev->dev, "save state of device\n");
pci_save_state(dev);
dev_data->pci_saved_state = pci_store_saved_state(dev);
if (!dev_data->pci_saved_state)
dev_err(&dev->dev, "Could not store PCI conf saved state!\n");
-
+ else {
+ dev_dbg(&dev->dev, "reseting (FLR, D3, etc) the device\n");
+ __pci_reset_function_locked(dev);
+ }
/* Now disable the device (this also ensures some private device
* data is setup before we export)
*/
next prev parent reply other threads:[~2012-09-12 23:59 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-12 23:35 [ 00/85] 3.4.11-stable review Greg Kroah-Hartman
2012-09-12 23:35 ` [ 01/85] USB: vt6656: remove __devinit* from the struct usb_device_id table Greg Kroah-Hartman
2012-09-12 23:35 ` [ 02/85] USB: emi62: " Greg Kroah-Hartman
2012-09-12 23:35 ` [ 03/85] ALSA: hda - fix Copyright debug message Greg Kroah-Hartman
2012-09-12 23:35 ` [ 04/85] ARM: 7483/1: vfp: only advertise VFPv4 in hwcaps if CONFIG_VFPv3 is enabled Greg Kroah-Hartman
2012-09-12 23:35 ` [ 05/85] ARM: 7487/1: mm: avoid setting nG bit for user mappings that arent present Greg Kroah-Hartman
2012-09-12 23:35 ` [ 06/85] ARM: 7488/1: mm: use 5 bits for swapfile type encoding Greg Kroah-Hartman
2012-09-12 23:35 ` [ 07/85] ARM: 7489/1: errata: fix workaround for erratum #720789 on UP systems Greg Kroah-Hartman
2012-09-12 23:35 ` [ 08/85] ARM: OMAP2+: Fix dmtimer set source clock failure Greg Kroah-Hartman
2012-09-12 23:35 ` [ 09/85] ARM: S3C24XX: Add missing DMACH_DT_PROP Greg Kroah-Hartman
2012-09-12 23:35 ` [ 10/85] ARM: S3C24XX: Fix s3c2410_dma_enqueue parameters Greg Kroah-Hartman
2012-09-12 23:35 ` [ 11/85] Revert dma: imx-dma: Fix kernel crash due to missing clock conversion Greg Kroah-Hartman
2012-09-12 23:35 ` [ 12/85] xen/setup: Fix one-off error when adding for-balloon PFNs to the P2M Greg Kroah-Hartman
2012-09-12 23:35 ` [ 13/85] ARM: imx6: spin the cpu until hardware takes it down Greg Kroah-Hartman
2012-09-12 23:35 ` [ 14/85] ARM: imx: select CPU_FREQ_TABLE when needed Greg Kroah-Hartman
2012-09-12 23:35 ` [ 15/85] ASoC: wm9712: Fix microphone source selection Greg Kroah-Hartman
2012-09-12 23:35 ` [ 16/85] ASoC: omap-mcbsp: Fix 6pin mux configuration Greg Kroah-Hartman
2012-09-12 23:36 ` [ 17/85] vfs: missed source of ->f_pos races Greg Kroah-Hartman
2012-09-12 23:36 ` [ 18/85] vfs: canonicalize create mode in build_open_flags() Greg Kroah-Hartman
2012-09-12 23:36 ` [ 19/85] alpha: fix fpu.h usage in userspace Greg Kroah-Hartman
2012-09-12 23:36 ` [ 20/85] alpha: Dont export SOCK_NONBLOCK to user space Greg Kroah-Hartman
2012-09-12 23:36 ` [ 21/85] USB: winbond: remove __devinit* from the struct usb_device_id table Greg Kroah-Hartman
2012-09-12 23:36 ` [ 22/85] mm: hugetlbfs: correctly populate shared pmd Greg Kroah-Hartman
2012-09-12 23:36 ` [ 23/85] ALSA: hda - dont create dysfunctional mixer controls for ca0132 Greg Kroah-Hartman
2012-09-12 23:36 ` [ 24/85] target: fix NULL pointer dereference bug alloc_page() fails to get memory Greg Kroah-Hartman
2012-09-12 23:36 ` [ 25/85] NFSv3: Ensure that do_proc_get_root() reports errors correctly Greg Kroah-Hartman
2012-09-12 23:36 ` [ 26/85] pnfs: defer release of pages in layoutget Greg Kroah-Hartman
2012-09-12 23:36 ` [ 27/85] NFSv4.1: Remove a bogus BUG_ON() in nfs4_layoutreturn_done Greg Kroah-Hartman
2012-09-12 23:36 ` [ 28/85] NFS: Clear key construction data if the idmap upcall fails Greg Kroah-Hartman
2012-09-12 23:36 ` [ 29/85] NFS: return -ENOKEY when the upcall fails to map the name Greg Kroah-Hartman
2012-09-12 23:36 ` [ 30/85] UBIFS: fix complaints about too small debug buffer size Greg Kroah-Hartman
2012-09-12 23:36 ` [ 31/85] Bluetooth: Fix using NULL inquiry entry Greg Kroah-Hartman
2012-09-12 23:36 ` [ 32/85] Bluetooth: Fix using a NULL inquiry cache entry Greg Kroah-Hartman
2012-09-12 23:36 ` [ 33/85] Bluetooth: Set name_state to unknown when entry name is empty Greg Kroah-Hartman
2012-09-12 23:36 ` [ 34/85] Bluetooth: Fix legacy pairing with some devices Greg Kroah-Hartman
2012-09-12 23:36 ` [ 35/85] NFS: Alias the nfs module to nfs4 Greg Kroah-Hartman
2012-09-12 23:36 ` [ 36/85] audit: dont free_chunk() after fsnotify_add_mark() Greg Kroah-Hartman
2012-09-12 23:36 ` [ 37/85] audit: fix refcounting in audit-tree Greg Kroah-Hartman
2012-09-12 23:36 ` [ 38/85] drm: stop vmgfx driver explosion Greg Kroah-Hartman
2012-09-12 23:36 ` [ 39/85] Revert "drm/radeon: fix bo creation retry path" Greg Kroah-Hartman
2012-09-12 23:36 ` [ 40/85] svcrpc: fix BUG() in svc_tcp_clear_pages Greg Kroah-Hartman
2012-09-12 23:36 ` [ 41/85] svcrpc: fix svc_xprt_enqueue/svc_recv busy-looping Greg Kroah-Hartman
2012-09-12 23:36 ` [ 42/85] svcrpc: sends on closed socket should stop immediately Greg Kroah-Hartman
2012-09-12 23:36 ` [ 43/85] cciss: fix incorrect scsi status reporting Greg Kroah-Hartman
2012-09-12 23:36 ` [ 44/85] ACPI: export symbol acpi_get_table_with_size Greg Kroah-Hartman
2012-09-15 2:19 ` Ben Hutchings
2012-09-12 23:36 ` [ 45/85] ath9k: fix decrypt_error initialization in ath_rx_tasklet() Greg Kroah-Hartman
2012-09-12 23:36 ` [ 46/85] PCI: EHCI: Fix crash during hibernation on ASUS computers Greg Kroah-Hartman
2012-09-12 23:36 ` [ 47/85] block: replace __getblk_slow misfix by grow_dev_page fix Greg Kroah-Hartman
2012-09-12 23:36 ` [ 48/85] sched,cgroup: Fix up task_groups list Greg Kroah-Hartman
2012-09-12 23:36 ` [ 49/85] sched: fix divide by zero at {thread_group,task}_times Greg Kroah-Hartman
2012-09-12 23:36 ` [ 50/85] [media] uvcvideo: Reset the bytesused field when recycling an erroneous buffer Greg Kroah-Hartman
2012-09-12 23:36 ` [ 51/85] rapidio/tsi721: fix inbound doorbell interrupt handling Greg Kroah-Hartman
2012-09-12 23:36 ` [ 52/85] rapidio/tsi721: fix unused variable compiler warning Greg Kroah-Hartman
2012-09-12 23:36 ` [ 53/85] regulator: twl-regulator: fix up VINTANA1/VINTANA2 Greg Kroah-Hartman
2012-09-12 23:36 ` [ 54/85] x32: Use compat shims for {g,s}etsockopt Greg Kroah-Hartman
2012-09-12 23:36 ` [ 55/85] USB: spca506: remove __devinit* from the struct usb_device_id table Greg Kroah-Hartman
2012-09-12 23:36 ` [ 56/85] USB: jl2005bcd: " Greg Kroah-Hartman
2012-09-12 23:36 ` [ 57/85] USB: p54usb: " Greg Kroah-Hartman
2012-09-12 23:36 ` [ 58/85] USB: rtl8187: " Greg Kroah-Hartman
2012-09-12 23:36 ` [ 59/85] USB: smsusb: " Greg Kroah-Hartman
2012-09-12 23:36 ` [ 60/85] USB: CDC ACM: Fix NULL pointer dereference Greg Kroah-Hartman
2012-09-12 23:36 ` [ 61/85] powerpc: Update DSCR on all CPUs when writing sysfs dscr_default Greg Kroah-Hartman
2012-09-12 23:36 ` [ 62/85] powerpc: Keep thread.dscr and thread.dscr_inherit in sync Greg Kroah-Hartman
2012-09-12 23:36 ` [ 63/85] powerpc: Fix DSCR inheritance in copy_thread() Greg Kroah-Hartman
2012-09-12 23:36 ` [ 64/85] powerpc: Restore correct DSCR in context switch Greg Kroah-Hartman
2012-09-12 23:36 ` [ 65/85] powerpc: Make sure IPI handlers see data written by IPI senders Greg Kroah-Hartman
2012-09-12 23:36 ` [ 66/85] Remove user-triggerable BUG from mpol_to_str Greg Kroah-Hartman
2012-09-12 23:36 ` [ 67/85] Fix order of arguments to compat_put_time[spec|val] Greg Kroah-Hartman
2012-09-12 23:36 ` [ 68/85] SCSI: megaraid_sas: Move poll_aen_lock initializer Greg Kroah-Hartman
2012-09-12 23:36 ` [ 69/85] SCSI: scsi_lib: fix scsi_io_completions SG_IO error propagation Greg Kroah-Hartman
2012-09-12 23:36 ` [ 70/85] SCSI: mpt2sas: Fix for Driver oops, when loading driver with max_queue_depth command line option to a very small value Greg Kroah-Hartman
2012-09-12 23:36 ` [ 71/85] SCSI: Fix Device not ready issue on mpt2sas Greg Kroah-Hartman
2012-09-12 23:36 ` [ 72/85] udf: Fix data corruption for files in ICB Greg Kroah-Hartman
2012-09-12 23:36 ` [ 73/85] ext3: Fix fdatasync() for files with only i_size changes Greg Kroah-Hartman
2012-09-12 23:36 ` [ 74/85] fuse: fix retrieve length Greg Kroah-Hartman
2012-09-12 23:36 ` [ 75/85] i2c-designware: Fix build error if CONFIG_I2C_DESIGNWARE_PLATFORM=y && CONFIG_I2C_DESIGNWARE_PCI=y Greg Kroah-Hartman
2012-09-12 23:36 ` [ 76/85] i2c-i801: Add Device IDs for Intel Lynx Point-LP PCH Greg Kroah-Hartman
2012-09-12 23:37 ` [ 77/85] HID: add NOGET quirk for Eaton Ellipse MAX UPS Greg Kroah-Hartman
2012-09-12 23:37 ` [ 78/85] Input: i8042 - add Gigabyte T1005 series netbooks to noloop table Greg Kroah-Hartman
2012-09-12 23:37 ` [ 79/85] drm/vmwgfx: add MODULE_DEVICE_TABLE so vmwgfx loads at boot Greg Kroah-Hartman
2012-09-12 23:37 ` [ 80/85] PARISC: Redefine ATOMIC_INIT and ATOMIC64_INIT to drop the casts Greg Kroah-Hartman
2012-09-12 23:37 ` [ 81/85] xen: Use correct masking in xen_swiotlb_alloc_coherent Greg Kroah-Hartman
2012-09-12 23:37 ` Greg Kroah-Hartman [this message]
2012-09-12 23:37 ` [ 83/85] x86, microcode, AMD: Fix broken ucode patch size check Greg Kroah-Hartman
2012-09-12 23:37 ` [ 84/85] dccp: check ccid before dereferencing Greg Kroah-Hartman
2012-09-12 23:37 ` [ 85/85] hwmon: (asus_atk0110) Add quirk for Asus M5A78L Greg Kroah-Hartman
2012-09-12 23:46 ` [ 00/85] 3.4.11-stable review 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=20120912233550.272400422@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=yongjie.ren@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).