Commit 6b90e276 authored by Linus Torvalds's avatar Linus Torvalds

Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6

into home.osdl.org:/home/torvalds/v2.5/linux
parents 5d03987b fce17a38
......@@ -187,7 +187,6 @@ static int bt832_attach(struct i2c_adapter *adap, int addr,
t->client.data = t;
i2c_attach_client(&t->client);
MOD_INC_USE_COUNT;
if(! bt832_init(&t->client)) {
bt832_detach(&t->client);
return -1;
......@@ -210,7 +209,6 @@ static int bt832_detach(struct i2c_client *client)
printk("bt832: detach.\n");
i2c_detach_client(client);
kfree(t);
MOD_DEC_USE_COUNT;
return 0;
}
......
......@@ -214,7 +214,6 @@ static int saa5249_attach(struct i2c_adapter *adap, int addr, int kind)
}
t->client = client;
i2c_attach_client(client);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -237,7 +236,6 @@ static int saa5249_detach(struct i2c_client *client)
kfree(vd->priv);
kfree(vd);
kfree(client);
MOD_DEC_USE_COUNT;
return 0;
}
......
......@@ -134,7 +134,6 @@ tuner_attach(struct i2c_adapter *adap, int addr, int kind)
printk("tuner: SAB3036 found, status %02x\n", tuner_getstatus(client));
i2c_attach_client(client);
MOD_INC_USE_COUNT;
if (i2c_master_send(client, buffer, 2) != 2)
printk("tuner: i2c i/o error 1\n");
......@@ -148,7 +147,6 @@ tuner_attach(struct i2c_adapter *adap, int addr, int kind)
static int
tuner_detach(struct i2c_client *c)
{
MOD_DEC_USE_COUNT;
return 0;
}
......
......@@ -132,13 +132,19 @@ pci_setup_cardbus(struct pci_bus *bus)
PCI-to-PCI Bridge Architecture Specification rev. 1.1 (1998)
requires that if there is no I/O ports or memory behind the
bridge, corresponding range must be turned off by writing base
value greater than limit to the bridge's base/limit registers. */
value greater than limit to the bridge's base/limit registers.
Note: care must be taken when updating I/O base/limit registers
of bridges which support 32-bit I/O. This update requires two
config space writes, so it's quite possible that an I/O window of
the bridge will have some undesirable address (e.g. 0) after the
first write. Ditto 64-bit prefetchable MMIO. */
static void __devinit
pci_setup_bridge(struct pci_bus *bus)
{
struct pci_dev *bridge = bus->self;
struct pci_bus_region region;
u32 l;
u32 l, io_upper16;
DBGC((KERN_INFO "PCI: Bus %d, bridge: %s\n",
bus->number, pci_name(bridge)));
......@@ -151,20 +157,22 @@ pci_setup_bridge(struct pci_bus *bus)
l |= (region.start >> 8) & 0x00f0;
l |= region.end & 0xf000;
/* Set up upper 16 bits of I/O base/limit. */
pci_write_config_word(bridge, PCI_IO_BASE_UPPER16,
region.start >> 16);
pci_write_config_word(bridge, PCI_IO_LIMIT_UPPER16,
region.end >> 16);
io_upper16 = (region.end & 0xffff0000) | (region.start >> 16);
DBGC((KERN_INFO " IO window: %04lx-%04lx\n",
region.start, region.end));
}
else {
/* Clear upper 16 bits of I/O base/limit. */
pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, 0);
io_upper16 = 0;
l = 0x00f0;
DBGC((KERN_INFO " IO window: disabled.\n"));
}
/* Temporarily disable the I/O range before updating PCI_IO_BASE. */
pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, 0x0000ffff);
/* Update lower 16 bits of I/O base/limit. */
pci_write_config_dword(bridge, PCI_IO_BASE, l);
/* Update upper 16 bits of I/O base/limit. */
pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, io_upper16);
/* Set up the top and bottom of the PCI Memory segment
for this bus. */
......@@ -181,8 +189,9 @@ pci_setup_bridge(struct pci_bus *bus)
}
pci_write_config_dword(bridge, PCI_MEMORY_BASE, l);
/* Clear out the upper 32 bits of PREF base/limit. */
pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, 0);
/* Clear out the upper 32 bits of PREF limit.
If PCI_PREF_BASE_UPPER32 was non-zero, this temporarily
disables PREF range, which is ok. */
pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, 0);
/* Set up PREF base/limit. */
......@@ -199,6 +208,9 @@ pci_setup_bridge(struct pci_bus *bus)
}
pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, l);
/* Clear out the upper 32 bits of PREF base. */
pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, 0);
/* Check if we have VGA behind the bridge.
Enable ISA in either case (FIXME!). */
l = (bus->resource[0]->flags & IORESOURCE_BUS_HAS_VGA) ? 0x0c : 0x04;
......
......@@ -73,7 +73,7 @@ config USB_SERIAL_BELKIN
config USB_SERIAL_WHITEHEAT
tristate "USB ConnectTech WhiteHEAT Serial Driver"
depends on USB_SERIAL
depends on USB_SERIAL && BROKEN_ON_SMP
help
Say Y here if you want to use a ConnectTech WhiteHEAT 4 port
USB to serial converter device.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment