• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/pci/hotplug/

Lines Matching defs:dev

37 static void program_hpp_type0(struct pci_dev *dev, struct hpp_type0 *hpp)
46 if (pci_is_pcie(dev))
48 dev_info(&dev->dev, "using default PCI settings\n");
53 dev_warn(&dev->dev,
59 pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, hpp->cache_line_size);
60 pci_write_config_byte(dev, PCI_LATENCY_TIMER, hpp->latency_timer);
61 pci_read_config_word(dev, PCI_COMMAND, &pci_cmd);
70 pci_write_config_word(dev, PCI_COMMAND, pci_cmd);
73 if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
74 pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER,
76 pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &pci_bctl);
85 pci_write_config_word(dev, PCI_BRIDGE_CONTROL, pci_bctl);
89 static void program_hpp_type1(struct pci_dev *dev, struct hpp_type1 *hpp)
92 dev_warn(&dev->dev, "PCI-X settings not supported\n");
95 static void program_hpp_type2(struct pci_dev *dev, struct hpp_type2 *hpp)
105 pos = pci_pcie_cap(dev);
110 dev_warn(&dev->dev, "PCIe settings rev %d not supported\n",
116 pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &reg16);
118 pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, reg16);
121 if (dev->subordinate) {
122 pci_read_config_word(dev, pos + PCI_EXP_LNKCTL, &reg16);
125 pci_write_config_word(dev, pos + PCI_EXP_LNKCTL, reg16);
129 pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
134 pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_MASK, &reg32);
136 pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_MASK, reg32);
139 pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, &reg32);
141 pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, reg32);
144 pci_read_config_dword(dev, pos + PCI_ERR_COR_MASK, &reg32);
146 pci_write_config_dword(dev, pos + PCI_ERR_COR_MASK, reg32);
149 pci_read_config_dword(dev, pos + PCI_ERR_CAP, &reg32);
151 pci_write_config_dword(dev, pos + PCI_ERR_CAP, reg32);
155 void pci_configure_slot(struct pci_dev *dev)
161 if (!(dev->hdr_type == PCI_HEADER_TYPE_NORMAL ||
162 (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE &&
163 (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI)))
167 ret = pci_get_hp_params(dev, &hpp);
169 dev_warn(&dev->dev, "no hotplug settings from platform\n");
171 program_hpp_type2(dev, hpp.t2);
172 program_hpp_type1(dev, hpp.t1);
173 program_hpp_type0(dev, hpp.t0);
175 if (dev->subordinate) {
176 list_for_each_entry(cdev, &dev->subordinate->devices,