| 971 | } |
| 972 | |
| 973 | static void |
| 974 | txgbevf_set_ivar_map(struct txgbe_hw *hw, int8_t direction, |
| 975 | uint8_t queue, uint8_t msix_vector) |
| 976 | { |
| 977 | uint32_t tmp, idx; |
| 978 | |
| 979 | if (direction == -1) { |
| 980 | /* other causes */ |
| 981 | msix_vector |= TXGBE_VFIVAR_VLD; |
| 982 | tmp = rd32(hw, TXGBE_VFIVARMISC); |
| 983 | tmp &= ~0xFF; |
| 984 | tmp |= msix_vector; |
| 985 | wr32(hw, TXGBE_VFIVARMISC, tmp); |
| 986 | } else { |
| 987 | /* rx or tx cause */ |
| 988 | msix_vector |= TXGBE_VFIVAR_VLD; /* Workaround for ICR lost */ |
| 989 | idx = ((16 * (queue & 1)) + (8 * direction)); |
| 990 | tmp = rd32(hw, TXGBE_VFIVAR(queue >> 1)); |
| 991 | tmp &= ~(0xFF << idx); |
| 992 | tmp |= (msix_vector << idx); |
| 993 | wr32(hw, TXGBE_VFIVAR(queue >> 1), tmp); |
| 994 | } |
| 995 | } |
| 996 | |
| 997 | static void |
| 998 | txgbevf_configure_msix(struct rte_eth_dev *dev) |
no test coverage detected