From: Johannes Thumshirn <johannes.thumshirn@men.de>
To: <linux-pci@vger.kernel.org>
Cc: <johannes.thumshirn@men.de>
Subject: PCI reset problem
Date: Wed, 28 Aug 2013 15:33:37 +0200 [thread overview]
Message-ID: <20130828133337.GA8544@jtlinux> (raw)
Hi List,
I have a rather odd problem with a PCIe swicht/bridge which does not get
enumerated correctly. If I issue _two_ manual rescans of the PCI bus via sysfs,
everything get setup correctly. To work around the problem I decided to make a
platform specific PCI quirk (for the embedded system I'm on, to not break
anything else) and issue the pci_rescan_bus() myself as a "final" fixup. However
this does not have any effect at all.
Does anyone have an idea what I could do wrong?
Example:
root@generic-powerpc:~# lspci -tv
-[0000:00]---00.0-[01]--
root@generic-powerpc:~# echo 1 > /sys/bus/pci/rescan
[...]
root@generic-powerpc:~# lspci -tv
-[0000:00]---00.0-[01-05]----00.0-[02-05]--+-01.0-[03]--
+-02.0-[04]--
\-03.0-[05]--
root@generic-powerpc:~# echo 1 > /sys/bus/pci/rescan
[...]
root@generic-powerpc:~# lspci -tv
-[0000:00]---00.0-[01-05]----00.0-[02-05]--+-01.0-[03]----00.0 Silicon Image, Inc. SiI 3132 Serial ATA Raid II Controller
+-02.0-[04]--
\-03.0-[05]--+-00.0 Pericom Semiconductor Device 400e
+-00.1 Pericom Semiconductor Device 400e
\-00.2 Pericom Semiconductor Device 400f
"My" rescan quirk:
#if CONFIG_PCI
static DEFINE_MUTEX(rescan_mutex);
static void xm51_fixup_bridge(struct pci_dev *dev)
{
struct pci_bus *b = NULL;
mutex_lock(&rescan_mutex);
while((b = pci_find_next_bus(b)) != NULL)
pci_rescan_bus(b);
mutex_unlock(&rescan_mutex);
}
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_FREESCALE, 0x0401, xm51_fixup_bridge);
#endif
Thanks in advance,
Johannes
next reply other threads:[~2013-08-28 13:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 13:33 Johannes Thumshirn [this message]
2013-08-28 16:50 ` PCI reset problem Bjorn Helgaas
2013-08-29 8:29 ` Johannes Thumshirn
2013-08-29 12:01 ` Bjorn Helgaas
2013-08-29 15:07 ` Johannes Thumshirn
2013-08-29 15:52 ` Bjorn Helgaas
2013-08-30 8:01 ` Johannes Thumshirn
2013-08-30 13:40 ` Bjorn Helgaas
2013-08-30 13:58 ` Johannes Thumshirn
2013-08-30 19:46 ` Yinghai Lu
2013-09-02 8:00 ` Johannes Thumshirn
2013-09-02 22:18 ` Yinghai Lu
2013-09-03 9:55 ` Johannes Thumshirn
2013-09-03 19:38 ` Yinghai Lu
2013-09-04 8:10 ` Johannes Thumshirn
2013-08-29 17:40 ` Yinghai Lu
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=20130828133337.GA8544@jtlinux \
--to=johannes.thumshirn@men.de \
--cc=linux-pci@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).