mirror of
https://github.com/adulau/aha.git
synced 2025-01-05 15:43:22 +00:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: Documentation: fix minor PCIe HOWTO thinko PCI: fix missing kernel-doc and typos PCI: fix struct pci_platform_pm_ops kernel-doc PCI: fix rom.c kernel-doc warning PCI/MSI: fix msi_mask() shift fix
This commit is contained in:
commit
c951aa62d5
5 changed files with 25 additions and 21 deletions
|
@ -93,7 +93,7 @@ the PCI Express Port Bus driver from loading a service driver.
|
||||||
|
|
||||||
int pcie_port_service_register(struct pcie_port_service_driver *new)
|
int pcie_port_service_register(struct pcie_port_service_driver *new)
|
||||||
|
|
||||||
This API replaces the Linux Driver Model's pci_module_init API. A
|
This API replaces the Linux Driver Model's pci_register_driver API. A
|
||||||
service driver should always calls pcie_port_service_register at
|
service driver should always calls pcie_port_service_register at
|
||||||
module init. Note that after service driver being loaded, calls
|
module init. Note that after service driver being loaded, calls
|
||||||
such as pci_enable_device(dev) and pci_set_master(dev) are no longer
|
such as pci_enable_device(dev) and pci_set_master(dev) are no longer
|
||||||
|
|
|
@ -103,14 +103,12 @@ static void msix_set_enable(struct pci_dev *dev, int enable)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Essentially, this is ((1 << (1 << x)) - 1), but without the
|
|
||||||
* undefinedness of a << 32.
|
|
||||||
*/
|
|
||||||
static inline __attribute_const__ u32 msi_mask(unsigned x)
|
static inline __attribute_const__ u32 msi_mask(unsigned x)
|
||||||
{
|
{
|
||||||
static const u32 mask[] = { 1, 2, 4, 0xf, 0xff, 0xffff, 0xffffffff };
|
/* Don't shift by >= width of type */
|
||||||
return mask[x];
|
if (x >= 5)
|
||||||
|
return 0xffffffff;
|
||||||
|
return (1 << (1 << x)) - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void msix_flush_writes(struct irq_desc *desc)
|
static void msix_flush_writes(struct irq_desc *desc)
|
||||||
|
|
|
@ -1540,16 +1540,21 @@ void pci_release_region(struct pci_dev *pdev, int bar)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pci_request_region - Reserved PCI I/O and memory resource
|
* __pci_request_region - Reserved PCI I/O and memory resource
|
||||||
* @pdev: PCI device whose resources are to be reserved
|
* @pdev: PCI device whose resources are to be reserved
|
||||||
* @bar: BAR to be reserved
|
* @bar: BAR to be reserved
|
||||||
* @res_name: Name to be associated with resource.
|
* @res_name: Name to be associated with resource.
|
||||||
|
* @exclusive: whether the region access is exclusive or not
|
||||||
*
|
*
|
||||||
* Mark the PCI region associated with PCI device @pdev BR @bar as
|
* Mark the PCI region associated with PCI device @pdev BR @bar as
|
||||||
* being reserved by owner @res_name. Do not access any
|
* being reserved by owner @res_name. Do not access any
|
||||||
* address inside the PCI regions unless this call returns
|
* address inside the PCI regions unless this call returns
|
||||||
* successfully.
|
* successfully.
|
||||||
*
|
*
|
||||||
|
* If @exclusive is set, then the region is marked so that userspace
|
||||||
|
* is explicitly not allowed to map the resource via /dev/mem or
|
||||||
|
* sysfs MMIO access.
|
||||||
|
*
|
||||||
* Returns 0 on success, or %EBUSY on error. A warning
|
* Returns 0 on success, or %EBUSY on error. A warning
|
||||||
* message is also printed on failure.
|
* message is also printed on failure.
|
||||||
*/
|
*/
|
||||||
|
@ -1588,12 +1593,12 @@ err_out:
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pci_request_region - Reserved PCI I/O and memory resource
|
* pci_request_region - Reserve PCI I/O and memory resource
|
||||||
* @pdev: PCI device whose resources are to be reserved
|
* @pdev: PCI device whose resources are to be reserved
|
||||||
* @bar: BAR to be reserved
|
* @bar: BAR to be reserved
|
||||||
* @res_name: Name to be associated with resource.
|
* @res_name: Name to be associated with resource
|
||||||
*
|
*
|
||||||
* Mark the PCI region associated with PCI device @pdev BR @bar as
|
* Mark the PCI region associated with PCI device @pdev BAR @bar as
|
||||||
* being reserved by owner @res_name. Do not access any
|
* being reserved by owner @res_name. Do not access any
|
||||||
* address inside the PCI regions unless this call returns
|
* address inside the PCI regions unless this call returns
|
||||||
* successfully.
|
* successfully.
|
||||||
|
|
|
@ -16,21 +16,21 @@ extern int pci_mmap_fits(struct pci_dev *pdev, int resno,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Firmware PM callbacks
|
* struct pci_platform_pm_ops - Firmware PM callbacks
|
||||||
*
|
*
|
||||||
* @is_manageable - returns 'true' if given device is power manageable by the
|
* @is_manageable: returns 'true' if given device is power manageable by the
|
||||||
* platform firmware
|
* platform firmware
|
||||||
*
|
*
|
||||||
* @set_state - invokes the platform firmware to set the device's power state
|
* @set_state: invokes the platform firmware to set the device's power state
|
||||||
*
|
*
|
||||||
* @choose_state - returns PCI power state of given device preferred by the
|
* @choose_state: returns PCI power state of given device preferred by the
|
||||||
* platform; to be used during system-wide transitions from a
|
* platform; to be used during system-wide transitions from a
|
||||||
* sleeping state to the working state and vice versa
|
* sleeping state to the working state and vice versa
|
||||||
*
|
*
|
||||||
* @can_wakeup - returns 'true' if given device is capable of waking up the
|
* @can_wakeup: returns 'true' if given device is capable of waking up the
|
||||||
* system from a sleeping state
|
* system from a sleeping state
|
||||||
*
|
*
|
||||||
* @sleep_wake - enables/disables the system wake up capability of given device
|
* @sleep_wake: enables/disables the system wake up capability of given device
|
||||||
*
|
*
|
||||||
* If given platform is generally capable of power managing PCI devices, all of
|
* If given platform is generally capable of power managing PCI devices, all of
|
||||||
* these callbacks are mandatory.
|
* these callbacks are mandatory.
|
||||||
|
|
|
@ -55,6 +55,7 @@ void pci_disable_rom(struct pci_dev *pdev)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pci_get_rom_size - obtain the actual size of the ROM image
|
* pci_get_rom_size - obtain the actual size of the ROM image
|
||||||
|
* @pdev: target PCI device
|
||||||
* @rom: kernel virtual pointer to image of ROM
|
* @rom: kernel virtual pointer to image of ROM
|
||||||
* @size: size of PCI window
|
* @size: size of PCI window
|
||||||
* return: size of actual ROM image
|
* return: size of actual ROM image
|
||||||
|
|
Loading…
Reference in a new issue