CVSROOT: /cvs Module name: src Changes by: s...@cvs.openbsd.org 2020/07/13 10:18:52
Modified files: sys/dev/pci : if_iwx.c if_iwxreg.h Log message: Increase iwx(4) command queue size to the size expected by hardware. The iwx(4) command queue has 256 entries in hardware. The Linux driver contains an abstraction layer which allows it to allocate just 32 command queue entries in software. Because I misunderstood how this works iwx(4) ended up with 32 command queue entries, but without a shim which presents these 32 entries as 256 entries to hardware. Our command queue size was later bumped to 64 to make fatal firmware errors during initialization disappear. The problem was still not fully understood at that time. I didn't realize that firmware errors coincided with the command queue index wrapping around. Hardware expects the queue to wrap at 256 entries so fix this problem for good in a simple way: Allocate 256 entries for the command queue, just like iwm(4) does. This will allow us to enable background scanning on iwx(4), which so far triggered firmware errors due to additional scan commands causing the command queue index to wrap at 64.