Date: Tue, 30 May 2006 21:42:35 +0800 From: "william wallace" <avalonwallace@gmail.com> To: "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, "Warner Losh" <imp@bsdimp.com> Cc: "Sy, Dely L" <dely.l.sy@intel.com>, Scott Long <scottl@samsco.org> Subject: Re: misc questions about the device&driver arch Message-ID: <87ab37ab0605300642ja608c97s24836a317cdac24@mail.gmail.com> In-Reply-To: <87ab37ab0605280309s15a31cb4yc8a54be1af5472dd@mail.gmail.com> References: <87ab37ab0605210108w127a235bue281428f52bbc784@mail.gmail.com> <87ab37ab0605212328ue7c70fcu49c5fec8921ae229@mail.gmail.com> <20060522.005010.104089663.imp@bsdimp.com> <87ab37ab0605221816y6cca5387sc43fa1e1116f55cc@mail.gmail.com> <44729B81.8010909@samsco.org> <87ab37ab0605240048g224218a5s87cfe1b1ed5cc8c9@mail.gmail.com> <20060524075946.GE49081@funkthat.com> <87ab37ab0605240613n594c566q844b754043c2c10@mail.gmail.com> <20060524153153.GF49081@funkthat.com> <87ab37ab0605280309s15a31cb4yc8a54be1af5472dd@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Sir: I have got the way to map linux pci access way to the BSD way :) now ,several more question ,wondering :( FIRST struct pci_devinfo * pci_read_device(device_t pcib, int b, int s, int f, size_t size) struct cardbus_devinfo { struct pci_devinfo pci; uint8_t mprefetchable; /* bit mask of prefetchable BARs */ so what happen when dinfo = (struct cardbus_devinfo *)pci_read_device(brdev, bus, slot, func, sizeof(struct cardbus_devinfo)); can we use this magic as a common way to wrap common guts? SECOND what should we do to destroy a device and hot remove it from the system ? 1 pause the application 2 device_detach(devlist[tmp]); 3***_release_all_resources(busdev, dinfo); 4 device_delete_child(busdev, devlist[tmp]); 5 pci_freecfg((struct pci_devinfo *)dinfo); 6 shutdown power of the slot so what exactly happens between 2 and 5? THIRD Because the PCIE configure space is 4k long ,shall we change the #define PCI_REGMAX 255 to facilitate the PCI express config R/W?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87ab37ab0605300642ja608c97s24836a317cdac24>