i386/130957: /sys/dev/pci/pci.c revision 181771 breaks
networking and the power button
Markus Hitter
mah at jump-ing.de
Sun Jan 25 15:00:03 PST 2009
The following reply was made to PR i386/130957; it has been noted by GNATS.
From: Markus Hitter <mah at jump-ing.de>
To: bug-followup at FreeBSD.org
Cc:
Subject: Re: i386/130957: /sys/dev/pci/pci.c revision 181771 breaks networking and the power button
Date: Sun, 25 Jan 2009 23:52:32 +0100
--Apple-Mail-3--933801065
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed
Indeed, reverting the r181771 change on stable/7 as of today brings
my Flepo back to life. I've attached a slimmed version of the reverse
patch, keeping the comments, code removal and spelling corrections.
--Apple-Mail-3--933801065
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
x-unix-mode=0644;
name=pcipatch.txt
Content-Disposition: attachment;
filename=pcipatch.txt
Index: sys/dev/pci/pci.c
===================================================================
--- sys/dev/pci/pci.c (revision 187693)
+++ sys/dev/pci/pci.c (working copy)
@@ -2395,17 +2395,10 @@
*/
res = resource_list_alloc(rl, bus, dev, type, ®, start, end, count,
prefetch ? RF_PREFETCHABLE : 0);
- if (res == NULL) {
- /*
- * If the allocation fails, clear the BAR and delete
- * the resource list entry to force
- * pci_alloc_resource() to allocate resources from the
- * parent.
- */
- resource_list_delete(rl, type, reg);
- start = 0;
- } else
- start = rman_get_start(res);
+ if (res == NULL)
+ return(barlen);
+ start = rman_get_start(res);
+
pci_write_config(dev, reg, start, 4);
if (ln2range == 64)
pci_write_config(dev, reg + 4, start >> 32, 4);
--Apple-Mail-3--933801065--
More information about the freebsd-i386
mailing list