Re: [PATCH] ata: disable port while unloading ATA controller driver

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

 



Hello,

On Wed, Nov 30, 2016 at 12:15:50AM +0200, Vladimir Zapolskiy wrote:
> in case if I haven't tired you out yet, I verified you solution and it
> works perfectly, there is no problem in ATA subsystem which I can point
> out:
> 
> diff --git a/drivers/base/dd.c b/drivers/base/dd.c
> index d76cd97..a4feecf 100644
> --- a/drivers/base/dd.c
> +++ b/drivers/base/dd.c
> @@ -384,6 +384,8 @@ static int really_probe(struct device *dev, struct device_driver *drv)
>  	if (test_remove) {
>  		test_remove = false;
>  
> +		async_synchronize_full();
> +
>  		if (dev->bus->remove)
>  			dev->bus->remove(dev);
>  		else if (drv->remove)

Yeah, this should do it.

> In my understanding the code under "if (test_remove)" branch should be
> close to the code of __device_release_driver() function, but here it
> is slightly different on purpose --- driver_allows_async_probing(drv)
> returns false in case of the ATA controller driver(s), here async
> probing is not a functional part of a driver, but it is embedded into
> the ATA subsystem by means of generic async_port_probe(). Not sure if
> __device_release_driver() or driver_allows_async_probing() should be
> corrected respecting this case, and hence I'm not going to touch it.

Currently, we depend on the fact that there is guaranteed to be a
synchronization point before unloading, so adding that to test code
seems like the right thing to do to me.

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