Message ID | 201001141650.17348.bzolnier@gmail.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Date: Thu, 14 Jan 2010 16:50:17 +0100 > bzolnier: > - release resources in ide_release() to fix ordering of events > - remove stale FIXME note while at it Ok this does look better, Wolfram can you test this? -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
> > bzolnier: > > - release resources in ide_release() to fix ordering of events > > - remove stale FIXME note while at it > > Ok this does look better, Wolfram can you test this? ACK, looks better. I will test it, might not happen before Sunday, though.
> > bzolnier: > > - release resources in ide_release() to fix ordering of events > > - remove stale FIXME note while at it > > Ok this does look better, Wolfram can you test this? Works as expected.
From: Wolfram Sang <w.sang@pengutronix.de> Date: Sat, 16 Jan 2010 19:51:24 +0100 >> > bzolnier: >> > - release resources in ide_release() to fix ordering of events >> > - remove stale FIXME note while at it >> >> Ok this does look better, Wolfram can you test this? > > Works as expected. Great, thanks for testing. -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Index: b/drivers/ide/ide-cs.c =================================================================== --- a/drivers/ide/ide-cs.c +++ b/drivers/ide/ide-cs.c @@ -131,19 +131,11 @@ static int ide_probe(struct pcmcia_devic static void ide_detach(struct pcmcia_device *link) { ide_info_t *info = link->priv; - ide_hwif_t *hwif = info->host->ports[0]; - unsigned long data_addr, ctl_addr; DEBUG(0, "ide_detach(0x%p)\n", link); - data_addr = hwif->io_ports.data_addr; - ctl_addr = hwif->io_ports.ctl_addr; - ide_release(link); - release_region(ctl_addr, 1); - release_region(data_addr, 8); - kfree(info); } /* ide_detach */ @@ -365,12 +357,19 @@ static void ide_release(struct pcmcia_de DEBUG(0, "ide_release(0x%p)\n", link); - if (info->ndev) - /* FIXME: if this fails we need to queue the cleanup somehow - -- need to investigate the required PCMCIA magic */ + if (info->ndev) { + ide_hwif_t *hwif = host->ports[0]; + unsigned long data_addr, ctl_addr; + + data_addr = hwif->io_ports.data_addr; + ctl_addr = hwif->io_ports.ctl_addr; + ide_host_remove(host); + info->ndev = 0; - info->ndev = 0; + release_region(ctl_addr, 1); + release_region(data_addr, 8); + } pcmcia_disable_device(link); } /* ide_release */