Date: Fri, 24 May 2013 04:01:32 +0000 (UTC) From: Justin Hibbits <jhibbits@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r250959 - projects/pmac_pmu/sys/powerpc/powermac Message-ID: <201305240401.r4O41XXP028656@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhibbits Date: Fri May 24 04:01:32 2013 New Revision: 250959 URL: http://svnweb.freebsd.org/changeset/base/250959 Log: Fix suspend/resume in ATA macio. Modified: projects/pmac_pmu/sys/powerpc/powermac/ata_macio.c Modified: projects/pmac_pmu/sys/powerpc/powermac/ata_macio.c ============================================================================== --- projects/pmac_pmu/sys/powerpc/powermac/ata_macio.c Fri May 24 04:00:47 2013 (r250958) +++ projects/pmac_pmu/sys/powerpc/powermac/ata_macio.c Fri May 24 04:01:32 2013 (r250959) @@ -340,13 +340,14 @@ ata_macio_begin_transaction(struct ata_r static int ata_macio_suspend(device_t dev) { - struct ata_channel *ch = device_get_softc(dev); + struct ata_dbdma_channel *ch = device_get_softc(dev); int error; - if (!ch->attached) + if (!ch->sc_ch.attached) return (0); error = ata_suspend(dev); + dbdma_save_state(ch->dbdma); return (error); } @@ -354,12 +355,13 @@ ata_macio_suspend(device_t dev) static int ata_macio_resume(device_t dev) { - struct ata_channel *ch = device_get_softc(dev); + struct ata_dbdma_channel *ch = device_get_softc(dev); int error; - if (!ch->attached) + if (!ch->sc_ch.attached) return (0); + dbdma_restore_state(ch->dbdma); error = ata_resume(dev); return (error);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305240401.r4O41XXP028656>