ahci_platform: perform platform exit in host_stop() hook
authorBrian Norris <computersforpeace@gmail.com>
Fri, 2 Nov 2012 07:46:17 +0000 (00:46 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 3 Dec 2012 10:15:15 +0000 (05:15 -0500)
commit1896b15eddb4ff7266bccf3efa981885ecf80ab1
tree81d96f5b9db3cabf778346d39ece8d7a571ab2dc
parent9a99e4768a6dcfa50d1cda1b2f55c9ea5c4213cc
ahci_platform: perform platform exit in host_stop() hook

AHCI platform devices may provide an exit() routine, via
ahci_platform_data, that powers off the SATA core. Such a routine should
be executed from the ata_port_operations host_stop() hook. That way, the
ATA subsystem can perform any last-minute hardware cleanup (via devres,
for example), then trigger the power-off at the appropriate time.

This patch fixes bus errors triggered during module removal or device
unbinding, seen on an SoC SATA core.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/ahci_platform.c