]> git.proxmox.com Git - mirror_qemu.git/commit
dp8393x: fix CAM descriptor entry index
authorMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Fri, 25 Jun 2021 06:54:00 +0000 (07:54 +0100)
committerPhilippe Mathieu-Daudé <f4bug@amsat.org>
Sun, 11 Jul 2021 20:29:54 +0000 (22:29 +0200)
commit85e411d7ff7d62a084f318f3956d48a644632d6c
treefd3ca14059b274a4ddd8207ddcf01a1cfd26e0df
parentd859a77dbdeca288bd6679e33bf2a83a635349a0
dp8393x: fix CAM descriptor entry index

Currently when a LOAD CAM command is executed the entries are loaded into the
CAM from memory in order which is incorrect. According to the datasheet the
first entry in the CAM descriptor is the entry index which means that each
descriptor may update any single entry in the CAM rather than the Nth entry.

Decode the CAM entry index and use it store the descriptor in the appropriate
slot in the CAM. This fixes the issue where the MacOS toolbox loads a single
CAM descriptor into the final slot in order to perform a loopback test which
must succeed before the Ethernet port is enabled.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Tested-by: Finn Thain <fthain@linux-m68k.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20210625065401.30170-10-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
hw/net/dp8393x.c