microsoft / azure-linux-kernel

Patches for building an Azure-tuned Linux kernel.
Other
49 stars 25 forks source link

Backport patches for linux 4.9 #13

Open m4h3 opened 6 years ago

m4h3 commented 6 years ago

Hello, I'm trying to get mellanox drivers working on 4.9.76 branch for Azure accelerated Networking. This is what happens in a "Standard_D16_v3" instance.

[   18.827068] hv_vmbus: registering driver hv_netvsc
[   18.827989] hv_netvsc: hv_netvsc channel opened successfully
[   18.845437] hv_netvsc 000d3a2e-fcbb-000d-3a2e-fcbb000d3a2e: Send section size: 6144,     Section count:2560
[   18.846091] hv_netvsc 000d3a2e-fcbb-000d-3a2e-fcbb000d3a2e: Device MAC 00:0d:3a:2e:fc:bb     link state up
[   21.890743] hv_utils: Registering HyperV Utility Driver
[   21.890744] hv_vmbus: registering driver hv_util
[   21.891766] hv_utils: Using TimeSync version 4.0
[   21.901584] pps_core: LinuxPPS API ver. 1 registered
[   21.901596] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>

and later on

[   51.336993] mlx4_core: Mellanox ConnectX core driver v2.2-1 (Feb, 2014)
[   51.340963] mlx4_core: Initializing bd45:00:02.0
[   51.353391] mlx4_core bd45:00:02.0: Detected virtual function - running in slave mode
[   51.358380] mlx4_core bd45:00:02.0: Sending reset
[   51.361118] mlx4_core bd45:00:02.0: Sending vhcr0
[   51.366673] mlx4_core bd45:00:02.0: HCA minimum page size:512
[   51.370358] mlx4_core bd45:00:02.0: Timestamping is not supported in slave mode
[   51.383500] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.387946] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.393170] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.397522] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.402003] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.406938] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.411471] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.415622] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.420364] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.424936] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.429269] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.433900] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.439128] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.443571] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.448011] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.453216] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.457835] hv_pci 920132cd-7705-40a7-bd45-5d19732e5993: Request for interrupt failed: 0xc0350005
[   51.546176] mlx4_core bd45:00:02.0: Failed to initialize event queue table, aborting
[   51.560164] mlx4_core: probe of bd45:00:02.0 failed with error -12
shirgall commented 6 years ago

To get AN for Azure working on 4.9 you will have to backport the Hyper-V device drivers (vmbus, storvsc, netvsc, and especially pci_hyperv) as well as the Mellanox VF drivers (mlx4_core and mlx4_en) from 4.14.

dcui commented 6 years ago

Please replace your drivers/pci/host/pci-hyperv.c with the latest version in the mainline and see what will happen: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/pci/host/pci-hyperv.c

I remember the latest version has a fix for the 0xc0350005 error you're seeing.

akaher commented 5 years ago

Hyper-V and Mellanox driver works fine with v4.9, after applying the patches mentioned in below link: https://lkml.org/lkml/fancy/2019/1/17/380