|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen-pciback: provide a "reset" sysfs file to try harder at an SBR
On 09/07/14 17:10, Konrad Rzeszutek Wilk wrote:
> On Wed, Jul 09, 2014 at 05:03:17PM +0100, David Vrabel wrote:
>> On 09/07/14 15:56, Konrad Rzeszutek Wilk wrote:
>>>
>>> I think for your patch to work it has to de-register what the
>>> generic PCI code does in pci_create_capabilities_sysfs:
>>>
>>> 1339 if (!pci_probe_reset_function(dev)) {
>>> 1340 retval = device_create_file(&dev->dev, &reset_attr);
>>> 1341 if (retval)
>>> 1342 goto error;
>>> 1343 dev->reset_fn = 1;
>>> 1344 }
>>
>> It just needs to have the inverse test.
>>
>> --- a/drivers/xen/xen-pciback/pci_stub.c
>> +++ b/drivers/xen/xen-pciback/pci_stub.c
>> @@ -151,14 +151,11 @@ static int pcistub_try_create_reset_file(struct
>> pci_dev *pci)
>> {
>> struct xen_pcibk_dev_data *dev_data = pci_get_drvdata(pci);
>> struct device *dev = &pci->dev;
>> - struct kernfs_node *reset_dirent;
>> int ret;
>>
>> - reset_dirent = sysfs_get_dirent(dev->kobj.sd, "reset");
>> - if (reset_dirent) {
>> - sysfs_put(reset_dirent);
>> + /* Already have a per-function reset? */
>> + if (pci_dev_reset(dev, 1) == 0)
>
> OK, however the'reset' in SysFS does not do bus/slot reset.
Um. This is probing if a per function reset is available, if it isn't
it creates the "reset" sysfs file. Which will then try an SBR.
(This snippet is broken though since pci_dev_reset() is not extern, see
latest series for the correct fix.)
David
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |