From owner-svn-src-all@freebsd.org Thu Jun 18 21:29:20 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E5C2B334759; Thu, 18 Jun 2020 21:29:20 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49nw741RqVz45j3; Thu, 18 Jun 2020 21:29:19 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f66.google.com with SMTP id o5so8934593iow.8; Thu, 18 Jun 2020 14:29:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fAn31h6g3o3MJ3TXn70NIgc5+f0Vl9V636Ph/O4DiVU=; b=VugG6M6JEBs9Jt4NC6G/Fk6DsBeINxSzOEev4CzqWB8tIcXJBQ9dt5QIOUwyBS5psP 4gLyFpv81StATjv4B1Irj6AMP32yeTtXmlXNu6nt0STjS/NVW6StURC2xIi5zVfItqzG cZZ8CAZtK3zSw8bdwBuPLlbnVfXjsBRbt//HyBirnVP5iaqVsXwx0KxojCovbEvPZYfC n/TpQD45aN5nQ0dvC/+fcFDbZSzmvnhJM4E9HXav6hylQ/GzXECgmnbHBy1k2DnKxyVo S5a2zQO0ZYCPqy66jfCDY47psIIlRR05rtLidPfDUOwKTg3csBJ6l+RVMzT+3JO6RW0W NhyQ== X-Gm-Message-State: AOAM532MxSGwdvZxkjjVSgRdWAKIeuGVn/jHgjfPdj8rFTaLKX3QF3hy jA0llSD7Ke9v5ajjWEXWXY7J2zkZ1f0EylBnXwmJCw== X-Google-Smtp-Source: ABdhPJwP0gufqok8+tQ6Q7vkG42jB5ChIDggiMxHU4vsinppNJQlohuyxfLE0KxOxgIR+sHivigUzLWOWAuGTc8x3S8= X-Received: by 2002:a02:ba93:: with SMTP id g19mr641437jao.136.1592515757159; Thu, 18 Jun 2020 14:29:17 -0700 (PDT) MIME-Version: 1.0 References: <202006171956.05HJuH8B032154@repo.freebsd.org> <831631E9-2F54-4E5F-950A-B923B0A3DADA@freebsd.org> In-Reply-To: <831631E9-2F54-4E5F-950A-B923B0A3DADA@freebsd.org> From: Ed Maste Date: Thu, 18 Jun 2020 17:29:05 -0400 Message-ID: Subject: Re: svn commit: r362285 - head/sys/dev/pci To: Jessica Clarke Cc: Andrew Turner , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49nw741RqVz45j3 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 21:29:21 -0000 On Thu, 18 Jun 2020 at 08:48, Jessica Clarke wrote: > > On 18 Jun 2020, at 13:23, Ed Maste wrote: > > On Wed, 17 Jun 2020 at 15:56, Andrew Turner wrote: > >> > >> Author: andrew > >> Date: Wed Jun 17 19:56:17 2020 > >> New Revision: 362285 > >> URL: https://svnweb.freebsd.org/changeset/base/362285 > >> > >> Log: > >> Clean up the pci host generic driver > > ... > >> > >> + /* Translate the address from a PCI address to a physical address */ > >> + switch (type) { > >> + case SYS_RES_IOPORT: > >> + case SYS_RES_MEMORY: > >> + found = false; > >> + for (i = 0; i < MAX_RANGES_TUPLES; i++) { > >> + pci_base = sc->ranges[i].pci_base; > >> + phys_base = sc->ranges[i].phys_base; > >> + size = sc->ranges[i].size; > >> + > >> + if (start < pci_base || start >= pci_base + size) > >> + continue; > > > > Should the second condition be end instead? markj had this comment on > > the old version in review D20884. > > The code previously had: > > > if ((rman_get_start(r) >= pci_base) && (rman_get_start(r) < (pci_base + size))) > > found = 1; > > break; > > } > > The new code is just the inverted form of that. Yes; Mark made the comment (that the 2nd rman_get_start should be rman_get_end) about the previous version of the code but no change was made. I believe that comment still applies.