Lines Matching defs:pdev

103 		dma = dma_map_single(&alx->hw.pdev->dev,
106 if (dma_mapping_error(&alx->hw.pdev->dev, dma)) {
316 if (alx->hw.pdev->msix_enabled) {
662 alx->descmem.virt = dma_alloc_coherent(&alx->hw.pdev->dev,
703 dma_free_coherent(&alx->hw.pdev->dev,
771 txq->dev = &alx->hw.pdev->dev;
787 rxq->dev = &alx->hw.pdev->dev;
812 if (alx->hw.pdev->msix_enabled) {
837 err = pci_alloc_irq_vectors(alx->hw.pdev, num_vec, num_vec,
857 err = request_irq(pci_irq_vector(alx->hw.pdev, 0), alx_intr_msix_misc,
880 err = request_irq(pci_irq_vector(alx->hw.pdev, vector),
888 free_irq(pci_irq_vector(alx->hw.pdev, free_vector++), alx);
892 free_irq(pci_irq_vector(alx->hw.pdev,free_vector++),
903 ret = pci_alloc_irq_vectors(alx->hw.pdev, 1, 1,
925 if (alx->hw.pdev->msix_enabled) {
941 if (alx->hw.pdev->msix_enabled) {
944 synchronize_irq(pci_irq_vector(alx->hw.pdev, i));
947 synchronize_irq(pci_irq_vector(alx->hw.pdev, 0));
957 pci_free_irq_vectors(alx->hw.pdev);
976 struct pci_dev *pdev = alx->hw.pdev;
983 if (alx->hw.pdev->msix_enabled) {
995 if (alx->hw.pdev->msi_enabled) {
998 err = request_irq(pci_irq_vector(pdev, 0), alx_intr_msi, 0,
1004 pci_free_irq_vectors(alx->hw.pdev);
1008 err = request_irq(pci_irq_vector(pdev, 0), alx_intr_legacy, IRQF_SHARED,
1020 struct pci_dev *pdev = alx->hw.pdev;
1023 free_irq(pci_irq_vector(pdev, 0), alx);
1024 if (alx->hw.pdev->msix_enabled) {
1026 free_irq(pci_irq_vector(pdev, i + 1), alx->qnapi[i]);
1029 pci_free_irq_vectors(pdev);
1047 struct pci_dev *pdev = alx->hw.pdev;
1053 dev_err(&pdev->dev, "unrecognized chip, aborting\n");
1058 pdev->device == ALX_DEV_ID_AR8161 &&
1059 pdev->subsystem_vendor == PCI_VENDOR_ID_ATTANSIC &&
1060 pdev->subsystem_device == 0x0091 &&
1061 pdev->revision == 0;
1253 pci_free_irq_vectors(alx->hw.pdev);
1639 if (alx->hw.pdev->msix_enabled) {
1643 } else if (alx->hw.pdev->msi_enabled)
1714 static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1722 err = pci_enable_device_mem(pdev);
1730 if (!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) {
1731 dev_dbg(&pdev->dev, "DMA to 64-BIT addresses\n");
1733 err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
1735 dev_err(&pdev->dev, "No usable DMA config, aborting\n");
1740 err = pci_request_mem_regions(pdev, alx_drv_name);
1742 dev_err(&pdev->dev,
1747 pci_set_master(pdev);
1749 if (!pdev->pm_cap) {
1750 dev_err(&pdev->dev,
1763 SET_NETDEV_DEV(netdev, &pdev->dev);
1769 alx->hw.pdev = pdev;
1773 pci_set_drvdata(pdev, alx);
1775 hw->hw_addr = pci_ioremap_bar(pdev, 0);
1777 dev_err(&pdev->dev, "cannot map device registers\n");
1784 netdev->irq = pci_irq_vector(pdev, 0);
1788 pdev->dev_flags |= PCI_DEV_FLAGS_MSI_INTX_DISABLE_BUG;
1792 dev_err(&pdev->dev, "net device private data init failed\n");
1807 dev_err(&pdev->dev, "MAC Reset failed, error = %d\n", err);
1815 dev_err(&pdev->dev,
1829 dev_warn(&pdev->dev,
1849 dev_err(&pdev->dev, "failed to identify PHY\n");
1862 dev_err(&pdev->dev, "register netdevice failed\n");
1879 pci_release_mem_regions(pdev);
1881 pci_disable_device(pdev);
1885 static void alx_remove(struct pci_dev *pdev)
1887 struct alx_priv *alx = pci_get_drvdata(pdev);
1895 pci_release_mem_regions(pdev);
1897 pci_disable_device(pdev);
1951 static pci_ers_result_t alx_pci_error_detected(struct pci_dev *pdev,
1954 struct alx_priv *alx = pci_get_drvdata(pdev);
1958 dev_info(&pdev->dev, "pci error detected\n");
1970 pci_disable_device(pdev);
1977 static pci_ers_result_t alx_pci_error_slot_reset(struct pci_dev *pdev)
1979 struct alx_priv *alx = pci_get_drvdata(pdev);
1983 dev_info(&pdev->dev, "pci error slot reset\n");
1987 if (pci_enable_device(pdev)) {
1988 dev_err(&pdev->dev, "Failed to re-enable PCI device after reset\n");
1992 pci_set_master(pdev);
2003 static void alx_pci_error_resume(struct pci_dev *pdev)
2005 struct alx_priv *alx = pci_get_drvdata(pdev);
2008 dev_info(&pdev->dev, "pci error resume\n");