Re: [PATCH -v2 3/3] PCI,pciehp: use PCIe DSN to identify device change during suspend

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

 



On 2013/7/11 22:33, Paul Bolle wrote:
> On Thu, 2013-07-11 at 17:43 +0800, Yijing Wang wrote:
> [...]
>> diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
>> index 1542735..f2eb214 100644
>> --- a/drivers/pci/hotplug/pciehp_core.c
>> +++ b/drivers/pci/hotplug/pciehp_core.c
> [...]
>> @@ -315,6 +342,24 @@ static int pciehp_resume (struct pcie_device *dev)
>>  	if (status) {
>>  		if (list_empty(&pbus->devices))
>>  			pciehp_enable_slot(slot);
>> +
>> +		if (device_serial_number_changed(pbus)) {
>> +			/*
>> +			 * first power off slot, avoid the old driver
>> +			 * .remove() method touch the new hardware
>> +			 */
>> +			if (POWER_CTRL(ctrl)) {
>> +				retval = pciehp_power_off_slot(slot);
>> +				if (retval) {
>> +					ctrl_err(ctrl,
>> +						"Issue of Slot Disable command failed\n");
>> +					return 0;
>> +				}
>> +				msleep(1000);
>> +				pciehp_unconfigure_device(slot);
>> +				pciehp_enable_slot(slot);
>> +			}
>> +		}
>>  	} else if (!list_empty(&pbus->devices))
>>  		pciehp_disable_slot(slot);
>>  	
> 
> It was surprisingly hard to see why the patch wouldn't apply to v3.10.
> It turns out the very last line of context is a line consisting of just
> a single tab. And in v3.10 it is an empty line. 
> 
> Is that lone tab perhaps an editing mistake on your side?

I will check this, thanks!

> 
> 
> Paul Bolle
> 
> 
> .
> 


-- 
Thanks!
Yijing

--
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