Re: Add option to passively listen for PCIE hotplug events

From: Alan Jenkins
Date: Tue Nov 04 2008 - 10:44:44 EST


Matthew Garrett wrote:
> On Tue, Nov 04, 2008 at 03:01:07PM +0000, Alan Jenkins wrote:
>
>
>> Hey... you're making this conditional on whether a power led is reported
>> present, right? Are you sure the EeePC doesn't report itself as having
>> a power led?
>>
>
> Doesn't seem to on the one I was testing, but it's possible. Any chance
> you could instrument it? There's only a few calls to msleep in
> pcihp_ctrl.c.
>

And pciehp_hpc.c!

I instrumented all the delays I could find. hpc_check_lnk_status() was
the only one that came up. 1000ms delay per call, and I get 6 such delays.

The code is saying my hardware lacks "Data Layer Link Active Reporting".



static int hpc_check_lnk_status(struct controller *ctrl)
{
u16 lnk_status;
int retval = 0;

/*
* Data Link Layer Link Active Reporting must be capable for
* hot-plug capable downstream port. But old controller might
* not implement it. In this case, we wait for 1000 ms.
*/
if (ctrl->link_active_reporting){
/* Wait for Data Link Layer Link Active bit to be set */
pcie_wait_link_active(ctrl);
/*
* We must wait for 100 ms after the Data Link Layer
* Link Active bit reads 1b before initiating a
* configuration access to the hot added device.
*/
msleep(100);
} else {
msleep(1000);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/