From owner-freebsd-drivers@FreeBSD.ORG Tue Jan 14 05:53:52 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBE20BF for ; Tue, 14 Jan 2014 05:53:52 +0000 (UTC) Received: from nm5-vm0.bullet.mail.bf1.yahoo.com (nm5-vm0.bullet.mail.bf1.yahoo.com [98.139.213.150]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6824D11CB for ; Tue, 14 Jan 2014 05:53:52 +0000 (UTC) Received: from [98.139.212.149] by nm5.bullet.mail.bf1.yahoo.com with NNFMP; 14 Jan 2014 05:53:45 -0000 Received: from [98.139.212.207] by tm6.bullet.mail.bf1.yahoo.com with NNFMP; 14 Jan 2014 05:53:45 -0000 Received: from [127.0.0.1] by omp1016.mail.bf1.yahoo.com with NNFMP; 14 Jan 2014 05:53:45 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 590254.48033.bm@omp1016.mail.bf1.yahoo.com Received: (qmail 64977 invoked by uid 60001); 14 Jan 2014 05:53:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1389678825; bh=KDgtGg07VKwch2xidYp9LvyMdMwN4gMZPV1AEtMfEDU=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=v2p7LrRphzF+qnC5S2zo5d5FJxmEYVgNcjILkzqnlDHrFTWyjddFqRC2dhsc1lrRbeBrPv59rz71AjzDp42z3jRRVretlIbv7H5CBqgNP7n3g+YCATkd9h8FJ7C95O/vsyT1Ra1ctc4+J4sZADKO/z0GDU9xYSZ4kyVkpw5rCUs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=p8GL2cVB+uR077O4vX1Ry2kbqi3373Li9aGU+X+sschL9mclh/aqrOTuc34yc33Ju0DKBkteBndy4oC5S8yGjJ5iD1EVZo5pbQRDgPT+p1wtGtJLz0CTmljLTjR2bJQpUsddj9dDG6K64tjnxvFRRI4LDceS0G8Czh6FRJxh9A4=; X-YMail-OSG: ifXJwmUVM1nm3tGAfV0Pv9b7sGE1XX4DFJSjINFFCI.eZtQ __rcKD3hTWgdXnw15ygDMZO2qp9us9mXRZRylovm5MgZW8tByaeB.JskLOQd EhP4HU41fQNPfRlQccLSVARKHExpyJbitHCVVKWLOm3LlgT1reK6Ac4DBBq6 eDtYw1QrK3ZlACGIQk_Eo961anOPQGlNtBi00z.HDv8UmIaKpADaeSPkFhGb l3IR6u527XYdn5iZMFayCPuM84IdNqQWfKvP7Aw8TzPjWUlZNCMcoAFASg0G pxYpsKCUIepSfd2EbLp.vERPOnhc_bPSFHmCMYXsIRKra9Ya3hFtnjwd6nT3 NXGvV5ugQvYka1vGUyGH9rygYr0Xvwciskr.Q1CjceVV72GkdcNNwNHcgz1H STndRVrMGEYU5uldArWhXr.8m8OG5oMHLkcitxzqsWgprR9w5CVCfokQdp6z WEd_lOgFjh2u1xJPx9DUK.nUFeWZ7Z2MpTDBl_b3utl_o4OfbyP9xjACpmDE LQlZEXfX7Hry8rY4mI7F7 Received: from [89.165.120.140] by web162702.mail.bf1.yahoo.com via HTTP; Mon, 13 Jan 2014 21:53:45 PST X-Rocket-MIMEInfo: 002.001, VGhhbmsgeW91LiBUaGUgdGhpbmcgaXMgb25lIG9mIHRoZSBpbnB1dCBhcmd1bWVudHMgb2YgdGhpcyBmdW5jdGlvbiBpcyBkZXZpY2VfdC4gSG93IGNhbiBJIGdldCB0aGlzIHN0cnVjdCBieSBkZXZpY2UgbmFtZSBzbyBJIGNhbiBwYXNzIGl0IHRvIHBjaV9nZXRfdnBkX3JlYWRvbmx5IGZ1bmN0aW9uPwpDb25zaWRlciB0aGF0IEknbSB0cnlpbmcgdG8gcmVhZCBlbSdzIHZwZCwgaG93IGNhbiBnZXQgZW0ncyByZWxhdGVkIGRldmljZV90IHN0cnVjdCBieSBpdCdzIG5hbWU_wqAKU29tZXRoaW5nIGxpa2U6CmQBMAEBAQE- X-Mailer: YahooMailWebService/0.8.172.614 References: <1389515545.51283.YahooMailNeo@web162704.mail.bf1.yahoo.com> <201401131349.06456.jhb@freebsd.org> Message-ID: <1389678825.62302.YahooMailNeo@web162702.mail.bf1.yahoo.com> Date: Mon, 13 Jan 2014 21:53:45 -0800 (PST) From: Nomad Esst Subject: Re: Access pci devices' serial numbers programmatically To: John Baldwin , "freebsd-drivers@freebsd.org" In-Reply-To: <201401131349.06456.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Nomad Esst List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jan 2014 05:53:52 -0000 Thank you. The thing is one of the input arguments of this function is devi= ce_t. How can I get this struct by device name so I can pass it to pci_get_= vpd_readonly function?=0AConsider that I'm trying to read em's vpd, how can= get em's related device_t struct by it's name?=A0=0ASomething like:=0Adevi= ce_t get_device_by_name(char dev_name)=0A=0A=0A=0AOn Monday, January 13, 20= 14 11:49 PM, John Baldwin wrote:=0A =0AOn Sunday, January= 12, 2014 3:32:25 am Nomad Esst wrote:=0A>> Hi list=0A>> Any experiences on= how to do so? Please tell me if you know how can I do =0A>that?=0A>=0A>The= re are methods available to query VPD data in dev/pci/pcivar.h if the=0A>se= rial number is stored in VPD (specifically you can call =0A>pci_get_vpd_rea= donly()).=0A>=0A>-- =0A>John Baldwin=0A>___________________________________= ____________=0A>freebsd-hackers@freebsd.org mailing list=0A>http://lists.fr= eebsd.org/mailman/listinfo/freebsd-hackers=0A>=0A>To unsubscribe, send any = mail to "freebsd-hackers-unsubscribe@freebsd.org=0A>"=0A>=0A>=0A>