M key (vs B+M key) in QNAP not recognized (perhaps pci lane downshifting?)

I seem to have a problem getting a QNAP NAS to recognize a Hailo-8.

Hardware – I have a QNAP TS-464 which has 2 M.2 slots, each supports only x1 lane. The TS-464 also has a single Gen3 PCIe x4 slot with x2 lanes supported.

While QNAP lists the B+M Key version as compatible, for easier availability, I picked up the M key version, product # is: HM218B1C2FAE. I understand the M key supports support 4 lanes, BUT should downshift to use x2 lanes, and possibly even x1 lane.

But it’s not detected. I’ve gone through the following to verify everything possible.

  1. Insert the Hailo-8 (M key) into the first M.2 slot on the QNAP. Does NOT show up in lspci.

  2. Insert the Hailo-8 into the other M.2 slot on the QNAP. Does NOT show up in lspci.

  3. Insert the Hailo-8 into an M.2 slot on my laptop. It works on the laptop. It is detected so I ran the integration tool and it passes the tests (laptop’s M.2 supports x2 lanes, so I know the Hailo-8 will negotiate down to 2 lanes).

  4. Thinking I possibly have a problem with the M.2 slots on the QNAP, I test them by putting a 1TB Samsung NVMe in each slot. The SSD works fine in either slot, although it is downgraded to x1 lane.

  5. Now I’m thinking possibly the Hailo-8 won’t downshift to use only 1 lane of the QNAP’s M.2 slots. So, I put a PCIe to M.2 adapter (Startech PEX4M2E1 ) into the QNAP’s PCIe x4 slot. Still does NOT show up in lspci! The red light is on, so I know it’s getting power.

  6. Just to make sure the Startech adapter is working, I put a NVMe drive into it as well. Works fine! So it’s not the adapter!

QNAP lists the HM218B1C2LAE as being compatible & supported on QTS > 5.1. I understand this product # is the B+M keyed version that supposes 2 PCIe lanes. But, the HM218B1C2FAE clearly can downshift to use x2 lanes.

Other than they keying, are there any differences between the M-Key Hailo-8 (HM218B1C2FAE) and the B+M Key version (HM218B1C2LAE) ? Power requirements? Different kernel driver between the M Key and B+M Key?

But, even if the kernel driver was different between the -LAE and -FAE versions, the device should still enumerate and be visible in lspci, right ?

I’m somewhat at a loss here… any further suggestions ?

Welcome to the Hailo Community!

The modules may use different external components. However they should not make a difference. The Hailo-8 chip itself is the same on both modules.

No. The chip is the same.

Yes, I have used the Hailo-8 M.2 module key M on Raspberry Pi (single PCIe lane) with many different HATs and PCIe adapters without issues. So, single PCIe lane should not be a problem.

Do you have a setup with 4 PCIe lanes? Just to make sure all lanes work. You have already tested many configurations.

This is on W10, in an X4 slot…

I’m using the HailoRT with the 4.18 firmware, since that’s the driver version QNAP includes…

Oh, and that is through the StarTech PCIe → M.2 adapter, so that confirms the adapter will work with x4 lanes. Very bizarre it doesn’t work on the qnap.

Digging a little further – I don’t believe anything in starting up would affect anything

[~] # cat /proc/cmdline
consoleblank=0 console=ttyS0,115200n8 intel_iommu=on,igfx_off i915.enable_hd_vgaarb=1 iommu=pt i915.disable_power_well=0 i915.enable_rc6=0 i915.enable_guc=2 memmap=2M$0x8000000 ramoops.mem_address=0x8000000 ramoops.mem_size=0x200000 ramoops.console_size=0x100000 usbcore.autosuspend=-1 zswap.enabled=1 zswap.compressor=lz4 BOOT_IMAGE=/boot/bzImage root=/dev/ram0 rw

The iommu settings should only affect passthrough to a VM, not whether the host system could see the card on the PCIe bus.

Given the problem is the failure of the card to enumerate, could this be something with power states or failure of the qnap to provide REFCLK? Would it be worth tying CLKREQ low to see if that has any effect ? I’m kinda grasping at straws, but this is weird….