I think the widths of the gain values here should be 6 bits, not 10. There's 32 bits of GPIO and the upper 16 bits are TX and the lower 16 bits are RX. Using TX as an example, by the time you get to the gain, 10 bits are used up and there are only 6 left. 0x3F is also the max value for 6 bits. Same goes for RX.
I think the widths of the gain values here should be 6 bits, not 10. There's 32 bits of GPIO and the upper 16 bits are TX and the lower 16 bits are RX. Using TX as an example, by the time you get to the gain, 10 bits are used up and there are only 6 left. 0x3F is also the max value for 6 bits. Same goes for RX.
https://github.com/EttusResearch/uhd/blob/0e50a37b5ec6039ed4e8947421dd333047e24408/host/lib/usrp/dboard/db_ubx.cpp#L173