[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAErSpo6Wr4NrbwkJg6L0khU=fcH7UOOVCUoFo1QNLTxu2Z9Dsw@mail.gmail.com>
Date: Wed, 25 Jun 2014 11:51:34 -0600
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Rajat Jain <rajatjain@...iper.net>
Cc: Guenter Roeck <linux@...ck-us.net>,
Myron Stowe <myron.stowe@...hat.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Rajat Jain <rajatjain.linux@...il.com>
Subject: Re: [PATCH] PCI: pciehp: Include the Data Link Layer State Changed
bit when clearing the Slot Status register's event bits
On Tue, Jun 24, 2014 at 11:26 PM, Rajat Jain <rajatjain@...iper.net> wrote:
>> > Essentially my hiccup was that I was not sure whether the driver should or
>> should not take care of the link change events that have happened BEFORE
>> the driver gets loaded. This has more impact if the pciehp is built as a kernel
>> module.
>> >
>> > As an example:
>> >
>> > It is common for the platform init code built into the kernel, to take the PCI
>> devices on the board out of reset. And that can happen after the PCI
>> enumeration but before the pciehp driver gets loaded. Thus in this condition,
>> with this patch, the pciehp will ignore the linkup event, thus device will not
>> be visible. The only way (other than a rescan) to do hot-add the device would
>> be to apply-and-remove-reset-signal to the device again. At which point
>> pciehp may give a warning about about an attempt to remove a non-existent
>> card, and then will proceed fine with hot-add.
>>
>> When you saw these problems, was pciehp a module?
>
> No, we did not actually hit *this* problem (DLLSC getting set before pciehp init). We had observed another HW specific problem where both link event and presence detect were toggling, hence 2 independent hot-plug interrupts events were coming, thus resulting in spurious messages.
OK, this sounds like a slightly different problem that we can work on
later if it turns out to be necessary.
> > For example, if a card were inserted
>> after enumeration but before pciehp is initialized, we'd miss the PDC
>> indication, so I think we would fail to notice the new device.
>> That seems basically the same as missing the linkup event in your example.
>> In both cases, I think we *should* notice the new device, so the fact that we
>> don't is a problem.
> ...
>> - We currently have a problem with missing pre-pciehp events, but there is
>> a way to fix this
>
> Somewhat agree (I do not understand what that way is currently. But I think it can wait as we don't hit that problem today and also the window where it can occur is very small).
My thought was that we could fix this by integrating pciehp into PCI
enumeration, so we're prepared to handle hotplug events on the bridge
before we enumerate any device below the bridge. But I haven't
actually tried this so I don't know whether it's practical.
Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists