/linux-4.4.14/drivers/net/wan/ |
H A D | hdlc_fr.c | 179 struct pvc_device *pvc = state(hdlc)->first_pvc; find_pvc() local 181 while (pvc) { find_pvc() 182 if (pvc->dlci == dlci) find_pvc() 183 return pvc; find_pvc() 184 if (pvc->dlci > dlci) find_pvc() 186 pvc = pvc->next; find_pvc() 196 struct pvc_device *pvc, **pvc_p = &state(hdlc)->first_pvc; add_pvc() local 206 pvc = kzalloc(sizeof(*pvc), GFP_ATOMIC); add_pvc() 208 printk(KERN_DEBUG "add_pvc: allocated pvc %p, frad %p\n", pvc, dev); add_pvc() 210 if (!pvc) add_pvc() 213 pvc->dlci = dlci; add_pvc() 214 pvc->frad = dev; add_pvc() 215 pvc->next = *pvc_p; /* Put it in the chain */ add_pvc() 216 *pvc_p = pvc; add_pvc() 217 return pvc; add_pvc() 221 static inline int pvc_is_used(struct pvc_device *pvc) pvc_is_used() argument 223 return pvc->main || pvc->ether; pvc_is_used() 227 static inline void pvc_carrier(int on, struct pvc_device *pvc) pvc_carrier() argument 230 if (pvc->main) pvc_carrier() 231 if (!netif_carrier_ok(pvc->main)) pvc_carrier() 232 netif_carrier_on(pvc->main); pvc_carrier() 233 if (pvc->ether) pvc_carrier() 234 if (!netif_carrier_ok(pvc->ether)) pvc_carrier() 235 netif_carrier_on(pvc->ether); pvc_carrier() 237 if (pvc->main) pvc_carrier() 238 if (netif_carrier_ok(pvc->main)) pvc_carrier() 239 netif_carrier_off(pvc->main); pvc_carrier() 240 if (pvc->ether) pvc_carrier() 241 if (netif_carrier_ok(pvc->ether)) pvc_carrier() 242 netif_carrier_off(pvc->ether); pvc_carrier() 253 struct pvc_device *pvc = *pvc_p; delete_unused_pvcs() local 255 printk(KERN_DEBUG "freeing unused pvc: %p\n", pvc); delete_unused_pvcs() 257 *pvc_p = pvc->next; delete_unused_pvcs() 258 kfree(pvc); delete_unused_pvcs() 266 static inline struct net_device **get_dev_p(struct pvc_device *pvc, get_dev_p() argument 270 return &pvc->ether; get_dev_p() 272 return &pvc->main; get_dev_p() 346 struct pvc_device *pvc = dev->ml_priv; pvc_open() local 348 if ((pvc->frad->flags & IFF_UP) == 0) pvc_open() 351 if (pvc->open_count++ == 0) { pvc_open() 352 hdlc_device *hdlc = dev_to_hdlc(pvc->frad); pvc_open() 354 pvc->state.active = netif_carrier_ok(pvc->frad); pvc_open() 356 pvc_carrier(pvc->state.active, pvc); pvc_open() 366 struct pvc_device *pvc = dev->ml_priv; pvc_close() local 368 if (--pvc->open_count == 0) { pvc_close() 369 hdlc_device *hdlc = dev_to_hdlc(pvc->frad); pvc_close() 371 pvc->state.active = 0; pvc_close() 375 pvc->state.active = 0; pvc_close() 385 struct pvc_device *pvc = dev->ml_priv; pvc_ioctl() local 400 info.dlci = pvc->dlci; pvc_ioctl() 401 memcpy(info.master, pvc->frad->name, IFNAMSIZ); pvc_ioctl() 413 struct pvc_device *pvc = dev->ml_priv; pvc_xmit() local 415 if (pvc->state.active) { pvc_xmit() 432 if (!fr_hard_header(&skb, pvc->dlci)) { pvc_xmit() 435 if (pvc->state.fecn) /* TX Congestion counter */ pvc_xmit() 437 skb->dev = pvc->frad; pvc_xmit() 448 static inline void fr_log_dlci_active(struct pvc_device *pvc) fr_log_dlci_active() argument 450 netdev_info(pvc->frad, "DLCI %d [%s%s%s]%s %s\n", fr_log_dlci_active() 451 pvc->dlci, fr_log_dlci_active() 452 pvc->main ? pvc->main->name : "", fr_log_dlci_active() 453 pvc->main && pvc->ether ? " " : "", fr_log_dlci_active() 454 pvc->ether ? pvc->ether->name : "", fr_log_dlci_active() 455 pvc->state.new ? " new" : "", fr_log_dlci_active() 456 !pvc->state.exist ? "deleted" : fr_log_dlci_active() 457 pvc->state.active ? "active" : "inactive"); fr_log_dlci_active() 473 struct pvc_device *pvc = state(hdlc)->first_pvc; fr_lmi_send() local 519 while (pvc) { fr_lmi_send() 525 if (state(hdlc)->reliable && !pvc->state.exist) { fr_lmi_send() 526 pvc->state.exist = pvc->state.new = 1; fr_lmi_send() 527 fr_log_dlci_active(pvc); fr_lmi_send() 531 if (pvc->open_count && !pvc->state.active && fr_lmi_send() 532 pvc->state.exist && !pvc->state.new) { fr_lmi_send() 533 pvc_carrier(1, pvc); fr_lmi_send() 534 pvc->state.active = 1; fr_lmi_send() 535 fr_log_dlci_active(pvc); fr_lmi_send() 539 data[i] = pvc->dlci >> 8; fr_lmi_send() 540 data[i + 1] = pvc->dlci & 0xFF; fr_lmi_send() 542 data[i] = (pvc->dlci >> 4) & 0x3F; fr_lmi_send() 543 data[i + 1] = ((pvc->dlci << 3) & 0x78) | 0x80; fr_lmi_send() 547 if (pvc->state.new) fr_lmi_send() 549 else if (pvc->state.active) fr_lmi_send() 553 pvc = pvc->next; fr_lmi_send() 570 struct pvc_device *pvc = state(hdlc)->first_pvc; fr_set_link_state() local 579 while (pvc) { /* Activate all PVCs */ fr_set_link_state() 580 pvc_carrier(1, pvc); fr_set_link_state() 581 pvc->state.exist = pvc->state.active = 1; fr_set_link_state() 582 pvc->state.new = 0; fr_set_link_state() 583 pvc = pvc->next; fr_set_link_state() 588 while (pvc) { /* Deactivate all PVCs */ fr_set_link_state() 589 pvc_carrier(0, pvc); fr_set_link_state() 590 pvc->state.exist = pvc->state.active = 0; fr_set_link_state() 591 pvc->state.new = 0; fr_set_link_state() 593 pvc->state.bandwidth = 0; fr_set_link_state() 594 pvc = pvc->next; fr_set_link_state() 656 struct pvc_device *pvc; fr_lmi_recv() local 751 pvc = state(hdlc)->first_pvc; fr_lmi_recv() 752 while (pvc) { fr_lmi_recv() 753 if (pvc->state.new) { fr_lmi_recv() 754 pvc->state.new = 0; fr_lmi_recv() 759 pvc = pvc->next; fr_lmi_recv() 784 pvc = state(hdlc)->first_pvc; fr_lmi_recv() 786 while (pvc) { fr_lmi_recv() 787 pvc->state.deleted = 1; fr_lmi_recv() 788 pvc = pvc->next; fr_lmi_recv() 824 pvc = add_pvc(dev, dlci); fr_lmi_recv() 826 if (!pvc && !no_ram) { fr_lmi_recv() 831 if (pvc) { fr_lmi_recv() 832 pvc->state.exist = 1; fr_lmi_recv() 833 pvc->state.deleted = 0; fr_lmi_recv() 834 if (active != pvc->state.active || fr_lmi_recv() 835 new != pvc->state.new || fr_lmi_recv() 836 bw != pvc->state.bandwidth || fr_lmi_recv() 837 !pvc->state.exist) { fr_lmi_recv() 838 pvc->state.new = new; fr_lmi_recv() 839 pvc->state.active = active; fr_lmi_recv() 840 pvc->state.bandwidth = bw; fr_lmi_recv() 841 pvc_carrier(active, pvc); fr_lmi_recv() 842 fr_log_dlci_active(pvc); fr_lmi_recv() 849 pvc = state(hdlc)->first_pvc; fr_lmi_recv() 851 while (pvc) { fr_lmi_recv() 852 if (pvc->state.deleted && pvc->state.exist) { fr_lmi_recv() 853 pvc_carrier(0, pvc); fr_lmi_recv() 854 pvc->state.active = pvc->state.new = 0; fr_lmi_recv() 855 pvc->state.exist = 0; fr_lmi_recv() 856 pvc->state.bandwidth = 0; fr_lmi_recv() 857 fr_log_dlci_active(pvc); fr_lmi_recv() 859 pvc = pvc->next; fr_lmi_recv() 876 struct pvc_device *pvc; fr_rx() local 895 pvc = find_pvc(hdlc, dlci); fr_rx() 896 if (!pvc) { fr_rx() 905 if (pvc->state.fecn != fh->fecn) { fr_rx() 910 pvc->state.fecn ^= 1; fr_rx() 913 if (pvc->state.becn != fh->becn) { fr_rx() 918 pvc->state.becn ^= 1; fr_rx() 929 dev = pvc->main; fr_rx() 934 dev = pvc->main; fr_rx() 948 dev = pvc->main; fr_rx() 953 if ((dev = pvc->ether) != NULL) fr_rx() 973 if (pvc->state.becn) fr_rx() 1032 struct pvc_device *pvc = state(hdlc)->first_pvc; fr_close() local 1034 while (pvc) { /* Shutdown all PVCs for this FRAD */ fr_close() 1035 if (pvc->main) fr_close() 1036 dev_close(pvc->main); fr_close() 1037 if (pvc->ether) fr_close() 1038 dev_close(pvc->ether); fr_close() 1039 pvc = pvc->next; fr_close() 1064 struct pvc_device *pvc; fr_add_pvc() local 1068 if ((pvc = add_pvc(frad, dlci)) == NULL) { fr_add_pvc() 1073 if (*get_dev_p(pvc, type)) fr_add_pvc() 1076 used = pvc_is_used(pvc); fr_add_pvc() 1082 dev = alloc_netdev(0, "pvc%d", NET_NAME_UNKNOWN, pvc_setup); fr_add_pvc() 1100 dev->ml_priv = pvc; fr_add_pvc() 1109 *get_dev_p(pvc, type) = dev; fr_add_pvc() 1121 struct pvc_device *pvc; fr_del_pvc() local 1124 if ((pvc = find_pvc(hdlc, dlci)) == NULL) fr_del_pvc() 1127 if ((dev = *get_dev_p(pvc, type)) == NULL) fr_del_pvc() 1134 *get_dev_p(pvc, type) = NULL; fr_del_pvc() 1136 if (!pvc_is_used(pvc)) { fr_del_pvc() 1149 struct pvc_device *pvc = state(hdlc)->first_pvc; fr_destroy() local 1154 while (pvc) { fr_destroy() 1155 struct pvc_device *next = pvc->next; fr_destroy() 1157 if (pvc->main) fr_destroy() 1158 unregister_netdevice(pvc->main); fr_destroy() 1160 if (pvc->ether) fr_destroy() 1161 unregister_netdevice(pvc->ether); fr_destroy() 1163 kfree(pvc); fr_destroy() 1164 pvc = next; fr_destroy() 1186 fr_proto_pvc pvc; fr_ioctl() local 1255 if (copy_from_user(&pvc, ifr->ifr_settings.ifs_ifsu.fr_pvc, fr_ioctl() 1259 if (pvc.dlci <= 0 || pvc.dlci >= 1024) fr_ioctl() 1270 return fr_add_pvc(dev, pvc.dlci, result); fr_ioctl() 1272 return fr_del_pvc(hdlc, pvc.dlci, result); fr_ioctl()
|
/linux-4.4.14/net/atm/ |
H A D | signaling.h | 23 struct atm_vcc *listen_vcc,const struct sockaddr_atmpvc *pvc, 26 struct atm_vcc *listen_vcc,const struct sockaddr_atmpvc *pvc,
|
H A D | Makefile | 5 atm-y := addr.o pvc.o signaling.o svc.o ioctl.o common.o atm_misc.o raw.o resources.o atm_sysfs.o
|
H A D | signaling.c | 89 session_vcc->itf = msg->pvc.sap_addr.itf; sigd_send() 90 session_vcc->vpi = msg->pvc.sap_addr.vpi; sigd_send() 91 session_vcc->vci = msg->pvc.sap_addr.vci; sigd_send() 142 struct atm_vcc *listen_vcc, const struct sockaddr_atmpvc *pvc, sigd_enq2() 167 if (pvc) sigd_enq2() 168 msg->pvc = *pvc; sigd_enq2() 180 struct atm_vcc *listen_vcc, const struct sockaddr_atmpvc *pvc, sigd_enq() 183 sigd_enq2(vcc, type, listen_vcc, pvc, svc, vcc ? &vcc->qos : NULL, 0); sigd_enq() 141 sigd_enq2(struct atm_vcc *vcc, enum atmsvc_msg_type type, struct atm_vcc *listen_vcc, const struct sockaddr_atmpvc *pvc, const struct sockaddr_atmsvc *svc, const struct atm_qos *qos, int reply) sigd_enq2() argument 179 sigd_enq(struct atm_vcc *vcc, enum atmsvc_msg_type type, struct atm_vcc *listen_vcc, const struct sockaddr_atmpvc *pvc, const struct sockaddr_atmsvc *svc) sigd_enq() argument
|
H A D | addr.c | 41 struct sockaddr_atmpvc pvc; notify_sigd() local 43 pvc.sap_addr.itf = dev->number; notify_sigd() 44 sigd_enq(NULL, as_itf_notify, NULL, &pvc, NULL); notify_sigd()
|
H A D | common.c | 813 struct sockaddr_atmpvc pvc; vcc_getsockopt() local 817 memset(&pvc, 0, sizeof(pvc)); vcc_getsockopt() 818 pvc.sap_family = AF_ATMPVC; vcc_getsockopt() 819 pvc.sap_addr.itf = vcc->dev->number; vcc_getsockopt() 820 pvc.sap_addr.vpi = vcc->vpi; vcc_getsockopt() 821 pvc.sap_addr.vci = vcc->vci; vcc_getsockopt() 822 return copy_to_user(optval, &pvc, sizeof(pvc)) ? -EFAULT : 0; vcc_getsockopt()
|
H A D | pvc.c | 1 /* net/atm/pvc.c - ATM PVC sockets */
|
H A D | svc.c | 378 error = vcc_connect(newsock, msg->pvc.sap_addr.itf, svc_accept() 379 msg->pvc.sap_addr.vpi, svc_accept() 380 msg->pvc.sap_addr.vci); svc_accept()
|
H A D | proc.c | 449 { .name = "pvc", .proc_fops = &pvc_seq_fops },
|
/linux-4.4.14/arch/powerpc/kvm/ |
H A D | book3s_hv.c | 2102 static bool can_piggyback_subcore(struct kvmppc_vcore *pvc, can_piggyback_subcore() argument 2112 if (pvc->kvm != vc->kvm || can_piggyback_subcore() 2113 pvc->tb_offset != vc->tb_offset || can_piggyback_subcore() 2114 pvc->pcr != vc->pcr || can_piggyback_subcore() 2115 pvc->lpcr != vc->lpcr) can_piggyback_subcore() 2120 (vc->num_threads > 1 || pvc->num_threads > 1)) can_piggyback_subcore() 2123 n_thr = cip->subcore_threads[sub] + pvc->num_threads; can_piggyback_subcore() 2130 cip->total_threads += pvc->num_threads; can_piggyback_subcore() 2132 pvc->master_vcore = vc; can_piggyback_subcore() 2133 list_del(&pvc->preempt_list); can_piggyback_subcore() 2134 list_add_tail(&pvc->preempt_list, &cip->vcs[sub]); can_piggyback_subcore() 2141 * vcore *pvc onto the execution of the other vcores described in *cip. 2143 static bool can_piggyback(struct kvmppc_vcore *pvc, struct core_info *cip, can_piggyback() argument 2148 if (cip->total_threads + pvc->num_threads > target_threads) can_piggyback() 2152 can_piggyback_subcore(pvc, cip, sub)) can_piggyback() 2155 if (can_dynamic_split(pvc, cip)) can_piggyback() 2183 struct kvmppc_vcore *pvc, *vcnext; collect_piggybacks() local 2186 list_for_each_entry_safe(pvc, vcnext, &lp->list, preempt_list) { collect_piggybacks() 2187 if (!spin_trylock(&pvc->lock)) collect_piggybacks() 2189 prepare_threads(pvc); collect_piggybacks() 2190 if (!pvc->n_runnable) { collect_piggybacks() 2191 list_del_init(&pvc->preempt_list); collect_piggybacks() 2192 if (pvc->runner == NULL) { collect_piggybacks() 2193 pvc->vcore_state = VCORE_INACTIVE; collect_piggybacks() 2194 kvmppc_core_end_stolen(pvc); collect_piggybacks() 2196 spin_unlock(&pvc->lock); collect_piggybacks() 2199 if (!can_piggyback(pvc, cip, target_threads)) { collect_piggybacks() 2200 spin_unlock(&pvc->lock); collect_piggybacks() 2203 kvmppc_core_end_stolen(pvc); collect_piggybacks() 2204 pvc->vcore_state = VCORE_PIGGYBACK; collect_piggybacks() 2279 struct kvmppc_vcore *pvc, *vcnext; kvmppc_run_core() local 2387 list_for_each_entry(pvc, &core_info.vcs[sub], preempt_list) { kvmppc_run_core() 2388 pvc->pcpu = pcpu + thr; kvmppc_run_core() 2389 list_for_each_entry(vcpu, &pvc->runnable_threads, kvmppc_run_core() 2391 kvmppc_start_thread(vcpu, pvc); kvmppc_run_core() 2392 kvmppc_create_dtl_entry(vcpu, pvc); kvmppc_run_core() 2402 if (pvc->master_vcore == pvc && !thr0_done) kvmppc_run_core() 2403 kvmppc_start_thread(NULL, pvc); kvmppc_run_core() 2404 thr += pvc->num_threads; kvmppc_run_core() 2432 list_for_each_entry(pvc, &core_info.vcs[sub], preempt_list) kvmppc_run_core() 2433 spin_unlock(&pvc->lock); kvmppc_run_core() 2484 list_for_each_entry_safe(pvc, vcnext, &core_info.vcs[sub], kvmppc_run_core() 2486 post_guest_process(pvc, pvc == vc); kvmppc_run_core()
|
/linux-4.4.14/include/uapi/linux/ |
H A D | atmsvc.h | 32 struct sockaddr_atmpvc pvc; /* indicate, okay (connect) */ member in struct:atmsvc_msg
|
/linux-4.4.14/net/sched/ |
H A D | sch_atm.c | 607 struct sockaddr_atmpvc pvc; atm_tc_dump_class() local 610 memset(&pvc, 0, sizeof(pvc)); atm_tc_dump_class() 611 pvc.sap_family = AF_ATMPVC; atm_tc_dump_class() 612 pvc.sap_addr.itf = flow->vcc->dev ? flow->vcc->dev->number : -1; atm_tc_dump_class() 613 pvc.sap_addr.vpi = flow->vcc->vpi; atm_tc_dump_class() 614 pvc.sap_addr.vci = flow->vcc->vci; atm_tc_dump_class() 615 if (nla_put(skb, TCA_ATM_ADDR, sizeof(pvc), &pvc)) atm_tc_dump_class()
|
/linux-4.4.14/drivers/isdn/hardware/eicon/ |
H A D | message.c | 2624 byte pvc[2]; connect_b3_req() local 2672 pvc[0] = ncpi->info[3]; connect_b3_req() 2673 pvc[1] = ncpi->info[2]; connect_b3_req() 2674 add_d(plci, 2, pvc); connect_b3_req()
|