Lines Matching refs:pdev
61 pci_read_config_byte(ah->pdev, PCI_CACHE_LINE_SIZE, &u8tmp); in ath5k_pci_read_cachesize()
159 ath5k_pci_probe(struct pci_dev *pdev, in ath5k_pci_probe() argument
186 pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S); in ath5k_pci_probe()
188 ret = pci_enable_device(pdev); in ath5k_pci_probe()
190 dev_err(&pdev->dev, "can't enable device\n"); in ath5k_pci_probe()
195 ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); in ath5k_pci_probe()
197 dev_err(&pdev->dev, "32-bit DMA not available\n"); in ath5k_pci_probe()
205 pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &csz); in ath5k_pci_probe()
215 pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, csz); in ath5k_pci_probe()
222 pci_write_config_byte(pdev, PCI_LATENCY_TIMER, 0xa8); in ath5k_pci_probe()
225 pci_set_master(pdev); in ath5k_pci_probe()
231 pci_write_config_byte(pdev, 0x41, 0); in ath5k_pci_probe()
233 ret = pci_request_region(pdev, 0, "ath5k"); in ath5k_pci_probe()
235 dev_err(&pdev->dev, "cannot reserve PCI memory region\n"); in ath5k_pci_probe()
239 mem = pci_iomap(pdev, 0, 0); in ath5k_pci_probe()
241 dev_err(&pdev->dev, "cannot remap PCI memory region\n"); in ath5k_pci_probe()
252 dev_err(&pdev->dev, "cannot allocate ieee80211_hw\n"); in ath5k_pci_probe()
257 dev_info(&pdev->dev, "registered as '%s'\n", wiphy_name(hw->wiphy)); in ath5k_pci_probe()
261 ah->pdev = pdev; in ath5k_pci_probe()
262 ah->dev = &pdev->dev; in ath5k_pci_probe()
263 ah->irq = pdev->irq; in ath5k_pci_probe()
273 pci_set_drvdata(pdev, hw); in ath5k_pci_probe()
279 pci_iounmap(pdev, mem); in ath5k_pci_probe()
281 pci_release_region(pdev, 0); in ath5k_pci_probe()
283 pci_disable_device(pdev); in ath5k_pci_probe()
289 ath5k_pci_remove(struct pci_dev *pdev) in ath5k_pci_remove() argument
291 struct ieee80211_hw *hw = pci_get_drvdata(pdev); in ath5k_pci_remove()
295 pci_iounmap(pdev, ah->iobase); in ath5k_pci_remove()
296 pci_release_region(pdev, 0); in ath5k_pci_remove()
297 pci_disable_device(pdev); in ath5k_pci_remove()
304 struct pci_dev *pdev = to_pci_dev(dev); in ath5k_pci_suspend() local
305 struct ieee80211_hw *hw = pci_get_drvdata(pdev); in ath5k_pci_suspend()
314 struct pci_dev *pdev = to_pci_dev(dev); in ath5k_pci_resume() local
315 struct ieee80211_hw *hw = pci_get_drvdata(pdev); in ath5k_pci_resume()
323 pci_write_config_byte(pdev, 0x41, 0); in ath5k_pci_resume()