1229997Sken/*- 2229997Sken * Copyright (c) 2003 Silicon Graphics International Corp. 3229997Sken * All rights reserved. 4229997Sken * 5229997Sken * Redistribution and use in source and binary forms, with or without 6229997Sken * modification, are permitted provided that the following conditions 7229997Sken * are met: 8229997Sken * 1. Redistributions of source code must retain the above copyright 9229997Sken * notice, this list of conditions, and the following disclaimer, 10229997Sken * without modification. 11229997Sken * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12229997Sken * substantially similar to the "NO WARRANTY" disclaimer below 13229997Sken * ("Disclaimer") and any redistribution must be conditioned upon 14229997Sken * including a substantially similar Disclaimer requirement for further 15229997Sken * binary redistribution. 16229997Sken * 17229997Sken * NO WARRANTY 18229997Sken * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19229997Sken * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20229997Sken * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR 21229997Sken * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22229997Sken * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23229997Sken * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24229997Sken * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25229997Sken * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26229997Sken * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 27229997Sken * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28229997Sken * POSSIBILITY OF SUCH DAMAGES. 29229997Sken * 30229997Sken * $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_debug.h#2 $ 31229997Sken * $FreeBSD$ 32229997Sken */ 33229997Sken/* 34229997Sken * CAM Target Layer debugging interface. 35229997Sken * 36229997Sken * Author: Ken Merry <ken@FreeBSD.org> 37229997Sken */ 38229997Sken 39229997Sken#ifndef _CTL_DEBUG_H_ 40229997Sken#define _CTL_DEBUG_H_ 41229997Sken 42273163Smav/* 43273163Smav * Debugging flags. 44273163Smav */ 45273163Smavtypedef enum { 46273163Smav CTL_DEBUG_NONE = 0x00, /* no debugging */ 47273163Smav CTL_DEBUG_INFO = 0x01, /* SCSI errors */ 48273163Smav CTL_DEBUG_CDB = 0x02, /* SCSI CDBs and tasks */ 49273163Smav CTL_DEBUG_CDB_DATA = 0x04 /* SCSI CDB DATA */ 50273163Smav} ctl_debug_flags; 51273163Smav 52229997Sken#ifdef CAM_CTL_DEBUG 53229997Sken#define CTL_DEBUG_PRINT(X) \ 54229997Sken do { \ 55229997Sken printf("ctl_debug: "); \ 56229997Sken printf X; \ 57229997Sken } while (0) 58229997Sken#else /* CAM_CTL_DEBUG */ 59229997Sken#define CTL_DEBUG_PRINT(X) 60229997Sken#endif /* CAM_CTL_DEBUG */ 61229997Sken 62229997Sken#endif /* _CTL_DEBUG_H_ */ 63