Skip to content

Commit

Permalink
apps.mellanox.connectx4: add MT28800 as supported device
Browse files Browse the repository at this point in the history
Also add identification of ConnectX type to the driver for
future version-dependent code.
  • Loading branch information
alexandergall committed Mar 30, 2020
1 parent 76c0c80 commit 56884a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/apps/mellanox/connectx4.lua
Expand Up @@ -177,9 +177,18 @@ end
ConnectX4 = {}
ConnectX4.__index = ConnectX4

local mlx_types = {
["0x1013" ] = 4, -- ConnectX4
["0x1017" ] = 5, -- ConnectX5
["0x1019" ] = 5, -- ConnectX5
}

function ConnectX4:new (conf)
local self = setmetatable({}, self)
local pciaddress = pci.qualified(conf.pciaddress)
local device_info = pci.device_info(pciaddress)
self.mlx = assert(mlx_types[device_info.device],
"Unsupported device "..device_info.device)

local sendq_size = conf.sendq_size or 1024
local recvq_size = conf.recvq_size or 1024
Expand Down Expand Up @@ -210,7 +219,9 @@ function ConnectX4:new (conf)
local hca = hca_factory:new()

-- Makes enable_hca() hang with ConnectX5
-- init_seg:reset()
if self.mlx == 4 then
init_seg:reset()
end
if debug_trace then init_seg:dump() end
while not init_seg:ready() do
C.usleep(1000)
Expand Down
1 change: 1 addition & 0 deletions src/lib/hardware/pci.lua
Expand Up @@ -86,6 +86,7 @@ local cards = {
["0x15b3"] = {
["0x1013" ] = {model = 'MT27700', driver = 'apps.mellanox.connectx4'},
["0x1017" ] = {model = 'MT27800', driver = 'apps.mellanox.connectx4'},
["0x1019" ] = {model = 'MT28800', driver = 'apps.mellanox.connectx4'},
},
}

Expand Down

0 comments on commit 56884a7

Please sign in to comment.