Lines Matching full:vcc
774 struct atm_vcc* vcc; in fore200e_tx_irq() local
800 /* vcc closed since the time the entry was submitted for tx? */ in fore200e_tx_irq()
801 if ((vc_map->vcc == NULL) || in fore200e_tx_irq()
802 (test_bit(ATM_VF_READY, &vc_map->vcc->flags) == 0)) { in fore200e_tx_irq()
804 DPRINTK(1, "no ready vcc found for PDU sent on device %d\n", in fore200e_tx_irq()
810 ASSERT(vc_map->vcc); in fore200e_tx_irq()
812 /* vcc closed then immediately re-opened? */ in fore200e_tx_irq()
815 /* when a vcc is closed, some PDUs may be still pending in the tx queue. in fore200e_tx_irq()
816 if the same vcc is immediately re-opened, those pending PDUs must in fore200e_tx_irq()
818 to the prior incarnation of that vcc. otherwise, sk_atm(vcc)->sk_wmem_alloc in fore200e_tx_irq()
820 leading to a negative sk->sk_wmem_alloc count, ultimately freezing the vcc. in fore200e_tx_irq()
821 we thus bind the tx entry to the current incarnation of the vcc in fore200e_tx_irq()
824 of the vcc, then this implies that the vcc has been closed then re-opened. in fore200e_tx_irq()
827 DPRINTK(1, "vcc closed-then-re-opened; dropping PDU sent on device %d\n", in fore200e_tx_irq()
833 vcc = vc_map->vcc; in fore200e_tx_irq()
834 ASSERT(vcc); in fore200e_tx_irq()
837 if (vcc->pop) { in fore200e_tx_irq()
838 vcc->pop(vcc, entry->skb); in fore200e_tx_irq()
846 atomic_inc(&vcc->stats->tx_err); in fore200e_tx_irq()
848 atomic_inc(&vcc->stats->tx); in fore200e_tx_irq()
962 fore200e_push_rpd(struct fore200e* fore200e, struct atm_vcc* vcc, struct rpd* rpd) in fore200e_push_rpd() argument
972 ASSERT(vcc); in fore200e_push_rpd()
974 fore200e_vcc = FORE200E_VCC(vcc); in fore200e_push_rpd()
978 if ((vcc->qos.aal == ATM_AAL0) && (vcc->qos.rxtp.max_sdu == ATM_AAL0_SDU)) { in fore200e_push_rpd()
997 atomic_inc(&vcc->stats->rx_drop); in fore200e_push_rpd()
1035 if (atm_charge(vcc, skb->truesize) == 0) { in fore200e_push_rpd()
1038 vcc->itf, vcc->vpi, vcc->vci); in fore200e_push_rpd()
1042 atomic_inc(&vcc->stats->rx_drop); in fore200e_push_rpd()
1046 vcc->push(vcc, skb); in fore200e_push_rpd()
1047 atomic_inc(&vcc->stats->rx); in fore200e_push_rpd()
1091 struct atm_vcc* vcc; in fore200e_rx_irq() local
1104 if ((vc_map->vcc == NULL) || in fore200e_rx_irq()
1105 (test_bit(ATM_VF_READY, &vc_map->vcc->flags) == 0)) { in fore200e_rx_irq()
1112 vcc = vc_map->vcc; in fore200e_rx_irq()
1113 ASSERT(vcc); in fore200e_rx_irq()
1117 fore200e_push_rpd(fore200e, vcc, entry->rpd); in fore200e_rx_irq()
1123 atomic_inc(&vcc->stats->rx_err); in fore200e_rx_irq()
1212 fore200e_select_scheme(struct atm_vcc* vcc) in fore200e_select_scheme() argument
1215 int scheme = vcc->vci % 2 ? BUFFER_SCHEME_ONE : BUFFER_SCHEME_TWO; in fore200e_select_scheme()
1218 vcc->itf, vcc->vpi, vcc->vci, scheme); in fore200e_select_scheme()
1225 fore200e_activate_vcin(struct fore200e* fore200e, int activate, struct atm_vcc* vcc, int mtu) in fore200e_activate_vcin() argument
1233 enum fore200e_aal aal = fore200e_atm2fore_aal(vcc->qos.aal); in fore200e_activate_vcin()
1238 FORE200E_VCC(vcc)->scheme = fore200e_select_scheme(vcc); in fore200e_activate_vcin()
1242 activ_opcode.scheme = FORE200E_VCC(vcc)->scheme; in fore200e_activate_vcin()
1250 vpvc.vci = vcc->vci; in fore200e_activate_vcin()
1251 vpvc.vpi = vcc->vpi; in fore200e_activate_vcin()
1276 activate ? "open" : "close", vcc->itf, vcc->vpi, vcc->vci); in fore200e_activate_vcin()
1280 DPRINTK(1, "VC %d.%d.%d %sed\n", vcc->itf, vcc->vpi, vcc->vci, in fore200e_activate_vcin()
1306 fore200e_open(struct atm_vcc *vcc) in fore200e_open() argument
1308 struct fore200e* fore200e = FORE200E_DEV(vcc->dev); in fore200e_open()
1312 int vci = vcc->vci; in fore200e_open()
1313 short vpi = vcc->vpi; in fore200e_open()
1321 if (vc_map->vcc) { in fore200e_open()
1331 vc_map->vcc = vcc; in fore200e_open()
1337 vc_map->vcc = NULL; in fore200e_open()
1343 vcc->itf, vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.aal), in fore200e_open()
1344 fore200e_traffic_class[ vcc->qos.txtp.traffic_class ], in fore200e_open()
1345 vcc->qos.txtp.min_pcr, vcc->qos.txtp.max_pcr, vcc->qos.txtp.max_cdv, vcc->qos.txtp.max_sdu, in fore200e_open()
1346 fore200e_traffic_class[ vcc->qos.rxtp.traffic_class ], in fore200e_open()
1347 vcc->qos.rxtp.min_pcr, vcc->qos.rxtp.max_pcr, vcc->qos.rxtp.max_cdv, vcc->qos.rxtp.max_sdu); in fore200e_open()
1350 if ((vcc->qos.txtp.traffic_class == ATM_CBR) && (vcc->qos.txtp.max_pcr > 0)) { in fore200e_open()
1353 if (fore200e->available_cell_rate < vcc->qos.txtp.max_pcr) { in fore200e_open()
1357 vc_map->vcc = NULL; in fore200e_open()
1362 fore200e->available_cell_rate -= vcc->qos.txtp.max_pcr; in fore200e_open()
1366 vcc->itf = vcc->dev->number; in fore200e_open()
1368 set_bit(ATM_VF_PARTIAL,&vcc->flags); in fore200e_open()
1369 set_bit(ATM_VF_ADDR, &vcc->flags); in fore200e_open()
1371 vcc->dev_data = fore200e_vcc; in fore200e_open()
1373 if (fore200e_activate_vcin(fore200e, 1, vcc, vcc->qos.rxtp.max_sdu) < 0) { in fore200e_open()
1375 vc_map->vcc = NULL; in fore200e_open()
1377 clear_bit(ATM_VF_ADDR, &vcc->flags); in fore200e_open()
1378 clear_bit(ATM_VF_PARTIAL,&vcc->flags); in fore200e_open()
1380 vcc->dev_data = NULL; in fore200e_open()
1382 fore200e->available_cell_rate += vcc->qos.txtp.max_pcr; in fore200e_open()
1389 if ((vcc->qos.txtp.traffic_class == ATM_CBR) && (vcc->qos.txtp.max_pcr > 0)) { in fore200e_open()
1391 fore200e_rate_ctrl(&vcc->qos, &fore200e_vcc->rate); in fore200e_open()
1392 set_bit(ATM_VF_HASQOS, &vcc->flags); in fore200e_open()
1395 vcc->itf, vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.aal), in fore200e_open()
1396 vcc->qos.txtp.max_pcr, vcc->qos.rxtp.max_pcr, in fore200e_open()
1404 /* new incarnation of the vcc */ in fore200e_open()
1408 set_bit(ATM_VF_READY, &vcc->flags); in fore200e_open()
1415 fore200e_close(struct atm_vcc* vcc) in fore200e_close() argument
1422 ASSERT(vcc); in fore200e_close()
1423 fore200e = FORE200E_DEV(vcc->dev); in fore200e_close()
1425 ASSERT((vcc->vpi >= 0) && (vcc->vpi < 1<<FORE200E_VPI_BITS)); in fore200e_close()
1426 ASSERT((vcc->vci >= 0) && (vcc->vci < 1<<FORE200E_VCI_BITS)); in fore200e_close()
1428 …DPRINTK(2, "closing %d.%d.%d:%d\n", vcc->itf, vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.a… in fore200e_close()
1430 clear_bit(ATM_VF_READY, &vcc->flags); in fore200e_close()
1432 fore200e_activate_vcin(fore200e, 0, vcc, 0); in fore200e_close()
1436 vc_map = FORE200E_VC_MAP(fore200e, vcc->vpi, vcc->vci); in fore200e_close()
1439 vc_map->vcc = NULL; in fore200e_close()
1441 vcc->itf = vcc->vci = vcc->vpi = 0; in fore200e_close()
1443 fore200e_vcc = FORE200E_VCC(vcc); in fore200e_close()
1444 vcc->dev_data = NULL; in fore200e_close()
1449 if ((vcc->qos.txtp.traffic_class == ATM_CBR) && (vcc->qos.txtp.max_pcr > 0)) { in fore200e_close()
1452 fore200e->available_cell_rate += vcc->qos.txtp.max_pcr; in fore200e_close()
1455 clear_bit(ATM_VF_HASQOS, &vcc->flags); in fore200e_close()
1458 clear_bit(ATM_VF_ADDR, &vcc->flags); in fore200e_close()
1459 clear_bit(ATM_VF_PARTIAL,&vcc->flags); in fore200e_close()
1467 fore200e_send(struct atm_vcc *vcc, struct sk_buff *skb) in fore200e_send() argument
1485 if (!vcc) in fore200e_send()
1488 fore200e = FORE200E_DEV(vcc->dev); in fore200e_send()
1489 fore200e_vcc = FORE200E_VCC(vcc); in fore200e_send()
1498 if (!test_bit(ATM_VF_READY, &vcc->flags)) { in fore200e_send()
1499 DPRINTK(1, "VC %d.%d.%d not ready for tx\n", vcc->itf, vcc->vpi, vcc->vpi); in fore200e_send()
1505 if ((vcc->qos.aal == ATM_AAL0) && (vcc->qos.txtp.max_sdu == ATM_AAL0_SDU)) { in fore200e_send()
1526 if ((vcc->qos.aal == ATM_AAL0) && (skb_len % ATM_CELL_PAYLOAD)) { in fore200e_send()
1537 if (vcc->pop) { in fore200e_send()
1538 vcc->pop(vcc, skb); in fore200e_send()
1554 vc_map = FORE200E_VC_MAP(fore200e, vcc->vpi, vcc->vci); in fore200e_send()
1555 ASSERT(vc_map->vcc == vcc); in fore200e_send()
1578 atomic_inc(&vcc->stats->tx_err); in fore200e_send()
1583 if (vcc->pop) { in fore200e_send()
1584 vcc->pop(vcc, skb); in fore200e_send()
1621 vcc->itf, vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.aal), in fore200e_send()
1645 tpd->atm_header.vci = vcc->vci; in fore200e_send()
1646 tpd->atm_header.vpi = vcc->vpi; in fore200e_send()
1652 tpd->spec.aal = fore200e_atm2fore_aal(vcc->qos.aal); in fore200e_send()
1885 fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags) in fore200e_change_qos() argument
1887 struct fore200e_vcc* fore200e_vcc = FORE200E_VCC(vcc); in fore200e_change_qos()
1888 struct fore200e* fore200e = FORE200E_DEV(vcc->dev); in fore200e_change_qos()
1890 if (!test_bit(ATM_VF_READY, &vcc->flags)) { in fore200e_change_qos()
1891 DPRINTK(1, "VC %d.%d.%d not ready for QoS change\n", vcc->itf, vcc->vpi, vcc->vpi); in fore200e_change_qos()
1899 vcc->itf, vcc->vpi, vcc->vci, in fore200e_change_qos()
1909 if (fore200e->available_cell_rate + vcc->qos.txtp.max_pcr < qos->txtp.max_pcr) { in fore200e_change_qos()
1914 fore200e->available_cell_rate += vcc->qos.txtp.max_pcr; in fore200e_change_qos()
1919 memcpy(&vcc->qos, qos, sizeof(struct atm_qos)); in fore200e_change_qos()
1924 set_bit(ATM_VF_HASQOS, &vcc->flags); in fore200e_change_qos()
2713 struct atm_vcc* vcc; in fore200e_proc_read() local
2963 vcc = fore200e->vc_map[i].vcc; in fore200e_proc_read()
2965 if (vcc == NULL) in fore200e_proc_read()
2970 if (vcc && test_bit(ATM_VF_READY, &vcc->flags) && !left--) { in fore200e_proc_read()
2972 fore200e_vcc = FORE200E_VCC(vcc); in fore200e_proc_read()
2977 vcc, in fore200e_proc_read()
2978 vcc->vpi, vcc->vci, fore200e_atm2fore_aal(vcc->qos.aal), in fore200e_proc_read()