diff options
author | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2010-06-02 08:44:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-03 06:28:28 -0400 |
commit | a1868dc2878e61778b9d6d8c61d5368e51d68a29 (patch) | |
tree | ef829861e7d437ed2d62d74fb01601c8f8bba69e /drivers | |
parent | db2c24175d149b55784f7cb2c303622ce962c1ae (diff) |
ixgbe: return IXGBE_ERR_RAR_INDEX when out of range
Based on original patch from Shirley Ma <xma@us.ibm.com>
Return IXGBE_ERR_RAR_INDEX when RAR index is out of range, instead of
returning IXGBE_SUCCESS.
CC: Shirley Ma <xma@us.ibm.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_type.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index 1159d9138f05..9595b1bfb8dd 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -1188,6 +1188,7 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, | |||
1188 | IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); | 1188 | IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); |
1189 | } else { | 1189 | } else { |
1190 | hw_dbg(hw, "RAR index %d is out of range.\n", index); | 1190 | hw_dbg(hw, "RAR index %d is out of range.\n", index); |
1191 | return IXGBE_ERR_RAR_INDEX; | ||
1191 | } | 1192 | } |
1192 | 1193 | ||
1193 | return 0; | 1194 | return 0; |
@@ -1219,6 +1220,7 @@ s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index) | |||
1219 | IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); | 1220 | IXGBE_WRITE_REG(hw, IXGBE_RAH(index), rar_high); |
1220 | } else { | 1221 | } else { |
1221 | hw_dbg(hw, "RAR index %d is out of range.\n", index); | 1222 | hw_dbg(hw, "RAR index %d is out of range.\n", index); |
1223 | return IXGBE_ERR_RAR_INDEX; | ||
1222 | } | 1224 | } |
1223 | 1225 | ||
1224 | /* clear VMDq pool/queue selection for this RAR */ | 1226 | /* clear VMDq pool/queue selection for this RAR */ |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index 2eb6e151016c..cdd1998f18c7 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -2609,6 +2609,7 @@ struct ixgbe_info { | |||
2609 | #define IXGBE_ERR_EEPROM_VERSION -24 | 2609 | #define IXGBE_ERR_EEPROM_VERSION -24 |
2610 | #define IXGBE_ERR_NO_SPACE -25 | 2610 | #define IXGBE_ERR_NO_SPACE -25 |
2611 | #define IXGBE_ERR_OVERTEMP -26 | 2611 | #define IXGBE_ERR_OVERTEMP -26 |
2612 | #define IXGBE_ERR_RAR_INDEX -27 | ||
2612 | #define IXGBE_NOT_IMPLEMENTED 0x7FFFFFFF | 2613 | #define IXGBE_NOT_IMPLEMENTED 0x7FFFFFFF |
2613 | 2614 | ||
2614 | #endif /* _IXGBE_TYPE_H_ */ | 2615 | #endif /* _IXGBE_TYPE_H_ */ |