mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
Merge branch 'pci/deprecate-get-bus-and-slot' into next
* pci/deprecate-get-bus-and-slot: video: fbdev: riva: deprecate pci_get_bus_and_slot() video: fbdev: nvidia: deprecate pci_get_bus_and_slot() video: fbdev: intelfb: deprecate pci_get_bus_and_slot() openprom: Deprecate pci_get_bus_and_slot() xen/pcifront: Deprecate pci_get_bus_and_slot() PCI: Deprecate pci_get_bus_and_slot() PCI: ibmphp: Deprecate pci_get_bus_and_slot() PCI: cpqhp: Deprecate pci_get_bus_and_slot() pch_gbe: Deprecate pci_get_bus_and_slot() bnx2x: Deprecate pci_get_bus_and_slot() powerpc/via-pmu: Deprecate pci_get_bus_and_slot() iommu/amd: Deprecate pci_get_bus_and_slot() sl82c105: deprecate pci_get_bus_and_slot() drm/nouveau: deprecate pci_get_bus_and_slot() drm/gma500: Deprecate pci_get_bus_and_slot() ibft: Deprecate pci_get_bus_and_slot() edd: Deprecate pci_get_bus_and_slot() agp: sworks: Deprecate pci_get_bus_and_slot() agp: nvidia: Deprecate pci_get_bus_and_slot() ata: Deprecate pci_get_bus_and_slot() x86/PCI: Deprecate pci_get_bus_and_slot() powerpc/PCI: Deprecate pci_get_bus_and_slot() alpha/PCI: Deprecate pci_get_bus_and_slot()
This commit is contained in:
commit
b0b7f9cde5
41 changed files with 174 additions and 89 deletions
|
@ -425,7 +425,7 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
|
|||
if (bus == 0 && dfn == 0) {
|
||||
hose = pci_isa_hose;
|
||||
} else {
|
||||
dev = pci_get_bus_and_slot(bus, dfn);
|
||||
dev = pci_get_domain_bus_and_slot(0, bus, dfn);
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
hose = dev->sysdata;
|
||||
|
|
|
@ -237,7 +237,7 @@ nautilus_init_pci(void)
|
|||
bus = hose->bus = bridge->bus;
|
||||
pcibios_claim_one_bus(bus);
|
||||
|
||||
irongate = pci_get_bus_and_slot(0, 0);
|
||||
irongate = pci_get_domain_bus_and_slot(pci_domain_nr(bus), 0, 0);
|
||||
bus->self = irongate;
|
||||
bus->resource[0] = &irongate_io;
|
||||
bus->resource[1] = &irongate_mem;
|
||||
|
|
|
@ -96,7 +96,8 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
|
|||
reg = of_get_property(node, "reg", NULL);
|
||||
if (!reg)
|
||||
continue;
|
||||
dev = pci_get_bus_and_slot(pci_bus, ((reg[0] >> 8) & 0xff));
|
||||
dev = pci_get_domain_bus_and_slot(0, pci_bus,
|
||||
((reg[0] >> 8) & 0xff));
|
||||
if (!dev || !dev->subordinate) {
|
||||
pci_dev_put(dev);
|
||||
continue;
|
||||
|
|
|
@ -829,7 +829,7 @@ core99_ata100_enable(struct device_node *node, long value)
|
|||
|
||||
if (value) {
|
||||
if (pci_device_from_OF_node(node, &pbus, &pid) == 0)
|
||||
pdev = pci_get_bus_and_slot(pbus, pid);
|
||||
pdev = pci_get_domain_bus_and_slot(0, pbus, pid);
|
||||
if (pdev == NULL)
|
||||
return 0;
|
||||
rc = pci_enable_device(pdev);
|
||||
|
|
|
@ -37,7 +37,7 @@ static ssize_t mv64x60_hs_reg_read(struct file *filp, struct kobject *kobj,
|
|||
if (count < MV64X60_VAL_LEN_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
phb = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
|
||||
phb = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
|
||||
if (!phb)
|
||||
return -ENODEV;
|
||||
pci_read_config_dword(phb, MV64X60_PCICFG_CPCI_HOTSWAP, &v);
|
||||
|
@ -61,7 +61,7 @@ static ssize_t mv64x60_hs_reg_write(struct file *filp, struct kobject *kobj,
|
|||
if (sscanf(buf, "%i", &v) != 1)
|
||||
return -EINVAL;
|
||||
|
||||
phb = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
|
||||
phb = pci_get_domain_bus_and_slot(0, 0, PCI_DEVFN(0, 0));
|
||||
if (!phb)
|
||||
return -ENODEV;
|
||||
pci_write_config_dword(phb, MV64X60_PCICFG_CPCI_HOTSWAP, v);
|
||||
|
|
|
@ -839,7 +839,8 @@ static void __init pirq_find_router(struct irq_router *r)
|
|||
DBG(KERN_DEBUG "PCI: Attempting to find IRQ router for [%04x:%04x]\n",
|
||||
rt->rtr_vendor, rt->rtr_device);
|
||||
|
||||
pirq_router_dev = pci_get_bus_and_slot(rt->rtr_bus, rt->rtr_devfn);
|
||||
pirq_router_dev = pci_get_domain_bus_and_slot(0, rt->rtr_bus,
|
||||
rt->rtr_devfn);
|
||||
if (!pirq_router_dev) {
|
||||
DBG(KERN_DEBUG "PCI: Interrupt router not found at "
|
||||
"%02x:%02x\n", rt->rtr_bus, rt->rtr_devfn);
|
||||
|
|
|
@ -466,7 +466,8 @@ static void ali_init_chipset(struct pci_dev *pdev)
|
|||
tmp |= 0x01; /* CD_ROM enable for DMA */
|
||||
pci_write_config_byte(pdev, 0x53, tmp);
|
||||
}
|
||||
north = pci_get_bus_and_slot(0, PCI_DEVFN(0,0));
|
||||
north = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus), 0,
|
||||
PCI_DEVFN(0, 0));
|
||||
if (north && north->vendor == PCI_VENDOR_ID_AL && ali_isa_bridge) {
|
||||
/* Configure the ALi bridge logic. For non ALi rely on BIOS.
|
||||
Set the south bridge enable bit */
|
||||
|
|
|
@ -340,11 +340,17 @@ static int agp_nvidia_probe(struct pci_dev *pdev,
|
|||
u8 cap_ptr;
|
||||
|
||||
nvidia_private.dev_1 =
|
||||
pci_get_bus_and_slot((unsigned int)pdev->bus->number, PCI_DEVFN(0, 1));
|
||||
pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
|
||||
(unsigned int)pdev->bus->number,
|
||||
PCI_DEVFN(0, 1));
|
||||
nvidia_private.dev_2 =
|
||||
pci_get_bus_and_slot((unsigned int)pdev->bus->number, PCI_DEVFN(0, 2));
|
||||
pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
|
||||
(unsigned int)pdev->bus->number,
|
||||
PCI_DEVFN(0, 2));
|
||||
nvidia_private.dev_3 =
|
||||
pci_get_bus_and_slot((unsigned int)pdev->bus->number, PCI_DEVFN(30, 0));
|
||||
pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
|
||||
(unsigned int)pdev->bus->number,
|
||||
PCI_DEVFN(30, 0));
|
||||
|
||||
if (!nvidia_private.dev_1 || !nvidia_private.dev_2 || !nvidia_private.dev_3) {
|
||||
printk(KERN_INFO PFX "Detected an NVIDIA nForce/nForce2 "
|
||||
|
|
|
@ -474,7 +474,8 @@ static int agp_serverworks_probe(struct pci_dev *pdev,
|
|||
}
|
||||
|
||||
/* Everything is on func 1 here so we are hardcoding function one */
|
||||
bridge_dev = pci_get_bus_and_slot((unsigned int)pdev->bus->number,
|
||||
bridge_dev = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
|
||||
(unsigned int)pdev->bus->number,
|
||||
PCI_DEVFN(0, 1));
|
||||
if (!bridge_dev) {
|
||||
dev_info(&pdev->dev, "can't find secondary device\n");
|
||||
|
|
|
@ -669,10 +669,10 @@ edd_get_pci_dev(struct edd_device *edev)
|
|||
struct edd_info *info = edd_dev_get_info(edev);
|
||||
|
||||
if (edd_dev_is_type(edev, "PCI") || edd_dev_is_type(edev, "XPRS")) {
|
||||
return pci_get_bus_and_slot(info->params.interface_path.pci.bus,
|
||||
PCI_DEVFN(info->params.interface_path.pci.slot,
|
||||
info->params.interface_path.pci.
|
||||
function));
|
||||
return pci_get_domain_bus_and_slot(0,
|
||||
info->params.interface_path.pci.bus,
|
||||
PCI_DEVFN(info->params.interface_path.pci.slot,
|
||||
info->params.interface_path.pci.function));
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -719,8 +719,9 @@ static int __init ibft_create_kobject(struct acpi_table_ibft *header,
|
|||
* executes only devices which are in domain 0. Furthermore, the
|
||||
* iBFT spec doesn't have a domain id field :-(
|
||||
*/
|
||||
pci_dev = pci_get_bus_and_slot((nic->pci_bdf & 0xff00) >> 8,
|
||||
(nic->pci_bdf & 0xff));
|
||||
pci_dev = pci_get_domain_bus_and_slot(0,
|
||||
(nic->pci_bdf & 0xff00) >> 8,
|
||||
(nic->pci_bdf & 0xff));
|
||||
if (pci_dev) {
|
||||
rc = sysfs_create_link(&boot_kobj->kobj,
|
||||
&pci_dev->dev.kobj, "device");
|
||||
|
|
|
@ -185,21 +185,22 @@ static int cdv_backlight_init(struct drm_device *dev)
|
|||
* for this and the MID devices.
|
||||
*/
|
||||
|
||||
static inline u32 CDV_MSG_READ32(uint port, uint offset)
|
||||
static inline u32 CDV_MSG_READ32(int domain, uint port, uint offset)
|
||||
{
|
||||
int mcr = (0x10<<24) | (port << 16) | (offset << 8);
|
||||
uint32_t ret_val = 0;
|
||||
struct pci_dev *pci_root = pci_get_bus_and_slot(0, 0);
|
||||
struct pci_dev *pci_root = pci_get_domain_bus_and_slot(domain, 0, 0);
|
||||
pci_write_config_dword(pci_root, 0xD0, mcr);
|
||||
pci_read_config_dword(pci_root, 0xD4, &ret_val);
|
||||
pci_dev_put(pci_root);
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
static inline void CDV_MSG_WRITE32(uint port, uint offset, u32 value)
|
||||
static inline void CDV_MSG_WRITE32(int domain, uint port, uint offset,
|
||||
u32 value)
|
||||
{
|
||||
int mcr = (0x11<<24) | (port << 16) | (offset << 8) | 0xF0;
|
||||
struct pci_dev *pci_root = pci_get_bus_and_slot(0, 0);
|
||||
struct pci_dev *pci_root = pci_get_domain_bus_and_slot(domain, 0, 0);
|
||||
pci_write_config_dword(pci_root, 0xD4, value);
|
||||
pci_write_config_dword(pci_root, 0xD0, mcr);
|
||||
pci_dev_put(pci_root);
|
||||
|
@ -216,11 +217,12 @@ static void cdv_init_pm(struct drm_device *dev)
|
|||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
u32 pwr_cnt;
|
||||
int domain = pci_domain_nr(dev->pdev->bus);
|
||||
int i;
|
||||
|
||||
dev_priv->apm_base = CDV_MSG_READ32(PSB_PUNIT_PORT,
|
||||
dev_priv->apm_base = CDV_MSG_READ32(domain, PSB_PUNIT_PORT,
|
||||
PSB_APMBA) & 0xFFFF;
|
||||
dev_priv->ospm_base = CDV_MSG_READ32(PSB_PUNIT_PORT,
|
||||
dev_priv->ospm_base = CDV_MSG_READ32(domain, PSB_PUNIT_PORT,
|
||||
PSB_OSPMBA) & 0xFFFF;
|
||||
|
||||
/* Power status */
|
||||
|
@ -251,7 +253,7 @@ static void cdv_errata(struct drm_device *dev)
|
|||
* Bonus Launch to work around the issue, by degrading
|
||||
* performance.
|
||||
*/
|
||||
CDV_MSG_WRITE32(3, 0x30, 0x08027108);
|
||||
CDV_MSG_WRITE32(pci_domain_nr(dev->pdev->bus), 3, 0x30, 0x08027108);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
void gma_get_core_freq(struct drm_device *dev)
|
||||
{
|
||||
uint32_t clock;
|
||||
struct pci_dev *pci_root = pci_get_bus_and_slot(0, 0);
|
||||
struct pci_dev *pci_root =
|
||||
pci_get_domain_bus_and_slot(pci_domain_nr(dev->pdev->bus),
|
||||
0, 0);
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
|
||||
/*pci_write_config_dword(pci_root, 0xD4, 0x00C32004);*/
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
static void mid_get_fuse_settings(struct drm_device *dev)
|
||||
{
|
||||
struct drm_psb_private *dev_priv = dev->dev_private;
|
||||
struct pci_dev *pci_root = pci_get_bus_and_slot(0, 0);
|
||||
struct pci_dev *pci_root =
|
||||
pci_get_domain_bus_and_slot(pci_domain_nr(dev->pdev->bus),
|
||||
0, 0);
|
||||
uint32_t fuse_value = 0;
|
||||
uint32_t fuse_value_tmp = 0;
|
||||
|
||||
|
@ -104,7 +106,9 @@ static void mid_get_fuse_settings(struct drm_device *dev)
|
|||
static void mid_get_pci_revID(struct drm_psb_private *dev_priv)
|
||||
{
|
||||
uint32_t platform_rev_id = 0;
|
||||
struct pci_dev *pci_gfx_root = pci_get_bus_and_slot(0, PCI_DEVFN(2, 0));
|
||||
int domain = pci_domain_nr(dev_priv->dev->pdev->bus);
|
||||
struct pci_dev *pci_gfx_root =
|
||||
pci_get_domain_bus_and_slot(domain, 0, PCI_DEVFN(2, 0));
|
||||
|
||||
if (pci_gfx_root == NULL) {
|
||||
WARN_ON(1);
|
||||
|
@ -281,7 +285,9 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv)
|
|||
u32 addr;
|
||||
u8 __iomem *vbt_virtual;
|
||||
struct mid_vbt_header vbt_header;
|
||||
struct pci_dev *pci_gfx_root = pci_get_bus_and_slot(0, PCI_DEVFN(2, 0));
|
||||
struct pci_dev *pci_gfx_root =
|
||||
pci_get_domain_bus_and_slot(pci_domain_nr(dev->pdev->bus),
|
||||
0, PCI_DEVFN(2, 0));
|
||||
int ret = -1;
|
||||
|
||||
/* Get the address of the platform config vbt */
|
||||
|
|
|
@ -261,7 +261,11 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
|
|||
goto out_err;
|
||||
|
||||
if (IS_MRST(dev)) {
|
||||
dev_priv->aux_pdev = pci_get_bus_and_slot(0, PCI_DEVFN(3, 0));
|
||||
int domain = pci_domain_nr(dev->pdev->bus);
|
||||
|
||||
dev_priv->aux_pdev =
|
||||
pci_get_domain_bus_and_slot(domain, 0,
|
||||
PCI_DEVFN(3, 0));
|
||||
|
||||
if (dev_priv->aux_pdev) {
|
||||
resource_start = pci_resource_start(dev_priv->aux_pdev,
|
||||
|
@ -281,7 +285,9 @@ static int psb_driver_load(struct drm_device *dev, unsigned long flags)
|
|||
}
|
||||
dev_priv->gmbus_reg = dev_priv->aux_reg;
|
||||
|
||||
dev_priv->lpc_pdev = pci_get_bus_and_slot(0, PCI_DEVFN(31, 0));
|
||||
dev_priv->lpc_pdev =
|
||||
pci_get_domain_bus_and_slot(domain, 0,
|
||||
PCI_DEVFN(31, 0));
|
||||
if (dev_priv->lpc_pdev) {
|
||||
pci_read_config_word(dev_priv->lpc_pdev, PSB_LPC_GBA,
|
||||
&dev_priv->lpc_gpio_base);
|
||||
|
|
|
@ -781,38 +781,40 @@ extern const struct psb_ops cdv_chip_ops;
|
|||
extern int drm_idle_check_interval;
|
||||
|
||||
/* Utilities */
|
||||
static inline u32 MRST_MSG_READ32(uint port, uint offset)
|
||||
static inline u32 MRST_MSG_READ32(int domain, uint port, uint offset)
|
||||
{
|
||||
int mcr = (0xD0<<24) | (port << 16) | (offset << 8);
|
||||
uint32_t ret_val = 0;
|
||||
struct pci_dev *pci_root = pci_get_bus_and_slot(0, 0);
|
||||
struct pci_dev *pci_root = pci_get_domain_bus_and_slot(domain, 0, 0);
|
||||
pci_write_config_dword(pci_root, 0xD0, mcr);
|
||||
pci_read_config_dword(pci_root, 0xD4, &ret_val);
|
||||
pci_dev_put(pci_root);
|
||||
return ret_val;
|
||||
}
|
||||
static inline void MRST_MSG_WRITE32(uint port, uint offset, u32 value)
|
||||
static inline void MRST_MSG_WRITE32(int domain, uint port, uint offset,
|
||||
u32 value)
|
||||
{
|
||||
int mcr = (0xE0<<24) | (port << 16) | (offset << 8) | 0xF0;
|
||||
struct pci_dev *pci_root = pci_get_bus_and_slot(0, 0);
|
||||
struct pci_dev *pci_root = pci_get_domain_bus_and_slot(domain, 0, 0);
|
||||
pci_write_config_dword(pci_root, 0xD4, value);
|
||||
pci_write_config_dword(pci_root, 0xD0, mcr);
|
||||
pci_dev_put(pci_root);
|
||||
}
|
||||
static inline u32 MDFLD_MSG_READ32(uint port, uint offset)
|
||||
static inline u32 MDFLD_MSG_READ32(int domain, uint port, uint offset)
|
||||
{
|
||||
int mcr = (0x10<<24) | (port << 16) | (offset << 8);
|
||||
uint32_t ret_val = 0;
|
||||
struct pci_dev *pci_root = pci_get_bus_and_slot(0, 0);
|
||||
struct pci_dev *pci_root = pci_get_domain_bus_and_slot(domain, 0, 0);
|
||||
pci_write_config_dword(pci_root, 0xD0, mcr);
|
||||
pci_read_config_dword(pci_root, 0xD4, &ret_val);
|
||||
pci_dev_put(pci_root);
|
||||
return ret_val;
|
||||
}
|
||||
static inline void MDFLD_MSG_WRITE32(uint port, uint offset, u32 value)
|
||||
static inline void MDFLD_MSG_WRITE32(int domain, uint port, uint offset,
|
||||
u32 value)
|
||||
{
|
||||
int mcr = (0x11<<24) | (port << 16) | (offset << 8) | 0xF0;
|
||||
struct pci_dev *pci_root = pci_get_bus_and_slot(0, 0);
|
||||
struct pci_dev *pci_root = pci_get_domain_bus_and_slot(domain, 0, 0);
|
||||
pci_write_config_dword(pci_root, 0xD4, value);
|
||||
pci_write_config_dword(pci_root, 0xD0, mcr);
|
||||
pci_dev_put(pci_root);
|
||||
|
|
|
@ -213,8 +213,10 @@ nv04_update_arb(struct drm_device *dev, int VClk, int bpp,
|
|||
if ((dev->pdev->device & 0xffff) == 0x01a0 /*CHIPSET_NFORCE*/ ||
|
||||
(dev->pdev->device & 0xffff) == 0x01f0 /*CHIPSET_NFORCE2*/) {
|
||||
uint32_t type;
|
||||
int domain = pci_domain_nr(dev->pdev->bus);
|
||||
|
||||
pci_read_config_dword(pci_get_bus_and_slot(0, 1), 0x7c, &type);
|
||||
pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 1),
|
||||
0x7c, &type);
|
||||
|
||||
sim_data.memory_type = (type >> 12) & 1;
|
||||
sim_data.memory_width = 64;
|
||||
|
|
|
@ -216,12 +216,15 @@ nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype)
|
|||
{
|
||||
struct nvkm_pll_vals pllvals;
|
||||
int ret;
|
||||
int domain;
|
||||
|
||||
domain = pci_domain_nr(dev->pdev->bus);
|
||||
|
||||
if (plltype == PLL_MEMORY &&
|
||||
(dev->pdev->device & 0x0ff0) == CHIPSET_NFORCE) {
|
||||
uint32_t mpllP;
|
||||
|
||||
pci_read_config_dword(pci_get_bus_and_slot(0, 3), 0x6c, &mpllP);
|
||||
pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 3),
|
||||
0x6c, &mpllP);
|
||||
mpllP = (mpllP >> 8) & 0xf;
|
||||
if (!mpllP)
|
||||
mpllP = 4;
|
||||
|
@ -232,7 +235,8 @@ nouveau_hw_get_clock(struct drm_device *dev, enum nvbios_pll_type plltype)
|
|||
(dev->pdev->device & 0xff0) == CHIPSET_NFORCE2) {
|
||||
uint32_t clock;
|
||||
|
||||
pci_read_config_dword(pci_get_bus_and_slot(0, 5), 0x4c, &clock);
|
||||
pci_read_config_dword(pci_get_domain_bus_and_slot(domain, 0, 5),
|
||||
0x4c, &clock);
|
||||
return clock / 1000;
|
||||
}
|
||||
|
||||
|
|
|
@ -524,7 +524,8 @@ nouveau_get_hdmi_dev(struct nouveau_drm *drm)
|
|||
}
|
||||
|
||||
/* subfunction one is a hdmi audio device? */
|
||||
drm->hdmi_device = pci_get_bus_and_slot((unsigned int)pdev->bus->number,
|
||||
drm->hdmi_device = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus),
|
||||
(unsigned int)pdev->bus->number,
|
||||
PCI_DEVFN(PCI_SLOT(pdev->devfn), 1));
|
||||
|
||||
if (!drm->hdmi_device) {
|
||||
|
|
|
@ -28,8 +28,16 @@ nv1a_ram_new(struct nvkm_fb *fb, struct nvkm_ram **pram)
|
|||
{
|
||||
struct pci_dev *bridge;
|
||||
u32 mem, mib;
|
||||
int domain = 0;
|
||||
struct pci_dev *pdev = NULL;
|
||||
|
||||
bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 1));
|
||||
if (dev_is_pci(fb->subdev.device->dev))
|
||||
pdev = to_pci_dev(fb->subdev.device->dev);
|
||||
|
||||
if (pdev)
|
||||
domain = pci_domain_nr(pdev->bus);
|
||||
|
||||
bridge = pci_get_domain_bus_and_slot(domain, 0, PCI_DEVFN(0, 1));
|
||||
if (!bridge) {
|
||||
nvkm_error(&fb->subdev, "no bridge device\n");
|
||||
return -ENODEV;
|
||||
|
|
|
@ -239,8 +239,9 @@ static u8 sl82c105_bridge_revision(struct pci_dev *dev)
|
|||
/*
|
||||
* The bridge should be part of the same device, but function 0.
|
||||
*/
|
||||
bridge = pci_get_bus_and_slot(dev->bus->number,
|
||||
PCI_DEVFN(PCI_SLOT(dev->devfn), 0));
|
||||
bridge = pci_get_domain_bus_and_slot(pci_domain_nr(dev->bus),
|
||||
dev->bus->number,
|
||||
PCI_DEVFN(PCI_SLOT(dev->devfn), 0));
|
||||
if (!bridge)
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -527,7 +527,8 @@ static void amd_iommu_report_page_fault(u16 devid, u16 domain_id,
|
|||
struct iommu_dev_data *dev_data = NULL;
|
||||
struct pci_dev *pdev;
|
||||
|
||||
pdev = pci_get_bus_and_slot(PCI_BUS_NUM(devid), devid & 0xff);
|
||||
pdev = pci_get_domain_bus_and_slot(0, PCI_BUS_NUM(devid),
|
||||
devid & 0xff);
|
||||
if (pdev)
|
||||
dev_data = get_dev_data(&pdev->dev);
|
||||
|
||||
|
|
|
@ -1697,8 +1697,8 @@ static int iommu_init_pci(struct amd_iommu *iommu)
|
|||
u32 range, misc, low, high;
|
||||
int ret;
|
||||
|
||||
iommu->dev = pci_get_bus_and_slot(PCI_BUS_NUM(iommu->devid),
|
||||
iommu->devid & 0xff);
|
||||
iommu->dev = pci_get_domain_bus_and_slot(0, PCI_BUS_NUM(iommu->devid),
|
||||
iommu->devid & 0xff);
|
||||
if (!iommu->dev)
|
||||
return -ENODEV;
|
||||
|
||||
|
@ -1764,8 +1764,9 @@ static int iommu_init_pci(struct amd_iommu *iommu)
|
|||
if (is_rd890_iommu(iommu->dev)) {
|
||||
int i, j;
|
||||
|
||||
iommu->root_pdev = pci_get_bus_and_slot(iommu->dev->bus->number,
|
||||
PCI_DEVFN(0, 0));
|
||||
iommu->root_pdev =
|
||||
pci_get_domain_bus_and_slot(0, iommu->dev->bus->number,
|
||||
PCI_DEVFN(0, 0));
|
||||
|
||||
/*
|
||||
* Some rd890 systems may not be fully reconfigured by the
|
||||
|
|
|
@ -564,7 +564,8 @@ static int ppr_notifier(struct notifier_block *nb, unsigned long e, void *data)
|
|||
finish = (iommu_fault->tag >> 9) & 1;
|
||||
|
||||
devid = iommu_fault->device_id;
|
||||
pdev = pci_get_bus_and_slot(PCI_BUS_NUM(devid), devid & 0xff);
|
||||
pdev = pci_get_domain_bus_and_slot(0, PCI_BUS_NUM(devid),
|
||||
devid & 0xff);
|
||||
if (!pdev)
|
||||
return -ENODEV;
|
||||
dev_data = get_dev_data(&pdev->dev);
|
||||
|
|
|
@ -1799,7 +1799,7 @@ static int powerbook_sleep_grackle(void)
|
|||
struct adb_request req;
|
||||
struct pci_dev *grackle;
|
||||
|
||||
grackle = pci_get_bus_and_slot(0, 0);
|
||||
grackle = pci_get_domain_bus_and_slot(0, 0, 0);
|
||||
if (!grackle)
|
||||
return -ENODEV;
|
||||
|
||||
|
|
|
@ -812,7 +812,7 @@ static u8 bnx2x_vf_is_pcie_pending(struct bnx2x *bp, u8 abs_vfid)
|
|||
if (!vf)
|
||||
return false;
|
||||
|
||||
dev = pci_get_bus_and_slot(vf->bus, vf->devfn);
|
||||
dev = pci_get_domain_bus_and_slot(vf->domain, vf->bus, vf->devfn);
|
||||
if (dev)
|
||||
return bnx2x_is_pcie_pending(dev);
|
||||
return false;
|
||||
|
@ -1041,6 +1041,13 @@ void bnx2x_iov_init_dmae(struct bnx2x *bp)
|
|||
REG_WR(bp, DMAE_REG_BACKWARD_COMP_EN, 0);
|
||||
}
|
||||
|
||||
static int bnx2x_vf_domain(struct bnx2x *bp, int vfid)
|
||||
{
|
||||
struct pci_dev *dev = bp->pdev;
|
||||
|
||||
return pci_domain_nr(dev->bus);
|
||||
}
|
||||
|
||||
static int bnx2x_vf_bus(struct bnx2x *bp, int vfid)
|
||||
{
|
||||
struct pci_dev *dev = bp->pdev;
|
||||
|
@ -1606,6 +1613,7 @@ int bnx2x_iov_nic_init(struct bnx2x *bp)
|
|||
struct bnx2x_virtf *vf = BP_VF(bp, vfid);
|
||||
|
||||
/* fill in the BDF and bars */
|
||||
vf->domain = bnx2x_vf_domain(bp, vfid);
|
||||
vf->bus = bnx2x_vf_bus(bp, vfid);
|
||||
vf->devfn = bnx2x_vf_devfn(bp, vfid);
|
||||
bnx2x_vf_set_bars(bp, vf);
|
||||
|
|
|
@ -182,6 +182,7 @@ struct bnx2x_virtf {
|
|||
u32 error; /* 0 means all's-well */
|
||||
|
||||
/* BDF */
|
||||
unsigned int domain;
|
||||
unsigned int bus;
|
||||
unsigned int devfn;
|
||||
|
||||
|
|
|
@ -2594,8 +2594,10 @@ static int pch_gbe_probe(struct pci_dev *pdev,
|
|||
if (adapter->pdata && adapter->pdata->platform_init)
|
||||
adapter->pdata->platform_init(pdev);
|
||||
|
||||
adapter->ptp_pdev = pci_get_bus_and_slot(adapter->pdev->bus->number,
|
||||
PCI_DEVFN(12, 4));
|
||||
adapter->ptp_pdev =
|
||||
pci_get_domain_bus_and_slot(pci_domain_nr(adapter->pdev->bus),
|
||||
adapter->pdev->bus->number,
|
||||
PCI_DEVFN(12, 4));
|
||||
|
||||
netdev->netdev_ops = &pch_gbe_netdev_ops;
|
||||
netdev->watchdog_timeo = PCH_GBE_WATCHDOG_PERIOD;
|
||||
|
|
|
@ -89,7 +89,9 @@ int cpqhp_configure_device(struct controller *ctrl, struct pci_func *func)
|
|||
pci_lock_rescan_remove();
|
||||
|
||||
if (func->pci_dev == NULL)
|
||||
func->pci_dev = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, func->function));
|
||||
func->pci_dev = pci_get_domain_bus_and_slot(0, func->bus,
|
||||
PCI_DEVFN(func->device,
|
||||
func->function));
|
||||
|
||||
/* No pci device, we need to create it then */
|
||||
if (func->pci_dev == NULL) {
|
||||
|
@ -99,7 +101,9 @@ int cpqhp_configure_device(struct controller *ctrl, struct pci_func *func)
|
|||
if (num)
|
||||
pci_bus_add_devices(ctrl->pci_dev->bus);
|
||||
|
||||
func->pci_dev = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, func->function));
|
||||
func->pci_dev = pci_get_domain_bus_and_slot(0, func->bus,
|
||||
PCI_DEVFN(func->device,
|
||||
func->function));
|
||||
if (func->pci_dev == NULL) {
|
||||
dbg("ERROR: pci_dev still null\n");
|
||||
goto out;
|
||||
|
@ -129,7 +133,10 @@ int cpqhp_unconfigure_device(struct pci_func *func)
|
|||
|
||||
pci_lock_rescan_remove();
|
||||
for (j = 0; j < 8 ; j++) {
|
||||
struct pci_dev *temp = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, j));
|
||||
struct pci_dev *temp = pci_get_domain_bus_and_slot(0,
|
||||
func->bus,
|
||||
PCI_DEVFN(func->device,
|
||||
j));
|
||||
if (temp) {
|
||||
pci_dev_put(temp);
|
||||
pci_stop_and_remove_bus_device(temp);
|
||||
|
@ -319,6 +326,7 @@ int cpqhp_save_config(struct controller *ctrl, int busnumber, int is_hot_plug)
|
|||
int cloop = 0;
|
||||
int stop_it;
|
||||
int index;
|
||||
u16 devfn;
|
||||
|
||||
/* Decide which slots are supported */
|
||||
|
||||
|
@ -416,7 +424,9 @@ int cpqhp_save_config(struct controller *ctrl, int busnumber, int is_hot_plug)
|
|||
new_slot->switch_save = 0x10;
|
||||
/* In case of unsupported board */
|
||||
new_slot->status = DevError;
|
||||
new_slot->pci_dev = pci_get_bus_and_slot(new_slot->bus, (new_slot->device << 3) | new_slot->function);
|
||||
devfn = (new_slot->device << 3) | new_slot->function;
|
||||
new_slot->pci_dev = pci_get_domain_bus_and_slot(0,
|
||||
new_slot->bus, devfn);
|
||||
|
||||
for (cloop = 0; cloop < 0x20; cloop++) {
|
||||
rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(device, function), cloop << 2, (u32 *) &(new_slot->config_space[cloop]));
|
||||
|
|
|
@ -707,7 +707,8 @@ static void ibm_unconfigure_device(struct pci_func *func)
|
|||
pci_lock_rescan_remove();
|
||||
|
||||
for (j = 0; j < 0x08; j++) {
|
||||
temp = pci_get_bus_and_slot(func->busno, (func->device << 3) | j);
|
||||
temp = pci_get_domain_bus_and_slot(0, func->busno,
|
||||
(func->device << 3) | j);
|
||||
if (temp) {
|
||||
pci_stop_and_remove_bus_device(temp);
|
||||
pci_dev_put(temp);
|
||||
|
@ -780,7 +781,7 @@ static int ibm_configure_device(struct pci_func *func)
|
|||
if (!(bus_structure_fixup(func->busno)))
|
||||
flag = 1;
|
||||
if (func->dev == NULL)
|
||||
func->dev = pci_get_bus_and_slot(func->busno,
|
||||
func->dev = pci_get_domain_bus_and_slot(0, func->busno,
|
||||
PCI_DEVFN(func->device, func->function));
|
||||
|
||||
if (func->dev == NULL) {
|
||||
|
@ -793,7 +794,7 @@ static int ibm_configure_device(struct pci_func *func)
|
|||
if (num)
|
||||
pci_bus_add_devices(bus);
|
||||
|
||||
func->dev = pci_get_bus_and_slot(func->busno,
|
||||
func->dev = pci_get_domain_bus_and_slot(0, func->busno,
|
||||
PCI_DEVFN(func->device, func->function));
|
||||
if (func->dev == NULL) {
|
||||
err("ERROR... : pci_dev still NULL\n");
|
||||
|
|
|
@ -2699,7 +2699,8 @@ static void __nv_msi_ht_cap_quirk(struct pci_dev *dev, int all)
|
|||
* HT MSI mapping should be disabled on devices that are below
|
||||
* a non-Hypertransport host bridge. Locate the host bridge...
|
||||
*/
|
||||
host_bridge = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0));
|
||||
host_bridge = pci_get_domain_bus_and_slot(pci_domain_nr(dev->bus), 0,
|
||||
PCI_DEVFN(0, 0));
|
||||
if (host_bridge == NULL) {
|
||||
dev_warn(&dev->dev, "nv_msi_ht_cap_quirk didn't locate host bridge\n");
|
||||
return;
|
||||
|
|
|
@ -28,7 +28,7 @@ SYSCALL_DEFINE5(pciconfig_read, unsigned long, bus, unsigned long, dfn,
|
|||
return -EPERM;
|
||||
|
||||
err = -ENODEV;
|
||||
dev = pci_get_bus_and_slot(bus, dfn);
|
||||
dev = pci_get_domain_bus_and_slot(0, bus, dfn);
|
||||
if (!dev)
|
||||
goto error;
|
||||
|
||||
|
@ -96,7 +96,7 @@ SYSCALL_DEFINE5(pciconfig_write, unsigned long, bus, unsigned long, dfn,
|
|||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
||||
dev = pci_get_bus_and_slot(bus, dfn);
|
||||
dev = pci_get_domain_bus_and_slot(0, bus, dfn);
|
||||
if (!dev)
|
||||
return -ENODEV;
|
||||
|
||||
|
|
|
@ -595,6 +595,7 @@ static pci_ers_result_t pcifront_common_process(int cmd,
|
|||
struct pci_driver *pdrv;
|
||||
int bus = pdev->sh_info->aer_op.bus;
|
||||
int devfn = pdev->sh_info->aer_op.devfn;
|
||||
int domain = pdev->sh_info->aer_op.domain;
|
||||
struct pci_dev *pcidev;
|
||||
int flag = 0;
|
||||
|
||||
|
@ -603,7 +604,7 @@ static pci_ers_result_t pcifront_common_process(int cmd,
|
|||
cmd, bus, devfn);
|
||||
result = PCI_ERS_RESULT_NONE;
|
||||
|
||||
pcidev = pci_get_bus_and_slot(bus, devfn);
|
||||
pcidev = pci_get_domain_bus_and_slot(domain, bus, devfn);
|
||||
if (!pcidev || !pcidev->driver) {
|
||||
dev_err(&pdev->xdev->dev, "device or AER driver is NULL\n");
|
||||
pci_dev_put(pcidev);
|
||||
|
|
|
@ -251,8 +251,9 @@ static int oprompci2node(void __user *argp, struct device_node *dp, struct openp
|
|||
struct pci_dev *pdev;
|
||||
struct device_node *dp;
|
||||
|
||||
pdev = pci_get_bus_and_slot (((int *) op->oprom_array)[0],
|
||||
((int *) op->oprom_array)[1]);
|
||||
pdev = pci_get_domain_bus_and_slot(0,
|
||||
((int *) op->oprom_array)[0],
|
||||
((int *) op->oprom_array)[1]);
|
||||
|
||||
dp = pci_device_to_OF_node(pdev);
|
||||
data->current_node = dp;
|
||||
|
|
|
@ -181,7 +181,9 @@ int intelfbhw_get_memory(struct pci_dev *pdev, int *aperture_size,
|
|||
return 1;
|
||||
|
||||
/* Find the bridge device. It is always 0:0.0 */
|
||||
if (!(bridge_dev = pci_get_bus_and_slot(0, PCI_DEVFN(0, 0)))) {
|
||||
bridge_dev = pci_get_domain_bus_and_slot(pci_domain_nr(pdev->bus), 0,
|
||||
PCI_DEVFN(0, 0));
|
||||
if (!bridge_dev) {
|
||||
ERR_MSG("cannot find bridge device\n");
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -683,10 +683,11 @@ static void nForceUpdateArbitrationSettings(unsigned VClk,
|
|||
nv10_sim_state sim_data;
|
||||
unsigned int M, N, P, pll, MClk, NVClk, memctrl;
|
||||
struct pci_dev *dev;
|
||||
int domain = pci_domain_nr(par->pci_dev->bus);
|
||||
|
||||
if ((par->Chipset & 0x0FF0) == 0x01A0) {
|
||||
unsigned int uMClkPostDiv;
|
||||
dev = pci_get_bus_and_slot(0, 3);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 3);
|
||||
pci_read_config_dword(dev, 0x6C, &uMClkPostDiv);
|
||||
uMClkPostDiv = (uMClkPostDiv >> 8) & 0xf;
|
||||
|
||||
|
@ -694,7 +695,7 @@ static void nForceUpdateArbitrationSettings(unsigned VClk,
|
|||
uMClkPostDiv = 4;
|
||||
MClk = 400000 / uMClkPostDiv;
|
||||
} else {
|
||||
dev = pci_get_bus_and_slot(0, 5);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 5);
|
||||
pci_read_config_dword(dev, 0x4c, &MClk);
|
||||
MClk /= 1000;
|
||||
}
|
||||
|
@ -707,13 +708,13 @@ static void nForceUpdateArbitrationSettings(unsigned VClk,
|
|||
sim_data.pix_bpp = (char)pixelDepth;
|
||||
sim_data.enable_video = 0;
|
||||
sim_data.enable_mp = 0;
|
||||
dev = pci_get_bus_and_slot(0, 1);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 1);
|
||||
pci_read_config_dword(dev, 0x7C, &sim_data.memory_type);
|
||||
pci_dev_put(dev);
|
||||
sim_data.memory_type = (sim_data.memory_type >> 12) & 1;
|
||||
sim_data.memory_width = 64;
|
||||
|
||||
dev = pci_get_bus_and_slot(0, 3);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 3);
|
||||
pci_read_config_dword(dev, 0, &memctrl);
|
||||
pci_dev_put(dev);
|
||||
memctrl >>= 16;
|
||||
|
@ -721,7 +722,7 @@ static void nForceUpdateArbitrationSettings(unsigned VClk,
|
|||
if ((memctrl == 0x1A9) || (memctrl == 0x1AB) || (memctrl == 0x1ED)) {
|
||||
u32 dimm[3];
|
||||
|
||||
dev = pci_get_bus_and_slot(0, 2);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 2);
|
||||
pci_read_config_dword(dev, 0x40, &dimm[0]);
|
||||
dimm[0] = (dimm[0] >> 8) & 0x4f;
|
||||
pci_read_config_dword(dev, 0x44, &dimm[1]);
|
||||
|
|
|
@ -264,7 +264,8 @@ static void nv10GetConfig(struct nvidia_par *par)
|
|||
}
|
||||
#endif
|
||||
|
||||
dev = pci_get_bus_and_slot(0, 1);
|
||||
dev = pci_get_domain_bus_and_slot(pci_domain_nr(par->pci_dev->bus),
|
||||
0, 1);
|
||||
if ((par->Chipset & 0xffff) == 0x01a0) {
|
||||
u32 amt;
|
||||
|
||||
|
|
|
@ -780,7 +780,7 @@ static int riva_load_video_mode(struct fb_info *info)
|
|||
else
|
||||
newmode.misc_output |= 0x80;
|
||||
|
||||
rc = CalcStateExt(&par->riva, &newmode.ext, bpp, width,
|
||||
rc = CalcStateExt(&par->riva, &newmode.ext, par->pdev, bpp, width,
|
||||
hDisplaySize, height, dotClock);
|
||||
if (rc)
|
||||
goto out;
|
||||
|
|
|
@ -159,6 +159,7 @@ unsigned long riva_get_memlen(struct riva_par *par)
|
|||
unsigned int chipset = par->Chipset;
|
||||
struct pci_dev* dev;
|
||||
u32 amt;
|
||||
int domain = pci_domain_nr(par->pdev->bus);
|
||||
|
||||
switch (chip->Architecture) {
|
||||
case NV_ARCH_03:
|
||||
|
@ -226,12 +227,12 @@ unsigned long riva_get_memlen(struct riva_par *par)
|
|||
case NV_ARCH_30:
|
||||
if(chipset == NV_CHIP_IGEFORCE2) {
|
||||
|
||||
dev = pci_get_bus_and_slot(0, 1);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 1);
|
||||
pci_read_config_dword(dev, 0x7C, &amt);
|
||||
pci_dev_put(dev);
|
||||
memlen = (((amt >> 6) & 31) + 1) * 1024;
|
||||
} else if (chipset == NV_CHIP_0x01F0) {
|
||||
dev = pci_get_bus_and_slot(0, 1);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 1);
|
||||
pci_read_config_dword(dev, 0x84, &amt);
|
||||
pci_dev_put(dev);
|
||||
memlen = (((amt >> 4) & 127) + 1) * 1024;
|
||||
|
@ -417,6 +418,6 @@ riva_common_setup(struct riva_par *par)
|
|||
}
|
||||
par->riva.flatPanel = (par->FlatPanel > 0) ? TRUE : FALSE;
|
||||
|
||||
RivaGetConfig(&par->riva, par->Chipset);
|
||||
RivaGetConfig(&par->riva, par->pdev, par->Chipset);
|
||||
}
|
||||
|
||||
|
|
|
@ -1108,7 +1108,8 @@ static void nForceUpdateArbitrationSettings
|
|||
unsigned pixelDepth,
|
||||
unsigned *burst,
|
||||
unsigned *lwm,
|
||||
RIVA_HW_INST *chip
|
||||
RIVA_HW_INST *chip,
|
||||
struct pci_dev *pdev
|
||||
)
|
||||
{
|
||||
nv10_fifo_info fifo_data;
|
||||
|
@ -1116,8 +1117,9 @@ static void nForceUpdateArbitrationSettings
|
|||
unsigned int M, N, P, pll, MClk, NVClk;
|
||||
unsigned int uMClkPostDiv;
|
||||
struct pci_dev *dev;
|
||||
int domain = pci_domain_nr(pdev->bus);
|
||||
|
||||
dev = pci_get_bus_and_slot(0, 3);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 3);
|
||||
pci_read_config_dword(dev, 0x6C, &uMClkPostDiv);
|
||||
pci_dev_put(dev);
|
||||
uMClkPostDiv = (uMClkPostDiv >> 8) & 0xf;
|
||||
|
@ -1132,7 +1134,7 @@ static void nForceUpdateArbitrationSettings
|
|||
sim_data.enable_video = 0;
|
||||
sim_data.enable_mp = 0;
|
||||
|
||||
dev = pci_get_bus_and_slot(0, 1);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 1);
|
||||
pci_read_config_dword(dev, 0x7C, &sim_data.memory_type);
|
||||
pci_dev_put(dev);
|
||||
sim_data.memory_type = (sim_data.memory_type >> 12) & 1;
|
||||
|
@ -1234,6 +1236,7 @@ int CalcStateExt
|
|||
(
|
||||
RIVA_HW_INST *chip,
|
||||
RIVA_HW_STATE *state,
|
||||
struct pci_dev *pdev,
|
||||
int bpp,
|
||||
int width,
|
||||
int hDisplaySize,
|
||||
|
@ -1300,7 +1303,7 @@ int CalcStateExt
|
|||
pixelDepth * 8,
|
||||
&(state->arbitration0),
|
||||
&(state->arbitration1),
|
||||
chip);
|
||||
chip, pdev);
|
||||
} else {
|
||||
nv10UpdateArbitrationSettings(VClk,
|
||||
pixelDepth * 8,
|
||||
|
@ -2102,10 +2105,12 @@ static void nv4GetConfig
|
|||
static void nv10GetConfig
|
||||
(
|
||||
RIVA_HW_INST *chip,
|
||||
struct pci_dev *pdev,
|
||||
unsigned int chipset
|
||||
)
|
||||
{
|
||||
struct pci_dev* dev;
|
||||
int domain = pci_domain_nr(pdev->bus);
|
||||
u32 amt;
|
||||
|
||||
#ifdef __BIG_ENDIAN
|
||||
|
@ -2118,12 +2123,12 @@ static void nv10GetConfig
|
|||
* Fill in chip configuration.
|
||||
*/
|
||||
if(chipset == NV_CHIP_IGEFORCE2) {
|
||||
dev = pci_get_bus_and_slot(0, 1);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 1);
|
||||
pci_read_config_dword(dev, 0x7C, &amt);
|
||||
pci_dev_put(dev);
|
||||
chip->RamAmountKBytes = (((amt >> 6) & 31) + 1) * 1024;
|
||||
} else if(chipset == NV_CHIP_0x01F0) {
|
||||
dev = pci_get_bus_and_slot(0, 1);
|
||||
dev = pci_get_domain_bus_and_slot(domain, 0, 1);
|
||||
pci_read_config_dword(dev, 0x84, &amt);
|
||||
pci_dev_put(dev);
|
||||
chip->RamAmountKBytes = (((amt >> 4) & 127) + 1) * 1024;
|
||||
|
@ -2224,6 +2229,7 @@ static void nv10GetConfig
|
|||
int RivaGetConfig
|
||||
(
|
||||
RIVA_HW_INST *chip,
|
||||
struct pci_dev *pdev,
|
||||
unsigned int chipset
|
||||
)
|
||||
{
|
||||
|
@ -2245,7 +2251,7 @@ int RivaGetConfig
|
|||
case NV_ARCH_10:
|
||||
case NV_ARCH_20:
|
||||
case NV_ARCH_30:
|
||||
nv10GetConfig(chip, chipset);
|
||||
nv10GetConfig(chip, pdev, chipset);
|
||||
break;
|
||||
default:
|
||||
return (-1);
|
||||
|
|
|
@ -536,6 +536,7 @@ extern int CalcStateExt
|
|||
(
|
||||
RIVA_HW_INST *chip,
|
||||
RIVA_HW_STATE *state,
|
||||
struct pci_dev *pdev,
|
||||
int bpp,
|
||||
int width,
|
||||
int hDisplaySize,
|
||||
|
@ -546,7 +547,7 @@ extern int CalcStateExt
|
|||
/*
|
||||
* External routines.
|
||||
*/
|
||||
int RivaGetConfig(RIVA_HW_INST *, unsigned int);
|
||||
int RivaGetConfig(RIVA_HW_INST *chip, struct pci_dev *pdev, unsigned int c);
|
||||
/*
|
||||
* FIFO Free Count. Should attempt to yield processor if RIVA is busy.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue