diff --git a/drivers/dahdi/xpp/card_bri.c b/drivers/dahdi/xpp/card_bri.c index e859d74..f4addc3 100644 --- a/drivers/dahdi/xpp/card_bri.c +++ b/drivers/dahdi/xpp/card_bri.c @@ -121,13 +121,13 @@ static const char *xhfc_state_name(bool is_nt, enum xhfc_states state) #define A_SU_RD_STA 0x30 typedef union { struct { - byte v_su_sta:4; - byte v_su_fr_sync:1; - byte v_su_t2_exp:1; - byte v_su_info0:1; - byte v_g2_g3:1; + __u8 v_su_sta:4; + __u8 v_su_fr_sync:1; + __u8 v_su_t2_exp:1; + __u8 v_su_info0:1; + __u8 v_g2_g3:1; } bits; - byte reg; + __u8 reg; } su_rd_sta_t; #define REG30_LOST 3 /* in polls */ @@ -145,7 +145,7 @@ typedef union { /*---------------- BRI Protocol Commands ----------------------------------*/ -static int write_state_register(xpd_t *xpd, byte value); +static int write_state_register(xpd_t *xpd, __u8 value); static bool bri_packet_is_valid(xpacket_t *pack); static void bri_packet_dump(const char *msg, xpacket_t *pack); #ifdef CONFIG_PROC_FS @@ -182,9 +182,9 @@ enum bri_led_names { struct bri_leds { - byte state:2; - byte led_sel:1; /* 0 - GREEN, 1 - RED */ - byte reserved:5; + __u8 state:2; + __u8 led_sel:1; /* 0 - GREEN, 1 - RED */ + __u8 reserved:5; }; #ifndef MAX_DFRAME_LEN_L1 @@ -235,7 +235,7 @@ static /* 0x33 */ DECLARE_CMD(BRI, SET_LED, enum bri_led_names which_led, enum l CALL_PROTO(BRI, SET_LED, (xpd)->xbus, (xpd), (which), (tostate)) #define DEBUG_BUF_SIZE (100) -static void dump_hex_buf(xpd_t *xpd, char *msg, byte *buf, size_t len) +static void dump_hex_buf(xpd_t *xpd, char *msg, __u8 *buf, size_t len) { char debug_buf[DEBUG_BUF_SIZE + 1]; int i; @@ -248,7 +248,7 @@ static void dump_hex_buf(xpd_t *xpd, char *msg, byte *buf, size_t len) (n >= DEBUG_BUF_SIZE)?"...":""); } -static void dump_dchan_packet(xpd_t *xpd, bool transmit, byte *buf, int len) +static void dump_dchan_packet(xpd_t *xpd, bool transmit, __u8 *buf, int len) { struct BRI_priv_data *priv; char msgbuf[MAX_PROC_WRITE]; @@ -329,7 +329,7 @@ static void layer1_state(xpd_t *xpd, bool up) static void te_activation(xpd_t *xpd, bool on) { struct BRI_priv_data *priv; - byte curr_state; + __u8 curr_state; BUG_ON(!xpd); priv = xpd->priv; @@ -372,7 +372,7 @@ static void te_activation(xpd_t *xpd, bool on) static void nt_activation(xpd_t *xpd, bool on) { struct BRI_priv_data *priv; - byte curr_state; + __u8 curr_state; BUG_ON(!xpd); priv = xpd->priv; @@ -421,10 +421,10 @@ static void nt_activation(xpd_t *xpd, bool on) /* * D-Chan receive */ -static int bri_check_stat(xpd_t *xpd, struct dahdi_chan *dchan, byte *buf, int len) +static int bri_check_stat(xpd_t *xpd, struct dahdi_chan *dchan, __u8 *buf, int len) { struct BRI_priv_data *priv; - byte status; + __u8 status; priv = xpd->priv; BUG_ON(!priv); @@ -453,7 +453,7 @@ static int bri_check_stat(xpd_t *xpd, struct dahdi_chan *dchan, byte *buf, int l static int rx_dchan(xpd_t *xpd, reg_cmd_t *regcmd) { struct BRI_priv_data *priv; - byte *src; + __u8 *src; struct dahdi_chan *dchan; uint len; bool eoframe; @@ -673,7 +673,7 @@ static int bri_proc_create(xbus_t *xbus, xpd_t *xpd) } static xpd_t *BRI_card_new(xbus_t *xbus, int unit, int subunit, const xproto_table_t *proto_table, - byte subtype, int subunits, int subunit_ports, bool to_phone) + __u8 subtype, int subunits, int subunit_ports, bool to_phone) { xpd_t *xpd = NULL; int channels = min(3, CHANNELS_PERXPD); @@ -1191,7 +1191,7 @@ static void BRI_card_pcm_recompute(xpd_t *xpd, static void BRI_card_pcm_fromspan(xpd_t *xpd, xpacket_t *pack) { - byte *pcm; + __u8 *pcm; unsigned long flags; int i; int subunit; @@ -1237,7 +1237,7 @@ static void BRI_card_pcm_fromspan(xpd_t *xpd, xpacket_t *pack) static void BRI_card_pcm_tospan(xpd_t *xpd, xpacket_t *pack) { - byte *pcm; + __u8 *pcm; xpp_line_t pcm_mask; unsigned long flags; int subunit; @@ -1343,7 +1343,7 @@ static /* 0x33 */ HOSTCMD(BRI, SET_LED, enum bri_led_names which_led, enum led_s return ret; } -static int write_state_register(xpd_t *xpd, byte value) +static int write_state_register(xpd_t *xpd, __u8 value) { int ret; @@ -1363,7 +1363,7 @@ static int write_state_register(xpd_t *xpd, byte value) } /*---------------- BRI: Astribank Reply Handlers --------------------------*/ -static void su_new_state(xpd_t *xpd, byte reg_x30) +static void su_new_state(xpd_t *xpd, __u8 reg_x30) { struct BRI_priv_data *priv; su_rd_sta_t new_state; diff --git a/drivers/dahdi/xpp/card_echo.c b/drivers/dahdi/xpp/card_echo.c index 200dd55..25d09d9 100644 --- a/drivers/dahdi/xpp/card_echo.c +++ b/drivers/dahdi/xpp/card_echo.c @@ -43,12 +43,12 @@ static bool echo_packet_is_valid(xpacket_t *pack); static void echo_packet_dump(const char *msg, xpacket_t *pack); DEF_RPACKET_DATA(ECHO, SET, - byte timeslots[ECHO_TIMESLOTS]; + __u8 timeslots[ECHO_TIMESLOTS]; ); DEF_RPACKET_DATA(ECHO, SET_REPLY, - byte status; - byte reserved; + __u8 status; + __u8 reserved; ); struct ECHO_priv_data { @@ -59,7 +59,7 @@ static xproto_table_t PROTO_TABLE(ECHO); /*---------------- ECHO: Methods -------------------------------------------*/ static xpd_t *ECHO_card_new(xbus_t *xbus, int unit, int subunit, - const xproto_table_t *proto_table, byte subtype, + const xproto_table_t *proto_table, __u8 subtype, int subunits, int subunit_ports, bool to_phone) { xpd_t *xpd = NULL; @@ -146,7 +146,7 @@ static int ECHO_card_register_reply(xbus_t *xbus, xpd_t *xpd, reg_cmd_t *info) static /* 0x39 */ HOSTCMD(ECHO, SET) { struct xbus_echo_state *es; - byte *ts; + __u8 *ts; xframe_t *xframe; xpacket_t *pack; int ret; @@ -172,7 +172,7 @@ static int ECHO_ec_set(xpd_t *xpd, int pos, bool on) { int ts_number; int ts_mask; - byte *ts; + __u8 *ts; ts = xpd->xbus->echo_state.timeslots; /* @@ -207,7 +207,7 @@ static int ECHO_ec_get(xpd_t *xpd, int pos) int ts_number; int ts_mask; int is_on; - byte *ts; + __u8 *ts; ts = xpd->xbus->echo_state.timeslots; ts_mask = (xpd->addr.unit == 0) ? 0x1 : 0x2; /* Which bit? */ @@ -227,7 +227,7 @@ static int ECHO_ec_get(xpd_t *xpd, int pos) static void ECHO_ec_dump(xbus_t *xbus) { - byte *ts; + __u8 *ts; int i; ts = xbus->echo_state.timeslots; @@ -255,7 +255,7 @@ static int ECHO_ec_update(xbus_t *xbus) /*---------------- ECHO: Astribank Reply Handlers --------------------------*/ HANDLER_DEF(ECHO, SET_REPLY) { - byte status; + __u8 status; BUG_ON(!xpd); status = RPACKET_FIELD(pack, ECHO, SET_REPLY, status); diff --git a/drivers/dahdi/xpp/card_fxo.c b/drivers/dahdi/xpp/card_fxo.c index bed4e21..1eaa215 100644 --- a/drivers/dahdi/xpp/card_fxo.c +++ b/drivers/dahdi/xpp/card_fxo.c @@ -202,12 +202,12 @@ static const int led_register_mask[] = { BIT(7), BIT(6), BIT(5) }; /* * LED control is done via DAA register 0x20 */ -static int do_led(xpd_t *xpd, lineno_t chan, byte which, bool on) +static int do_led(xpd_t *xpd, lineno_t chan, __u8 which, bool on) { int ret = 0; struct FXO_priv_data *priv; xbus_t *xbus; - byte value; + __u8 value; BUG_ON(!xpd); xbus = xpd->xbus; @@ -324,7 +324,7 @@ static int do_sethook(xpd_t *xpd, int pos, bool to_offhook) xbus_t *xbus; struct FXO_priv_data *priv; int ret = 0; - byte value; + __u8 value; BUG_ON(!xpd); BUG_ON(PHONEDEV(xpd).direction == TO_PHONE); // We can SETHOOK state only on PSTN @@ -423,7 +423,7 @@ static int fxo_proc_create(xbus_t *xbus, xpd_t *xpd) } static xpd_t *FXO_card_new(xbus_t *xbus, int unit, int subunit, const xproto_table_t *proto_table, - byte subtype, int subunits, int subunit_ports, bool to_phone) + __u8 subtype, int subunits, int subunit_ports, bool to_phone) { xpd_t *xpd = NULL; int channels; @@ -870,7 +870,7 @@ HANDLER_DEF(FXO, SIG_CHANGED) return 0; } -static void update_battery_voltage(xpd_t *xpd, byte data_low, xportno_t portno) +static void update_battery_voltage(xpd_t *xpd, __u8 data_low, xportno_t portno) { struct FXO_priv_data *priv; enum polarity_state pol; @@ -986,7 +986,7 @@ ignore_reading: reset_battery_readings(xpd, portno); /* unstable during hook changes */ } -static void update_battery_current(xpd_t *xpd, byte data_low, xportno_t portno) +static void update_battery_current(xpd_t *xpd, __u8 data_low, xportno_t portno) { struct FXO_priv_data *priv; @@ -1028,7 +1028,7 @@ ignore_it: #ifdef WITH_METERING #define BTD_BIT BIT(0) -static void update_metering_state(xpd_t *xpd, byte data_low, lineno_t portno) +static void update_metering_state(xpd_t *xpd, __u8 data_low, lineno_t portno) { struct FXO_priv_data *priv; bool metering_tone = data_low & BTD_BIT; diff --git a/drivers/dahdi/xpp/card_fxs.c b/drivers/dahdi/xpp/card_fxs.c index be26dce..94270ba 100644 --- a/drivers/dahdi/xpp/card_fxs.c +++ b/drivers/dahdi/xpp/card_fxs.c @@ -224,7 +224,7 @@ static const int led_register_vals[] = { BIT(4), BIT(1), BIT(0) }; * - A line number * - ALL_LINES. This is not valid anymore since 8-Jan-2007. */ -static int do_led(xpd_t *xpd, lineno_t chan, byte which, bool on) +static int do_led(xpd_t *xpd, lineno_t chan, __u8 which, bool on) { int ret = 0; struct FXS_priv_data *priv; @@ -314,7 +314,7 @@ static void restore_leds(xpd_t *xpd) #ifdef WITH_METERING static int metering_gen(xpd_t *xpd, lineno_t chan, bool on) { - byte value = (on) ? 0x94 : 0x00; + __u8 value = (on) ? 0x94 : 0x00; LINE_DBG(SIGNAL, xpd, chan, "METERING Generate: %s\n", (on)?"ON":"OFF"); return SLIC_DIRECT_REQUEST(xpd->xbus, xpd, chan, SLIC_WRITE, 0x23, value); @@ -380,7 +380,7 @@ static int fxs_proc_create(xbus_t *xbus, xpd_t *xpd) } static xpd_t *FXS_card_new(xbus_t *xbus, int unit, int subunit, const xproto_table_t *proto_table, - byte subtype, int subunits, int subunit_ports, bool to_phone) + __u8 subtype, int subunits, int subunit_ports, bool to_phone) { xpd_t *xpd = NULL; int channels; @@ -1052,7 +1052,7 @@ static void poll_inputs(xpd_t *xpd) BUG_ON(xpd->xbus_idx != 0); // Only unit #0 has digital inputs for (i = 0; i < ARRAY_SIZE(input_channels); i++) { - byte pos = input_channels[i]; + __u8 pos = input_channels[i]; SLIC_DIRECT_REQUEST(xpd->xbus, xpd, pos, SLIC_READ, 0x06, 0); } @@ -1112,9 +1112,9 @@ static void detect_vmwi(xpd_t *xpd) { struct FXS_priv_data *priv; xbus_t *xbus; - static const byte FSK_COMMON_PATTERN[] = { 0xA8, 0x49, 0x22, 0x3B, 0x9F, 0xFF, 0x1F, 0xBB }; - static const byte FSK_ON_PATTERN[] = { 0xA2, 0x2C, 0x1F, 0x2C, 0xBB, 0xA1, 0xA5, 0xFF }; - static const byte FSK_OFF_PATTERN[] = { 0xA2, 0x2C, 0x28, 0xA5, 0xB1, 0x21, 0x49, 0x9F }; + static const __u8 FSK_COMMON_PATTERN[] = { 0xA8, 0x49, 0x22, 0x3B, 0x9F, 0xFF, 0x1F, 0xBB }; + static const __u8 FSK_ON_PATTERN[] = { 0xA2, 0x2C, 0x1F, 0x2C, 0xBB, 0xA1, 0xA5, 0xFF }; + static const __u8 FSK_OFF_PATTERN[] = { 0xA2, 0x2C, 0x28, 0xA5, 0xB1, 0x21, 0x49, 0x9F }; int i; xpp_line_t ignore_mask; @@ -1130,7 +1130,7 @@ static void detect_vmwi(xpd_t *xpd) PHONEDEV(xpd).digital_outputs; for_each_line(xpd, i) { struct dahdi_chan *chan = XPD_CHAN(xpd, i); - byte *writechunk = chan->writechunk; + __u8 *writechunk = chan->writechunk; if (IS_SET(ignore_mask, i)) continue; @@ -1331,9 +1331,9 @@ static const char dtmf_digits[] = { /* * This function is called with spinlocked XPD */ -static void process_dtmf(xpd_t *xpd, uint portnum, byte val) +static void process_dtmf(xpd_t *xpd, uint portnum, __u8 val) { - byte digit; + __u8 digit; bool key_down = val & 0x10; bool want_mute; bool want_event; @@ -1388,7 +1388,7 @@ static int FXS_card_register_reply(xbus_t *xbus, xpd_t *xpd, reg_cmd_t *info) { unsigned long flags; struct FXS_priv_data *priv; - byte regnum; + __u8 regnum; bool indirect; spin_lock_irqsave(&xpd->lock, flags); @@ -1400,7 +1400,7 @@ static int FXS_card_register_reply(xbus_t *xbus, xpd_t *xpd, reg_cmd_t *info) (indirect)?"I":"D", regnum, REG_FIELD(info, data_low), REG_FIELD(info, data_high)); if (!indirect && regnum == REG_DTMF_DECODE) { - byte val = REG_FIELD(info, data_low); + __u8 val = REG_FIELD(info, data_low); process_dtmf(xpd, info->portnum, val); } @@ -1413,7 +1413,7 @@ static int FXS_card_register_reply(xbus_t *xbus, xpd_t *xpd, reg_cmd_t *info) } #endif else if (!indirect && regnum == REG_LOOPCLOSURE) { /* OFFHOOK ? */ - byte val = REG_FIELD(info, data_low); + __u8 val = REG_FIELD(info, data_low); xpp_line_t mask = BIT(info->portnum); xpp_line_t offhook; diff --git a/drivers/dahdi/xpp/card_global.c b/drivers/dahdi/xpp/card_global.c index fc5b61d..b786f31 100644 --- a/drivers/dahdi/xpp/card_global.c +++ b/drivers/dahdi/xpp/card_global.c @@ -78,7 +78,7 @@ static int parse_hexbyte(const char *buf) val = simple_strtoul(buf, &endp, 16); if (*endp != '\0' || val > 0xFF) return -EBADR; - return (byte)val; + return (__u8)val; } static int execute_chip_command(xpd_t *xpd, const int argc, char *argv[]) @@ -274,7 +274,7 @@ int parse_chip_command(xpd_t *xpd, char *cmdline) { xbus_t *xbus; int ret = -EBADR; - byte buf[MAX_PROC_WRITE]; + __u8 buf[MAX_PROC_WRITE]; char *str; char *p; static const int MAX_ARGS = 10; @@ -348,8 +348,8 @@ static void global_packet_dump(const char *msg, xpacket_t *pack); } int xpp_register_request(xbus_t *xbus, xpd_t *xpd, xportno_t portno, - bool writing, byte regnum, bool do_subreg, byte subreg, - byte data_low, bool do_datah, byte data_high, bool should_reply) + bool writing, __u8 regnum, bool do_subreg, __u8 subreg, + __u8 data_low, bool do_datah, __u8 data_high, bool should_reply) { int ret = 0; xframe_t *xframe; @@ -446,7 +446,7 @@ HANDLER_DEF(GLOBAL, NULL_REPLY) HANDLER_DEF(GLOBAL, AB_DESCRIPTION) /* 0x08 */ { struct xbus_workqueue *worker; - byte rev; + __u8 rev; struct unit_descriptor *units; int count_units; int i; @@ -458,7 +458,7 @@ HANDLER_DEF(GLOBAL, AB_DESCRIPTION) /* 0x08 */ } rev = RPACKET_FIELD(pack, GLOBAL, AB_DESCRIPTION, rev); units = RPACKET_FIELD(pack, GLOBAL, AB_DESCRIPTION, unit_descriptor); - count_units = XPACKET_LEN(pack) - ((byte *)units - (byte *)pack); + count_units = XPACKET_LEN(pack) - ((__u8 *)units - (__u8 *)pack); count_units /= sizeof(*units); if (rev != XPP_PROTOCOL_VERSION) { XBUS_NOTICE(xbus, "Bad protocol version %d (should be %d)\n", @@ -561,8 +561,8 @@ HANDLER_DEF(GLOBAL, REGISTER_REPLY) HANDLER_DEF(GLOBAL, SYNC_REPLY) { - byte mode = RPACKET_FIELD(pack, GLOBAL, SYNC_REPLY, sync_mode); - byte drift = RPACKET_FIELD(pack, GLOBAL, SYNC_REPLY, drift); + __u8 mode = RPACKET_FIELD(pack, GLOBAL, SYNC_REPLY, sync_mode); + __u8 drift = RPACKET_FIELD(pack, GLOBAL, SYNC_REPLY, drift); const char *mode_name; BUG_ON(!xbus); @@ -582,8 +582,8 @@ HANDLER_DEF(GLOBAL, ERROR_CODE) { char tmp_name[TMP_NAME_LEN]; static long rate_limit; - byte category_code; - byte errorbits; + __u8 category_code; + __u8 errorbits; BUG_ON(!xbus); if ((rate_limit++ % 5003) > 200) @@ -651,7 +651,7 @@ int run_initialize_registers(xpd_t *xpd) char connectorstr[MAX_ENV_STR]; char xbuslabel[MAX_ENV_STR]; char init_card[MAX_PATH_STR]; - byte direction_mask; + __u8 direction_mask; int i; char *argv[] = { init_card, @@ -727,8 +727,8 @@ int run_initialize_registers(xpd_t *xpd) else if (ret < 0) { XPD_ERR(xpd, "Failed running '%s' (errno %d)\n", init_card, ret); } else { - byte exitval = ((unsigned)ret >> 8) & 0xFF; - byte sigval = ret & 0xFF; + __u8 exitval = ((unsigned)ret >> 8) & 0xFF; + __u8 sigval = ret & 0xFF; if (!exitval) { XPD_ERR(xpd, "'%s' killed by signal %d\n", init_card, sigval); diff --git a/drivers/dahdi/xpp/card_global.h b/drivers/dahdi/xpp/card_global.h index 6264e84..c8ce7a7 100644 --- a/drivers/dahdi/xpp/card_global.h +++ b/drivers/dahdi/xpp/card_global.h @@ -44,12 +44,12 @@ enum global_opcodes { struct unit_descriptor { struct xpd_addr addr; - byte subtype:4; - byte type:4; - byte numchips; - byte ports_per_chip; - byte port_dir; /* bitmask: 0 - PSTN, 1 - PHONE */ - byte reserved[2]; + __u8 subtype:4; + __u8 type:4; + __u8 numchips; + __u8 ports_per_chip; + __u8 port_dir; /* bitmask: 0 - PSTN, 1 - PHONE */ + __u8 reserved[2]; struct xpd_addr ec_addr; }; @@ -57,12 +57,12 @@ struct unit_descriptor { DEF_RPACKET_DATA(GLOBAL, NULL_REPLY); DEF_RPACKET_DATA(GLOBAL, AB_REQUEST, - byte rev; - byte reserved; + __u8 rev; + __u8 reserved; ); DEF_RPACKET_DATA(GLOBAL, AB_DESCRIPTION, - byte rev; - byte reserved[3]; + __u8 rev; + __u8 reserved[3]; struct unit_descriptor unit_descriptor[NUM_UNITS]; ); DEF_RPACKET_DATA(GLOBAL, REGISTER_REQUEST, @@ -70,30 +70,30 @@ DEF_RPACKET_DATA(GLOBAL, REGISTER_REQUEST, ); DEF_RPACKET_DATA(GLOBAL, PCM_WRITE, xpp_line_t lines; - byte pcm[PCM_CHUNKSIZE]; + __u8 pcm[PCM_CHUNKSIZE]; ); DEF_RPACKET_DATA(GLOBAL, PCM_READ, xpp_line_t lines; - byte pcm[PCM_CHUNKSIZE]; + __u8 pcm[PCM_CHUNKSIZE]; ); DEF_RPACKET_DATA(GLOBAL, SYNC_SOURCE, - byte sync_mode; - byte drift; + __u8 sync_mode; + __u8 drift; ); DEF_RPACKET_DATA(GLOBAL, SYNC_REPLY, - byte sync_mode; - byte drift; + __u8 sync_mode; + __u8 drift; ); DEF_RPACKET_DATA(GLOBAL, REGISTER_REPLY, reg_cmd_t regcmd; ); DEF_RPACKET_DATA(GLOBAL, RESET_SYNC_COUNTERS, - byte mask; + __u8 mask; ); DEF_RPACKET_DATA(GLOBAL, ERROR_CODE, - byte category_code; - byte errorbits; - byte bad_packet[0]; + __u8 category_code; + __u8 errorbits; + __u8 bad_packet[0]; ); /* 0x07 */ DECLARE_CMD(GLOBAL, AB_REQUEST); @@ -101,10 +101,10 @@ DEF_RPACKET_DATA(GLOBAL, ERROR_CODE, /* 0x23 */ DECLARE_CMD(GLOBAL, RESET_SYNC_COUNTERS); int xpp_register_request(xbus_t *xbus, xpd_t *xpd, xportno_t portno, - bool writing, byte regnum, bool do_subreg, byte subreg, - byte data_low, bool do_datah, byte data_high, bool should_reply); + bool writing, __u8 regnum, bool do_subreg, __u8 subreg, + __u8 data_low, bool do_datah, __u8 data_high, bool should_reply); int send_multibyte_request(xbus_t *xbus, unsigned unit, xportno_t portno, - bool eoftx, byte *buf, unsigned len); + bool eoftx, __u8 *buf, unsigned len); extern xproto_table_t PROTO_TABLE(GLOBAL); int run_initialize_registers(xpd_t *xpd); int parse_chip_command(xpd_t *xpd, char *cmdline); diff --git a/drivers/dahdi/xpp/card_pri.c b/drivers/dahdi/xpp/card_pri.c index fa871e5..2abc944 100644 --- a/drivers/dahdi/xpp/card_pri.c +++ b/drivers/dahdi/xpp/card_pri.c @@ -183,9 +183,9 @@ enum pri_led_selectors { #define NUM_LEDS 4 struct pri_leds { - byte state:2; /* enum pri_led_state */ - byte led_sel:2; /* enum pri_led_selectors */ - byte reserved:4; + __u8 state:2; /* enum pri_led_state */ + __u8 led_sel:2; /* enum pri_led_selectors */ + __u8 reserved:4; }; #define REG_CCB1_T 0x2F /* Clear Channel Register 1 */ @@ -333,19 +333,19 @@ struct PRI_priv_data { #define VALID_DCHAN(p) (DCHAN(p) != NO_DCHAN) #define SET_DCHAN(p, d) do { DCHAN(p) = (d); } while (0); - byte cas_rs_e[NUM_CAS_RS_E]; - byte cas_ts_e[NUM_CAS_RS_E]; + __u8 cas_rs_e[NUM_CAS_RS_E]; + __u8 cas_ts_e[NUM_CAS_RS_E]; uint cas_replies; bool is_esf; bool local_loopback; uint poll_noreplies; uint layer1_replies; - byte reg_frs0; - byte reg_frs1; + __u8 reg_frs0; + __u8 reg_frs1; bool layer1_up; int alarms; - byte dchan_tx_sample; - byte dchan_rx_sample; + __u8 dchan_tx_sample; + __u8 dchan_rx_sample; uint dchan_tx_counter; uint dchan_rx_counter; bool dchan_alive; @@ -367,7 +367,7 @@ static /* 0x33 */ DECLARE_CMD(PRI, SET_LED, enum pri_led_selectors led_sel, enum /*---------------- PRI: Methods -------------------------------------------*/ -static int query_subunit(xpd_t *xpd, byte regnum) +static int query_subunit(xpd_t *xpd, __u8 regnum) { XPD_DBG(REGS, xpd, "(%d%d): REG=0x%02X\n", xpd->addr.unit, xpd->addr.subunit, @@ -387,7 +387,7 @@ static int query_subunit(xpd_t *xpd, byte regnum) } -static int write_subunit(xpd_t *xpd, byte regnum, byte val) +static int write_subunit(xpd_t *xpd, __u8 regnum, __u8 val) { XPD_DBG(REGS, xpd, "(%d%d): REG=0x%02X dataL=0x%02X\n", xpd->addr.unit, xpd->addr.subunit, @@ -406,7 +406,7 @@ static int write_subunit(xpd_t *xpd, byte regnum, byte val) ); } -static int pri_write_reg(xpd_t *xpd, int regnum, byte val) +static int pri_write_reg(xpd_t *xpd, int regnum, __u8 val) { XPD_DBG(REGS, xpd, "(%d%d): REG=0x%02X dataL=0x%02X\n", xpd->addr.unit, xpd->addr.subunit, @@ -465,7 +465,7 @@ static int cas_numregs(xpd_t *xpd) return 0; } -static int write_cas_reg(xpd_t *xpd, int rsnum, byte val) +static int write_cas_reg(xpd_t *xpd, int rsnum, __u8 val) { struct PRI_priv_data *priv; int regbase = cas_regbase(xpd); @@ -703,10 +703,10 @@ static void set_clocking(xpd_t *xpd) } /* Now set it */ if (best_xpd && ((struct PRI_priv_data *)(best_xpd->priv))->clock_source == 0) { - byte reg_pc_init[] = { VAL_PC_GPI, VAL_PC_GPI, VAL_PC_GPI }; + __u8 reg_pc_init[] = { VAL_PC_GPI, VAL_PC_GPI, VAL_PC_GPI }; for (i = 0; i < ARRAY_SIZE(reg_pc_init); i++) { - byte reg_pc = reg_pc_init[i]; + __u8 reg_pc = reg_pc_init[i]; reg_pc |= (best_subunit & (1 << i)) ? VAL_PC_GPOH : VAL_PC_GPOL; XPD_DBG(SYNC, best_xpd, @@ -735,7 +735,7 @@ static void set_reg_lim0(const char *msg, xpd_t *xpd) struct PRI_priv_data *priv; bool is_master_mode; bool localloop; - byte lim0 = 0; + __u8 lim0 = 0; BUG_ON(!xpd); priv = xpd->priv; @@ -832,7 +832,7 @@ static void set_rbslines(xpd_t *xpd, int channo) XPD_DBG(DEVICES, xpd, "RBSLINES-%d(%s): 0x%X\n", channo, pri_protocol_name(priv->pri_protocol), new_rbslines); if ((priv->pri_protocol == PRI_PROTO_T1) || (priv->pri_protocol == PRI_PROTO_J1)) { - byte clear_lines = 0; /* Mark clear lines */ + __u8 clear_lines = 0; /* Mark clear lines */ bool reg_changed = 0; for_each_line(xpd, i) { @@ -882,15 +882,15 @@ static int pri_lineconfig(xpd_t *xpd, int lineconfig) const char *codingstr = ""; const char *crcstr = ""; #ifdef JAPANEZE_SUPPORT - byte rc0 = 0; /* FIXME: PCM offsets */ + __u8 rc0 = 0; /* FIXME: PCM offsets */ #endif - byte fmr0 = 0; - byte fmr1 = REG_FMR1_ECM; - byte fmr2 = 0; - byte fmr3 = 0; /* write only for CRC4 */ - byte fmr4 = 0; - byte cmdr = REG_CMDR_RRES | REG_CMDR_XRES; - byte xsp = 0; + __u8 fmr0 = 0; + __u8 fmr1 = REG_FMR1_ECM; + __u8 fmr2 = 0; + __u8 fmr3 = 0; /* write only for CRC4 */ + __u8 fmr4 = 0; + __u8 cmdr = REG_CMDR_RRES | REG_CMDR_XRES; + __u8 xsp = 0; unsigned int bad_bits; bool force_cas = 0; int i; @@ -1153,7 +1153,7 @@ static int pri_chanconfig(struct file *file, struct dahdi_chan *chan, } static xpd_t *PRI_card_new(xbus_t *xbus, int unit, int subunit, const xproto_table_t *proto_table, - byte subtype, int subunits, int subunit_ports, bool to_phone) + __u8 subtype, int subunits, int subunit_ports, bool to_phone) { xpd_t *xpd = NULL; struct PRI_priv_data *priv; @@ -1358,11 +1358,11 @@ static void dchan_state(xpd_t *xpd, bool up) int d = PRI_DCHAN_IDX(priv); if (SPAN_REGISTERED(xpd) && d >= 0 && d < PHONEDEV(xpd).channels) { - byte *pcm; + __u8 *pcm; - pcm = (byte *)XPD_CHAN(xpd, d)->readchunk; + pcm = (__u8 *)XPD_CHAN(xpd, d)->readchunk; pcm[0] = 0x00; - pcm = (byte *)XPD_CHAN(xpd, d)->writechunk; + pcm = (__u8 *)XPD_CHAN(xpd, d)->writechunk; pcm[0] = 0x00; } XPD_DBG(SIGNAL, xpd, "STATE CHANGE: D-Channel STOPPED\n"); @@ -1566,7 +1566,7 @@ static int pri_shutdown(struct dahdi_span *span) static int encode_rbsbits_e1(xpd_t *xpd, int pos, int bits) { struct PRI_priv_data *priv; - byte val; + __u8 val; int rsnum; BUG_ON(!xpd); @@ -1602,7 +1602,7 @@ static int encode_rbsbits_t1(xpd_t *xpd, int pos, int bits) int width; uint tx_bits = bits; uint mask; - byte val; + __u8 val; BUG_ON(!xpd); priv = xpd->priv; @@ -1637,7 +1637,7 @@ static int encode_rbsbits_t1(xpd_t *xpd, int pos, int bits) static void send_idlebits(xpd_t *xpd, bool saveold) { struct PRI_priv_data *priv; - byte save_rs[NUM_CAS_RS_E]; + __u8 save_rs[NUM_CAS_RS_E]; int i; if (!SPAN_REGISTERED(xpd)) @@ -1721,7 +1721,7 @@ static int pri_rbsbits(struct dahdi_chan *chan, int bits) static void PRI_card_pcm_fromspan(xpd_t *xpd, xpacket_t *pack) { struct PRI_priv_data *priv; - byte *pcm; + __u8 *pcm; unsigned long flags; int i; xpp_line_t wanted_lines; @@ -1794,7 +1794,7 @@ static void PRI_card_pcm_fromspan(xpd_t *xpd, xpacket_t *pack) static void PRI_card_pcm_tospan(xpd_t *xpd, xpacket_t *pack) { struct PRI_priv_data *priv; - byte *pcm; + __u8 *pcm; xpp_line_t physical_mask; unsigned long flags; int i; @@ -1916,7 +1916,7 @@ static /* 0x33 */ HOSTCMD(PRI, SET_LED, enum pri_led_selectors led_sel, enum pri } /*---------------- PRI: Astribank Reply Handlers --------------------------*/ -static void layer1_state(xpd_t *xpd, byte data_low) +static void layer1_state(xpd_t *xpd, __u8 data_low) { struct PRI_priv_data *priv; int alarms = DAHDI_ALARM_NONE; @@ -1981,7 +1981,7 @@ static void layer1_state(xpd_t *xpd, byte data_low) XPD_DBG(REGS, xpd, "subunit=%d data_low=0x%02X\n", xpd->addr.subunit, data_low); } -static int decode_cas_e1(xpd_t *xpd, byte regnum, byte data_low) +static int decode_cas_e1(xpd_t *xpd, __u8 regnum, __u8 data_low) { struct PRI_priv_data *priv; uint pos = regnum - REG_RS2_E; @@ -2024,7 +2024,7 @@ static int decode_cas_e1(xpd_t *xpd, byte regnum, byte data_low) return 0; } -static int decode_cas_t1(xpd_t *xpd, byte regnum, byte data_low) +static int decode_cas_t1(xpd_t *xpd, __u8 regnum, __u8 data_low) { struct PRI_priv_data *priv; uint rsnum; @@ -2075,7 +2075,7 @@ static int decode_cas_t1(xpd_t *xpd, byte regnum, byte data_low) return 0; } -static void process_cas_dchan(xpd_t *xpd, byte regnum, byte data_low) +static void process_cas_dchan(xpd_t *xpd, __u8 regnum, __u8 data_low) { struct PRI_priv_data *priv; @@ -2137,8 +2137,8 @@ static int PRI_card_register_reply(xbus_t *xbus, xpd_t *xpd, reg_cmd_t *info) struct PRI_priv_data *priv; struct xpd_addr addr; xpd_t *orig_xpd; - byte regnum; - byte data_low; + __u8 regnum; + __u8 data_low; /* Map UNIT + PORTNUM to XPD */ orig_xpd = xpd; @@ -2385,7 +2385,7 @@ static DEVICE_ATTR_READER(pri_alarms_show, dev, buf) unsigned long flags; int len = 0; static const struct { - byte bits; + __u8 bits; const char *name; } alarm_types[] = { { REG_FRS0_LOS, "RED" }, diff --git a/drivers/dahdi/xpp/mmapdrv.c b/drivers/dahdi/xpp/mmapdrv.c index 0890ceb..8dee19c 100644 --- a/drivers/dahdi/xpp/mmapdrv.c +++ b/drivers/dahdi/xpp/mmapdrv.c @@ -105,7 +105,7 @@ static irqreturn_t xpp_mmap_rx_irq(int irq, void *dev_id) unsigned short rxcnt; xbus_t *xbus; xframe_t *xframe; - byte *buf; + __u8 *buf; bool in_use = 0; struct timeval tv1; @@ -287,7 +287,7 @@ static xframe_t *alloc_xframe(xbus_t *xbus, gfp_t gfp_flags) XBUS_ERR(xbus, "frame allocation failed (%d)\n", rate_limit); return NULL; } - xframe_init(xbus, xframe, ((byte*)xframe) + sizeof(xframe_t), XFRAME_DATASIZE, xbus); + xframe_init(xbus, xframe, ((__u8*)xframe) + sizeof(xframe_t), XFRAME_DATASIZE, xbus); return xframe; } @@ -431,14 +431,14 @@ static int __init xpp_mmap_load_fpga(u8 *data, size_t size) bfin_write_PORTGIO_CLEAR(DCLK); for (i=0; i>= 1; + __u8 >>= 1; bfin_write_PORTGIO_SET(DCLK); bfin_write_PORTGIO_CLEAR(DCLK); } diff --git a/drivers/dahdi/xpp/xbus-core.c b/drivers/dahdi/xpp/xbus-core.c index bfa3c8a..cdb0250 100644 --- a/drivers/dahdi/xpp/xbus-core.c +++ b/drivers/dahdi/xpp/xbus-core.c @@ -251,7 +251,7 @@ xpacket_t *xframe_next_packet(xframe_t *frm, int len) static DEFINE_SPINLOCK(serialize_dump_xframe); -static void do_hexdump(const char msg[], byte *data, uint16_t len) +static void do_hexdump(const char msg[], __u8 *data, uint16_t len) { int i; int debug = DBG_ANY; /* mask global debug */ @@ -620,12 +620,12 @@ int xbus_xpd_unbind(xbus_t *xbus, xpd_t *xpd) static int new_card(xbus_t *xbus, int unit, - byte type, - byte subtype, - byte numchips, - byte ports_per_chip, - byte ports, - byte port_dir) + __u8 type, + __u8 subtype, + __u8 numchips, + __u8 ports_per_chip, + __u8 ports, + __u8 port_dir) { const xproto_table_t *proto_table; int i; @@ -1720,8 +1720,8 @@ static int proc_xbus_command_write(struct file *file, const char __user *buffer, char *buf; xbus_t *xbus = data; char *p; - byte *pack_start; - byte *q; + __u8 *pack_start; + __u8 *q; xframe_t *xframe; size_t len; const size_t max_len = xbus->transport.max_send_size; diff --git a/drivers/dahdi/xpp/xbus-core.h b/drivers/dahdi/xpp/xbus-core.h index 3cdaa36..7a629cf 100644 --- a/drivers/dahdi/xpp/xbus-core.h +++ b/drivers/dahdi/xpp/xbus-core.h @@ -171,7 +171,7 @@ struct echoops { struct xbus_echo_state { const struct echoops *echoops; - byte timeslots[ECHO_TIMESLOTS]; + __u8 timeslots[ECHO_TIMESLOTS]; int xpd_idx; struct device_attribute *da[MAX_XPDS]; }; @@ -188,7 +188,7 @@ struct xbus { /* low-level bus drivers set these 2 fields */ char connector[XBUS_DESCLEN]; char label[LABEL_SIZE]; - byte revision; /* Protocol revision */ + __u8 revision; /* Protocol revision */ struct xbus_transport transport; struct dahdi_device *ddev; @@ -288,8 +288,8 @@ struct xframe { struct timeval tv_received; /* filled by transport layer */ size_t frame_maxlen; - byte *packets; /* max XFRAME_DATASIZE */ - byte *first_free; + __u8 *packets; /* max XFRAME_DATASIZE */ + __u8 *first_free; int usec_towait; /* prevent overflowing AB */ void *priv; }; diff --git a/drivers/dahdi/xpp/xbus-pcm.c b/drivers/dahdi/xpp/xbus-pcm.c index 8ee6a4e..f597a47 100644 --- a/drivers/dahdi/xpp/xbus-pcm.c +++ b/drivers/dahdi/xpp/xbus-pcm.c @@ -856,7 +856,7 @@ dropit: */ void generic_card_pcm_fromspan(xpd_t *xpd, xpacket_t *pack) { - byte *pcm; + __u8 *pcm; unsigned long flags; xpp_line_t wanted_lines; int i; @@ -891,7 +891,7 @@ void generic_card_pcm_fromspan(xpd_t *xpd, xpacket_t *pack) void generic_card_pcm_tospan(xpd_t *xpd, xpacket_t *pack) { - byte *pcm; + __u8 *pcm; xpp_line_t pcm_mask; xpp_line_t pcm_mute; unsigned long flags; @@ -963,9 +963,9 @@ EXPORT_SYMBOL(generic_echocancel_setmask); static int copy_pcm_tospan(xbus_t *xbus, xframe_t *xframe) { - byte *xframe_end; + __u8 *xframe_end; xpacket_t *pack; - byte *p; + __u8 *p; int ret = -EPROTO; /* Assume error */ if (debug & DBG_PCM) diff --git a/drivers/dahdi/xpp/xpd.h b/drivers/dahdi/xpp/xpd.h index aabbdf4..8c8c27e 100644 --- a/drivers/dahdi/xpp/xpd.h +++ b/drivers/dahdi/xpp/xpd.h @@ -88,13 +88,13 @@ typedef unsigned gfp_t; /* Added in 2.6.14 */ struct card_desc_struct { struct list_head card_list; u32 magic; - byte type; /* LSB: 1 - to_phone, 0 - to_line */ - byte subtype; + __u8 type; /* LSB: 1 - to_phone, 0 - to_line */ + __u8 subtype; struct xpd_addr xpd_addr; - byte numchips; - byte ports_per_chip; - byte ports; - byte port_dir; + __u8 numchips; + __u8 ports_per_chip; + __u8 ports; + __u8 port_dir; struct xpd_addr ec_addr; /* echo canceler address */ }; @@ -191,7 +191,7 @@ struct xpd { const struct xops *xops; xpd_type_t type; const char *type_name; - byte subtype; + __u8 subtype; int subunits; /* all siblings */ enum xpd_state xpd_state; struct device xpd_dev; diff --git a/drivers/dahdi/xpp/xpp_dahdi.c b/drivers/dahdi/xpp/xpp_dahdi.c index fcdcba0..3d75296 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.c +++ b/drivers/dahdi/xpp/xpp_dahdi.c @@ -220,11 +220,11 @@ void xpd_free(xpd_t *xpd) int create_xpd(xbus_t *xbus, const xproto_table_t *proto_table, int unit, int subunit, - byte type, - byte subtype, + __u8 type, + __u8 subtype, int subunits, int subunit_ports, - byte port_dir) + __u8 port_dir) { xpd_t *xpd = NULL; bool to_phone; @@ -326,10 +326,10 @@ static int xpd_read_proc(char *page, char **start, off_t off, int count, int *eo len += sprintf(page + len, "\nPCM:\n | [readchunk] | [writechunk] | W D"); for_each_line(xpd, i) { struct dahdi_chan *chan = XPD_CHAN(xpd, i); - byte rchunk[DAHDI_CHUNKSIZE]; - byte wchunk[DAHDI_CHUNKSIZE]; - byte *rp; - byte *wp; + __u8 rchunk[DAHDI_CHUNKSIZE]; + __u8 wchunk[DAHDI_CHUNKSIZE]; + __u8 *rp; + __u8 *wp; int j; if (IS_SET(PHONEDEV(xpd).digital_outputs, i)) @@ -522,7 +522,7 @@ __must_check xpd_t *xpd_alloc(xbus_t *xbus, __func__, type); goto err; } - xpd->priv = (byte *)xpd + sizeof(xpd_t); + xpd->priv = (__u8 *)xpd + sizeof(xpd_t); spin_lock_init(&xpd->lock); xpd->card_present = 0; xpd->type = proto_table->type; diff --git a/drivers/dahdi/xpp/xpp_dahdi.h b/drivers/dahdi/xpp/xpp_dahdi.h index d5e58c1..6f0e51d 100644 --- a/drivers/dahdi/xpp/xpp_dahdi.h +++ b/drivers/dahdi/xpp/xpp_dahdi.h @@ -31,7 +31,7 @@ int xpd_dahdi_postregister(xpd_t *xpd); void xpd_dahdi_preunregister(xpd_t *xpd); void xpd_dahdi_postunregister(xpd_t *xpd); int create_xpd(xbus_t *xbus, const xproto_table_t *proto_table, - int unit, int subunit, byte type, byte subtype, int subunits, int subunit_ports, byte port_dir); + int unit, int subunit, __u8 type, __u8 subtype, int subunits, int subunit_ports, __u8 port_dir); xpd_t *xpd_alloc(xbus_t *xbus, int unit, int subunit, int subtype, int subunits, size_t privsize, const xproto_table_t *proto_table, int channels); void xpd_free(xpd_t *xpd); void xpd_remove(xpd_t *xpd); diff --git a/drivers/dahdi/xpp/xproto.c b/drivers/dahdi/xpp/xproto.c index 2bbaf94..1283fba 100644 --- a/drivers/dahdi/xpp/xproto.c +++ b/drivers/dahdi/xpp/xproto.c @@ -45,7 +45,7 @@ bool valid_xpd_addr(const struct xpd_addr *addr) /*---------------- General Protocol Management ----------------------------*/ -const xproto_entry_t *xproto_card_entry(const xproto_table_t *table, byte opcode) +const xproto_entry_t *xproto_card_entry(const xproto_table_t *table, __u8 opcode) { const xproto_entry_t *xe; @@ -54,7 +54,7 @@ const xproto_entry_t *xproto_card_entry(const xproto_table_t *table, byte opcode return (xe->handler != NULL) ? xe : NULL; } -const xproto_entry_t *xproto_global_entry(byte opcode) +const xproto_entry_t *xproto_global_entry(__u8 opcode) { const xproto_entry_t *xe; @@ -63,7 +63,7 @@ const xproto_entry_t *xproto_global_entry(byte opcode) return xe; } -xproto_handler_t xproto_global_handler(byte opcode) +xproto_handler_t xproto_global_handler(__u8 opcode) { return xproto_card_handler(&PROTO_TABLE(GLOBAL), opcode); } @@ -114,7 +114,7 @@ void xproto_put(const xproto_table_t *xtable) module_put(xtable->owner); } -xproto_handler_t xproto_card_handler(const xproto_table_t *table, byte opcode) +xproto_handler_t xproto_card_handler(const xproto_table_t *table, __u8 opcode) { const xproto_entry_t *xe; @@ -131,7 +131,7 @@ void notify_bad_xpd(const char *funcname, xbus_t *xbus, const struct xpd_addr ad static int packet_process(xbus_t *xbus, xpacket_t *pack) { - byte op; + __u8 op; const xproto_entry_t *xe; xproto_handler_t handler; xproto_table_t *table; @@ -205,9 +205,9 @@ out: static int xframe_receive_cmd(xbus_t *xbus, xframe_t *xframe) { - byte *xframe_end; + __u8 *xframe_end; xpacket_t *pack; - byte *p; + __u8 *p; int len; int ret; @@ -297,8 +297,8 @@ int xframe_receive(xbus_t *xbus, xframe_t *xframe) void dump_packet(const char *msg, const xpacket_t *packet, bool debug) { - byte op = XPACKET_OP(packet); - byte *addr = (byte *)&XPACKET_ADDR(packet); + __u8 op = XPACKET_OP(packet); + __u8 *addr = (__u8 *)&XPACKET_ADDR(packet); if (!debug) return; @@ -313,7 +313,7 @@ void dump_packet(const char *msg, const xpacket_t *packet, bool debug) #if VERBOSE_DEBUG { int i; - byte *p = (byte *)packet; + __u8 *p = (__u8 *)packet; printk(" BYTES: "); for (i = 0; i < XPACKET_LEN(packet); i++) { @@ -339,7 +339,7 @@ void dump_packet(const char *msg, const xpacket_t *packet, bool debug) } void dump_reg_cmd(const char msg[], bool writing, xbus_t *xbus, - byte unit, xportno_t port, const reg_cmd_t *regcmd) + __u8 unit, xportno_t port, const reg_cmd_t *regcmd) { char action; char modifier; @@ -357,7 +357,7 @@ void dump_reg_cmd(const char msg[], bool writing, xbus_t *xbus, int i; int n = 0; size_t len = regcmd->bytes; - const byte *p = REG_XDATA(regcmd); + const __u8 *p = REG_XDATA(regcmd); buf[0] = '\0'; for (i = 0; i < len && n < MAX_PROC_WRITE; i++) diff --git a/drivers/dahdi/xpp/xproto.h b/drivers/dahdi/xpp/xproto.h index a97aadc..9bc38b0 100644 --- a/drivers/dahdi/xpp/xproto.h +++ b/drivers/dahdi/xpp/xproto.h @@ -168,24 +168,24 @@ bool valid_xpd_addr(const struct xpd_addr *addr); typedef struct reg_cmd { byte bytes:3; /* Length (for Multibyte) */ - byte eoframe:1; /* For BRI -- end of frame */ - byte portnum:3; /* For port specific registers */ - byte is_multibyte:1; + __u8 eoframe:1; /* For BRI -- end of frame */ + __u8 portnum:3; /* For port specific registers */ + __u8 is_multibyte:1; union { struct { - byte reserved:4; - byte do_datah:1; - byte do_subreg:1; - byte read_request:1; - byte all_ports_broadcast:1; - byte regnum; - byte subreg; - byte data_low; - byte data_high; + __u8 reserved:4; + __u8 do_datah:1; + __u8 do_subreg:1; + __u8 read_request:1; + __u8 all_ports_broadcast:1; + __u8 regnum; + __u8 subreg; + __u8 data_low; + __u8 data_high; } PACKED r; /* For Write-Multibyte commands in BRI */ struct { - byte xdata[MULTIBYTE_MAX_LEN]; + __u8 xdata[MULTIBYTE_MAX_LEN]; } PACKED d; } PACKED alt; } PACKED reg_cmd_t; @@ -208,11 +208,11 @@ typedef int (*xproto_handler_t)( const xproto_table_t *xproto_get(xpd_type_t cardtype); void xproto_put(const xproto_table_t *xtable); -const xproto_entry_t *xproto_card_entry(const xproto_table_t *table, byte opcode); -xproto_handler_t xproto_card_handler(const xproto_table_t *table, byte opcode); +const xproto_entry_t *xproto_card_entry(const xproto_table_t *table, __u8 opcode); +xproto_handler_t xproto_card_handler(const xproto_table_t *table, __u8 opcode); -const xproto_entry_t *xproto_global_entry(byte opcode); -xproto_handler_t xproto_global_handler(byte opcode); +const xproto_entry_t *xproto_global_entry(__u8 opcode); +xproto_handler_t xproto_global_handler(__u8 opcode); /* * XMETHOD() resolve to method pointer (NULL for optional methods) @@ -248,7 +248,7 @@ struct phoneops { struct xops { xpd_t *(*card_new)(xbus_t *xbus, int unit, int subunit, - const xproto_table_t *proto_table, byte subtype, + const xproto_table_t *proto_table, __u8 subtype, int subunits, int subunit_ports, bool to_phone); int (*card_init)(xbus_t *xbus, xpd_t *xpd); int (*card_remove)(xbus_t *xbus, xpd_t *xpd); @@ -270,7 +270,7 @@ struct xproto_table { const struct phoneops *phoneops; /* DAHDI operations */ const struct echoops *echoops; /* Echo Canceller operations */ xpd_type_t type; - byte ports_per_subunit; + __u8 ports_per_subunit; const char *name; bool (*packet_is_valid)(xpacket_t *pack); void (*packet_dump)(const char *msg, xpacket_t *pack); @@ -297,18 +297,18 @@ struct xpacket { MEMBER(FXS, SIG_CHANGED); MEMBER(FXO, SIG_CHANGED); - byte data[0]; + __u8 data[0]; }; /* Last byte is chksum */ } PACKED; void dump_packet(const char *msg, const xpacket_t *packet, bool debug); -void dump_reg_cmd(const char msg[], bool writing, xbus_t *xbus, byte unit, xportno_t port, const reg_cmd_t *regcmd); +void dump_reg_cmd(const char msg[], bool writing, xbus_t *xbus, __u8 unit, xportno_t port, const reg_cmd_t *regcmd); int xframe_receive(xbus_t *xbus, xframe_t *xframe); void notify_bad_xpd(const char *funcname, xbus_t *xbus, const struct xpd_addr addr, const char *msg); int xproto_register(const xproto_table_t *proto_table); void xproto_unregister(const xproto_table_t *proto_table); -const xproto_entry_t *xproto_global_entry(byte opcode); +const xproto_entry_t *xproto_global_entry(__u8 opcode); const char *xproto_name(xpd_type_t xpd_type); #endif /* __KERNEL__ */