Created
November 5, 2020 15:55
-
-
Save noslin005/a07124a15ce228cb586b49859f86c7fe to your computer and use it in GitHub Desktop.
Patch to fix the issue with Mellanox ConnectX-6 on OpenBSD 6.8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- if_mcx.c Thu Nov 5 09:48:26 2020 | |
+++ /usr/src/sys/dev/pci/if_mcx.c Thu Nov 5 09:39:32 2020 | |
@@ -839,6 +839,7 @@ | |
#define MCX_CAP_DEVICE_PORT_MODULE_EVENT \ | |
0x80 | |
#define MCX_CAP_DEVICE_PORT_TYPE 0x03 | |
+#define MCX_CAP_DEVICE_PORT_TYPE_ETH 0x01 | |
uint8_t num_ports; | |
uint8_t snapshot_log_max_msg; | |
@@ -2543,6 +2544,7 @@ | |
{ PCI_VENDOR_MELLANOX, PCI_PRODUCT_MELLANOX_MT28800 }, | |
{ PCI_VENDOR_MELLANOX, PCI_PRODUCT_MELLANOX_MT28800VF }, | |
{ PCI_VENDOR_MELLANOX, PCI_PRODUCT_MELLANOX_MT2892 }, | |
+ { PCI_VENDOR_MELLANOX, PCI_PRODUCT_MELLANOX_MT28908 }, | |
}; | |
struct mcx_eth_proto_capability { | |
@@ -3768,6 +3770,12 @@ | |
mb = mcx_cq_mbox(&mxm, 0); | |
hca = mcx_cq_mbox_data(mb); | |
+ if ((hca->port_type & MCX_CAP_DEVICE_PORT_TYPE) | |
+ != MCX_CAP_DEVICE_PORT_TYPE_ETH) { | |
+ printf(", not in ethernet mode\n"); | |
+ error = -1; | |
+ goto free; | |
+ } | |
if (hca->log_pg_sz > PAGE_SHIFT) { | |
printf(", minimum system page shift %u is too large\n", | |
hca->log_pg_sz); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment