* The PCI Library -- Configuration Access via /sys/bus/pci
*
* Copyright (c) 2003 Matthew Wilcox <willy@fc.hp.com>
* The PCI Library -- Configuration Access via /sys/bus/pci
*
* Copyright (c) 2003 Matthew Wilcox <willy@fc.hp.com>
file = fopen(namebuf, "r");
if (!file)
a->error("Cannot open %s: %s", namebuf, strerror(errno));
file = fopen(namebuf, "r");
if (!file)
a->error("Cannot open %s: %s", namebuf, strerror(errno));
{
unsigned long long start, end, size;
if (!fgets(buf, sizeof(buf), file))
break;
if (sscanf(buf, "%llx %llx", &start, &end) != 2)
a->error("Syntax error in %s", namebuf);
{
unsigned long long start, end, size;
if (!fgets(buf, sizeof(buf), file))
break;
if (sscanf(buf, "%llx %llx", &start, &end) != 2)
a->error("Syntax error in %s", namebuf);
- * We prefer reading these from the config registers, it's faster.
- * However, it would be possible and maybe even useful to hack the kernel
- * to believe that some device has a different ID. If you do it, just
- * enable this piece of code. --mj
+ * We could read these faster from the config registers, but we want to give
+ * the kernel a chance to fix up ID's and especially classes of broken devices.
*/
d->vendor_id = sysfs_get_value(d, "vendor");
d->device_id = sysfs_get_value(d, "device");
*/
d->vendor_id = sysfs_get_value(d, "vendor");
d->device_id = sysfs_get_value(d, "device");
- d->access->warning("sysfs_write: tried to write %d bytes at %d, but got only %d", len, pos, res);
+ d->access->warning("sysfs_write: tried to write %d bytes at %d, but only %d succeeded", len, pos, res);