| /freebsd-13-stable/sys/dev/mvs/ |
| HD | mvs.c | 74 static int mvs_sata_connect(struct mvs_channel *ch); 117 struct mvs_channel *ch = device_get_softc(dev); in mvs_ch_attach() local 121 ch->dev = dev; in mvs_ch_attach() 122 ch->unit = (intptr_t)device_get_ivars(dev); in mvs_ch_attach() 123 ch->quirks = ctlr->quirks; in mvs_ch_attach() 124 mtx_init(&ch->mtx, "MVS channel lock", NULL, MTX_DEF); in mvs_ch_attach() 125 ch->pm_level = 0; in mvs_ch_attach() 127 device_get_unit(dev), "pm_level", &ch->pm_level); in mvs_ch_attach() 128 if (ch->pm_level > 3) in mvs_ch_attach() 129 callout_init_mtx(&ch->pm_timer, &ch->mtx, 0); in mvs_ch_attach() [all …]
|
| /freebsd-13-stable/contrib/openpam/lib/libpam/ |
| HD | 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-13-stable/sys/dev/ahci/ |
| HD | 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-13-stable/sys/powerpc/mpc85xx/ |
| HD | fsl_sata.c | 66 static void fsl_sata_intr_main(struct fsl_sata_channel *ch, uint32_t istatus); 67 static void fsl_sata_begin_transaction(struct fsl_sata_channel *ch, union ccb *ccb); 72 static int fsl_sata_setup_fis(struct fsl_sata_channel *ch, struct fsl_sata_cmd_tab *ctp, union ccb … 78 static void fsl_sata_reset(struct fsl_sata_channel *ch); 79 static void fsl_sata_start(struct fsl_sata_channel *ch); 80 static void fsl_sata_stop(struct fsl_sata_channel *ch); 82 static void fsl_sata_issue_recovery(struct fsl_sata_channel *ch); 83 static void fsl_sata_process_read_log(struct fsl_sata_channel *ch, union ccb *ccb); 84 static void fsl_sata_process_request_sense(struct fsl_sata_channel *ch, union ccb *ccb); 158 #define FSL_SATA_CTP_BUS(ch, slot) \ argument [all …]
|
| /freebsd-13-stable/lib/libiconv_modules/ZW/ |
| HD | citrus_zw.c | 66 char ch[4]; member 116 int ch, len; in _citrus_ZW_mbrtowc_priv() local 133 ch = (unsigned char)*s0++; \ in _citrus_ZW_mbrtowc_priv() 134 if (len++ > MB_LEN_MAX || ch > 0x7F)\ in _citrus_ZW_mbrtowc_priv() 136 psenc->ch[psenc->chlen++] = ch; \ in _citrus_ZW_mbrtowc_priv() 145 switch (psenc->ch[0]) { in _citrus_ZW_mbrtowc_priv() 155 ch = (unsigned char)psenc->ch[0]; in _citrus_ZW_mbrtowc_priv() 156 if (ch > 0x7F) in _citrus_ZW_mbrtowc_priv() 158 wc = (wchar_t)ch; in _citrus_ZW_mbrtowc_priv() 165 ch = (unsigned char)psenc->ch[0]; in _citrus_ZW_mbrtowc_priv() [all …]
|
| /freebsd-13-stable/sys/arm/ti/ |
| HD | ti_sdma.c | 92 void (*callback)(unsigned int ch, uint32_t ch_status, void *data); 219 unsigned int ch, j; in ti_sdma_intr() local 232 for (ch = 0; ch < NUM_DMA_CHANNELS; ch++) { in ti_sdma_intr() 233 if (intr & (1 << ch)) { in ti_sdma_intr() 234 channel = &sc->sc_channel[ch]; in ti_sdma_intr() 237 csr = ti_sdma_read_4(sc, DMA4_CSR(ch)); in ti_sdma_intr() 240 "%d\n", ch); in ti_sdma_intr() 245 if ((sc->sc_active_channels & (1 << ch)) == 0) { in ti_sdma_intr() 247 "channel %d\n", j, ch); in ti_sdma_intr() 255 ch); in ti_sdma_intr() [all …]
|
| /freebsd-13-stable/sys/dev/ata/ |
| HD | ata-dma.c | 68 struct ata_channel *ch = device_get_softc(dev); in ata_dmainit() local 71 if (ch->dma.alloc == NULL) in ata_dmainit() 72 ch->dma.alloc = ata_dmaalloc; in ata_dmainit() 73 if (ch->dma.free == NULL) in ata_dmainit() 74 ch->dma.free = ata_dmafree; in ata_dmainit() 75 if (ch->dma.setprd == NULL) in ata_dmainit() 76 ch->dma.setprd = ata_dmasetprd; in ata_dmainit() 77 if (ch->dma.load == NULL) in ata_dmainit() 78 ch->dma.load = ata_dmaload; in ata_dmainit() 79 if (ch->dma.unload == NULL) in ata_dmainit() [all …]
|
| HD | ata-lowlevel.c | 56 static int ata_wait(struct ata_channel *ch, int unit, u_int8_t); 68 struct ata_channel *ch = device_get_softc(dev); in ata_generic_hw() local 70 ch->hw.begin_transaction = ata_begin_transaction; in ata_generic_hw() 71 ch->hw.end_transaction = ata_end_transaction; in ata_generic_hw() 72 ch->hw.status = ata_generic_status; in ata_generic_hw() 73 ch->hw.softreset = NULL; in ata_generic_hw() 74 ch->hw.command = ata_generic_command; in ata_generic_hw() 75 ch->hw.tf_read = ata_tf_read; in ata_generic_hw() 76 ch->hw.tf_write = ata_tf_write; in ata_generic_hw() 77 ch->hw.pm_read = NULL; in ata_generic_hw() [all …]
|
| HD | ata-all.c | 98 struct ata_channel *ch = device_get_softc(dev); in ata_attach() local 106 if (ch->r_irq) in ata_attach() 110 ch->dev = dev; in ata_attach() 111 ch->state = ATA_IDLE; in ata_attach() 112 bzero(&ch->state_mtx, sizeof(struct mtx)); in ata_attach() 113 mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF); in ata_attach() 114 TASK_INIT(&ch->conntask, 0, ata_conn_event, dev); in ata_attach() 116 ch->user[i].revision = 0; in ata_attach() 124 ch->user[i].revision = mode; in ata_attach() 125 ch->user[i].mode = 0; in ata_attach() [all …]
|
| /freebsd-13-stable/contrib/llvm-project/llvm/lib/Support/ |
| HD | ConvertUTF.cpp | 167 UTF32 ch; in ConvertUTF32toUTF16() local 171 ch = *source++; in ConvertUTF32toUTF16() 172 if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ in ConvertUTF32toUTF16() 174 if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { in ConvertUTF32toUTF16() 183 *target++ = (UTF16)ch; /* normal case */ in ConvertUTF32toUTF16() 185 } else if (ch > UNI_MAX_LEGAL_UTF32) { in ConvertUTF32toUTF16() 197 ch -= halfBase; in ConvertUTF32toUTF16() 198 *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); in ConvertUTF32toUTF16() 199 *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); in ConvertUTF32toUTF16() 215 UTF32 ch, ch2; in ConvertUTF16toUTF32() local [all …]
|
| /freebsd-13-stable/sys/dev/siis/ |
| HD | siis.c | 85 static int siis_sata_connect(struct siis_channel *ch); 461 struct siis_channel *ch = device_get_softc(dev); in siis_ch_attach() local 465 ch->dev = dev; in siis_ch_attach() 466 ch->unit = (intptr_t)device_get_ivars(dev); in siis_ch_attach() 467 ch->quirks = ctlr->quirks; in siis_ch_attach() 468 ch->pm_level = 0; in siis_ch_attach() 470 device_get_unit(dev), "pm_level", &ch->pm_level); in siis_ch_attach() 474 ch->user[i].revision = sata_rev; in siis_ch_attach() 475 ch->user[i].mode = 0; in siis_ch_attach() 476 ch->user[i].bytecount = 8192; in siis_ch_attach() [all …]
|
| /freebsd-13-stable/sys/cddl/contrib/opensolaris/common/util/ |
| HD | 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-13-stable/cddl/contrib/opensolaris/common/util/ |
| HD | 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-13-stable/sys/arm/allwinner/ |
| HD | a10_hdmiaudio.c | 132 struct a10hdmiaudio_chinfo *ch = arg; in a10hdmiaudio_dmamap_cb() local 137 ch->physaddr = segs[0].ds_addr; in a10hdmiaudio_dmamap_cb() 141 a10hdmiaudio_transfer(struct a10hdmiaudio_chinfo *ch) in a10hdmiaudio_transfer() argument 145 error = SUNXI_DMA_TRANSFER(ch->dmac, ch->dmachan, in a10hdmiaudio_transfer() 146 ch->physaddr + ch->pos, TX_FIFO, ch->blocksize); in a10hdmiaudio_transfer() 148 ch->run = 0; in a10hdmiaudio_transfer() 149 device_printf(ch->parent->dev, "DMA transfer failed: %d\n", in a10hdmiaudio_transfer() 155 a10hdmiaudio_dmaconfig(struct a10hdmiaudio_chinfo *ch) in a10hdmiaudio_dmaconfig() argument 168 SUNXI_DMA_SET_CONFIG(ch->dmac, ch->dmachan, &conf); in a10hdmiaudio_dmaconfig() 174 struct a10hdmiaudio_chinfo *ch = priv; in a10hdmiaudio_dmaintr() local [all …]
|
| /freebsd-13-stable/sys/arm/broadcom/bcm2835/ |
| HD | bcm2835_dma.c | 127 static void bcm_dma_reg_dump(int ch); 132 int ch; member 174 bcm_dma_reset(device_t dev, int ch) in bcm_dma_reset() argument 181 if (ch < 0 || ch >= BCM_DMA_CH_MAX) in bcm_dma_reset() 184 cs = bus_read_4(sc->sc_mem, BCM_DMA_CS(ch)); in bcm_dma_reset() 188 bus_write_4(sc->sc_mem, BCM_DMA_CS(ch), 0); in bcm_dma_reset() 192 cs = bus_read_4(sc->sc_mem, BCM_DMA_CS(ch)); in bcm_dma_reset() 197 "Can't abort DMA transfer at channel %d\n", ch); in bcm_dma_reset() 200 bus_write_4(sc->sc_mem, BCM_DMA_CBNEXT(ch), 0); in bcm_dma_reset() 203 bus_write_4(sc->sc_mem, BCM_DMA_CS(ch), in bcm_dma_reset() [all …]
|
| /freebsd-13-stable/usr.bin/mkimg/ |
| HD | 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-13-stable/sys/dev/sound/pci/ |
| HD | t4dwave.c | 312 tr_testint(struct tr_chinfo *ch) 314 struct tr_info *tr = ch->parent; 317 bank = (ch->index & 0x20) ? 1 : 0; 318 chan = ch->index & 0x1f; 324 tr_clrint(struct tr_chinfo *ch) in tr_clrint() argument 326 struct tr_info *tr = ch->parent; in tr_clrint() 329 bank = (ch->index & 0x20) ? 1 : 0; in tr_clrint() 330 chan = ch->index & 0x1f; in tr_clrint() 335 tr_enaint(struct tr_chinfo *ch, int enable) in tr_enaint() argument 337 struct tr_info *tr = ch->parent; in tr_enaint() [all …]
|
| HD | hdspe-pcm.c | 84 hdspe_hw_mixer(struct sc_chinfo *ch, unsigned int dst, in hdspe_hw_mixer() argument 91 scp = ch->parent; in hdspe_hw_mixer() 95 if (ch->dir == PCMDIR_PLAY) in hdspe_hw_mixer() 106 hdspechan_setgain(struct sc_chinfo *ch) in hdspechan_setgain() argument 109 hdspe_hw_mixer(ch, ch->lslot, ch->lslot, in hdspechan_setgain() 110 ch->lvol * HDSPE_MAX_GAIN / 100); in hdspechan_setgain() 111 hdspe_hw_mixer(ch, ch->rslot, ch->rslot, in hdspechan_setgain() 112 ch->rvol * HDSPE_MAX_GAIN / 100); in hdspechan_setgain() 150 struct sc_chinfo *ch; in hdspemixer_set() local 161 ch = &scp->chan[i]; in hdspemixer_set() [all …]
|
| HD | maestro.c | 443 wp_rdapu(struct agg_info *ess, unsigned ch, u_int16_t reg) in wp_rdapu() argument 445 wp_wrreg(ess, WPREG_CRAM_PTR, reg | (ch << 4)); in wp_rdapu() 446 if (wp_wait_data(ess, reg | (ch << 4)) != 0) in wp_rdapu() 452 wp_wrapu(struct agg_info *ess, unsigned ch, u_int16_t reg, u_int16_t data) in wp_wrapu() argument 454 wp_wrreg(ess, WPREG_CRAM_PTR, reg | (ch << 4)); in wp_wrapu() 455 if (wp_wait_data(ess, reg | (ch << 4)) == 0) { in wp_wrapu() 544 wc_rdchctl(struct agg_info *ess, int ch) 546 return wc_rdreg(ess, ch << 3); 551 wc_wrchctl(struct agg_info *ess, int ch, u_int16_t data) in wc_wrchctl() argument 553 wc_wrreg(ess, ch << 3, data); in wc_wrchctl() [all …]
|
| /freebsd-13-stable/sys/dev/ata/chipsets/ |
| HD | ata-promise.c | 362 struct ata_channel *ch = device_get_softc(dev); in ata_promise_ch_attach() local 368 ch->dma.start = ata_promise_dmastart; in ata_promise_ch_attach() 369 ch->dma.stop = ata_promise_dmastop; in ata_promise_ch_attach() 370 ch->dma.reset = ata_promise_dmareset; in ata_promise_ch_attach() 373 ch->hw.status = ata_promise_status; in ata_promise_ch_attach() 374 ch->flags |= ATA_NO_ATAPI_DMA; in ata_promise_ch_attach() 375 ch->flags |= ATA_CHECKS_CABLE; in ata_promise_ch_attach() 383 struct ata_channel *ch = device_get_softc(dev); in ata_promise_status() local 385 if (ATA_INL(ctlr->r_res1, 0x1c) & (ch->unit ? 0x00004000 : 0x00000400)) { in ata_promise_status() 395 struct ata_channel *ch = device_get_softc(request->parent); in ata_promise_dmastart() local [all …]
|
| /freebsd-13-stable/sys/netpfil/ipfw/ |
| HD | ip_fw_iface.c | 59 #define CHAIN_TO_II(ch) ((struct namedobj_instance *)ch->ifcfg) argument 63 static void handle_ifdetach(struct ip_fw_chain *ch, struct ipfw_iface *iif, 65 static void handle_ifattach(struct ip_fw_chain *ch, struct ipfw_iface *iif, 67 static int list_ifaces(struct ip_fw_chain *ch, ip_fw3_opheader *op3, 93 struct ip_fw_chain *ch; in ipfw_kifhandler() local 101 ch = &V_layer3_chain; in ipfw_kifhandler() 104 IPFW_UH_WLOCK(ch); in ipfw_kifhandler() 105 ii = CHAIN_TO_II(ch); in ipfw_kifhandler() 107 IPFW_UH_WUNLOCK(ch); in ipfw_kifhandler() 114 handle_ifattach(ch, iif, ifp->if_index); in ipfw_kifhandler() [all …]
|
| HD | ip_fw_eaction.c | 95 #define EACTION_OBJ(ch, cmd) \ argument 96 ((struct eaction_obj *)SRV_OBJECT((ch), (cmd)->arg1)) 108 default_eaction(struct ip_fw_chain *ch, struct ip_fw_args *args, in default_eaction() argument 138 eaction_findbyname(struct ip_fw_chain *ch, struct tid_info *ti, in eaction_findbyname() argument 158 *pno = ipfw_objhash_lookup_name_type(CHAIN_TO_SRV(ch), in eaction_findbyname() 166 eaction_findbykidx(struct ip_fw_chain *ch, uint16_t idx) in eaction_findbykidx() argument 170 return (ipfw_objhash_lookup_kidx(CHAIN_TO_SRV(ch), idx)); in eaction_findbykidx() 185 create_eaction_obj(struct ip_fw_chain *ch, ipfw_eaction_t handler, in create_eaction_obj() argument 191 IPFW_UH_UNLOCK_ASSERT(ch); in create_eaction_obj() 193 ni = CHAIN_TO_SRV(ch); in create_eaction_obj() [all …]
|
| /freebsd-13-stable/lib/libc/iconv/ |
| HD | citrus_prop.c | 84 int ch, cutlim, n; \ 91 ch = _memstream_getc(ms); \ 92 p = strchr(xdigit, _bcs_toupper(ch)); \ 100 _memstream_ungetc(ms, ch); \ 113 int base, ch, neg; \ in _CITRUS_PROP_READ_UINT_COMMON() 116 ch = _memstream_getc(ms); \ in _CITRUS_PROP_READ_UINT_COMMON() 118 switch (ch) { \ in _CITRUS_PROP_READ_UINT_COMMON() 122 ch = _memstream_getc(ms); \ in _CITRUS_PROP_READ_UINT_COMMON() 125 if (ch == '0') { \ in _CITRUS_PROP_READ_UINT_COMMON() 127 ch = _memstream_getc(ms); \ in _CITRUS_PROP_READ_UINT_COMMON() [all …]
|
| /freebsd-13-stable/contrib/ncurses/ncurses/base/ |
| HD | MKunctrl.awk | 53 for ( ch = 0; ch < 256; ch++ ) { 56 if ((ch % 8) == 0) { 58 if (ch != 0) 64 if (ch < 32) { 65 part = sprintf ("^\\%03o", ch + 64); 67 } else if (ch == 127) { 70 } else if (ch >= 128 && ch < 160) { 71 part = sprintf("~\\%03o", ch - 64); 73 } else if (ch == 255) { 76 } else if (ch >= 160) { [all …]
|
| /freebsd-13-stable/lib/libiconv_modules/DECHanyu/ |
| HD | citrus_dechanyu.c | 56 char ch[4]; member 174 int ch; in _citrus_DECHanyu_mbrtowc_priv() local 188 ch = *s0++ & 0xFF; in _citrus_DECHanyu_mbrtowc_priv() 189 if (is_singlebyte(ch)) { in _citrus_DECHanyu_mbrtowc_priv() 191 *pwc = (wchar_t)ch; in _citrus_DECHanyu_mbrtowc_priv() 192 *nresult = (size_t)((ch == 0) ? 0 : 1); in _citrus_DECHanyu_mbrtowc_priv() 196 if (!is_leadbyte(ch)) in _citrus_DECHanyu_mbrtowc_priv() 198 psenc->ch[psenc->chlen++] = ch; in _citrus_DECHanyu_mbrtowc_priv() 201 ch = psenc->ch[0] & 0xFF; in _citrus_DECHanyu_mbrtowc_priv() 202 if (!is_leadbyte(ch)) in _citrus_DECHanyu_mbrtowc_priv() [all …]
|