Bug 116827 - sysutils/pciutils: update to 2.2.6 and unbreak for FreeBSD >= 700053
Summary: sysutils/pciutils: update to 2.2.6 and unbreak for FreeBSD >= 700053
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Marius Strobl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-02 14:40 UTC by Marius Strobl
Modified: 2007-10-14 14:10 UTC (History)
0 users

See Also:


Attachments
pciutils.diff (5.12 KB, patch)
2007-10-02 14:40 UTC, Marius Strobl
no flags Details | Diff
pciutils.diff2 (6.66 KB, text/plain; charset=us-ascii)
2007-10-02 18:06 UTC, Marius Strobl
no flags Details
pciutils.diff.txt (6.66 KB, text/plain)
2007-10-02 23:01 UTC, Samy Al Bahra
no flags Details
fbsd-device.c.diff_git (2.68 KB, text/plain; charset=us-ascii)
2007-10-03 10:57 UTC, marius
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Strobl freebsd_committer 2007-10-02 14:40:03 UTC
	- 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.
Comment 1 Edwin Groothuis freebsd_committer 2007-10-02 14:40:36 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marius

Submitter has GNATS access
Comment 2 Edwin Groothuis freebsd_committer 2007-10-02 14:40:43 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback
Comment 3 Marius Strobl freebsd_committer 2007-10-02 18:06:09 UTC
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
Comment 4 Samy Al Bahra 2007-10-02 23:01:09 UTC
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]
Comment 5 mj 2007-10-03 08:52:54 UTC
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.
Comment 6 marius 2007-10-03 10:56:31 UTC
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
Comment 7 marius 2007-10-03 10:57:44 UTC
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...
Comment 8 mj 2007-10-03 16:16:40 UTC
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...
Comment 9 marius 2007-10-03 16:32:54 UTC
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
Comment 10 dfilter service freebsd_committer 2007-10-05 23:57:40 UTC
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"
Comment 11 Marius Strobl freebsd_committer 2007-10-05 23:58:52 UTC
State Changed
From-To: feedback->closed


Close; patch has been committed.
Comment 12 mj 2007-10-14 13:09:28 UTC
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