Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2015 08:17:02 +0000 (UTC)
From:      Nomad Esst <noname.esst@yahoo.com>
To:        "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org>,  Freebsd Hackers List <freebsd-hackers@freebsd.org>
Subject:   Get pci slot number in driver
Message-ID:  <1473579278.716147.1440404222458.JavaMail.yahoo@mail.yahoo.com>

next in thread | raw e-mail | index | archive | help
Is it possible to find out the pci slot number on which the card is mounted in driver? I tried pci_get_slot but it's always 0.Any ideas about doing this?
regards
From owner-freebsd-hackers@freebsd.org  Mon Aug 24 15:19:01 2015
Return-Path: <owner-freebsd-hackers@freebsd.org>
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 CAE7E9C0528;
 Mon, 24 Aug 2015 15:19:01 +0000 (UTC)
 (envelope-from jim.harris@gmail.com)
Received: from mail-ob0-x22e.google.com (mail-ob0-x22e.google.com
 [IPv6:2607:f8b0:4003:c01::22e])
 (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 92B65E8D;
 Mon, 24 Aug 2015 15:19:01 +0000 (UTC)
 (envelope-from jim.harris@gmail.com)
Received: by obbhe7 with SMTP id he7so116106716obb.0;
 Mon, 24 Aug 2015 08:19:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=LMBtQDc0jiAykPZLO6qyhd9WfY4trce0mp1qZvLrDpQ=;
 b=Wbp0drf7Cvh0NuBqu+Mv9dUP6GzUUNRFOC6LGPNXU0tYYEkOTCwUMI7xox7E+hi3kH
 9/puZnBBz7AtLE6R7UsvPowxrzI7gfSjNVoF5chGHHevz5IHOqrBVysDiEm7EcfFWGo3
 5ri/zoyfG8rhMa8p6T+tGRsOPPzTQex7t/NHIImxYxiH1/NbhOYyaWkshuvAWgGrgEwu
 LfCwsXVtHOjq/6eDwKUiEZCDsfS5ttmq7jB1JoOOBZW45rlReQt3W/TTIWZGTrhkpa+f
 iB1nPahZV/i6g8iw4IQuNTlFYo6BhYhpLTybhPBPCP0Pv4lZH2/GivaZKGCCJJp0fGnH
 vZOw==
MIME-Version: 1.0
X-Received: by 10.182.33.38 with SMTP id o6mr21072474obi.41.1440429540928;
 Mon, 24 Aug 2015 08:19:00 -0700 (PDT)
Received: by 10.202.212.76 with HTTP; Mon, 24 Aug 2015 08:19:00 -0700 (PDT)
In-Reply-To: <1473579278.716147.1440404222458.JavaMail.yahoo@mail.yahoo.com>
References: <1473579278.716147.1440404222458.JavaMail.yahoo@mail.yahoo.com>
Date: Mon, 24 Aug 2015 08:19:00 -0700
Message-ID: <CAJP=Hc8+ZGy_L-NNGg3wRV3WA_iW1eqcPWAxFy78czQ53iD8mA@mail.gmail.com>
Subject: Re: Get pci slot number in driver
From: Jim Harris <jim.harris@gmail.com>
To: Nomad Esst <noname.esst@yahoo.com>
Cc: "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org>, 
 Freebsd Hackers List <freebsd-hackers@freebsd.org>
Content-Type: text/plain; charset=UTF-8
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: freebsd-hackers@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: Technical Discussions relating to FreeBSD
 <freebsd-hackers.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-hackers>, 
 <mailto:freebsd-hackers-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-hackers/>;
List-Post: <mailto:freebsd-hackers@freebsd.org>
List-Help: <mailto:freebsd-hackers-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-hackers>, 
 <mailto:freebsd-hackers-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Aug 2015 15:19:02 -0000

On Mon, Aug 24, 2015 at 1:17 AM, Nomad Esst via freebsd-drivers <
freebsd-drivers@freebsd.org> wrote:

> Is it possible to find out the pci slot number on which the card is
> mounted in driver? I tried pci_get_slot but it's always 0.Any ideas about
> doing this?
> regards
>

What do the PCI bus, slot, and function numbers for this device show up as
in "pciconf -l" output?

For PCI Express endpoints, the PCI slot number (also sometimes referred to
as PCI device number) is typically 0.  These endpoints are more typically
differentiated by their PCI bus number, not slot number.

-Jim

_______________________________________________
> freebsd-drivers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-drivers
> To unsubscribe, send any mail to "freebsd-drivers-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1473579278.716147.1440404222458.JavaMail.yahoo>