From 84a6ed1a126e0877a4166c2aa7d40f409180fdde Mon Sep 17 00:00:00 2001 From: Gerhard Sittig Date: Thu, 25 May 2017 21:57:30 +0200 Subject: [PATCH] asix-sigma: Fix a register addressing bug (non-issue) Fix how the READ_ID register index was passed to the hardware access. Addresses are sent in nibbles, so shift by eight is wrong here. No harm was done, as the register's index is zero. --- src/hardware/asix-sigma/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/asix-sigma/protocol.c b/src/hardware/asix-sigma/protocol.c index 253e98a0..05709c1d 100644 --- a/src/hardware/asix-sigma/protocol.c +++ b/src/hardware/asix-sigma/protocol.c @@ -330,7 +330,7 @@ static int sigma_fpga_init_la(struct dev_context *devc) /* Initialize the logic analyzer mode. */ uint8_t logic_mode_start[] = { REG_ADDR_LOW | (READ_ID & 0xf), - REG_ADDR_HIGH | (READ_ID >> 8), + REG_ADDR_HIGH | (READ_ID >> 4), REG_READ_ADDR, /* Read ID register. */ REG_ADDR_LOW | (WRITE_TEST & 0xf),