From owner-freebsd-hackers@freebsd.org Fri Sep 7 20:17:34 2018 Return-Path: Delivered-To: freebsd-hackers@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 0267C106B17D for ; Fri, 7 Sep 2018 20:17:34 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 74EA576249 for ; Fri, 7 Sep 2018 20:17:33 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pl1-x630.google.com with SMTP id j8-v6so7052949pll.12 for ; Fri, 07 Sep 2018 13:17:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=sTdPpZFM07kjoD9mvy4mIO/OEG8mbpHzc1qGh9rC6Eg=; b=pb3tk70UyX4fubNyRcnjBI7lf9vvBjLcDZnmNUxJZMRfAUd06wVU6ggTGk7vkkpYMS vOMV0vbSRX7GA7vhlHSxjyl2IXG5ja7kbNFPB/ZwM401kKkk4f18149yjzTz6SkLSmJ8 a/PsDiDZOhqqJlXMpglIP31TAidecS2Nr/Ph6nyfRT8gvlC30iep7CX0OcBVZjtleIh+ jo5AC03WGHCdA1HZ44wm1BIleSQj+pg4AVgUXQq3wbDyXn0tU+f2h2y3FZgmZRiWQEha P8uGtdxQd0j9C0fWD+U79bFSeZq16UcJKxdYdJYWhyCieHO9oEQ7S0naskSU1WXx6j+p Nd6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=sTdPpZFM07kjoD9mvy4mIO/OEG8mbpHzc1qGh9rC6Eg=; b=mHXue5yep+bDtdwKsuEaNClfFFcjbd6n0sHtIYkyZ72svm94ANs5ia7Mg+RPOLRIi5 XXs03glwQRGurI99ibjhDPHw4fO1UclI0aku5/R18+BgU4e7zj32W84RldcKS7IK0aPl QPNRPhED18jTpHwaIj7W0XjVbqMh/pB6i9FiuHKfLdSyQgw6hqoGraKwuF+rJ9FYdU+V H2h54mZQi9Fo6WzaqmFE1BcKXlQfH+K/mvzFjcayFExTbSLUQoH8MwXhpKugBg3vcCMK fJi7nMwKhVGsjYmtQ/AGZbQh7H0+SP+sKCecflFjZdtqnZ62taRemmejmOLHuGW3ysRv vm4Q== X-Gm-Message-State: APzg51DwQJqa3M3rrssNyKq77SREBinDGXMupa51VdQMmfITuVwqBaaN eOHnu8DDWjRAwiKFW0wlvkTVFQTY X-Google-Smtp-Source: ANB0Vdb4AuyNXLjSl6cWPRzTcqs0WGp5MzHf+5UXbnzRdFBLCV8VZ+++zlkD29IfihmMYr59IxmD9g== X-Received: by 2002:a17:902:bb08:: with SMTP id l8-v6mr3842008pls.71.1536351452415; Fri, 07 Sep 2018 13:17:32 -0700 (PDT) Received: from raichu (toroon0560w-lp130-09-70-52-224-239.dsl.bell.ca. [70.52.224.239]) by smtp.gmail.com with ESMTPSA id 203-v6sm11028894pgb.14.2018.09.07.13.17.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Sep 2018 13:17:31 -0700 (PDT) Sender: Mark Johnston Date: Fri, 7 Sep 2018 16:17:28 -0400 From: Mark Johnston To: Yuri Pankov Cc: freebsd-hackers Subject: Re: intelspi: fix "Device leaked IRQ resources" Message-ID: <20180907201728.GI63224@raichu> References: <1edec70d-8ba3-56c8-d25e-1aef9458452e@yuripv.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1edec70d-8ba3-56c8-d25e-1aef9458452e@yuripv.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2018 20:17:34 -0000 On Fri, Sep 07, 2018 at 10:56:51PM +0300, Yuri Pankov wrote: > A simple fix for an obvious typo, leading to "Device leaked IRQ > resources" on attach failure or detach. Thanks, I'll submit this to re@. > diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c > index 9b229bb74123..575240fc3167 100644 > --- a/sys/dev/intel/spi.c > +++ b/sys/dev/intel/spi.c > @@ -480,7 +480,7 @@ intelspi_attach(device_t dev) > sc->sc_mem_rid, sc->sc_mem_res); > > if (sc->sc_irq_res != NULL) > - bus_release_resource(dev, SYS_RES_MEMORY, > + bus_release_resource(dev, SYS_RES_IRQ, > sc->sc_irq_rid, sc->sc_irq_res); > > return (ENXIO); > @@ -503,7 +503,7 @@ intelspi_detach(device_t dev) > sc->sc_mem_rid, sc->sc_mem_res); > > if (sc->sc_irq_res != NULL) > - bus_release_resource(dev, SYS_RES_MEMORY, > + bus_release_resource(dev, SYS_RES_IRQ, > sc->sc_irq_rid, sc->sc_irq_res); > > return (0); > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"