mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-03-01 11:19:49 +00:00
525.85.05
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2017-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2017-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -1336,6 +1336,7 @@ nvswitch_lib_initialize_device
|
||||
NvU8 link_num;
|
||||
nvlink_link *link = NULL;
|
||||
NvBool is_blacklisted_by_os = NV_FALSE;
|
||||
NvU64 mode;
|
||||
|
||||
if (!NVSWITCH_IS_DEVICE_ACCESSIBLE(device))
|
||||
{
|
||||
@@ -1497,6 +1498,19 @@ nvswitch_lib_initialize_device
|
||||
}
|
||||
|
||||
nvswitch_reset_persistent_link_hw_state(device, link_num);
|
||||
|
||||
if(_nvswitch_corelib_get_dl_link_mode(link, &mode) != NVL_SUCCESS)
|
||||
{
|
||||
NVSWITCH_PRINT(device, ERROR, "%s: nvlipt_lnk_status: Failed to check link mode! LinkId %d\n",
|
||||
__FUNCTION__, link_num);
|
||||
}
|
||||
else if(mode == NVLINK_LINKSTATE_FAULT)
|
||||
{
|
||||
NVSWITCH_PRINT(device, INFO, "%s: retraining LinkId %d\n",
|
||||
__FUNCTION__, link_num);
|
||||
nvswitch_reset_and_train_link(device, link);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
retval = nvswitch_set_training_mode(device);
|
||||
@@ -3004,11 +3018,17 @@ _nvswitch_ctrl_unregister_link
|
||||
return -NVL_BAD_ARGS;
|
||||
}
|
||||
|
||||
// With ALI in FW, links can be unregistered while Active
|
||||
if (!device->nvlink_device->enableALI)
|
||||
{
|
||||
|
||||
if (device->hal.nvswitch_is_link_in_use(device, params->portNum))
|
||||
{
|
||||
return -NVL_ERR_STATE_IN_USE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
nvlink_lib_unregister_link(link);
|
||||
nvswitch_destroy_link(link);
|
||||
|
||||
@@ -4632,6 +4652,16 @@ nvswitch_launch_ALI_link_training
|
||||
return device->hal.nvswitch_launch_ALI_link_training(device, link, bSync);
|
||||
}
|
||||
|
||||
NvlStatus
|
||||
nvswitch_reset_and_train_link
|
||||
(
|
||||
nvswitch_device *device,
|
||||
nvlink_link *link
|
||||
)
|
||||
{
|
||||
return device->hal.nvswitch_reset_and_train_link(device, link);
|
||||
}
|
||||
|
||||
static NvlStatus
|
||||
_nvswitch_ctrl_get_err_info
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user