Re: [PATCH] pata_legacy: Allow disabling of legacy PATA device probes on non-PCI systems

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

 



Hello,

On Mon, Dec 19, 2016 at 09:12:49PM -0500, tedheadster wrote:
> Tejun,
>   apologies this took a while. Here is the patch I _think_ you were
> asking me to test:
> 
> diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
> index bce2a8c..bfa63d1 100644
> --- a/drivers/ata/pata_legacy.c
> +++ b/drivers/ata/pata_legacy.c
> @@ -1008,12 +1008,15 @@ static __init int legacy_init_one(struct
> legacy_probe *probe)
>         if (!ata_dev_absent(dev)) {
>             legacy_host[probe->slot] = host;
>             ld->platform_dev = pdev;
> +                       devres_remove_group(&pdev->dev, legacy_init_one);
>             return 0;
>         }
>     }
>         ata_host_detach(host);
>  fail:
>           platform_device_unregister(pdev);
> +       devres_release_group(&pdev->dev, legacy_init_one);
> +       printk("XXX pata_legacy: unregistering platform dev %p\n", pdev);
>     return ret;

The thing I'm puzzled about and can't reproduce here is that the
platform_device_unregister() call on the fail path should release the
irq resources without the explicit devres group operations.  I can
write up tracking each step but it'd probably be easier on your side
to track down why it's not getting called.

So, pata_legacy doesn't need anything changed, but in the probe fail
path, platform_device_unregister() should trigger
driver/base/core.c::device_release() which calls devres_release_all()
and release the irqs.

Thanks.

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



[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux