Re: [PATCH] libata: add host_set->next for legacy two host_sets case, take #3

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

 



Tejun Heo wrote:
> For a legacy ATA controller, libata registers two separate host sets.
> There was no connection between the two hosts making it impossible to
> traverse all ports related to the controller.  This patch adds
> host_set->next which points to the second host_set and makes
> ata_pci_remove_one() remove all associated host_sets.
> 
> * On device removal, all ports hanging off the device are properly
>   detached.  Prior to this patch, ports on the first host_set weren't
>   detached casuing oops on driver unloading.
> 
> * On device removal, both host_sets are properly freed
> 
> This will also be used by new power management code to suspend and
> resume all ports of a controller.  


> host_set/port representation will
> be improved to handle legacy controllers better and this host_set
> linking will go away with it.
> 

Hi Tejun,

Hmm, the current patch looks more like a temporary solution. The legacy mode
ATA_HOST_SIMPLEX host_set->flags could be assigned to both legacy ports.
In the long term, have one host_set for both legacy ports
instead of two host_sets for both legacy ports can fix the problem.

A patch was submitted by Unicorn, but it looks not good/elegant enough. :(
It will be nice if you have plan for furthur legacy two host_sets case fixes...

Thanks,

Albert


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