Re: [PATCH] pciehp: always implement resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, August 01, 2012, Oliver Neukum wrote:
> The driver by default ignores resume. On some laptops
> that means that interrupts are not delivered after S3.
> So card removals and insertions will not be handled. Requiring
> a forced load isn't right.
> 
> Signed-off-by: Oliver Neukum <oneukum@xxxxxxx>

Reviewed-by: Rafael J. Wysocki <rjw@xxxxxxx>

> ---
>  drivers/pci/hotplug/pciehp_core.c |   28 ++++++++++++++--------------
>  1 files changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
> index 365c6b9..916bf4f 100644
> --- a/drivers/pci/hotplug/pciehp_core.c
> +++ b/drivers/pci/hotplug/pciehp_core.c
> @@ -300,24 +300,24 @@ static int pciehp_suspend (struct pcie_device *dev)
>  
>  static int pciehp_resume (struct pcie_device *dev)
>  {
> +	struct controller *ctrl;
> +	struct slot *slot;
> +	u8 status;
> +
>  	dev_info(&dev->device, "%s ENTRY\n", __func__);
> -	if (pciehp_force) {
> -		struct controller *ctrl = get_service_data(dev);
> -		struct slot *slot;
> -		u8 status;
> +	ctrl = get_service_data(dev);
>  
> -		/* reinitialize the chipset's event detection logic */
> -		pcie_enable_notification(ctrl);
> +	/* reinitialize the chipset's event detection logic */
> +	pcie_enable_notification(ctrl);
>  
> -		slot = ctrl->slot;
> +	slot = ctrl->slot;
>  
> -		/* Check if slot is occupied */
> -		pciehp_get_adapter_status(slot, &status);
> -		if (status)
> -			pciehp_enable_slot(slot);
> -		else
> -			pciehp_disable_slot(slot);
> -	}
> +	/* Check if slot is occupied */
> +	pciehp_get_adapter_status(slot, &status);
> +	if (status)
> +		pciehp_enable_slot(slot);
> +	else
> +		pciehp_disable_slot(slot);
>  	return 0;
>  }
>  #endif /* PM */
> 

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


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux