From owner-freebsd-hackers@freebsd.org Fri Jun 16 07:47:20 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D005BF91D9 for ; Fri, 16 Jun 2017 07:47:20 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from dedi548.your-server.de (dedi548.your-server.de [85.10.215.148]) (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 3AB5C748C5 for ; Fri, 16 Jun 2017 07:47:20 +0000 (UTC) (envelope-from sebastian.huber@embedded-brains.de) Received: from [88.198.220.132] (helo=sslproxy03.your-server.de) by dedi548.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1dLlZL-0004y6-Qv for freebsd-hackers@freebsd.org; Fri, 16 Jun 2017 09:21:23 +0200 Received: from [82.135.62.35] (helo=mail.embedded-brains.de) by sslproxy03.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dLlZL-0005Rn-8v for freebsd-hackers@freebsd.org; Fri, 16 Jun 2017 09:21:23 +0200 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 8707C2A160A for ; Fri, 16 Jun 2017 09:21:34 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id iHb6kkgWYmRY for ; Fri, 16 Jun 2017 09:21:34 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 48B4A2A1677 for ; Fri, 16 Jun 2017 09:21:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at zimbra.eb.localhost Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id lx_fij7ZL71C for ; Fri, 16 Jun 2017 09:21:34 +0200 (CEST) Received: from huber-linux.eb.localhost (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTP id 2FD8D2A004F for ; Fri, 16 Jun 2017 09:21:34 +0200 (CEST) From: Sebastian Huber To: freebsd-hackers@freebsd.org Subject: [PATCH 1/2] cfi: Add intr_restore() to cfi_write_block() Date: Fri, 16 Jun 2017 09:21:21 +0200 Message-Id: <20170616072122.17504-1-sebastian.huber@embedded-brains.de> X-Mailer: git-send-email 2.12.3 X-Authenticated-Sender: smtp-embedded@poldinet.de X-Virus-Scanned: Clear (ClamAV 0.99.2/23478/Fri Jun 16 06:12:21 2017) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jun 2017 07:47:20 -0000 Restore the interrupt status in case of a timeout. --- sys/dev/cfi/cfi_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/cfi/cfi_core.c b/sys/dev/cfi/cfi_core.c index 1bf687e3cee..e90db06dcef 100644 --- a/sys/dev/cfi/cfi_core.c +++ b/sys/dev/cfi/cfi_core.c @@ -647,6 +647,7 @@ cfi_write_block(struct cfi_softc *sc) cfi_write(sc, sc->sc_wrofs + i, CFI_BCS_BUF_PROG_SETUP); if (sbinuptime() > start + sc->sc_max_timeouts[CFI_TIMEOUT_BUFWRITE]) { + intr_restore(intr); error = ETIMEDOUT; goto out; } -- 2.12.3