Bug 227252 - devel/libpci-3.5.6 breaks sysutils/flashrom (No EEPROM/flash device found)
Summary: devel/libpci-3.5.6 breaks sysutils/flashrom (No EEPROM/flash device found)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Po-Chuan Hsieh
URL:
Keywords: needs-qa, regression
Depends on:
Blocks:
 
Reported: 2018-04-03 12:39 UTC by doktornotor
Modified: 2018-05-10 23:15 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description doktornotor 2018-04-03 12:39:14 UTC
Trying to flash coreboot on APU2C4 with libpci-3.5.6 and latest flashrom results in this:

# flashrom -p internal -w apu2_v4.0.15.rom 
flashrom v1.0 on FreeBSD 11.1-RELEASE-p6 (amd64) flashrom is free software, get the source code at https://flashrom.org

Using clock_gettime for delay loops (clk_id: 4, resolution: 2ns).
coreboot table found at 0xdffae000.
Found chipset "AMD FCH".
Enabling flash write... OK.
No EEPROM/flash device found.
Note: flashrom can never write if the flash chip isn't found automatically.

This problem has been described quite a couple of months ago @ https://groups.google.com/forum/#!topic/muc.lists.freebsd.hackers/KNzO0CnMpbA without any solution. Flashing works without any problem with libpci-3.5.5. 

https://git.kernel.org/pub/scm/utils/pciutils/pciutils.git/tree/ChangeLog mentions: "Improvements of the FreeBSD back-end: read-only access for non-root" - this clearly did not work as expected.

I have reported the issue to the maintainer - mj (at) ucw.cz - as per http://mj.ucw.cz/sw/pciutils/ about two weeks ago, so far without any ack/response. Give that the maintainer has repeatedly claimed to have no FreeBSD development boxes available, I think I'd rather move it here.
Comment 1 vidwer+fbsdbugs 2018-04-28 22:30:30 UTC
I can confirm that the change found in https://github.com/pciutils/pciutils/commit/58d9f25f25c0070c3c3df3073f375d87a9163e88 applied to pciutils-3.5.6 unbreaks this release.

Tested on FreeBSD 12.0-CURRENT r333087, ports r468595.
Comment 2 Douglas Thrift 2018-05-10 00:34:53 UTC
Fix maintainer-feedback request to devel/libpci maintainer.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-05-10 23:15:36 UTC
A commit references this bug:

Author: sunpoet
Date: Thu May 10 23:14:58 UTC 2018
New revision: 469602
URL: https://svnweb.freebsd.org/changeset/ports/469602

Log:
  Fix device scan

  - Bump PORTREVISION for package change

  PR:		227252
  Reported by:	doktornotor <doktornotor@mailinator.com>
  Tested by:	<vidwer@gmail.com>
  Obtained from:	https://github.com/pciutils/pciutils/commit/58d9f25f25c0070c3c3df3073f375d87a9163e88

Changes:
  head/devel/libpci/Makefile
  head/devel/libpci/files/patch-lib-fbsd-device.c
Comment 4 Po-Chuan Hsieh freebsd_committer freebsd_triage 2018-05-10 23:15:54 UTC
Committed. Thanks!