From owner-svn-src-all@freebsd.org Thu Jun 18 12:24:04 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 3936334F259; Thu, 18 Jun 2020 12:24:04 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f68.google.com (mail-io1-f68.google.com [209.85.166.68]) (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 49nh1v6cmjz4cWW; Thu, 18 Jun 2020 12:24:03 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io1-f68.google.com with SMTP id o5so6733714iow.8; Thu, 18 Jun 2020 05:24:03 -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=eFeoDwj03nEA/2f1pYz6nZQNnEKFF2pKCTCVW/9WE8c=; b=eATTcriK/5SFuYoNGDWXb/y7SPqeSDjLlFrM/7XbrhhdQb2roze5MUznL8UyqvRyZB qOtbo3+CU/DC/tX1bMte5L/FyWxA3iLO3kHGhqQNEqbn2GDL8dTuuJ6pinWgiNGjVpHV lmwIHFFIi8gWYa56LsytqSvyX8uwb4OyUou4ekLN6C7064seUbCQp1KeH+IHrLGXwn5S 9XXKn5wo7qpTfjRs+4y/7K4mk9VeTZ86N1i3+WpFcL/3KrQuB4hNLk9mmUZ5ZFyDXBi4 wtqrXXrNdQTUi/TlaOEfGMCleilI9g+iWyMhKYguK5GH6wC79R0747XNwNoEs56Z8k67 j1Tg== X-Gm-Message-State: AOAM533ofmdvA7pbn97EAnoPAcDDi/3WFu/V/tmmcn+Fg0Pky+6dkMEZ Im23YndXbFn5rvpZJ+IlT5t+gRolr3035ChEMqnqQIk8rrE= X-Google-Smtp-Source: ABdhPJzJuViAlWDU8QlXy8o89E0Tf33zRB5WArK5hNc1VflIg3bXA8RCHbyTvpW0TXzoB72osBujD99kNZuODiz5HdA= X-Received: by 2002:a6b:b252:: with SMTP id b79mr4670504iof.31.1592483041274; Thu, 18 Jun 2020 05:24:01 -0700 (PDT) MIME-Version: 1.0 References: <202006171956.05HJuH8B032154@repo.freebsd.org> In-Reply-To: <202006171956.05HJuH8B032154@repo.freebsd.org> From: Ed Maste Date: Thu, 18 Jun 2020 08:23:49 -0400 Message-ID: Subject: Re: svn commit: r362285 - head/sys/dev/pci To: Andrew Turner Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49nh1v6cmjz4cWW 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 12:24:04 -0000 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.