mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: PCI: Make PCI device numa-node attribute visible in sysfs PCI: add systems for automatic breadth-first device sorting PCI: PCI devices get assigned redundant IRQs PCI: Make CARDBUS_MEM_SIZE and CARDBUS_IO_SIZE boot options PCI: pci.txt fix __devexit() usage PCI/sysfs/kobject kernel-doc fixes
This commit is contained in:
commit
733abe4fff
@ -1275,6 +1275,12 @@ and is between 256 and 4096 characters. It is defined in the file
|
||||
This sorting is done to get a device
|
||||
order compatible with older (<= 2.4) kernels.
|
||||
nobfsort Don't sort PCI devices into breadth-first order.
|
||||
cbiosize=nn[KMG] The fixed amount of bus space which is
|
||||
reserved for the CardBus bridge's IO window.
|
||||
The default value is 256 bytes.
|
||||
cbmemsize=nn[KMG] The fixed amount of bus space which is
|
||||
reserved for the CardBus bridge's memory
|
||||
window. The default value is 64 megabytes.
|
||||
|
||||
pcmv= [HW,PCMCIA] BadgePAD 4
|
||||
|
||||
|
@ -205,8 +205,8 @@ Tips on when/where to use the above attributes:
|
||||
exclusively called by the probe() routine, can be marked __devinit.
|
||||
Ditto for remove() and __devexit.
|
||||
|
||||
o If mydriver_probe() is marked with __devinit(), then all address
|
||||
references to mydriver_probe must use __devexit_p(mydriver_probe)
|
||||
o If mydriver_remove() is marked with __devexit(), then all address
|
||||
references to mydriver_remove must use __devexit_p(mydriver_remove)
|
||||
(in the struct pci_driver declaration for example).
|
||||
__devexit_p() will generate the function name _or_ NULL if the
|
||||
function will be discarded. For an example, see drivers/net/tg3.c.
|
||||
|
@ -191,6 +191,94 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2950"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL20p G3",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL20p G3"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL20p G4",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL20p G4"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL30p G1",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL30p G1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL25p G1",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL25p G1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL35p G1",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL35p G1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL45p G1",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL45p G1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL45p G2",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL45p G2"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL460c G1",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL460c G1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL465c G1",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL465c G1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL480c G1",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL480c G1"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = set_bf_sort,
|
||||
.ident = "HP ProLiant BL685c G1",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "HP"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "ProLiant BL685c G1"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -415,6 +415,7 @@ static struct kobj_type pci_driver_kobj_type = {
|
||||
* __pci_register_driver - register a new pci driver
|
||||
* @drv: the driver structure to register
|
||||
* @owner: owner module of drv
|
||||
* @mod_name: module name string
|
||||
*
|
||||
* Adds the driver structure to the list of registered drivers.
|
||||
* Returns a negative value on error, otherwise 0.
|
||||
|
@ -143,6 +143,14 @@ static ssize_t is_enabled_show(struct device *dev,
|
||||
return sprintf (buf, "%u\n", atomic_read(&pdev->enable_cnt));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NUMA
|
||||
static ssize_t
|
||||
numa_node_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return sprintf (buf, "%d\n", dev->numa_node);
|
||||
}
|
||||
#endif
|
||||
|
||||
static ssize_t
|
||||
msi_bus_show(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
@ -194,6 +202,9 @@ struct device_attribute pci_dev_attrs[] = {
|
||||
__ATTR_RO(irq),
|
||||
__ATTR_RO(local_cpus),
|
||||
__ATTR_RO(modalias),
|
||||
#ifdef CONFIG_NUMA
|
||||
__ATTR_RO(numa_node),
|
||||
#endif
|
||||
__ATTR(enable, 0600, is_enabled_show, is_enabled_store),
|
||||
__ATTR(broken_parity_status,(S_IRUGO|S_IWUSR),
|
||||
broken_parity_status_show,broken_parity_status_store),
|
||||
|
@ -21,6 +21,12 @@
|
||||
|
||||
unsigned int pci_pm_d3_delay = 10;
|
||||
|
||||
#define DEFAULT_CARDBUS_IO_SIZE (256)
|
||||
#define DEFAULT_CARDBUS_MEM_SIZE (64*1024*1024)
|
||||
/* pci=cbmemsize=nnM,cbiosize=nn can override this */
|
||||
unsigned long pci_cardbus_io_size = DEFAULT_CARDBUS_IO_SIZE;
|
||||
unsigned long pci_cardbus_mem_size = DEFAULT_CARDBUS_MEM_SIZE;
|
||||
|
||||
/**
|
||||
* pci_bus_max_busnr - returns maximum PCI bus number of given bus' children
|
||||
* @bus: pointer to PCI bus structure to search
|
||||
@ -1300,7 +1306,7 @@ pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
|
||||
|
||||
/**
|
||||
* pci_select_bars - Make BAR mask from the type of resource
|
||||
* @pdev: the PCI device for which BAR mask is made
|
||||
* @dev: the PCI device for which BAR mask is made
|
||||
* @flags: resource type mask to be selected
|
||||
*
|
||||
* This helper routine makes bar mask from the type of resource.
|
||||
@ -1333,6 +1339,10 @@ static int __devinit pci_setup(char *str)
|
||||
if (*str && (str = pcibios_setup(str)) && *str) {
|
||||
if (!strcmp(str, "nomsi")) {
|
||||
pci_no_msi();
|
||||
} else if (!strncmp(str, "cbiosize=", 9)) {
|
||||
pci_cardbus_io_size = memparse(str + 9, &str);
|
||||
} else if (!strncmp(str, "cbmemsize=", 10)) {
|
||||
pci_cardbus_mem_size = memparse(str + 10, &str);
|
||||
} else {
|
||||
printk(KERN_ERR "PCI: Unknown option `%s'\n",
|
||||
str);
|
||||
|
@ -36,13 +36,6 @@
|
||||
|
||||
#define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1))
|
||||
|
||||
/*
|
||||
* FIXME: IO should be max 256 bytes. However, since we may
|
||||
* have a P2P bridge below a cardbus bridge, we need 4K.
|
||||
*/
|
||||
#define CARDBUS_IO_SIZE (256)
|
||||
#define CARDBUS_MEM_SIZE (64*1024*1024)
|
||||
|
||||
static void __devinit
|
||||
pbus_assign_resources_sorted(struct pci_bus *bus)
|
||||
{
|
||||
@ -415,12 +408,12 @@ pci_bus_size_cardbus(struct pci_bus *bus)
|
||||
* Reserve some resources for CardBus. We reserve
|
||||
* a fixed amount of bus space for CardBus bridges.
|
||||
*/
|
||||
b_res[0].start = CARDBUS_IO_SIZE;
|
||||
b_res[0].end = b_res[0].start + CARDBUS_IO_SIZE - 1;
|
||||
b_res[0].start = pci_cardbus_io_size;
|
||||
b_res[0].end = b_res[0].start + pci_cardbus_io_size - 1;
|
||||
b_res[0].flags |= IORESOURCE_IO;
|
||||
|
||||
b_res[1].start = CARDBUS_IO_SIZE;
|
||||
b_res[1].end = b_res[1].start + CARDBUS_IO_SIZE - 1;
|
||||
b_res[1].start = pci_cardbus_io_size;
|
||||
b_res[1].end = b_res[1].start + pci_cardbus_io_size - 1;
|
||||
b_res[1].flags |= IORESOURCE_IO;
|
||||
|
||||
/*
|
||||
@ -440,16 +433,16 @@ pci_bus_size_cardbus(struct pci_bus *bus)
|
||||
* twice the size.
|
||||
*/
|
||||
if (ctrl & PCI_CB_BRIDGE_CTL_PREFETCH_MEM0) {
|
||||
b_res[2].start = CARDBUS_MEM_SIZE;
|
||||
b_res[2].end = b_res[2].start + CARDBUS_MEM_SIZE - 1;
|
||||
b_res[2].start = pci_cardbus_mem_size;
|
||||
b_res[2].end = b_res[2].start + pci_cardbus_mem_size - 1;
|
||||
b_res[2].flags |= IORESOURCE_MEM | IORESOURCE_PREFETCH;
|
||||
|
||||
b_res[3].start = CARDBUS_MEM_SIZE;
|
||||
b_res[3].end = b_res[3].start + CARDBUS_MEM_SIZE - 1;
|
||||
b_res[3].start = pci_cardbus_mem_size;
|
||||
b_res[3].end = b_res[3].start + pci_cardbus_mem_size - 1;
|
||||
b_res[3].flags |= IORESOURCE_MEM;
|
||||
} else {
|
||||
b_res[3].start = CARDBUS_MEM_SIZE * 2;
|
||||
b_res[3].end = b_res[3].start + CARDBUS_MEM_SIZE * 2 - 1;
|
||||
b_res[3].start = pci_cardbus_mem_size * 2;
|
||||
b_res[3].end = b_res[3].start + pci_cardbus_mem_size * 2 - 1;
|
||||
b_res[3].flags |= IORESOURCE_MEM;
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ pdev_fixup_irq(struct pci_dev *dev,
|
||||
int (*map_irq)(struct pci_dev *, u8, u8))
|
||||
{
|
||||
u8 pin, slot;
|
||||
int irq;
|
||||
int irq = 0;
|
||||
|
||||
/* If this device is not on the primary bus, we need to figure out
|
||||
which interrupt pin it will come in on. We know which slot it
|
||||
@ -33,16 +33,18 @@ pdev_fixup_irq(struct pci_dev *dev,
|
||||
apply the swizzle function. */
|
||||
|
||||
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
|
||||
/* Cope with 0 and illegal. */
|
||||
if (pin == 0 || pin > 4)
|
||||
/* Cope with illegal. */
|
||||
if (pin > 4)
|
||||
pin = 1;
|
||||
|
||||
/* Follow the chain of bridges, swizzling as we go. */
|
||||
slot = (*swizzle)(dev, &pin);
|
||||
if (pin != 0) {
|
||||
/* Follow the chain of bridges, swizzling as we go. */
|
||||
slot = (*swizzle)(dev, &pin);
|
||||
|
||||
irq = (*map_irq)(dev, slot, pin);
|
||||
if (irq == -1)
|
||||
irq = 0;
|
||||
irq = (*map_irq)(dev, slot, pin);
|
||||
if (irq == -1)
|
||||
irq = 0;
|
||||
}
|
||||
dev->irq = irq;
|
||||
|
||||
pr_debug("PCI: fixup irq: (%s) got %d\n",
|
||||
|
@ -54,7 +54,7 @@ static struct sysfs_ops subsys_sysfs_ops = {
|
||||
/**
|
||||
* add_to_collection - add buffer to a collection
|
||||
* @buffer: buffer to be added
|
||||
* @node inode of set to add to
|
||||
* @node: inode of set to add to
|
||||
*/
|
||||
|
||||
static inline void
|
||||
|
@ -854,5 +854,8 @@ extern int pci_pci_problems;
|
||||
#define PCIPCI_ALIMAGIK 32 /* Need low latency setting */
|
||||
#define PCIAGP_FAIL 64 /* No PCI to AGP DMA */
|
||||
|
||||
extern unsigned long pci_cardbus_io_size;
|
||||
extern unsigned long pci_cardbus_mem_size;
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
#endif /* LINUX_PCI_H */
|
||||
|
@ -326,6 +326,7 @@ int kobject_rename(struct kobject * kobj, const char *new_name)
|
||||
/**
|
||||
* kobject_rename - change the name of an object
|
||||
* @kobj: object in question.
|
||||
* @new_parent: object's new parent
|
||||
* @new_name: object's new name
|
||||
*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user