From owner-freebsd-current@freebsd.org Thu May 17 14:59:29 2018 Return-Path: Delivered-To: freebsd-current@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 19B96EAAFC1 for ; Thu, 17 May 2018 14:59:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x22f.google.com (mail-it0-x22f.google.com [IPv6:2607:f8b0:4001:c0b::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B3738396D for ; Thu, 17 May 2018 14:59:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x22f.google.com with SMTP id 70-v6so9247456ity.2 for ; Thu, 17 May 2018 07:59:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=SWA8guDu/EEAqWB6dQPgZ5VBMKLP4AxtihbKV7/947M=; b=DVRszpDE3tBqnGcG6dzmsiwhqsfMlWiXm3lTnHHtKSgGQMMB8Z6CyfyKDNBVdB8/AX m+qrsK5kugojgE65U15E50x2IcINWYwv5S6vY8DX2/BQZEpC3RS3lDB2soQMfsUDDbN4 xaLoHfP0tBfwhaXOvUHx5E9CNbCpC2a/IogtAioah8XbPIWKQTrwHF/zp2Q8uzr8c+F+ 6LTKDHKHL7T8jW8PRyEz+pTfbXhc39nH5dHyml1MSwOqv2NvVT+m+haXO1786l2uUF+K O9QAn75oaz2uPq32Bk5isQ7yubYxbvFgZLhLtuVI5sXYjBShdC5b0u5JjOsfIzTbdANV EMtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=SWA8guDu/EEAqWB6dQPgZ5VBMKLP4AxtihbKV7/947M=; b=sIC78dWMn5ZEGdoEdgmagz4NRgmpRLF435YF7mBY85gbb5DkcVo3hAGZTKDmfxmNlT 8DB6tTVE8SqjwaTZZ2MG1mvHy1nx8pijW4UtD7B2xG6lHOqvL/pUZ/Jq3VZ4eGmlLAtc kaJeUaWINaKirxTP6hrG6/mFo/xkURbePikwodYm4UGSPJSHDxqfm+JX6tfQsuzHiLFF j3mYBl0t5MsHOwh4OltG/lH6HnhJg4dPuWbovwYAKinng2UFQuYFujG9XJEZth/WkAol GbQtEiB6QUVOqSGU0IsIqah0AqYKBkrzQ0BHt/Eru9U5Yharrr3oqh9P8FzI6FMwt9i8 NyMw== X-Gm-Message-State: ALKqPwcSrGTlDIrnQaucovgZP2e5PEBGZ2uza0UnsK/IN6//iBD9scA7 TewU7QAs8M5a8/J8tO8hKXgvVoLmsIjTQULRnNaJIg== X-Google-Smtp-Source: AB8JxZpE5rUA/S59ZANxtyX8/ZIVD6PvrLbOStbyKj+tEn+Z6UqGMth5Qz5XNCCPEBG8v+xLJ41zdk0a1Bd8/qc49fg= X-Received: by 2002:a24:4c55:: with SMTP id a82-v6mr2926477itb.1.1526569168004; Thu, 17 May 2018 07:59:28 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:a649:0:0:0:0:0 with HTTP; Thu, 17 May 2018 07:59:27 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <0e1d5601-f792-0708-3bcf-7153bea8f679@FreeBSD.org> <1526563552.32688.47.camel@freebsd.org> From: Warner Losh Date: Thu, 17 May 2018 08:59:27 -0600 X-Google-Sender-Auth: MbM5vind_VP0OzOtzw_oxqu9Vhk Message-ID: Subject: Re: serial console vs suspend To: Andriy Gapon Cc: Ian Lepore , freebsd-hackers , FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 May 2018 14:59:29 -0000 On Thu, May 17, 2018 at 7:28 AM, Andriy Gapon wrote: > On 17/05/2018 16:25, Ian Lepore wrote: > > Why should it go through the console layer? If the uart hardware needs > > some re-init on resume, won't that be true whether the uart is serving > > as a console, a dial-in terminal, or the interface to wifi or bluetooth > > chip? > > I think that for those things a normal device resume should do. > console gets used very early, so it may require a special resume. > We should re-init both places (maybe with a flag to prevent double if that's harmful). The console is needed very early after the resume, often earlier than the accidental location in the device tree the console device_t node lives. That way we don't lose output. The console layer gives us a convenient hook early in resume to cope. It's yet another reason, though, it should be restricted to true console devices, but that's another conversation. Warner