/freebsd/sys/dev/mvs/ |
H A D | mvs.c | 73 static int mvs_sata_connect(struct mvs_channel *ch); 116 struct mvs_channel *ch = device_get_softc(dev); in mvs_ch_attach() local 120 ch->dev = dev; in mvs_ch_attach() 121 ch->unit = (intptr_t)device_get_ivars(dev); in mvs_ch_attach() 122 ch->quirks = ctlr->quirks; in mvs_ch_attach() 123 mtx_init(&ch->mtx, "MVS channel lock", NULL, MTX_DEF); in mvs_ch_attach() 124 ch->pm_level = 0; in mvs_ch_attach() 126 device_get_unit(dev), "pm_level", &ch->pm_level); in mvs_ch_attach() 127 if (ch->pm_level > 3) in mvs_ch_attach() 128 callout_init_mtx(&ch->pm_timer, &ch->mtx, 0); in mvs_ch_attach() [all …]
|
/freebsd/sys/dev/ahci/ |
H A D | ahci.c | 64 static void ahci_ch_intr_main(struct ahci_channel *ch, uint32_t istatus); 65 static void ahci_begin_transaction(struct ahci_channel *ch, union ccb *ccb); 70 static int ahci_setup_fis(struct ahci_channel *ch, struct ahci_cmd_tab *ctp, union ccb *ccb, int ta… 76 static void ahci_reset(struct ahci_channel *ch); 77 static void ahci_start(struct ahci_channel *ch, int fbs); 78 static void ahci_stop(struct ahci_channel *ch); 79 static void ahci_clo(struct ahci_channel *ch); 80 static void ahci_start_fr(struct ahci_channel *ch); 81 static void ahci_stop_fr(struct ahci_channel *ch); 82 static int ahci_phy_check_events(struct ahci_channel *ch, u_int32_t serr); [all …]
|
/freebsd/sys/powerpc/mpc85xx/ |
H A D | fsl_sata.c | 65 static void fsl_sata_intr_main(struct fsl_sata_channel *ch, uint32_t istatus); 66 static void fsl_sata_begin_transaction(struct fsl_sata_channel *ch, union ccb *ccb); 71 static int fsl_sata_setup_fis(struct fsl_sata_channel *ch, struct fsl_sata_cmd_tab *ctp, union ccb … 77 static void fsl_sata_reset(struct fsl_sata_channel *ch); 78 static void fsl_sata_start(struct fsl_sata_channel *ch); 79 static void fsl_sata_stop(struct fsl_sata_channel *ch); 81 static void fsl_sata_issue_recovery(struct fsl_sata_channel *ch); 82 static void fsl_sata_process_read_log(struct fsl_sata_channel *ch, union ccb *ccb); 83 static void fsl_sata_process_request_sense(struct fsl_sata_channel *ch, union ccb *ccb); 157 #define FSL_SATA_CTP_BUS(ch, slot) \ argument [all …]
|
/freebsd/sys/dev/siis/ |
H A D | siis.c | 85 static int siis_sata_connect(struct siis_channel *ch); 458 struct siis_channel *ch = device_get_softc(dev); in siis_ch_attach() local 462 ch->dev = dev; in siis_ch_attach() 463 ch->unit = (intptr_t)device_get_ivars(dev); in siis_ch_attach() 464 ch->quirks = ctlr->quirks; in siis_ch_attach() 465 ch->pm_level = 0; in siis_ch_attach() 467 device_get_unit(dev), "pm_level", &ch->pm_level); in siis_ch_attach() 471 ch->user[i].revision = sata_rev; in siis_ch_attach() 472 ch->user[i].mode = 0; in siis_ch_attach() 473 ch->user[i].bytecount = 8192; in siis_ch_attach() [all …]
|
/freebsd/sys/dev/ata/ |
H A D | ata-dma.c | 67 struct ata_channel *ch = device_get_softc(dev); in ata_dmainit() local 70 if (ch->dma.alloc == NULL) in ata_dmainit() 71 ch->dma.alloc = ata_dmaalloc; in ata_dmainit() 72 if (ch->dma.free == NULL) in ata_dmainit() 73 ch->dma.free = ata_dmafree; in ata_dmainit() 74 if (ch->dma.setprd == NULL) in ata_dmainit() 75 ch->dma.setprd = ata_dmasetprd; in ata_dmainit() 76 if (ch->dma.load == NULL) in ata_dmainit() 77 ch->dma.load = ata_dmaload; in ata_dmainit() 78 if (ch->dma.unload == NULL) in ata_dmainit() [all …]
|
H A D | ata-all.c | 96 struct ata_channel *ch = device_get_softc(dev); in ata_attach() local 104 if (ch->r_irq) in ata_attach() 108 ch->dev = dev; in ata_attach() 109 ch->state = ATA_IDLE; in ata_attach() 110 bzero(&ch->state_mtx, sizeof(struct mtx)); in ata_attach() 111 mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF); in ata_attach() 112 TASK_INIT(&ch->conntask, 0, ata_conn_event, dev); in ata_attach() 114 ch->user[i].revision = 0; in ata_attach() 122 ch->user[i].revision = mode; in ata_attach() 123 ch->user[i].mode = 0; in ata_attach() [all …]
|
H A D | ata-lowlevel.c | 55 static int ata_wait(struct ata_channel *ch, int unit, u_int8_t); 67 struct ata_channel *ch = device_get_softc(dev); in ata_generic_hw() local 69 ch->hw.begin_transaction = ata_begin_transaction; in ata_generic_hw() 70 ch->hw.end_transaction = ata_end_transaction; in ata_generic_hw() 71 ch->hw.status = ata_generic_status; in ata_generic_hw() 72 ch->hw.softreset = NULL; in ata_generic_hw() 73 ch->hw.command = ata_generic_command; in ata_generic_hw() 74 ch->hw.tf_read = ata_tf_read; in ata_generic_hw() 75 ch->hw.tf_write = ata_tf_write; in ata_generic_hw() 76 ch->hw.pm_read = NULL; in ata_generic_hw() [all …]
|
/freebsd/lib/libiconv_modules/ZW/ |
H A D | citrus_zw.c | 65 char ch[4]; member 115 int ch, len; in _citrus_ZW_mbrtowc_priv() local 132 ch = (unsigned char)*s0++; \ in _citrus_ZW_mbrtowc_priv() 133 if (len++ > MB_LEN_MAX || ch > 0x7F)\ in _citrus_ZW_mbrtowc_priv() 135 psenc->ch[psenc->chlen++] = ch; \ in _citrus_ZW_mbrtowc_priv() 144 switch (psenc->ch[0]) { in _citrus_ZW_mbrtowc_priv() 154 ch = (unsigned char)psenc->ch[0]; in _citrus_ZW_mbrtowc_priv() 155 if (ch > 0x7F) in _citrus_ZW_mbrtowc_priv() 157 wc = (wchar_t)ch; in _citrus_ZW_mbrtowc_priv() 164 ch = (unsigned char)psenc->ch[0]; in _citrus_ZW_mbrtowc_priv() [all …]
|
/freebsd/usr.bin/mkimg/ |
H A D | image.c | 135 struct chunk *ch; in image_chunk_find() local 137 ch = (last != NULL && last->ch_block <= blk) in image_chunk_find() 139 while (ch != NULL) { in image_chunk_find() 140 if (ch->ch_block <= blk && in image_chunk_find() 141 (lba_t)(ch->ch_block + (ch->ch_size / secsz)) > blk) { in image_chunk_find() 142 last = ch; in image_chunk_find() 145 ch = TAILQ_NEXT(ch, ch_list); in image_chunk_find() 147 return (ch); in image_chunk_find() 151 image_chunk_grow(struct chunk *ch, size_t sz) in image_chunk_grow() argument 155 newsz = ch->ch_size + sz; in image_chunk_grow() [all …]
|
/freebsd/contrib/openpam/lib/libpam/ |
H A D | openpam_ctype.h | 36 #define is_digit(ch) \ argument 37 (ch >= '0' && ch <= '9') 42 #define is_xdigit(ch) \ argument 43 ((ch >= '0' && ch <= '9') || \ 44 (ch >= 'a' && ch <= 'f') || \ 45 (ch >= 'A' && ch <= 'F')) 50 #define is_upper(ch) \ argument 51 (ch >= 'A' && ch <= 'Z') 56 #define is_lower(ch) \ argument 57 (ch >= 'a' && ch <= 'z') [all …]
|
/freebsd/sys/dev/sound/pci/ |
H A D | t4dwave.c | 310 tr_testint(struct tr_chinfo *ch) 312 struct tr_info *tr = ch->parent; 315 bank = (ch->index & 0x20) ? 1 : 0; 316 chan = ch->index & 0x1f; 322 tr_clrint(struct tr_chinfo *ch) in tr_clrint() argument 324 struct tr_info *tr = ch->parent; in tr_clrint() 327 bank = (ch->index & 0x20) ? 1 : 0; in tr_clrint() 328 chan = ch->index & 0x1f; in tr_clrint() 333 tr_enaint(struct tr_chinfo *ch, int enable) in tr_enaint() argument 335 struct tr_info *tr = ch->parent; in tr_enaint() [all …]
|
H A D | hdspe-pcm.c | 5 * Copyright (c) 2023-2024 Florian Walpen <dev@submerge.ch> 232 hdspe_hw_mixer(struct sc_chinfo *ch, unsigned int dst, in hdspe_hw_mixer() argument 239 scp = ch->parent; in hdspe_hw_mixer() 243 if (ch->dir == PCMDIR_PLAY) in hdspe_hw_mixer() 254 hdspechan_setgain(struct sc_chinfo *ch) in hdspechan_setgain() argument 261 sc = ch->parent->sc; in hdspechan_setgain() 264 ports = ch->ports; in hdspechan_setgain() 274 volume = ch->lvol * HDSPE_MAX_GAIN / 100; in hdspechan_setgain() 276 hdspe_hw_mixer(ch, slot, slot, volume); in hdspechan_setgain() 278 volume = ch->rvol * HDSPE_MAX_GAIN / 100; in hdspechan_setgain() [all …]
|
/freebsd/lib/libc/iconv/ |
H A D | citrus_prop.c | 83 int ch, cutlim, n; \ 90 ch = _memstream_getc(ms); \ 91 p = strchr(xdigit, _bcs_toupper(ch)); \ 99 _memstream_ungetc(ms, ch); \ 112 int base, ch, neg; \ in _CITRUS_PROP_READ_UINT_COMMON() 115 ch = _memstream_getc(ms); \ in _CITRUS_PROP_READ_UINT_COMMON() 117 switch (ch) { \ in _CITRUS_PROP_READ_UINT_COMMON() 121 ch = _memstream_getc(ms); \ in _CITRUS_PROP_READ_UINT_COMMON() 124 if (ch == '0') { \ in _CITRUS_PROP_READ_UINT_COMMON() 126 ch = _memstream_getc(ms); \ in _CITRUS_PROP_READ_UINT_COMMON() [all …]
|
/freebsd/sys/arm/broadcom/bcm2835/ |
H A D | bcm2835_dma.c | 126 static void bcm_dma_reg_dump(int ch); 131 int ch; member 173 bcm_dma_reset(device_t dev, int ch) in bcm_dma_reset() argument 180 if (ch < 0 || ch >= BCM_DMA_CH_MAX) in bcm_dma_reset() 183 cs = bus_read_4(sc->sc_mem, BCM_DMA_CS(ch)); in bcm_dma_reset() 187 bus_write_4(sc->sc_mem, BCM_DMA_CS(ch), 0); in bcm_dma_reset() 191 cs = bus_read_4(sc->sc_mem, BCM_DMA_CS(ch)); in bcm_dma_reset() 196 "Can't abort DMA transfer at channel %d\n", ch); in bcm_dma_reset() 199 bus_write_4(sc->sc_mem, BCM_DMA_CBNEXT(ch), 0); in bcm_dma_reset() 202 bus_write_4(sc->sc_mem, BCM_DMA_CS(ch), in bcm_dma_reset() [all …]
|
/freebsd/sys/kern/ |
H A D | Make.tags.inc | 12 ${SYS}/dev/alc/*.[ch] \ 13 ${SYS}/dev/iicbus/*.[ch] \ 14 ${SYS}/dev/isp/*.[ch] \ 15 ${SYS}/dev/ppbus/*.[ch] \ 16 ${SYS}/dev/smbus/*.[ch] \ 17 ${SYS}/fs/autofs/*.[ch] \ 18 ${SYS}/fs/cd9660/*.[ch] \ 19 ${SYS}/fs/cuse/*.[ch] \ 20 ${SYS}/fs/deadfs/*.[ch] \ 21 ${SYS}/fs/devfs/*.[ch] \ [all …]
|
/freebsd/sys/dev/dpaa2/ |
H A D | dpaa2_channel.c | 121 struct dpaa2_channel *ch = NULL; in dpaa2_chan_setup() local 148 ch = malloc(sizeof(struct dpaa2_channel), M_DPAA2_CH, M_WAITOK | M_ZERO); in dpaa2_chan_setup() 149 ch->ni_dev = dev; in dpaa2_chan_setup() 150 ch->io_dev = iodev; in dpaa2_chan_setup() 151 ch->con_dev = condev; in dpaa2_chan_setup() 152 ch->id = consc->attr.chan_id; in dpaa2_chan_setup() 153 ch->flowid = flowid; in dpaa2_chan_setup() 154 ch->tx_frames = 0; /* for debug purposes */ in dpaa2_chan_setup() 155 ch->tx_dropped = 0; /* for debug purposes */ in dpaa2_chan_setup() 156 ch->store_sz = 0; in dpaa2_chan_setup() [all …]
|
/freebsd/sys/netpfil/ipfw/nat64/ |
H A D | nat64stl_control.c | 95 nat64stl_export_config(struct ip_fw_chain *ch, struct nat64stl_cfg *cfg, in nat64stl_export_config() argument 106 no = ipfw_objhash_lookup_table_kidx(ch, cfg->map64); in nat64stl_export_config() 108 no = ipfw_objhash_lookup_table_kidx(ch, cfg->map46); in nat64stl_export_config() 113 struct ip_fw_chain *ch; member 125 nat64stl_export_config(da->ch, (struct nat64stl_cfg *)no, uc); in export_config_cb() 141 nat64stl_create_internal(struct ip_fw_chain *ch, struct nat64stl_cfg *cfg, in nat64stl_create_internal() argument 145 IPFW_UH_WLOCK_ASSERT(ch); in nat64stl_create_internal() 147 if (ipfw_objhash_alloc_idx(CHAIN_TO_SRV(ch), &cfg->no.kidx) != 0) in nat64stl_create_internal() 151 if (ipfw_ref_table(ch, &i->ntlv4, &cfg->map46) != 0) in nat64stl_create_internal() 155 if (ipfw_ref_table(ch, &i->ntlv6, &cfg->map64) != 0) in nat64stl_create_internal() [all …]
|
H A D | nat64clat_control.c | 93 nat64clat_export_config(struct ip_fw_chain *ch, struct nat64clat_cfg *cfg, in nat64clat_export_config() argument 106 struct ip_fw_chain *ch; member 118 nat64clat_export_config(da->ch, (struct nat64clat_cfg *)no, uc); in export_config_cb() 141 nat64clat_create(struct ip_fw_chain *ch, ip_fw3_opheader *op3, in nat64clat_create() argument 163 ni = CHAIN_TO_SRV(ch); in nat64clat_create() 165 IPFW_UH_RLOCK(ch); in nat64clat_create() 167 IPFW_UH_RUNLOCK(ch); in nat64clat_create() 170 IPFW_UH_RUNLOCK(ch); in nat64clat_create() 182 IPFW_UH_WLOCK(ch); in nat64clat_create() 185 IPFW_UH_WUNLOCK(ch); in nat64clat_create() [all …]
|
/freebsd/sys/netpfil/ipfw/ |
H A D | ip_fw_iface.c | 60 #define CHAIN_TO_II(ch) ((struct namedobj_instance *)ch->ifcfg) argument 64 static void handle_ifdetach(struct ip_fw_chain *ch, struct ipfw_iface *iif, 66 static void handle_ifattach(struct ip_fw_chain *ch, struct ipfw_iface *iif, 68 static int list_ifaces(struct ip_fw_chain *ch, ip_fw3_opheader *op3, 94 struct ip_fw_chain *ch; in ipfw_kifhandler() local 102 ch = &V_layer3_chain; in ipfw_kifhandler() 105 IPFW_UH_WLOCK(ch); in ipfw_kifhandler() 106 ii = CHAIN_TO_II(ch); in ipfw_kifhandler() 108 IPFW_UH_WUNLOCK(ch); in ipfw_kifhandler() 115 handle_ifattach(ch, iif, ifp->if_index); in ipfw_kifhandler() [all …]
|
H A D | ip_fw_table.c | 96 static struct table_config *alloc_table_config(struct ip_fw_chain *ch, 100 static int create_table_internal(struct ip_fw_chain *ch, struct tid_info *ti, 102 static void link_table(struct ip_fw_chain *ch, struct table_config *tc); 103 static void unlink_table(struct ip_fw_chain *ch, struct table_config *tc); 104 static int find_ref_table(struct ip_fw_chain *ch, struct tid_info *ti, 108 static int export_tables(struct ip_fw_chain *ch, ipfw_obj_lheader *olh, 110 static void export_table_info(struct ip_fw_chain *ch, struct table_config *tc, 115 static int swap_tables(struct ip_fw_chain *ch, struct tid_info *a, 119 static int check_table_space(struct ip_fw_chain *ch, struct tableop_state *ts, 121 static int destroy_table(struct ip_fw_chain *ch, struct tid_info *ti); [all …]
|
/freebsd/sys/netgraph/bluetooth/l2cap/ |
H A D | ng_l2cap_ulpi.c | 68 ng_l2cap_chan_p ch = NULL; in ng_l2cap_l2ca_con_req() local 107 ch = ng_l2cap_new_chan(l2cap, con, ip->psm, ip->idtype); in ng_l2cap_l2ca_con_req() 108 if (ch == NULL) { in ng_l2cap_l2ca_con_req() 114 cmd = ng_l2cap_new_cmd(ch->con, ch, ng_l2cap_get_ident(con), in ng_l2cap_l2ca_con_req() 117 ng_l2cap_free_chan(ch); in ng_l2cap_l2ca_con_req() 124 ng_l2cap_free_chan(ch); in ng_l2cap_l2ca_con_req() 139 _ng_l2cap_con_req(cmd->aux, cmd->ident, ch->psm, ch->scid); in ng_l2cap_l2ca_con_req() 143 ng_l2cap_free_chan(ch); in ng_l2cap_l2ca_con_req() 148 ch->state = NG_L2CAP_W4_L2CAP_CON_RSP; in ng_l2cap_l2ca_con_req() 151 ng_l2cap_link_cmd(ch->con, cmd); in ng_l2cap_l2ca_con_req() [all …]
|
/freebsd/sys/arm/ti/ |
H A D | ti_sdma.c | 91 void (*callback)(unsigned int ch, uint32_t ch_status, void *data); 218 unsigned int ch, j; in ti_sdma_intr() local 231 for (ch = 0; ch < NUM_DMA_CHANNELS; ch++) { in ti_sdma_intr() 232 if (intr & (1 << ch)) { in ti_sdma_intr() 233 channel = &sc->sc_channel[ch]; in ti_sdma_intr() 236 csr = ti_sdma_read_4(sc, DMA4_CSR(ch)); in ti_sdma_intr() 239 "%d\n", ch); in ti_sdma_intr() 244 if ((sc->sc_active_channels & (1 << ch)) == 0) { in ti_sdma_intr() 246 "channel %d\n", j, ch); in ti_sdma_intr() 254 ch); in ti_sdma_intr() [all …]
|
/freebsd/cddl/contrib/opensolaris/common/util/ |
H A D | strtolctype.h | 49 #define isalnum(ch) (isalpha(ch) || isdigit(ch)) argument 50 #define isalpha(ch) (isupper(ch) || islower(ch)) argument 51 #define isdigit(ch) ((ch) >= '0' && (ch) <= '9') argument 52 #define islower(ch) ((ch) >= 'a' && (ch) <= 'z') argument 53 #define isspace(ch) (((ch) == ' ') || ((ch) == '\r') || ((ch) == '\n') || \ argument 54 ((ch) == '\t') || ((ch) == '\f')) 55 #define isupper(ch) ((ch) >= 'A' && (ch) <= 'Z') argument 56 #define isxdigit(ch) (isdigit(ch) || ((ch) >= 'a' && (ch) <= 'f') || \ argument 57 ((ch) >= 'A' && (ch) <= 'F'))
|
/freebsd/sys/cddl/contrib/opensolaris/common/util/ |
H A D | strtolctype.h | 49 #define isalnum(ch) (isalpha(ch) || isdigit(ch)) argument 50 #define isalpha(ch) (isupper(ch) || islower(ch)) argument 51 #define isdigit(ch) ((ch) >= '0' && (ch) <= '9') argument 52 #define islower(ch) ((ch) >= 'a' && (ch) <= 'z') argument 53 #define isspace(ch) (((ch) == ' ') || ((ch) == '\r') || ((ch) == '\n') || \ argument 54 ((ch) == '\t') || ((ch) == '\f')) 55 #define isupper(ch) ((ch) >= 'A' && (ch) <= 'Z') argument 56 #define isxdigit(ch) (isdigit(ch) || ((ch) >= 'a' && (ch) <= 'f') || \ argument 57 ((ch) >= 'A' && (ch) <= 'F'))
|
/freebsd/sys/dev/dcons/ |
H A D | dcons.c | 52 struct dcons_ch *ch; in dcons_ischar() local 54 ch = &dc->i; in dcons_ischar() 56 ptr = ntohl(*ch->ptr); in dcons_ischar() 59 if (gen == ch->gen && pos == ch->pos) in dcons_ischar() 62 next_gen = DCONS_NEXT_GEN(ch->gen); in dcons_ischar() 64 if ((gen != ch->gen && gen != next_gen) in dcons_ischar() 65 || (gen == ch->gen && pos < ch->pos)) { in dcons_ischar() 68 ch->gen = gen; in dcons_ischar() 69 ch->pos = pos; in dcons_ischar() 81 struct dcons_ch *ch; in dcons_checkc() local [all …]
|