From owner-svn-src-head@freebsd.org Tue Jul 3 16:18:00 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 26707102E06E; Tue, 3 Jul 2018 16:18:00 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CAF3F89B5B; Tue, 3 Jul 2018 16:17:59 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A5AEC1E661; Tue, 3 Jul 2018 16:17:59 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w63GHxpM053133; Tue, 3 Jul 2018 16:17:59 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w63GHxBd053132; Tue, 3 Jul 2018 16:17:59 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201807031617.w63GHxBd053132@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 3 Jul 2018 16:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335896 - head/sys/dev/ata X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/dev/ata X-SVN-Commit-Revision: 335896 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 16:18:00 -0000 Author: sbruno Date: Tue Jul 3 16:17:59 2018 New Revision: 335896 URL: https://svnweb.freebsd.org/changeset/base/335896 Log: Reset indentiation of ata_suspend() such that its clear we fall through this function and that we aren't supposed to be controlled by the first if() conditional. Found with gcc. No functional change is intended with this commit. Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Tue Jul 3 16:07:04 2018 (r335895) +++ head/sys/dev/ata/ata-all.c Tue Jul 3 16:17:59 2018 (r335896) @@ -316,13 +316,13 @@ ata_suspend(device_t dev) if (!dev || !(ch = device_get_softc(dev))) return ENXIO; - if (ch->flags & ATA_PERIODIC_POLL) - callout_drain(&ch->poll_callout); - mtx_lock(&ch->state_mtx); - xpt_freeze_simq(ch->sim, 1); - while (ch->state != ATA_IDLE) - msleep(ch, &ch->state_mtx, PRIBIO, "atasusp", hz/100); - mtx_unlock(&ch->state_mtx); + if (ch->flags & ATA_PERIODIC_POLL) + callout_drain(&ch->poll_callout); + mtx_lock(&ch->state_mtx); + xpt_freeze_simq(ch->sim, 1); + while (ch->state != ATA_IDLE) + msleep(ch, &ch->state_mtx, PRIBIO, "atasusp", hz/100); + mtx_unlock(&ch->state_mtx); return(0); }