From owner-svn-src-projects@FreeBSD.ORG Sat Jun 7 05:14:08 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 449177ED; Sat, 7 Jun 2014 05:14:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 325CC2B61; Sat, 7 Jun 2014 05:14:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s575E8sp094952; Sat, 7 Jun 2014 05:14:08 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s575E834094951; Sat, 7 Jun 2014 05:14:08 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201406070514.s575E834094951@svn.freebsd.org> From: Justin Hibbits Date: Sat, 7 Jun 2014 05:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r267209 - projects/pmac_pmu/sys/powerpc/powermac X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Jun 2014 05:14:08 -0000 Author: jhibbits Date: Sat Jun 7 05:14:07 2014 New Revision: 267209 URL: http://svnweb.freebsd.org/changeset/base/267209 Log: Add an ATA channel reset handler for the macio controller. This is used during suspend/resume. 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 Sat Jun 7 05:12:55 2014 (r267208) +++ projects/pmac_pmu/sys/powerpc/powermac/ata_macio.c Sat Jun 7 05:14:07 2014 (r267209) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include "ata_dbdma.h" +#include "maciovar.h" /* * Offset to control registers from base @@ -116,6 +117,7 @@ static int ata_macio_attach(device_t d static int ata_macio_begin_transaction(struct ata_request *request); static int ata_macio_suspend(device_t dev); static int ata_macio_resume(device_t dev); +static void ata_macio_chreset(device_t dev); static device_method_t ata_macio_methods[] = { /* Device interface */ @@ -126,6 +128,7 @@ static device_method_t ata_macio_methods /* ATA interface */ DEVMETHOD(ata_setmode, ata_macio_setmode), + DEVMETHOD(ata_reset, ata_macio_chreset), DEVMETHOD_END }; @@ -356,6 +359,17 @@ ata_macio_suspend(device_t dev) return (error); } +static void +ata_macio_chreset(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + + if (ch->dma.reset) + ch->dma.reset(dev); + macio_reset_ata(dev); + ata_generic_reset(dev); +} + static int ata_macio_resume(device_t dev) {