Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mlx5/mlx5_core/mlx5_main.c
Show First 20 Lines • Show All 1,628 Lines • ▼ Show 20 Lines | if (err == 0) { | ||||
} | } | ||||
} else { | } else { | ||||
mlx5_core_err(dev, "eswitch init failed, error %d\n", | mlx5_core_err(dev, "eswitch init failed, error %d\n", | ||||
err); | err); | ||||
} | } | ||||
} | } | ||||
#endif | #endif | ||||
pci_save_state(bsddev); | pci_save_state(pdev); | ||||
return 0; | return 0; | ||||
clean_health: | clean_health: | ||||
mlx5_pagealloc_cleanup(dev); | mlx5_pagealloc_cleanup(dev); | ||||
mlx5_health_cleanup(dev); | mlx5_health_cleanup(dev); | ||||
close_pci: | close_pci: | ||||
mlx5_pci_close(dev, priv); | mlx5_pci_close(dev, priv); | ||||
clean_dev: | clean_dev: | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | static pci_ers_result_t mlx5_pci_slot_reset(struct pci_dev *pdev) | ||||
err = mlx5_pci_enable_device(dev); | err = mlx5_pci_enable_device(dev); | ||||
if (err) { | if (err) { | ||||
mlx5_core_err(dev, "mlx5_pci_enable_device failed with error code: %d\n" | mlx5_core_err(dev, "mlx5_pci_enable_device failed with error code: %d\n" | ||||
,err); | ,err); | ||||
return PCI_ERS_RESULT_DISCONNECT; | return PCI_ERS_RESULT_DISCONNECT; | ||||
} | } | ||||
pci_set_master(pdev); | pci_set_master(pdev); | ||||
pci_set_powerstate(pdev->dev.bsddev, PCI_POWERSTATE_D0); | pci_set_powerstate(pdev->dev.bsddev, PCI_POWERSTATE_D0); | ||||
pci_restore_state(pdev->dev.bsddev); | pci_restore_state(pdev); | ||||
pci_save_state(pdev->dev.bsddev); | pci_save_state(pdev); | ||||
return err ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED; | return err ? PCI_ERS_RESULT_DISCONNECT : PCI_ERS_RESULT_RECOVERED; | ||||
} | } | ||||
/* wait for the device to show vital signs. For now we check | /* wait for the device to show vital signs. For now we check | ||||
* that we can read the device ID and that the health buffer | * that we can read the device ID and that the health buffer | ||||
* shows a non zero value which is different than 0xffffffff | * shows a non zero value which is different than 0xffffffff | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 341 Lines • Show Last 20 Lines |