From owner-freebsd-net Mon Jan 6 1:22: 8 2003 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA2C437B401; Mon, 6 Jan 2003 01:22:06 -0800 (PST) Received: from birch.ripe.net (birch.ripe.net [193.0.1.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id BCE0643E4A; Mon, 6 Jan 2003 01:22:05 -0800 (PST) (envelope-from marks@ripe.net) Received: from laptop.6bone.nl (cow.ripe.net [193.0.1.239]) by birch.ripe.net (8.12.5/8.11.6) with SMTP id h069M1vP008186; Mon, 6 Jan 2003 10:22:02 +0100 Received: (nullmailer pid 2167 invoked by uid 1000); Mon, 06 Jan 2003 09:22:04 -0000 Date: Mon, 6 Jan 2003 10:22:03 +0100 From: Mark Santcroos To: shubha mr Cc: freebsd-questions@FreeBSD.ORG, freebsd-net@FreeBSD.ORG Subject: Re: help-urgent Message-ID: <20030106092203.GA620@laptop.6bone.nl> References: <20030106062513.51746.qmail@web41203.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030106062513.51746.qmail@web41203.mail.yahoo.com> User-Agent: Mutt/1.4i X-Handles: MS6-6BONE, MS18417-RIPE Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Don't think these lists are the best place for this question but alas... On Mon, Jan 06, 2003 at 06:25:13AM +0000, shubha mr wrote: > If I have to write to a register at offset say x,in > the pci configuration space,how do I do it? If it is > using pci_read_config and pci_write_config,how does > the system know where the pci reg base address of my > device is? val = pci_read_config(dev, OFFSET, len); dev: the PCI device your driver is working on OFFSET: the position you want to read from len: the number of bytes you want to read Because you specify the pci dev the system knows where to read from. Look at any random pci driver in sys/ and it will all become clear. Mark -- Mark Santcroos RIPE Network Coordination Centre http://www.ripe.net/home/mark/ New Projects Group/TTM To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message