Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 261156
b: refs/heads/master
c: db34a36
h: refs/heads/master
v: v3
  • Loading branch information
Jan Beulich authored and Jesse Barnes committed Jul 22, 2011
1 parent eb7b99b commit e604f01
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 688398bb7b9c6ac115da7749ea808d3ef69e029f
refs/heads/master: db34a363b992e0c8063f432607561520d79fbfb8
2 changes: 2 additions & 0 deletions trunk/arch/x86/pci/ce4100.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ static int ce4100_conf_read(unsigned int seg, unsigned int bus,
{
int i;

WARN_ON(seg);
if (bus == 1) {
for (i = 0; i < ARRAY_SIZE(bus1_fixups); i++) {
if (bus1_fixups[i].dev_func == devfn &&
Expand All @@ -282,6 +283,7 @@ static int ce4100_conf_write(unsigned int seg, unsigned int bus,
{
int i;

WARN_ON(seg);
if (bus == 1) {
for (i = 0; i < ARRAY_SIZE(bus1_fixups); i++) {
if (bus1_fixups[i].dev_func == devfn &&
Expand Down
6 changes: 4 additions & 2 deletions trunk/arch/x86/pci/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus,
{
unsigned long flags;

if ((bus > 255) || (devfn > 255) || (reg > 4095)) {
if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) {
*value = -1;
return -EINVAL;
}
Expand Down Expand Up @@ -53,7 +53,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus,
{
unsigned long flags;

if ((bus > 255) || (devfn > 255) || (reg > 4095))
if (seg || (bus > 255) || (devfn > 255) || (reg > 4095))
return -EINVAL;

raw_spin_lock_irqsave(&pci_config_lock, flags);
Expand Down Expand Up @@ -97,6 +97,7 @@ static int pci_conf2_read(unsigned int seg, unsigned int bus,
unsigned long flags;
int dev, fn;

WARN_ON(seg);
if ((bus > 255) || (devfn > 255) || (reg > 255)) {
*value = -1;
return -EINVAL;
Expand Down Expand Up @@ -138,6 +139,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus,
unsigned long flags;
int dev, fn;

WARN_ON(seg);
if ((bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;

Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/pci/numaq_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ static int pci_conf1_mq_read(unsigned int seg, unsigned int bus,
unsigned long flags;
void *adr __iomem = XQUAD_PORT_ADDR(0xcfc, BUS2QUAD(bus));

WARN_ON(seg);
if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255))
return -EINVAL;

Expand Down Expand Up @@ -73,6 +74,7 @@ static int pci_conf1_mq_write(unsigned int seg, unsigned int bus,
unsigned long flags;
void *adr __iomem = XQUAD_PORT_ADDR(0xcfc, BUS2QUAD(bus));

WARN_ON(seg);
if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255))
return -EINVAL;

Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/x86/pci/olpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ static int pci_olpc_read(unsigned int seg, unsigned int bus,
{
uint32_t *addr;

WARN_ON(seg);

/* Use the hardware mechanism for non-simulated devices */
if (!is_simulated(bus, devfn))
return pci_direct_conf1.read(seg, bus, devfn, reg, len, value);
Expand Down Expand Up @@ -264,6 +266,8 @@ static int pci_olpc_read(unsigned int seg, unsigned int bus,
static int pci_olpc_write(unsigned int seg, unsigned int bus,
unsigned int devfn, int reg, int len, uint32_t value)
{
WARN_ON(seg);

/* Use the hardware mechanism for non-simulated devices */
if (!is_simulated(bus, devfn))
return pci_direct_conf1.write(seg, bus, devfn, reg, len, value);
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/x86/pci/pcbios.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ static int pci_bios_read(unsigned int seg, unsigned int bus,
unsigned long flags;
unsigned long bx = (bus << 8) | devfn;

WARN_ON(seg);
if (!value || (bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;

Expand Down Expand Up @@ -247,6 +248,7 @@ static int pci_bios_write(unsigned int seg, unsigned int bus,
unsigned long flags;
unsigned long bx = (bus << 8) | devfn;

WARN_ON(seg);
if ((bus > 255) || (devfn > 255) || (reg > 255))
return -EINVAL;

Expand Down

0 comments on commit e604f01

Please sign in to comment.