Commit c3150eac authored by Jon Mason's avatar Jon Mason Committed by David S. Miller
Browse files

vxge: Handle errors in vxge_hw_vpath_fw_api

Propagate the return code of the call to vxge_hw_vpath_fw_api and
__vxge_hw_vpath_pci_func_mode_get.  This enables the proper handling of
error conditions when querying the function mode of the device during
Signed-off-by: default avatarJon Mason <>
Signed-off-by: default avatarRam Vepa <>
Signed-off-by: default avatarDavid S. Miller <>
parent b81b3733
......@@ -1107,8 +1107,9 @@ __vxge_hw_vpath_card_info_get(struct __vxge_hw_virtualpath *vpath,
* __vxge_hw_vpath_pci_func_mode_get - Get the pci mode
* Returns pci function mode
static u64
__vxge_hw_vpath_pci_func_mode_get(struct __vxge_hw_virtualpath *vpath)
static enum vxge_hw_status
__vxge_hw_vpath_pci_func_mode_get(struct __vxge_hw_virtualpath *vpath,
struct vxge_hw_device_hw_info *hw_info)
u64 data0, data1 = 0, steer_ctrl = 0;
enum vxge_hw_status status;
......@@ -1119,8 +1120,11 @@ __vxge_hw_vpath_pci_func_mode_get(struct __vxge_hw_virtualpath *vpath)
0, &data0, &data1, &steer_ctrl);
if (status != VXGE_HW_OK)
return status;
return data0;
hw_info->function_mode = data0;
return status;
......@@ -1235,8 +1239,9 @@ vxge_hw_device_hw_info_get(void __iomem *bar0,
(bar0 + val64);
vpath.vp_open = 0;
hw_info->function_mode =
status = __vxge_hw_vpath_pci_func_mode_get(&vpath, hw_info);
if (status != VXGE_HW_OK)
goto exit;
status = __vxge_hw_vpath_fw_ver_get(&vpath, hw_info);
if (status != VXGE_HW_OK)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment