|
@@ -6314,6 +6314,8 @@ int ata_host_activate(struct ata_host *host, int irq,
|
|
static void ata_port_detach(struct ata_port *ap)
|
|
static void ata_port_detach(struct ata_port *ap)
|
|
{
|
|
{
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
|
|
+ struct ata_link *link;
|
|
|
|
+ struct ata_device *dev;
|
|
|
|
|
|
if (!ap->ops->error_handler)
|
|
if (!ap->ops->error_handler)
|
|
goto skip_eh;
|
|
goto skip_eh;
|
|
@@ -6333,6 +6335,13 @@ static void ata_port_detach(struct ata_port *ap)
|
|
cancel_delayed_work_sync(&ap->hotplug_task);
|
|
cancel_delayed_work_sync(&ap->hotplug_task);
|
|
|
|
|
|
skip_eh:
|
|
skip_eh:
|
|
|
|
+ /* clean up zpodd on port removal */
|
|
|
|
+ ata_for_each_link(link, ap, HOST_FIRST) {
|
|
|
|
+ ata_for_each_dev(dev, link, ALL) {
|
|
|
|
+ if (zpodd_dev_enabled(dev))
|
|
|
|
+ zpodd_exit(dev);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (ap->pmp_link) {
|
|
if (ap->pmp_link) {
|
|
int i;
|
|
int i;
|
|
for (i = 0; i < SATA_PMP_MAX_PORTS; i++)
|
|
for (i = 0; i < SATA_PMP_MAX_PORTS; i++)
|