- Update to 2.2.6. - Teach about support for PCI domains in FreeBSD >= 700053. - Stop including pcivar.h from the kernel source on FreeBSD => 430000, if this was ever necessary it no longer is since the introduction of pciio.h.
Responsible Changed From-To: freebsd-ports-bugs->marius Submitter has GNATS access
State Changed From-To: open->feedback Awaiting maintainers feedback
Dear maintainer of sysutils/pciutils, please approve PR116827, which can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=116827 Though please use the attached version of the patch instead, as some additional testing revealed bugs in libpci. The revised version of the patch also does: - Catch up with FreeBSD returning ENODEV for non-existing devices. - Fix on big-endian archs. Please also take care of getting the fixes and updates to fbsd-device.c integrated upstream. Thanks, Marius
Looks good. Thanks for the patch Marius, I'm cool with it. I'll get it integrated upstream (I have CC'ed the pcituils maintainer). Regarding the ENODEV changes, I'll follow up with this in another PR in the future (I think the way it is handled currently is not as clean as should be). Regardless, this patch should be committed now rather than later. On 10/2/07, Marius Strobl <marius@freebsd.org> wrote: > > Dear maintainer of sysutils/pciutils, > > please approve PR116827, which can be found at: > http://www.freebsd.org/cgi/query-pr.cgi?pr=116827 > > Though please use the attached version of the patch instead, > as some additional testing revealed bugs in libpci. The > revised version of the patch also does: > - Catch up with FreeBSD returning ENODEV for non-existing > devices. > - Fix on big-endian archs. > > Please also take care of getting the fixes and updates to > fbsd-device.c integrated upstream. > > Thanks, > Marius > > > -- Samy Al Bahra [http://kerneled.org]
Hello! > Looks good. Thanks for the patch Marius, I'm cool with it. I'll get > it integrated upstream (I have CC'ed the pcituils maintainer). I already have some BSD-related changes in my current tree. Could you please look at the current GIT tree, check them and send a new patch? Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://mj.ucw.cz/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth First law of socio-genetics: Celibacy is not hereditary.
On Wed, Oct 03, 2007 at 09:52:54AM +0200, Martin Mares wrote: > Hello! > > > Looks good. Thanks for the patch Marius, I'm cool with it. I'll get > > it integrated upstream (I have CC'ed the pcituils maintainer). > > I already have some BSD-related changes in my current tree. Could you > please look at the current GIT tree, check them and send a new patch? > Attached is a patch against the head of the GIT tree. Marius
On Wed, Oct 03, 2007 at 11:56:31AM +0200, Marius Strobl wrote: > On Wed, Oct 03, 2007 at 09:52:54AM +0200, Martin Mares wrote: > > Hello! > > > > > Looks good. Thanks for the patch Marius, I'm cool with it. I'll get > > > it integrated upstream (I have CC'ed the pcituils maintainer). > > > > I already have some BSD-related changes in my current tree. Could you > > please look at the current GIT tree, check them and send a new patch? > > > > Attached is a patch against the head of the GIT tree. > Ehh, forgot the attachment...
Hello! > -#if defined(__DragonFly__) > -# include <bus/pci/pcivar.h> > -#elif __FreeBSD_version < 500000 > -# include <pci/pcivar.h> > -#else > -# include <dev/pci/pcivar.h> > -#endif > - > #if __FreeBSD_version < 430000 && !defined(__DragonFly__) > +# include <pci/pcivar.h> Are you sure this will work with DragonFly? I've Cc'd Hasso Tepper who contributed the DragonFly patch recently. > if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) > - d->access->error("fbsd_read: ioctl(PCIOCREAD) failed"); > + { > + if (errno == ENODEV) > + { > + return 0; > + } > + d->access->error("fbsd_read: ioctl(PCIOCREAD) failed: %s", strerror(errno)); > + } Please avoid unnecessary braces. The rest of the patch looks OK. Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://mj.ucw.cz/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth My Wife Says I Never Listen, Or Something Like That...
On Wed, Oct 03, 2007 at 05:16:40PM +0200, Martin Mares wrote: > Hello! > > > -#if defined(__DragonFly__) > > -# include <bus/pci/pcivar.h> > > -#elif __FreeBSD_version < 500000 > > -# include <pci/pcivar.h> > > -#else > > -# include <dev/pci/pcivar.h> > > -#endif > > - > > #if __FreeBSD_version < 430000 && !defined(__DragonFly__) > > +# include <pci/pcivar.h> > > Are you sure this will work with DragonFly? > Yes, DragonFly was forked at __FreeBSD_version 480101 and their <sys/pciio.h> is still the same as in FreeBSD before __FreeBSD_version 700053 except for header multiple inclusion protection stuff and whitespace differences, i.e. shouldn't require pcivar.h to be included from the kernel source either. > I've Cc'd Hasso Tepper who contributed the DragonFly patch recently. > > > if (ioctl(d->access->fd, PCIOCREAD, &pi) < 0) > > - d->access->error("fbsd_read: ioctl(PCIOCREAD) failed"); > > + { > > + if (errno == ENODEV) > > + { > > + return 0; > > + } > > + d->access->error("fbsd_read: ioctl(PCIOCREAD) failed: %s", strerror(errno)); > > + } > > Please avoid unnecessary braces. > > The rest of the patch looks OK. > I've tried to copy the existing style of fbsd-device.c, which uses unnecessary braces in more places than in places it doesn't. Marius
marius 2007-10-05 22:57:36 UTC FreeBSD ports repository (src committer) Modified files: sysutils/pciutils Makefile distinfo sysutils/pciutils/files patch-Makefile Added files: sysutils/pciutils/files patch-lib::fbsd-device.c patch-lspci.c Log: - Update to 2.2.6. - Teach about support for PCI domains in FreeBSD >= 700053. - Stop including pcivar.h from the kernel source on FreeBSD => 430000, if this was ever necessary it no longer is since the introduction of pciio.h. - Catch up with FreeBSD returning ENODEV for non-existing devices. - Fix on big-endian archs. PR: 116827 Approved by: maintainer, netchild Revision Changes Path 1.10 +1 -13 ports/sysutils/pciutils/Makefile 1.5 +3 -3 ports/sysutils/pciutils/distinfo 1.4 +6 -13 ports/sysutils/pciutils/files/patch-Makefile 1.4 +99 -0 ports/sysutils/pciutils/files/patch-lib::fbsd-device.c (new) 1.1 +14 -0 ports/sysutils/pciutils/files/patch-lspci.c (new) _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Close; patch has been committed.
Hi! > Yes, DragonFly was forked at __FreeBSD_version 480101 and > their <sys/pciio.h> is still the same as in FreeBSD before > __FreeBSD_version 700053 except for header multiple inclusion > protection stuff and whitespace differences, i.e. shouldn't > require pcivar.h to be included from the kernel source either. OK. > I've tried to copy the existing style of fbsd-device.c, which > uses unnecessary braces in more places than in places it doesn't. Fine, I have cleaned it up in all three BSD drivers. Have a nice fortnight -- Martin `MJ' Mares <mj@ucw.cz> http://mj.ucw.cz/ Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth "Dijkstra probably hates me." -- /usr/src/linux/kernel/sched.c