public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [GIT PATCH] More PCI patches for 2.6.13
@ 2005-09-09 22:07 Greg KH
  2005-09-09 22:37 ` Linus Torvalds
  0 siblings, 1 reply; 29+ messages in thread
From: Greg KH @ 2005-09-09 22:07 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton; +Cc: linux-kernel, linux-pci

Here are some more PCI patches against your latest git tree.  Most of
them were just not applied to the last pci git pull, due to me messing
up the mbox that I applied to the tree.  They have been in the -mm tree
for a while.

The other two patches are a moving around of the pci probe functions so
that ppc has an easier time of future work, and I've sent in a pci quirk
that has been in the -mm tree for a while.

Please pull from:
	rsync://rsync.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/
or if master.kernel.org hasn't synced up yet:
	master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/

The full patches will be sent to the linux-pci mailing lists, if anyone
wants to see them.

thanks,

greg k-h

 drivers/pci/hotplug.c               |   53 ++++++++++++++----------------------
 drivers/pci/hotplug/pciehprm_acpi.c |    8 ++---
 drivers/pci/pci.h                   |    1 
 drivers/pci/probe.c                 |   50 ++++++++++++++++++++++-----------
 drivers/pci/quirks.c                |   12 ++++++++
 include/linux/pci.h                 |   23 ++++++++-------
 6 files changed, 83 insertions(+), 64 deletions(-)


Dave Jones:
  must_check attributes for PCI layer.

Greg Kroah-Hartman:
  PCI: move pci core to use add_hotplug_env_var()

Paul Mackerras:
  PCI: Small rearrangement of PCI probing code

Rajesh Shah:
  PCI: Fix PCI bus mastering enable problem in pciehp

Rumen Ivanov Zarev:
  PCI: Unhide SMBus on Compaq Evo N620c


^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [GIT PATCH] More PCI patches for 2.6.13
@ 2005-09-10 21:07 Alan Stern
  2005-09-10 21:12 ` Linus Torvalds
  0 siblings, 1 reply; 29+ messages in thread
From: Alan Stern @ 2005-09-10 21:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Andrew Morton, Greg KH, Kernel development list

On Fri, 9 Sep 2005, Linus Torvalds wrote:
> 
> On Fri, 9 Sep 2005, Linus Torvalds wrote:
> > 
> > There are functions where it is really _important_ to check the error 
> > return, because they return errors often enough - and the error case is 
> > something you have to do something about - that it's good to force people 
> > to be aware.
> > 
> > But "pci_set_power_state()"?
> > 
> > I don't think so.
> 
> Btw, a perfect example of this is
> 
> 	pci_set_power_state(pdev, 0);
> 
> which is a very common thing to do in a driver init routine. And it has
> absolutely _no_ valid return values: it either succeeds, or it doesn't,
> and the only reason it wouldn't succeed is because the device doesn't
> support power management in the first place (in which case it already
> effectively is in state 0).
> 
> In other words, there's nothing you can or should do about it. Testing the 
> return value is pointless. And thus adding a "must_check" is really really 
> wrong: it might make people do
> 
> 	if (pci_set_power_state(pdev, 0))
> 		return -ENODEV
> 
> which is actually actively the _wrong_ thing to do, and would just cause 
> old revisions of the chip that might not support PM capabilities to no 
> longer work.

Funny you should say this -- exactly that problem _did_ arise.  See

http://marc.theaimsgroup.com/?l=linux-pci&m=112621842604724&w=2

pci_enable_device_bars() would an error when trying to initialize 
devices without PM support, because it started checking the return value
from pci_set_power_state().

Alan Stern


^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [GIT PATCH] More PCI patches for 2.6.13
@ 2005-09-11  2:34 Gabriel A. Devenyi
  0 siblings, 0 replies; 29+ messages in thread
From: Gabriel A. Devenyi @ 2005-09-11  2:34 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

Hi Andrew,

I noticed your mail about this bug in a discussion on PCI patches for 2.6.13, I emailed the list with some info
about this bug, so here it is again, perhaps this can clear up what the problem is, sorry I don't have a patch,
I don't understand the kernel well enough for that.

drivers/pci/probe.c: In function `pci_read_bases':
drivers/pci/probe.c:166: warning: large integer implicitly truncated to unsigned type
drivers/pci/probe.c:216: warning: large integer implicitly truncated to unsigned type

I've tracked this down to pci_size, and two #define's in include/linux/pci.h

#define  PCI_BASE_ADDRESS_MEM_MASK      (~0x0fUL)
#define PCI_ROM_ADDRESS_MASK    (~0x7ffUL)

pci_size expects 3 u32 arguments,but from what I can tell, on 64 bit arch's the two above 
defines expand to 64bit values, and are truncated when being passed.

I'm not sure how to go about fixing this, if pci_size should accept a u64 or if the defines should
be changed. Is this bug dangerous? What should be done to fix it?

-- 
Gabriel A. Devenyi
ace@staticwave.ca

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2005-09-11 11:40 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-09 22:07 [GIT PATCH] More PCI patches for 2.6.13 Greg KH
2005-09-09 22:37 ` Linus Torvalds
2005-09-09 22:54   ` Greg KH
2005-09-09 23:22     ` Linus Torvalds
2005-09-09 23:28       ` Linus Torvalds
2005-09-09 23:36       ` Andrew Morton
2005-09-10  0:22         ` Linus Torvalds
2005-09-10  1:27           ` Jeff Garzik
2005-09-10 18:33       ` John W. Linville
2005-09-10 18:53         ` Linus Torvalds
2005-09-11 11:33           ` Pavel Machek
2005-09-10 10:05     ` Arjan van de Ven
  -- strict thread matches above, loose matches on Subject: below --
2005-09-10 21:07 Alan Stern
2005-09-10 21:12 ` Linus Torvalds
2005-09-10 21:58   ` Jeff Garzik
2005-09-10 22:31     ` Andrew Morton
2005-09-10 22:53       ` Linus Torvalds
2005-09-10 23:44         ` Jeff Garzik
2005-09-11  0:02           ` Linus Torvalds
2005-09-11  0:17             ` Jeff Garzik
2005-09-11  0:27               ` Linus Torvalds
2005-09-10 23:02       ` Pavel Machek
2005-09-11 11:38       ` Pavel Machek
2005-09-10 22:32     ` Alistair John Strachan
2005-09-10 23:47       ` Jeff Garzik
2005-09-11  6:47         ` David Woodhouse
2005-09-11  4:41       ` Greg KH
2005-09-11  6:47         ` Alistair John Strachan
2005-09-11  2:34 Gabriel A. Devenyi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox