Made RAY_COM_DUMP a real debug called RAY_DCOM
unsed ioctl locking
This commit is contained in:
parent
9385b6d6d7
commit
203e551839
@ -28,7 +28,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_raydbg.h,v 1.3 2000/05/11 18:53:10 dmlb Exp $
|
||||
* $Id: if_raydbg.h,v 1.4 2000/05/21 20:51:09 dmlb Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -101,16 +101,27 @@
|
||||
device_printf((sc)->dev, "%s(%d) %s\n", \
|
||||
__FUNCTION__ , __LINE__ , (s)); \
|
||||
for (i = (off); i < (off)+(len); i += 8) { \
|
||||
printf(" 0x%04x ", i); \
|
||||
printf(". 0x%04x ", i); \
|
||||
for (j = 0; j < 8; j++) \
|
||||
printf("%02x ", SRAM_READ_1((sc), i+j)); \
|
||||
printf("\n"); \
|
||||
} \
|
||||
} } while (0)
|
||||
|
||||
#define RAY_DCOM(sc, mask, com, s) do { if (RAY_DEBUG & (mask)) { \
|
||||
device_printf((sc)->dev, "%s(%d) %s com entry 0x%p\n", \
|
||||
__FUNCTION__ , __LINE__ , (s) , (com)); \
|
||||
printf(". c_mesg %s\n", (com)->c_mesg); \
|
||||
printf(". c_flags 0x%b\n", (com)->c_flags, RAY_COM_FLAGS_PRINTFB); \
|
||||
printf(". c_retval 0x%x\n", (com)->c_retval); \
|
||||
printf(". c_ccs 0x%0x index 0x%02x\n", \
|
||||
(com)->c_ccs, RAY_CCS_INDEX((com)->c_ccs)); \
|
||||
} } while (0)
|
||||
|
||||
#else
|
||||
#define RAY_DPRINTF(sc, mask, fmt, args...)
|
||||
#define RAY_DHEX8(sc, mask, off, len, s)
|
||||
#define RAY_DCOM(sc, mask, com, s)
|
||||
#endif /* RAY_DEBUG > 0 */
|
||||
|
||||
/*
|
||||
@ -118,26 +129,15 @@
|
||||
* debugging ones.
|
||||
*/
|
||||
#if RAY_DEBUG & RAY_DBG_COM
|
||||
#define RAY_COM_DUMP(sc, com, s) do { if (RAY_DEBUG & RAY_DBG_COM) { \
|
||||
device_printf((sc)->dev, "%s(%d) %s com entry 0x%p\n", \
|
||||
__FUNCTION__ , __LINE__ , (s) , (com)); \
|
||||
printf(" c_mesg %s\n", (com)->c_mesg); \
|
||||
printf(" c_flags 0x%b\n", (com)->c_flags, RAY_COM_FLAGS_PRINTFB); \
|
||||
printf(" c_retval 0x%x\n", (com)->c_retval); \
|
||||
printf(" c_ccs 0x%0x index 0x%02x\n", \
|
||||
(com)->c_ccs, RAY_CCS_INDEX((com)->c_ccs)); \
|
||||
} } while (0)
|
||||
|
||||
#define RAY_COM_CHECK(sc, com) do { if (RAY_DEBUG & RAY_DBG_COM) { \
|
||||
ray_com_ecf_check((sc), (com), __FUNCTION__ ); \
|
||||
} } while (0)
|
||||
|
||||
#define RAY_COM_MALLOC(function, flags) \
|
||||
ray_com_malloc((function), (flags), __STRING(function));
|
||||
#endif /* RAY_DEBUG & RAY_DBG_COM */
|
||||
|
||||
#if RAY_DEBUG & RAY_DBG_MBUF
|
||||
#define RAY_MBUF_DUMP(sc, mask, m, s) do { if (RAY_DEBUG & (mask)) { \
|
||||
ray_dump_mbuf((sc), (m), (s)); \
|
||||
ray_dump_mbuf((sc), (m), (s)); \
|
||||
} } while (0)
|
||||
#endif /* RAY_DEBUG & RAY_DBG_MBUF */
|
||||
|
@ -28,7 +28,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_rayvar.h,v 1.3 2000/05/11 18:53:50 dmlb Exp $
|
||||
* $Id: if_rayvar.h,v 1.4 2000/05/21 20:43:24 dmlb Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -90,6 +90,11 @@ struct ray_softc {
|
||||
TAILQ_HEAD(ray_comq, ray_comq_entry)
|
||||
sc_comq; /* Command queue */
|
||||
|
||||
#if XXX_IOCTLLOCK
|
||||
int sc_ioctl_lock; /* IOCTL lock */
|
||||
int sc_ioctl_cnt; /* IOCTL lock count */
|
||||
#endif /* XXX_IOCTLLOCK */
|
||||
|
||||
struct ray_nw_param sc_c; /* current network params */
|
||||
struct ray_nw_param sc_d; /* desired network params */
|
||||
int sc_havenet; /* true if we have a network */
|
||||
@ -123,9 +128,7 @@ struct ray_comq_entry {
|
||||
size_t c_ccs; /* CCS structure */
|
||||
struct ray_param_req
|
||||
*c_pr; /* MIB report/update */
|
||||
#if RAY_DEBUG & RAY_DBG_COM
|
||||
char *c_mesg;
|
||||
#endif /* RAY_DEBUG & RAY_DBG_COM */
|
||||
};
|
||||
|
||||
/*
|
||||
@ -247,18 +250,16 @@ static int mib_info[RAY_MIB_MAX+1][3] = RAY_MIB_INFO;
|
||||
__FUNCTION__ , __LINE__ , ##args); \
|
||||
} while (0)
|
||||
|
||||
#ifndef RAY_COM_MALLOC
|
||||
#define RAY_COM_MALLOC(function, flags) ray_com_malloc((function), (flags));
|
||||
#endif /* RAY_COM_MALLOC */
|
||||
#define RAY_COM_MALLOC(function, flags) \
|
||||
ray_com_malloc((function), (flags), __STRING(function));
|
||||
|
||||
#define RAY_COM_INIT(com, function, flags) \
|
||||
ray_com_init((com), (function), (flags), __STRING(function));
|
||||
|
||||
#ifndef RAY_COM_CHECK
|
||||
#define RAY_COM_CHECK(sc, com)
|
||||
#endif /* RAY_COM_CHECK */
|
||||
|
||||
#ifndef RAY_COM_DUMP
|
||||
#define RAY_COM_DUMP(sc, com, s)
|
||||
#endif /* RAY_COM_DUMP */
|
||||
|
||||
#ifndef RAY_MBUF_DUMP
|
||||
#define RAY_MBUF_DUMP(sc, mask, m, s)
|
||||
#endif /* RAY_MBUF_DUMP */
|
||||
|
Loading…
x
Reference in New Issue
Block a user