Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2009 23:00:02 GMT
From:      Markus Hitter <mah@jump-ing.de>
To:        freebsd-i386@FreeBSD.org
Subject:   Re: i386/130957: /sys/dev/pci/pci.c revision 181771 breaks networking and the power button
Message-ID:  <200901252300.n0PN02eD036574@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/130957; it has been noted by GNATS.

From: Markus Hitter <mah@jump-ing.de>
To: bug-followup@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, &reg, 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901252300.n0PN02eD036574>