Lines Matching full:vcc
769 struct atm_vcc* vcc; in fore200e_tx_irq() local
795 /* vcc closed since the time the entry was submitted for tx? */ in fore200e_tx_irq()
796 if ((vc_map->vcc == NULL) || in fore200e_tx_irq()
797 (test_bit(ATM_VF_READY, &vc_map->vcc->flags) == 0)) { in fore200e_tx_irq()
799 DPRINTK(1, "no ready vcc found for PDU sent on device %d\n", in fore200e_tx_irq()
805 ASSERT(vc_map->vcc); in fore200e_tx_irq()
807 /* vcc closed then immediately re-opened? */ in fore200e_tx_irq()
810 /* when a vcc is closed, some PDUs may be still pending in the tx queue. in fore200e_tx_irq()
811 if the same vcc is immediately re-opened, those pending PDUs must in fore200e_tx_irq()
813 to the prior incarnation of that vcc. otherwise, sk_atm(vcc)->sk_wmem_alloc in fore200e_tx_irq()
815 leading to a negative sk->sk_wmem_alloc count, ultimately freezing the vcc. in fore200e_tx_irq()
816 we thus bind the tx entry to the current incarnation of the vcc in fore200e_tx_irq()
819 of the vcc, then this implies that the vcc has been closed then re-opened. in fore200e_tx_irq()
822 DPRINTK(1, "vcc closed-then-re-opened; dropping PDU sent on device %d\n", in fore200e_tx_irq()
828 vcc = vc_map->vcc; in fore200e_tx_irq()
829 ASSERT(vcc); in fore200e_tx_irq()
832 if (vcc->pop) { in fore200e_tx_irq()
833 vcc->pop(vcc, entry->skb); in fore200e_tx_irq()
841 atomic_inc(&vcc->stats->tx_err); in fore200e_tx_irq()
843 atomic_inc(&vcc->stats->tx); in fore200e_tx_irq()
957 fore200e_push_rpd(struct fore200e* fore200e, struct atm_vcc* vcc, struct rpd* rpd) in fore200e_push_rpd() argument
967 ASSERT(vcc); in fore200e_push_rpd()
969 fore200e_vcc = FORE200E_VCC(vcc); in fore200e_push_rpd()
973 if ((vcc->qos.aal == ATM_AAL0) && (vcc->qos.rxtp.max_sdu == ATM_AAL0_SDU)) { in fore200e_push_rpd()
992 atomic_inc(&vcc->stats->rx_drop); in fore200e_push_rpd()
1030 if (atm_charge(vcc, skb->truesize) == 0) { in fore200e_push_rpd()
1033 vcc->itf, vcc->vpi, vcc->vci); in fore200e_push_rpd()
1037 atomic_inc(&vcc->stats->rx_drop); in fore200e_push_rpd()
1041 vcc->push(vcc, skb); in fore200e_push_rpd()
1042 atomic_inc(&vcc->stats->rx); in fore200e_push_rpd()
1086 struct atm_vcc* vcc; in fore200e_rx_irq() local
1099 if ((vc_map->vcc == NULL) || in fore200e_rx_irq()
1100 (test_bit(ATM_VF_READY, &vc_map->vcc->flags) == 0)) { in fore200e_rx_irq()
1107 vcc = vc_map->vcc; in fore200e_rx_irq()
1108 ASSERT(vcc); in fore200e_rx_irq()
1112 fore200e_push_rpd(fore200e, vcc, entry->rpd); in fore200e_rx_irq()
1118 atomic_inc(&vcc->stats->rx_err); in fore200e_rx_irq()
1207 fore200e_select_scheme(struct atm_vcc* vcc) in fore200e_select_scheme() argument
1210 int scheme = vcc->vci % 2 ? BUFFER_SCHEME_ONE : BUFFER_SCHEME_TWO; in fore200e_select_scheme()
1213 vcc->itf, vcc->vpi, vcc->vci, scheme); in fore200e_select_scheme()
1220 fore200e_activate_vcin(struct fore200e* fore200e, int activate, struct atm_vcc* vcc, int mtu) in fore200e_activate_vcin() argument
1228 enum fore200e_aal aal = fore200e_atm2fore_aal(vcc->qos.aal); in fore200e_activate_vcin()
1233 FORE200E_VCC(vcc)->scheme = fore200e_select_scheme(vcc); in fore200e_activate_vcin()
1237 activ_opcode.scheme = FORE200E_VCC(vcc)->scheme; in fore200e_activate_vcin()
1245 vpvc.vci = vcc->vci; in fore200e_activate_vcin()
1246 vpvc.vpi = vcc->vpi; in fore200e_activate_vcin()
1271 activate ? "open" : "close", vcc->itf, vcc->vpi, vcc->vci); in fore200e_activate_vcin()
1275 DPRINTK(1, "VC %d.%d.%d %sed\n", vcc->itf, vcc->vpi, vcc->vci, in fore200e_activate_vcin()
1301 fore200e_open(struct atm_vcc *vcc) in fore200e_open() argument
1303 struct fore200e* fore200e = FORE200E_DEV(vcc->dev); in fore200e_open()
1307 int vci = vcc->vci; in fore200e_open()
1308 short vpi = vcc->vpi; in fore200e_open()
1316 if (vc_map->vcc) { in fore200e_open()
1326 vc_map->vcc = vcc; in fore200e_open()
1332 vc_map->vcc = NULL; in fore200e_open()
1338 vcc->itf, vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.aal), in fore200e_open()
1339 fore200e_traffic_class[ vcc->qos.txtp.traffic_class ], in fore200e_open()
1340 vcc->qos.txtp.min_pcr, vcc->qos.txtp.max_pcr, vcc->qos.txtp.max_cdv, vcc->qos.txtp.max_sdu, in fore200e_open()
1341 fore200e_traffic_class[ vcc->qos.rxtp.traffic_class ], in fore200e_open()
1342 vcc->qos.rxtp.min_pcr, vcc->qos.rxtp.max_pcr, vcc->qos.rxtp.max_cdv, vcc->qos.rxtp.max_sdu); in fore200e_open()
1345 if ((vcc->qos.txtp.traffic_class == ATM_CBR) && (vcc->qos.txtp.max_pcr > 0)) { in fore200e_open()
1348 if (fore200e->available_cell_rate < vcc->qos.txtp.max_pcr) { in fore200e_open()
1352 vc_map->vcc = NULL; in fore200e_open()
1357 fore200e->available_cell_rate -= vcc->qos.txtp.max_pcr; in fore200e_open()
1361 vcc->itf = vcc->dev->number; in fore200e_open()
1363 set_bit(ATM_VF_PARTIAL,&vcc->flags); in fore200e_open()
1364 set_bit(ATM_VF_ADDR, &vcc->flags); in fore200e_open()
1366 vcc->dev_data = fore200e_vcc; in fore200e_open()
1368 if (fore200e_activate_vcin(fore200e, 1, vcc, vcc->qos.rxtp.max_sdu) < 0) { in fore200e_open()
1370 vc_map->vcc = NULL; in fore200e_open()
1372 clear_bit(ATM_VF_ADDR, &vcc->flags); in fore200e_open()
1373 clear_bit(ATM_VF_PARTIAL,&vcc->flags); in fore200e_open()
1375 vcc->dev_data = NULL; in fore200e_open()
1377 fore200e->available_cell_rate += vcc->qos.txtp.max_pcr; in fore200e_open()
1384 if ((vcc->qos.txtp.traffic_class == ATM_CBR) && (vcc->qos.txtp.max_pcr > 0)) { in fore200e_open()
1386 fore200e_rate_ctrl(&vcc->qos, &fore200e_vcc->rate); in fore200e_open()
1387 set_bit(ATM_VF_HASQOS, &vcc->flags); in fore200e_open()
1390 vcc->itf, vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.aal), in fore200e_open()
1391 vcc->qos.txtp.max_pcr, vcc->qos.rxtp.max_pcr, in fore200e_open()
1399 /* new incarnation of the vcc */ in fore200e_open()
1403 set_bit(ATM_VF_READY, &vcc->flags); in fore200e_open()
1410 fore200e_close(struct atm_vcc* vcc) in fore200e_close() argument
1417 ASSERT(vcc); in fore200e_close()
1418 fore200e = FORE200E_DEV(vcc->dev); in fore200e_close()
1420 ASSERT((vcc->vpi >= 0) && (vcc->vpi < 1<<FORE200E_VPI_BITS)); in fore200e_close()
1421 ASSERT((vcc->vci >= 0) && (vcc->vci < 1<<FORE200E_VCI_BITS)); in fore200e_close()
1423 …DPRINTK(2, "closing %d.%d.%d:%d\n", vcc->itf, vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.a… in fore200e_close()
1425 clear_bit(ATM_VF_READY, &vcc->flags); in fore200e_close()
1427 fore200e_activate_vcin(fore200e, 0, vcc, 0); in fore200e_close()
1431 vc_map = FORE200E_VC_MAP(fore200e, vcc->vpi, vcc->vci); in fore200e_close()
1434 vc_map->vcc = NULL; in fore200e_close()
1436 vcc->itf = vcc->vci = vcc->vpi = 0; in fore200e_close()
1438 fore200e_vcc = FORE200E_VCC(vcc); in fore200e_close()
1439 vcc->dev_data = NULL; in fore200e_close()
1444 if ((vcc->qos.txtp.traffic_class == ATM_CBR) && (vcc->qos.txtp.max_pcr > 0)) { in fore200e_close()
1447 fore200e->available_cell_rate += vcc->qos.txtp.max_pcr; in fore200e_close()
1450 clear_bit(ATM_VF_HASQOS, &vcc->flags); in fore200e_close()
1453 clear_bit(ATM_VF_ADDR, &vcc->flags); in fore200e_close()
1454 clear_bit(ATM_VF_PARTIAL,&vcc->flags); in fore200e_close()
1462 fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb) in fore200e_send() argument
1480 if (!vcc) in fore200e_send()
1483 fore200e = FORE200E_DEV(vcc->dev); in fore200e_send()
1484 fore200e_vcc = FORE200E_VCC(vcc); in fore200e_send()
1493 if (!test_bit(ATM_VF_READY, &vcc->flags)) { in fore200e_send()
1494 DPRINTK(1, "VC %d.%d.%d not ready for tx\n", vcc->itf, vcc->vpi, vcc->vpi); in fore200e_send()
1500 if ((vcc->qos.aal == ATM_AAL0) && (vcc->qos.txtp.max_sdu == ATM_AAL0_SDU)) { in fore200e_send()
1521 if ((vcc->qos.aal == ATM_AAL0) && (skb_len % ATM_CELL_PAYLOAD)) { in fore200e_send()
1532 if (vcc->pop) { in fore200e_send()
1533 vcc->pop(vcc, skb); in fore200e_send()
1549 vc_map = FORE200E_VC_MAP(fore200e, vcc->vpi, vcc->vci); in fore200e_send()
1550 ASSERT(vc_map->vcc == vcc); in fore200e_send()
1573 atomic_inc(&vcc->stats->tx_err); in fore200e_send()
1578 if (vcc->pop) { in fore200e_send()
1579 vcc->pop(vcc, skb); in fore200e_send()
1616 vcc->itf, vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.aal), in fore200e_send()
1640 tpd->atm_header.vci = vcc->vci; in fore200e_send()
1641 tpd->atm_header.vpi = vcc->vpi; in fore200e_send()
1647 tpd->spec.aal = fore200e_atm2fore_aal(vcc->qos.aal); in fore200e_send()
1880 fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags) in fore200e_change_qos() argument
1882 struct fore200e_vcc* fore200e_vcc = FORE200E_VCC(vcc); in fore200e_change_qos()
1883 struct fore200e* fore200e = FORE200E_DEV(vcc->dev); in fore200e_change_qos()
1885 if (!test_bit(ATM_VF_READY, &vcc->flags)) { in fore200e_change_qos()
1886 DPRINTK(1, "VC %d.%d.%d not ready for QoS change\n", vcc->itf, vcc->vpi, vcc->vpi); in fore200e_change_qos()
1894 vcc->itf, vcc->vpi, vcc->vci, in fore200e_change_qos()
1904 if (fore200e->available_cell_rate + vcc->qos.txtp.max_pcr < qos->txtp.max_pcr) { in fore200e_change_qos()
1909 fore200e->available_cell_rate += vcc->qos.txtp.max_pcr; in fore200e_change_qos()
1914 memcpy(&vcc->qos, qos, sizeof(struct atm_qos)); in fore200e_change_qos()
1919 set_bit(ATM_VF_HASQOS, &vcc->flags); in fore200e_change_qos()
2700 struct atm_vcc* vcc; in fore200e_proc_read() local
2950 vcc = fore200e->vc_map[i].vcc; in fore200e_proc_read()
2952 if (vcc == NULL) in fore200e_proc_read()
2957 if (vcc && test_bit(ATM_VF_READY, &vcc->flags) && !left--) { in fore200e_proc_read()
2959 fore200e_vcc = FORE200E_VCC(vcc); in fore200e_proc_read()
2964 vcc, in fore200e_proc_read()
2965 vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.aal), in fore200e_proc_read()