Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux/can
File: error.h
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
[0] Fix | Delete
/*
[1] Fix | Delete
* linux/can/error.h
[2] Fix | Delete
*
[3] Fix | Delete
* Definitions of the CAN error messages to be filtered and passed to the user.
[4] Fix | Delete
*
[5] Fix | Delete
* Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de>
[6] Fix | Delete
* Copyright (c) 2002-2007 Volkswagen Group Electronic Research
[7] Fix | Delete
* All rights reserved.
[8] Fix | Delete
*
[9] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[10] Fix | Delete
* modification, are permitted provided that the following conditions
[11] Fix | Delete
* are met:
[12] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[13] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[14] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[15] Fix | Delete
* notice, this list of conditions and the following disclaimer in the
[16] Fix | Delete
* documentation and/or other materials provided with the distribution.
[17] Fix | Delete
* 3. Neither the name of Volkswagen nor the names of its contributors
[18] Fix | Delete
* may be used to endorse or promote products derived from this software
[19] Fix | Delete
* without specific prior written permission.
[20] Fix | Delete
*
[21] Fix | Delete
* Alternatively, provided that this notice is retained in full, this
[22] Fix | Delete
* software may be distributed under the terms of the GNU General
[23] Fix | Delete
* Public License ("GPL") version 2, in which case the provisions of the
[24] Fix | Delete
* GPL apply INSTEAD OF those given above.
[25] Fix | Delete
*
[26] Fix | Delete
* The provided data structures and external interfaces from this code
[27] Fix | Delete
* are not restricted to be used by modules with a GPL compatible license.
[28] Fix | Delete
*
[29] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
[30] Fix | Delete
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
[31] Fix | Delete
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
[32] Fix | Delete
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
[33] Fix | Delete
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
[34] Fix | Delete
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
[35] Fix | Delete
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
[36] Fix | Delete
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
[37] Fix | Delete
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
[38] Fix | Delete
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
[39] Fix | Delete
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
[40] Fix | Delete
* DAMAGE.
[41] Fix | Delete
*/
[42] Fix | Delete
[43] Fix | Delete
#ifndef _CAN_ERROR_H
[44] Fix | Delete
#define _CAN_ERROR_H
[45] Fix | Delete
[46] Fix | Delete
#define CAN_ERR_DLC 8 /* dlc for error message frames */
[47] Fix | Delete
[48] Fix | Delete
/* error class (mask) in can_id */
[49] Fix | Delete
#define CAN_ERR_TX_TIMEOUT 0x00000001U /* TX timeout (by netdevice driver) */
[50] Fix | Delete
#define CAN_ERR_LOSTARB 0x00000002U /* lost arbitration / data[0] */
[51] Fix | Delete
#define CAN_ERR_CRTL 0x00000004U /* controller problems / data[1] */
[52] Fix | Delete
#define CAN_ERR_PROT 0x00000008U /* protocol violations / data[2..3] */
[53] Fix | Delete
#define CAN_ERR_TRX 0x00000010U /* transceiver status / data[4] */
[54] Fix | Delete
#define CAN_ERR_ACK 0x00000020U /* received no ACK on transmission */
[55] Fix | Delete
#define CAN_ERR_BUSOFF 0x00000040U /* bus off */
[56] Fix | Delete
#define CAN_ERR_BUSERROR 0x00000080U /* bus error (may flood!) */
[57] Fix | Delete
#define CAN_ERR_RESTARTED 0x00000100U /* controller restarted */
[58] Fix | Delete
[59] Fix | Delete
/* arbitration lost in bit ... / data[0] */
[60] Fix | Delete
#define CAN_ERR_LOSTARB_UNSPEC 0x00 /* unspecified */
[61] Fix | Delete
/* else bit number in bitstream */
[62] Fix | Delete
[63] Fix | Delete
/* error status of CAN-controller / data[1] */
[64] Fix | Delete
#define CAN_ERR_CRTL_UNSPEC 0x00 /* unspecified */
[65] Fix | Delete
#define CAN_ERR_CRTL_RX_OVERFLOW 0x01 /* RX buffer overflow */
[66] Fix | Delete
#define CAN_ERR_CRTL_TX_OVERFLOW 0x02 /* TX buffer overflow */
[67] Fix | Delete
#define CAN_ERR_CRTL_RX_WARNING 0x04 /* reached warning level for RX errors */
[68] Fix | Delete
#define CAN_ERR_CRTL_TX_WARNING 0x08 /* reached warning level for TX errors */
[69] Fix | Delete
#define CAN_ERR_CRTL_RX_PASSIVE 0x10 /* reached error passive status RX */
[70] Fix | Delete
#define CAN_ERR_CRTL_TX_PASSIVE 0x20 /* reached error passive status TX */
[71] Fix | Delete
/* (at least one error counter exceeds */
[72] Fix | Delete
/* the protocol-defined level of 127) */
[73] Fix | Delete
#define CAN_ERR_CRTL_ACTIVE 0x40 /* recovered to error active state */
[74] Fix | Delete
[75] Fix | Delete
/* error in CAN protocol (type) / data[2] */
[76] Fix | Delete
#define CAN_ERR_PROT_UNSPEC 0x00 /* unspecified */
[77] Fix | Delete
#define CAN_ERR_PROT_BIT 0x01 /* single bit error */
[78] Fix | Delete
#define CAN_ERR_PROT_FORM 0x02 /* frame format error */
[79] Fix | Delete
#define CAN_ERR_PROT_STUFF 0x04 /* bit stuffing error */
[80] Fix | Delete
#define CAN_ERR_PROT_BIT0 0x08 /* unable to send dominant bit */
[81] Fix | Delete
#define CAN_ERR_PROT_BIT1 0x10 /* unable to send recessive bit */
[82] Fix | Delete
#define CAN_ERR_PROT_OVERLOAD 0x20 /* bus overload */
[83] Fix | Delete
#define CAN_ERR_PROT_ACTIVE 0x40 /* active error announcement */
[84] Fix | Delete
#define CAN_ERR_PROT_TX 0x80 /* error occurred on transmission */
[85] Fix | Delete
[86] Fix | Delete
/* error in CAN protocol (location) / data[3] */
[87] Fix | Delete
#define CAN_ERR_PROT_LOC_UNSPEC 0x00 /* unspecified */
[88] Fix | Delete
#define CAN_ERR_PROT_LOC_SOF 0x03 /* start of frame */
[89] Fix | Delete
#define CAN_ERR_PROT_LOC_ID28_21 0x02 /* ID bits 28 - 21 (SFF: 10 - 3) */
[90] Fix | Delete
#define CAN_ERR_PROT_LOC_ID20_18 0x06 /* ID bits 20 - 18 (SFF: 2 - 0 )*/
[91] Fix | Delete
#define CAN_ERR_PROT_LOC_SRTR 0x04 /* substitute RTR (SFF: RTR) */
[92] Fix | Delete
#define CAN_ERR_PROT_LOC_IDE 0x05 /* identifier extension */
[93] Fix | Delete
#define CAN_ERR_PROT_LOC_ID17_13 0x07 /* ID bits 17-13 */
[94] Fix | Delete
#define CAN_ERR_PROT_LOC_ID12_05 0x0F /* ID bits 12-5 */
[95] Fix | Delete
#define CAN_ERR_PROT_LOC_ID04_00 0x0E /* ID bits 4-0 */
[96] Fix | Delete
#define CAN_ERR_PROT_LOC_RTR 0x0C /* RTR */
[97] Fix | Delete
#define CAN_ERR_PROT_LOC_RES1 0x0D /* reserved bit 1 */
[98] Fix | Delete
#define CAN_ERR_PROT_LOC_RES0 0x09 /* reserved bit 0 */
[99] Fix | Delete
#define CAN_ERR_PROT_LOC_DLC 0x0B /* data length code */
[100] Fix | Delete
#define CAN_ERR_PROT_LOC_DATA 0x0A /* data section */
[101] Fix | Delete
#define CAN_ERR_PROT_LOC_CRC_SEQ 0x08 /* CRC sequence */
[102] Fix | Delete
#define CAN_ERR_PROT_LOC_CRC_DEL 0x18 /* CRC delimiter */
[103] Fix | Delete
#define CAN_ERR_PROT_LOC_ACK 0x19 /* ACK slot */
[104] Fix | Delete
#define CAN_ERR_PROT_LOC_ACK_DEL 0x1B /* ACK delimiter */
[105] Fix | Delete
#define CAN_ERR_PROT_LOC_EOF 0x1A /* end of frame */
[106] Fix | Delete
#define CAN_ERR_PROT_LOC_INTERM 0x12 /* intermission */
[107] Fix | Delete
[108] Fix | Delete
/* error status of CAN-transceiver / data[4] */
[109] Fix | Delete
/* CANH CANL */
[110] Fix | Delete
#define CAN_ERR_TRX_UNSPEC 0x00 /* 0000 0000 */
[111] Fix | Delete
#define CAN_ERR_TRX_CANH_NO_WIRE 0x04 /* 0000 0100 */
[112] Fix | Delete
#define CAN_ERR_TRX_CANH_SHORT_TO_BAT 0x05 /* 0000 0101 */
[113] Fix | Delete
#define CAN_ERR_TRX_CANH_SHORT_TO_VCC 0x06 /* 0000 0110 */
[114] Fix | Delete
#define CAN_ERR_TRX_CANH_SHORT_TO_GND 0x07 /* 0000 0111 */
[115] Fix | Delete
#define CAN_ERR_TRX_CANL_NO_WIRE 0x40 /* 0100 0000 */
[116] Fix | Delete
#define CAN_ERR_TRX_CANL_SHORT_TO_BAT 0x50 /* 0101 0000 */
[117] Fix | Delete
#define CAN_ERR_TRX_CANL_SHORT_TO_VCC 0x60 /* 0110 0000 */
[118] Fix | Delete
#define CAN_ERR_TRX_CANL_SHORT_TO_GND 0x70 /* 0111 0000 */
[119] Fix | Delete
#define CAN_ERR_TRX_CANL_SHORT_TO_CANH 0x80 /* 1000 0000 */
[120] Fix | Delete
[121] Fix | Delete
/* controller specific additional information / data[5..7] */
[122] Fix | Delete
[123] Fix | Delete
#endif /* _CAN_ERROR_H */
[124] Fix | Delete
[125] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function