diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:36:56 -0400 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:36:56 -0400 |
| commit | cf9b59e9d3e008591d1f54830f570982bb307a0d (patch) | |
| tree | 113478ce8fd8c832ba726ffdf59b82cb46356476 /net/tipc/link.h | |
| parent | 44504b2bebf8b5823c59484e73096a7d6574471d (diff) | |
| parent | f4b87dee923342505e1ddba8d34ce9de33e75050 (diff) | |
Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.
Conflicts:
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-mpc.c
drivers/net/gianfar.c
Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'net/tipc/link.h')
| -rw-r--r-- | net/tipc/link.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/net/tipc/link.h b/net/tipc/link.h index 6a51e38ad25c..2e5385c47d30 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h | |||
| @@ -292,4 +292,39 @@ static inline u32 lesser(u32 left, u32 right) | |||
| 292 | return less_eq(left, right) ? left : right; | 292 | return less_eq(left, right) ? left : right; |
| 293 | } | 293 | } |
| 294 | 294 | ||
| 295 | |||
| 296 | /* | ||
| 297 | * Link status checking routines | ||
| 298 | */ | ||
| 299 | |||
| 300 | static inline int link_working_working(struct link *l_ptr) | ||
| 301 | { | ||
| 302 | return (l_ptr->state == WORKING_WORKING); | ||
| 303 | } | ||
| 304 | |||
| 305 | static inline int link_working_unknown(struct link *l_ptr) | ||
| 306 | { | ||
| 307 | return (l_ptr->state == WORKING_UNKNOWN); | ||
| 308 | } | ||
| 309 | |||
| 310 | static inline int link_reset_unknown(struct link *l_ptr) | ||
| 311 | { | ||
| 312 | return (l_ptr->state == RESET_UNKNOWN); | ||
| 313 | } | ||
| 314 | |||
| 315 | static inline int link_reset_reset(struct link *l_ptr) | ||
| 316 | { | ||
| 317 | return (l_ptr->state == RESET_RESET); | ||
| 318 | } | ||
| 319 | |||
| 320 | static inline int link_blocked(struct link *l_ptr) | ||
| 321 | { | ||
| 322 | return (l_ptr->exp_msg_count || l_ptr->blocked); | ||
| 323 | } | ||
| 324 | |||
| 325 | static inline int link_congested(struct link *l_ptr) | ||
| 326 | { | ||
| 327 | return (l_ptr->out_queue_size >= l_ptr->queue_limit[0]); | ||
| 328 | } | ||
| 329 | |||
| 295 | #endif | 330 | #endif |
