Thread (7 messages) 7 messages, 2 authors, 2012-10-25

Re: [RFC 3/3] libata: don't perform HW activity in devres

From: Brian Norris <computersforpeace@gmail.com>
Date: 2012-10-25 17:41:59
Also in: lkml

On Thu, Oct 25, 2012 at 10:25 AM, Tejun Heo [off-list ref] wrote:
On Thu, Oct 25, 2012 at 09:56:01AM -0700, Brian Norris wrote:
quoted
devres functions are intended for simplified cleanup of memory and other
software resources on device exit, not for hardware shutdown sequences.
In addition, inducing hardware activity at device removal hamstrings
some drivers (particularly ahci_platform) so that they cannot totally
power off their hardware before removal, as devres cleanup occurs after
the driver's exit() sequence.

More concretely, I experience the following bus error when using rmmod
to remove (and power off) the SATA block on my SoC:
Shouldn't poweroff happen from ->port/host_stop()?
Hmm, I guess that makes more sense. I was using the ahci_platform
ahci_platform_data->exit() function. Would it be safe to call the
platform init()/exit() functions as part of a
ata_port_operations.host_{start,stop}() hook? These functions aren't
currently implemented at all in ahci_platform, but I don't see why
they couldn't be.

Brian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help