1/*- 2 * Copyright (c) 2003-2009 RMI Corporation 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * RMI_BSD |
30 * $FreeBSD: head/sys/mips/rmi/msgring.h 211996 2010-08-30 13:26:07Z jchandra $ |
31 */ 32#ifndef _RMI_MSGRING_H_ 33#define _RMI_MSGRING_H_ 34 35#include <sys/types.h> 36#include <mips/rmi/rmi_mips_exts.h> 37 38#define MSGRNG_TX_BUF_REG 0 --- 330 unchanged lines hidden (view full) --- 369 msgrng_load_tx_msg3(msg->msg3); 370 371 dest = ((size - 1) << 16) | (code << 8) | (stid); 372 373 msgrng_send(dest); 374 375 for (i = 0; i < 16; i++) { 376 status = msgrng_read_status(); |
377 378 if (status & 0x6) { 379 continue; 380 } else 381 break; 382 } |
383 return msgrng_read_status() & 0x06; 384} 385 386static __inline__ int 387message_send_retry(unsigned int size, unsigned int code, 388 unsigned int stid, struct msgrng_msg *msg) 389{ 390 int res = 0; --- 15 unchanged lines hidden (view full) --- 406 407 return 0; 408} 409 410static __inline__ int 411message_receive(int pri, int *size, int *code, int *src_id, 412 struct msgrng_msg *msg) 413{ |
414 int res; 415 416 res = message_receive_fast(pri, *size, *code, *src_id, 417 msg->msg0, msg->msg1, msg->msg2, msg->msg3); |
418 return res; 419} 420 421#define MSGRNG_STN_RX_QSIZE 256 422 423struct stn_cc { 424 unsigned short counters[16][8]; 425}; --- 92 unchanged lines hidden --- |