as 289 arch/i386/isa/ahc_isa.c struct ahc_isa_slot *as; as 303 arch/i386/isa/ahc_isa.c LIST_FOREACH(as, &ahc_isa_all_slots, link) as 304 arch/i386/isa/ahc_isa.c if (as->bus == parent->dv_unit) as 310 arch/i386/isa/ahc_isa.c as = (struct ahc_isa_slot *) as 312 arch/i386/isa/ahc_isa.c if (as == NULL) as 315 arch/i386/isa/ahc_isa.c as->bus = parent->dv_unit; as 316 arch/i386/isa/ahc_isa.c as->slot = AHC_ISA_MIN_SLOT; as 317 arch/i386/isa/ahc_isa.c LIST_INSERT_HEAD(&ahc_isa_all_slots, as, link); as 321 arch/i386/isa/ahc_isa.c for (; as->slot <= AHC_ISA_MAX_SLOT; as->slot++) { as 322 arch/i386/isa/ahc_isa.c if (ahc_isa_match(ia, EISA_SLOT_ADDR(as->slot) + as 324 arch/i386/isa/ahc_isa.c as->slot++; /* next slot to search */ as 99 dev/ata/atascsi.c struct atascsi *as; as 102 dev/ata/atascsi.c as = malloc(sizeof(struct atascsi), M_DEVBUF, M_WAITOK); as 103 dev/ata/atascsi.c bzero(as, sizeof(struct atascsi)); as 105 dev/ata/atascsi.c as->as_dev = self; as 106 dev/ata/atascsi.c as->as_cookie = aaa->aaa_cookie; as 107 dev/ata/atascsi.c as->as_methods = aaa->aaa_methods; as 108 dev/ata/atascsi.c as->as_capability = aaa->aaa_capability; as 111 dev/ata/atascsi.c as->as_switch = atascsi_switch; as 112 dev/ata/atascsi.c as->as_switch.scsi_minphys = aaa->aaa_minphys; as 115 dev/ata/atascsi.c as->as_link.device = &atascsi_device; as 116 dev/ata/atascsi.c as->as_link.adapter = &as->as_switch; as 117 dev/ata/atascsi.c as->as_link.adapter_softc = as; as 118 dev/ata/atascsi.c as->as_link.adapter_buswidth = aaa->aaa_nports; as 119 dev/ata/atascsi.c as->as_link.luns = 1; /* XXX port multiplier as luns */ as 120 dev/ata/atascsi.c as->as_link.adapter_target = aaa->aaa_nports; as 121 dev/ata/atascsi.c as->as_link.openings = aaa->aaa_ncmds; as 122 dev/ata/atascsi.c if (as->as_capability & ASAA_CAP_NEEDS_RESERVED) as 123 dev/ata/atascsi.c as->as_link.openings--; as 125 dev/ata/atascsi.c as->as_ports = malloc(sizeof(struct ata_port *) * aaa->aaa_nports, as 127 dev/ata/atascsi.c bzero(as->as_ports, sizeof(struct ata_port *) * aaa->aaa_nports); as 130 dev/ata/atascsi.c for (i = 0; i < as->as_link.adapter_buswidth; i++) as 131 dev/ata/atascsi.c atascsi_probe(as, i); as 134 dev/ata/atascsi.c saa.saa_sc_link = &as->as_link; as 137 dev/ata/atascsi.c as->as_scsibus = (struct scsibus_softc *)config_found(self, &saa, as 140 dev/ata/atascsi.c return (as); as 144 dev/ata/atascsi.c atascsi_detach(struct atascsi *as) as 150 dev/ata/atascsi.c atascsi_probe(struct atascsi *as, int port) as 156 dev/ata/atascsi.c if (port > as->as_link.adapter_buswidth) as 159 dev/ata/atascsi.c type = as->as_methods->probe(as->as_cookie, port); as 164 dev/ata/atascsi.c as->as_link.flags |= SDEV_ATAPI; as 165 dev/ata/atascsi.c as->as_link.quirks |= SDEV_ONLYBIG; as 173 dev/ata/atascsi.c ap->ap_as = as; as 177 dev/ata/atascsi.c as->as_ports[port] = ap; as 197 dev/ata/atascsi.c ata_exec(as, xa); as 267 dev/ata/atascsi.c struct atascsi *as = link->adapter_softc; as 268 dev/ata/atascsi.c struct ata_port *ap = as->as_ports[link->target]; as 289 dev/ata/atascsi.c struct atascsi *as = link->adapter_softc; as 290 dev/ata/atascsi.c struct ata_port *ap = as->as_ports[link->target]; as 390 dev/ata/atascsi.c return (ata_exec(as, xa)); as 431 dev/ata/atascsi.c struct atascsi *as = link->adapter_softc; as 432 dev/ata/atascsi.c struct ata_port *ap = as->as_ports[link->target]; as 445 dev/ata/atascsi.c return (ata_exec(as, xa)); as 453 dev/ata/atascsi.c struct atascsi *as = link->adapter_softc; as 454 dev/ata/atascsi.c struct ata_port *ap = as->as_ports[link->target]; as 498 dev/ata/atascsi.c if (as->as_capability & ASAA_CAP_NCQ && (letoh16(id.satacap) & as 506 dev/ata/atascsi.c host_ncqdepth = link->openings + 1 + ((as->as_capability & as 535 dev/ata/atascsi.c struct atascsi *as = link->adapter_softc; as 536 dev/ata/atascsi.c struct ata_port *ap = as->as_ports[link->target]; as 559 dev/ata/atascsi.c return (ata_exec(as, xa)); as 595 dev/ata/atascsi.c struct atascsi *as = link->adapter_softc; as 596 dev/ata/atascsi.c struct ata_port *ap = as->as_ports[link->target]; as 609 dev/ata/atascsi.c return (ata_exec(as, xa)); as 689 dev/ata/atascsi.c struct atascsi *as = link->adapter_softc; as 690 dev/ata/atascsi.c struct ata_port *ap = as->as_ports[link->target]; as 733 dev/ata/atascsi.c return (ata_exec(as, xa)); as 789 dev/ata/atascsi.c ata_exec(struct atascsi *as, struct ata_xfer *xa) as 793 dev/ata/atascsi.c switch (as->as_methods->ata_cmd(xa)) { as 808 dev/ata/atascsi.c struct atascsi *as = ap->ap_as; as 811 dev/ata/atascsi.c xa = as->as_methods->ata_get_xfer(as->as_cookie, ap->ap_port); as 229 dev/atapiscsi/atapiscsi.c struct atapiscsi_softc *as = (struct atapiscsi_softc *)self; as 247 dev/atapiscsi/atapiscsi.c as->chp = chp; as 248 dev/atapiscsi/atapiscsi.c as->drive = drvp->drive; as 249 dev/atapiscsi/atapiscsi.c as->sc_adapterlink.adapter_softc = as; as 250 dev/atapiscsi/atapiscsi.c as->sc_adapterlink.adapter_target = 7; as 251 dev/atapiscsi/atapiscsi.c as->sc_adapterlink.adapter_buswidth = 2; as 252 dev/atapiscsi/atapiscsi.c as->sc_adapterlink.adapter = &atapiscsi_switch; as 253 dev/atapiscsi/atapiscsi.c as->sc_adapterlink.device = &atapiscsi_dev; as 254 dev/atapiscsi/atapiscsi.c as->sc_adapterlink.luns = 1; as 255 dev/atapiscsi/atapiscsi.c as->sc_adapterlink.openings = 1; as 256 dev/atapiscsi/atapiscsi.c as->sc_adapterlink.flags = SDEV_ATAPI; as 258 dev/atapiscsi/atapiscsi.c strlcpy(drvp->drive_name, as->sc_dev.dv_xname, as 260 dev/atapiscsi/atapiscsi.c drvp->cf_flags = as->sc_dev.dv_cfdata->cf_flags; as 291 dev/atapiscsi/atapiscsi.c saa.saa_sc_link = &as->sc_adapterlink; as 293 dev/atapiscsi/atapiscsi.c child = config_found((struct device *)as, &saa, scsiprint); as 326 dev/atapiscsi/atapiscsi.c struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; as 327 dev/atapiscsi/atapiscsi.c struct channel_softc *chp = as->chp; as 328 dev/atapiscsi/atapiscsi.c struct ata_drive_datas *drvp = &chp->ch_drive[as->drive]; as 334 dev/atapiscsi/atapiscsi.c chp->wdc->sc_dev.dv_xname, chp->channel, as->drive), DEBUG_XFERS); as 348 dev/atapiscsi/atapiscsi.c xfer->drive = as->drive; as 359 dev/atapiscsi/atapiscsi.c chp->wdc->sc_dev.dv_xname, chp->channel, as->drive), as 451 dev/atapiscsi/atapiscsi.c struct atapiscsi_softc *as = sc_link->adapter_softc; as 452 dev/atapiscsi/atapiscsi.c struct channel_softc *chp = as->chp; as 453 dev/atapiscsi/atapiscsi.c struct ata_drive_datas *drvp = &chp->ch_drive[as->drive]; as 861 dev/atapiscsi/atapiscsi.c struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; as 918 dev/atapiscsi/atapiscsi.c as->protocol_phase = as_completed; as 920 dev/atapiscsi/atapiscsi.c as->protocol_phase = as_data; as 964 dev/atapiscsi/atapiscsi.c struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; as 967 dev/atapiscsi/atapiscsi.c if (as->protocol_phase != as_data) { as 1108 dev/atapiscsi/atapiscsi.c struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; as 1145 dev/atapiscsi/atapiscsi.c as->protocol_phase = as_none; as 1235 dev/atapiscsi/atapiscsi.c struct atapiscsi_softc *as = sc_xfer->sc_link->adapter_softc; as 1271 dev/atapiscsi/atapiscsi.c WDCDEBUG_PRINT(("Phase %d, (0x%b, 0x%x) ", as->protocol_phase, as 1274 dev/atapiscsi/atapiscsi.c switch (as->protocol_phase) { as 558 dev/ic/ac97.c ac97_read(struct ac97_softc *as, u_int8_t reg, u_int16_t *val) as 562 dev/ic/ac97.c if (((as->host_flags & AC97_HOST_DONT_READ) && as 565 dev/ic/ac97.c (as->host_flags & AC97_HOST_DONT_READANY)) { as 566 dev/ic/ac97.c *val = as->shadow_reg[reg >> 1]; as 570 dev/ic/ac97.c if ((error = as->host_if->read(as->host_if->arg, reg, val))) as 571 dev/ic/ac97.c *val = as->shadow_reg[reg >> 1]; as 576 dev/ic/ac97.c ac97_write(struct ac97_softc *as, u_int8_t reg, u_int16_t val) as 578 dev/ic/ac97.c as->shadow_reg[reg >> 1] = val; as 579 dev/ic/ac97.c return (as->host_if->write(as->host_if->arg, reg, val)); as 583 dev/ic/ac97.c ac97_setup_defaults(struct ac97_softc *as) as 587 dev/ic/ac97.c bzero(as->shadow_reg, sizeof(as->shadow_reg)); as 592 dev/ic/ac97.c ac97_write(as, si->reg, si->default_value); as 599 dev/ic/ac97.c struct ac97_softc *as = (struct ac97_softc *)self; as 605 dev/ic/ac97.c ac97_write(as, si->reg, as->shadow_reg[si->reg >> 1]); as 616 dev/ic/ac97.c ac97_setup_source_info(struct ac97_softc *as) as 622 dev/ic/ac97.c si = &as->source_info[ouridx]; as 637 dev/ic/ac97.c si = &as->source_info[ouridx]; as 660 dev/ic/ac97.c as->num_source_info = ouridx; as 662 dev/ic/ac97.c for (idx = 0; idx < as->num_source_info; idx++) { as 665 dev/ic/ac97.c si = &as->source_info[idx]; as 668 dev/ic/ac97.c for (idx2 = 0; idx2 < as->num_source_info; idx2++) { as 669 dev/ic/ac97.c si2 = &as->source_info[idx2]; as 685 dev/ic/ac97.c for (idx2 = 0; idx2 < as->num_source_info; idx2++) { as 689 dev/ic/ac97.c si2 = &as->source_info[idx2]; as 694 dev/ic/ac97.c as->source_info[previdx].next = idx2; as 695 dev/ic/ac97.c as->source_info[idx2].prev = previdx; as 701 dev/ic/ac97.c as->source_info[previdx].next = AUDIO_MIXER_LAST; as 708 dev/ic/ac97.c struct ac97_softc *as; as 717 dev/ic/ac97.c if (!(as = malloc(sizeof(struct ac97_softc), M_DEVBUF, M_NOWAIT))) as 720 dev/ic/ac97.c bzero(as, sizeof(*as)); as 722 dev/ic/ac97.c as->codec_if.vtbl = &ac97civ; as 723 dev/ic/ac97.c as->host_if = host_if; as 725 dev/ic/ac97.c if ((error = host_if->attach(host_if->arg, &as->codec_if))) { as 726 dev/ic/ac97.c free(as, M_DEVBUF); as 738 dev/ic/ac97.c as->host_flags = host_if->flags(host_if->arg); as 740 dev/ic/ac97.c ac97_setup_defaults(as); as 741 dev/ic/ac97.c ac97_read(as, AC97_REG_VENDOR_ID1, &id1); as 742 dev/ic/ac97.c ac97_read(as, AC97_REG_VENDOR_ID2, &id2); as 743 dev/ic/ac97.c ac97_read(as, AC97_REG_RESET, &as->caps); as 776 dev/ic/ac97.c if (as->caps) { as 779 dev/ic/ac97.c if (as->caps & (1 << i)) as 783 dev/ic/ac97.c ac97enhancement[AC97_CAPS_ENHANCEMENT(as->caps)]); as 786 dev/ic/ac97.c ac97_read(as, AC97_REG_EXT_AUDIO_ID, &as->ext_id); as 787 dev/ic/ac97.c if (as->ext_id) as 788 dev/ic/ac97.c DPRINTF(("ac97: ext id %b\n", as->ext_id, as 790 dev/ic/ac97.c if (as->ext_id & (AC97_EXT_AUDIO_VRA | AC97_EXT_AUDIO_VRM)) { as 791 dev/ic/ac97.c ac97_read(as, AC97_REG_EXT_AUDIO_CTRL, &id1); as 792 dev/ic/ac97.c if (as->ext_id & AC97_EXT_AUDIO_VRA) as 794 dev/ic/ac97.c if (as->ext_id & AC97_EXT_AUDIO_VRM) as 796 dev/ic/ac97.c ac97_write(as, AC97_REG_EXT_AUDIO_CTRL, id1); as 799 dev/ic/ac97.c ac97_setup_source_info(as); as 803 dev/ic/ac97.c initfunc(as); as 810 dev/ic/ac97.c ctl.dev = ac97_get_portnum_by_name(&as->codec_if, AudioCoutputs, as 812 dev/ic/ac97.c ac97_mixer_set_port(&as->codec_if, &ctl); as 814 dev/ic/ac97.c ctl.dev = ac97_get_portnum_by_name(&as->codec_if, AudioCinputs, as 816 dev/ic/ac97.c ac97_mixer_set_port(&as->codec_if, &ctl); as 818 dev/ic/ac97.c ctl.dev = ac97_get_portnum_by_name(&as->codec_if, AudioCrecord, as 820 dev/ic/ac97.c ac97_mixer_set_port(&as->codec_if, &ctl); as 824 dev/ic/ac97.c ctl.dev = ac97_get_portnum_by_name(&as->codec_if, AudioCrecord, as 826 dev/ic/ac97.c ac97_mixer_set_port(&as->codec_if, &ctl); as 834 dev/ic/ac97.c struct ac97_softc *as = (struct ac97_softc *)codec_if; as 836 dev/ic/ac97.c if (dip->index < as->num_source_info) { as 837 dev/ic/ac97.c struct ac97_source_info *si = &as->source_info[dip->index]; as 870 dev/ic/ac97.c struct ac97_softc *as = (struct ac97_softc *)codec_if; as 871 dev/ic/ac97.c struct ac97_source_info *si = &as->source_info[cp->dev]; as 876 dev/ic/ac97.c if (cp->dev < 0 || cp->dev >= as->num_source_info || as 880 dev/ic/ac97.c ac97_read(as, si->reg, &val); as 915 dev/ic/ac97.c if (!(as->host_flags & AC97_HOST_SWAPPED_CHANNELS)) { as 945 dev/ic/ac97.c error = ac97_write(as, si->reg, (val & ~mask) | newval); as 956 dev/ic/ac97.c struct ac97_softc *as = (struct ac97_softc *)codec_if; as 959 dev/ic/ac97.c for (idx = 0; idx < as->num_source_info; idx++) { as 960 dev/ic/ac97.c struct ac97_source_info *si = &as->source_info[idx]; as 973 dev/ic/ac97.c struct ac97_softc *as = (struct ac97_softc *)codec_if; as 974 dev/ic/ac97.c struct ac97_source_info *si = &as->source_info[cp->dev]; as 978 dev/ic/ac97.c if (cp->dev < 0 || cp->dev >= as->num_source_info || as 982 dev/ic/ac97.c ac97_read(as, si->reg, &val); as 1006 dev/ic/ac97.c if (!(as->host_flags & AC97_HOST_SWAPPED_CHANNELS)) { as 1047 dev/ic/ac97.c struct ac97_softc *as = (struct ac97_softc *)codec_if; as 1052 dev/ic/ac97.c if (!(as->ext_id & AC97_EXT_AUDIO_VRA)) { as 1060 dev/ic/ac97.c if (!(as->ext_id & AC97_EXT_AUDIO_DRA)) as 1062 dev/ic/ac97.c if (ac97_read(as, AC97_REG_EXT_AUDIO_CTRL, &id)) as 1065 dev/ic/ac97.c if (ac97_write(as, AC97_REG_EXT_AUDIO_CTRL, id)) as 1071 dev/ic/ac97.c if (ac97_read(as, AC97_REG_POWER, &val) || as 1072 dev/ic/ac97.c ac97_write(as, AC97_REG_POWER, val | as 1079 dev/ic/ac97.c if (ac97_write(as, reg, (u_int16_t) p->sample_rate) || as 1080 dev/ic/ac97.c ac97_read(as, reg, ®val)) as 1088 dev/ic/ac97.c if (ac97_write(as, AC97_REG_POWER, val)) as 1101 dev/ic/ac97.c ac97_ad1886_init(struct ac97_softc *as) as 1103 dev/ic/ac97.c ac97_write(as, AC97_AD1886_JACK_SENSE, 0x0010); as 1107 dev/ic/ac97.c ac97_ad198x_init(struct ac97_softc *as) as 1112 dev/ic/ac97.c ac97_read(as, AC97_AD_REG_MISC, &misc); as 1113 dev/ic/ac97.c ac97_write(as, AC97_AD_REG_MISC, as 1116 dev/ic/ac97.c for (i = 0; i < as->num_source_info; i++) { as 1117 dev/ic/ac97.c if (as->source_info[i].reg == AC97_REG_SURROUND_VOLUME) as 1118 dev/ic/ac97.c as->source_info[i].reg = AC97_REG_MASTER_VOLUME; as 1119 dev/ic/ac97.c else if (as->source_info[i].reg == AC97_REG_MASTER_VOLUME) { as 1120 dev/ic/ac97.c as->source_info[i].reg = AC97_REG_SURROUND_VOLUME; as 1121 dev/ic/ac97.c if (as->source_info[i].type == AUDIO_MIXER_ENUM) { as 1122 dev/ic/ac97.c as->source_info[i].mute = 1; as 1123 dev/ic/ac97.c as->source_info[i].ofs = 7; as 1130 dev/ic/ac97.c ac97_alc655_init(struct ac97_softc *as) as 1134 dev/ic/ac97.c ac97_read(as, AC97_AV_REG_MISC, &misc); as 1135 dev/ic/ac97.c if (as->host_flags & AC97_HOST_DONT_ENABLE_SPDIF) { as 1141 dev/ic/ac97.c ac97_write(as, AC97_AV_REG_MISC, misc); as 1143 dev/ic/ac97.c ac97_write(as, AC97_AV_REG_MULTICH, AC97_AV_MULTICH_MAGIC); as 1147 dev/ic/ac97.c ac97_cx20468_init(struct ac97_softc *as) as 1151 dev/ic/ac97.c ac97_read(as, AC97_CX_REG_MISC, &misc); as 1152 dev/ic/ac97.c ac97_write(as, AC97_CX_REG_MISC, misc & as 818 dev/ic/re.c u_int16_t as[ETHER_ADDR_LEN / 2]; as 837 dev/ic/re.c re_read_eeprom(sc, (caddr_t)as, RL_EE_EADDR, 3); as 839 dev/ic/re.c as[i] = letoh16(as[i]); as 840 dev/ic/re.c bcopy(as, eaddr, sizeof(eaddr)); as 704 dev/pci/if_vge.c u_int16_t as[3]; as 750 dev/pci/if_vge.c vge_read_eeprom(sc, (caddr_t)as, VGE_EE_EADDR, 3, 0); as 752 dev/pci/if_vge.c eaddr[(i * 2) + 0] = as[i] & 0xff; as 753 dev/pci/if_vge.c eaddr[(i * 2) + 1] = as[i] >> 8; as 2528 dev/usb/uaudio.c struct as_info *as = &sc->sc_alts[ch->altidx]; as 2529 dev/usb/uaudio.c int endpt = as->edesc->bEndpointAddress; as 2533 dev/usb/uaudio.c endpt, ch->sample_rate, as->alt)); as 2536 dev/usb/uaudio.c err = usbd_set_interface(as->ifaceh, as->alt); as 2545 dev/usb/uaudio.c if (as->asf1desc->bSamFreqType != 1) { as 2555 dev/usb/uaudio.c err = usbd_open_pipe(as->ifaceh, endpt, 0, &ch->pipe); as 2558 dev/usb/uaudio.c if (as->edesc1 != NULL) { as 2559 dev/usb/uaudio.c endpt = as->edesc1->bEndpointAddress; as 2561 dev/usb/uaudio.c err = usbd_open_pipe(as->ifaceh, endpt, 0, &ch->sync_pipe); as 2569 dev/usb/uaudio.c struct as_info *as = &sc->sc_alts[ch->altidx]; as 2571 dev/usb/uaudio.c as->sc_busy = 0; as 2575 dev/usb/uaudio.c usbd_set_interface(as->ifaceh, sc->sc_nullalt); as 1072 net/pf_table.c struct pfr_astats as; as 1074 net/pf_table.c pfr_copyout_addr(&as.pfras_a, ke); as 1077 net/pf_table.c bcopy(ke->pfrke_packets, as.pfras_packets, as 1078 net/pf_table.c sizeof(as.pfras_packets)); as 1079 net/pf_table.c bcopy(ke->pfrke_bytes, as.pfras_bytes, as 1080 net/pf_table.c sizeof(as.pfras_bytes)); as 1082 net/pf_table.c as.pfras_tzero = ke->pfrke_tzero; as 1084 net/pf_table.c if (COPYOUT(&as, w->pfrw_astats, sizeof(as), flags))