Lines Matching refs:chp
86 static void ch_free_dma_handles(ch_t *chp);
87 static void ch_set_name(ch_t *chp, int unit);
88 static void ch_free_name(ch_t *chp);
89 static void ch_get_prop(ch_t *chp);
92 static void ch_free_dvma_handles(ch_t *chp);
366 ch_t *chp; in ch_attach() local
401 chp = (ch_t *)kmem_zalloc(sizeof (ch_t), KM_SLEEP); in ch_attach()
403 if (chp == NULL) { in ch_attach()
414 gchp[unit] = chp; in ch_attach()
417 PRINT(("attach macinfo: %p chp: %p\n", macinfo, chp)); in ch_attach()
419 chp->ch_dip = dip; in ch_attach()
420 chp->ch_macp = macinfo; in ch_attach()
421 chp->ch_unit = unit; in ch_attach()
422 ch_set_name(chp, unit); in ch_attach()
434 &chp->ch_hpci); /* ptr to data access handle */ in ch_attach()
443 chp->ch_name, rv); in ch_attach()
445 ch_free_name(chp); in ch_attach()
446 kmem_free(chp, sizeof (ch_t)); in ch_attach()
452 ch_get_prop(chp); in ch_attach()
455 macinfo->gldm_private = (caddr_t)chp; in ch_attach()
471 macinfo->gldm_maxpkt = chp->ch_mtu; in ch_attach()
485 pci_config_put32(chp->ch_hpci, 0x44, 3); in ch_attach()
486 pci_config_put32(chp->ch_hpci, 0x44, 0); in ch_attach()
492 VendorID = pci_config_get16(chp->ch_hpci, 0); in ch_attach()
493 DeviceID = pci_config_get16(chp->ch_hpci, 2); in ch_attach()
494 SubDeviceID = pci_config_get16(chp->ch_hpci, 0x2e); in ch_attach()
495 Command = pci_config_get16(chp->ch_hpci, 4); in ch_attach()
504 &chp->ch_bar0, /* address of offset */ in ch_attach()
508 &chp->ch_hbar0); /* ptr to data access handle */ in ch_attach()
518 chp->ch_name, rv); in ch_attach()
520 pci_config_teardown(&chp->ch_hpci); in ch_attach()
521 ch_free_name(chp); in ch_attach()
522 kmem_free(chp, sizeof (ch_t)); in ch_attach()
529 Version = ddi_get32(chp->ch_hbar0, in ch_attach()
530 (uint32_t *)(chp->ch_bar0+0x6c)); in ch_attach()
533 (void) ddi_dev_regsize(dip, 1, &chp->ch_bar0sz); in ch_attach()
535 PRINT(("PCI BAR0 space addr: %p\n", chp->ch_bar0)); in ch_attach()
536 PRINT(("PCI BAR0 space size: %x\n", chp->ch_bar0sz)); in ch_attach()
545 &chp->ch_icookp); /* ptr to interrupt block cookie */ in ch_attach()
555 chp->ch_name, rv); in ch_attach()
557 ddi_regs_map_free(&chp->ch_hbar0); in ch_attach()
558 pci_config_teardown(&chp->ch_hpci); in ch_attach()
559 ch_free_name(chp); in ch_attach()
560 kmem_free(chp, sizeof (ch_t)); in ch_attach()
584 chp->ch_name, rv); in ch_attach()
586 ddi_regs_map_free(&chp->ch_hbar0); in ch_attach()
587 pci_config_teardown(&chp->ch_hpci); in ch_attach()
588 ch_free_name(chp); in ch_attach()
589 kmem_free(chp, sizeof (ch_t)); in ch_attach()
596 mutex_init(&chp->ch_lock, NULL, MUTEX_DRIVER, in ch_attach()
597 (void *)chp->ch_icookp); in ch_attach()
598 mutex_init(&chp->ch_intr, NULL, MUTEX_DRIVER, in ch_attach()
599 (void *)chp->ch_icookp); in ch_attach()
600 mutex_init(&chp->ch_mc_lck, NULL, MUTEX_DRIVER, NULL); in ch_attach()
601 mutex_init(&chp->ch_dh_lck, NULL, MUTEX_DRIVER, NULL); in ch_attach()
602 mutex_init(&chp->mac_lock, NULL, MUTEX_DRIVER, NULL); in ch_attach()
606 if (pe_attach(chp)) { in ch_attach()
613 chp->ch_name); in ch_attach()
615 mutex_destroy(&chp->ch_lock); in ch_attach()
616 mutex_destroy(&chp->ch_intr); in ch_attach()
617 mutex_destroy(&chp->ch_mc_lck); in ch_attach()
618 mutex_destroy(&chp->ch_dh_lck); in ch_attach()
619 mutex_destroy(&chp->mac_lock); in ch_attach()
620 ddi_remove_intr(dip, 0, chp->ch_icookp); in ch_attach()
621 ddi_regs_map_free(&chp->ch_hbar0); in ch_attach()
622 pci_config_teardown(&chp->ch_hpci); in ch_attach()
623 ch_free_name(chp); in ch_attach()
624 kmem_free(chp, sizeof (ch_t)); in ch_attach()
633 macinfo->gldm_vendor_addr = pe_get_mac(chp); in ch_attach()
635 macinfo->gldm_cookie = chp->ch_icookp; in ch_attach()
640 if (is_T2(chp)) { in ch_attach()
641 if (chp->ch_config.cksum_enabled) in ch_attach()
645 chp->ch_config.cksum_enabled = 0; in ch_attach()
660 macinfo->gldm_maxpkt = chp->ch_mtu = 1500; in ch_attach()
673 chp->ch_name, rv); in ch_attach()
675 pe_detach(chp); in ch_attach()
677 mutex_destroy(&chp->ch_lock); in ch_attach()
678 mutex_destroy(&chp->ch_intr); in ch_attach()
679 mutex_destroy(&chp->ch_mc_lck); in ch_attach()
680 mutex_destroy(&chp->ch_dh_lck); in ch_attach()
681 mutex_destroy(&chp->mac_lock); in ch_attach()
682 ddi_remove_intr(dip, 0, chp->ch_icookp); in ch_attach()
683 ddi_regs_map_free(&chp->ch_hbar0); in ch_attach()
684 pci_config_teardown(&chp->ch_hpci); in ch_attach()
685 ch_free_name(chp); in ch_attach()
686 kmem_free(chp, sizeof (ch_t)); in ch_attach()
706 if ((chp = (ch_t *)ddi_get_driver_private(dip)) == NULL) in ch_attach()
709 mutex_enter(&chp->ch_lock); in ch_attach()
710 chp->ch_flags &= ~PESUSPENDED; in ch_attach()
711 mutex_exit(&chp->ch_lock); in ch_attach()
734 ch_t *chp; in ch_quiesce() local
738 chp = (ch_t *)macinfo->gldm_private; in ch_quiesce()
743 gchp[chp->ch_unit] = NULL; in ch_quiesce()
747 chp->ch_state = PEIDLE; in ch_quiesce()
754 pci_config_put32(chp->ch_hpci, 0x44, 3); in ch_quiesce()
755 pci_config_put32(chp->ch_hpci, 0x44, 0); in ch_quiesce()
763 chp->ch_refcnt = 0; in ch_quiesce()
764 chp->ch_state = PESTOP; in ch_quiesce()
767 t1_interrupts_disable(chp); in ch_quiesce()
770 t1_write_reg_4(chp->sge->obj, A_SG_CONTROL, 0x0); in ch_quiesce()
771 t1_write_reg_4(chp->sge->obj, A_SG_INT_CAUSE, 0x0); in ch_quiesce()
780 ch_t *chp; in ch_detach() local
784 chp = (ch_t *)macinfo->gldm_private; in ch_detach()
792 mutex_enter(&chp->ch_lock); in ch_detach()
793 if (chp->ch_refcnt > 0) { in ch_detach()
794 mutex_exit(&chp->ch_lock); in ch_detach()
797 mutex_exit(&chp->ch_lock); in ch_detach()
798 gchp[chp->ch_unit] = NULL; in ch_detach()
804 mutex_enter(&chp->ch_lock); in ch_detach()
805 chp->ch_state = PEIDLE; in ch_detach()
806 mutex_exit(&chp->ch_lock); in ch_detach()
814 pci_config_put32(chp->ch_hpci, 0x44, 3); in ch_detach()
815 pci_config_put32(chp->ch_hpci, 0x44, 0); in ch_detach()
824 ddi_remove_intr(dip, 0, chp->ch_icookp); in ch_detach()
829 pe_detach(chp); in ch_detach()
831 ddi_regs_map_free(&chp->ch_hbar0); in ch_detach()
832 pci_config_teardown(&chp->ch_hpci); in ch_detach()
833 mutex_destroy(&chp->ch_lock); in ch_detach()
834 mutex_destroy(&chp->ch_intr); in ch_detach()
835 mutex_destroy(&chp->ch_mc_lck); in ch_detach()
836 mutex_destroy(&chp->ch_dh_lck); in ch_detach()
837 mutex_destroy(&chp->mac_lock); in ch_detach()
838 ch_free_dma_handles(chp); in ch_detach()
840 ch_free_dvma_handles(chp); in ch_detach()
842 ch_free_name(chp); in ch_detach()
843 kmem_free(chp, sizeof (ch_t)); in ch_detach()
852 if ((chp = (ch_t *)ddi_get_driver_private(dip)) == NULL) in ch_detach()
854 mutex_enter(&chp->ch_lock); in ch_detach()
855 chp->ch_flags |= PESUSPENDED; in ch_detach()
856 mutex_exit(&chp->ch_lock); in ch_detach()
882 ch_alloc_dma_mem(ch_t *chp, int type, int flags, int size, uint64_t *paddr, in ch_alloc_dma_mem() argument
902 align = chp->ch_sm_buf_aln; in ch_alloc_dma_mem()
904 align = chp->ch_bg_buf_aln; in ch_alloc_dma_mem()
907 chp->ch_name); in ch_alloc_dma_mem()
929 chp->ch_dip, /* device dev_info structure */ in ch_alloc_dma_mem()
938 chp->ch_name, rv); in ch_alloc_dma_mem()
964 chp->ch_name, rv); in ch_alloc_dma_mem()
985 chp->ch_name, rv); in ch_alloc_dma_mem()
993 chp->ch_name, count); in ch_alloc_dma_mem()
1035 ch_get_dma_handle(ch_t *chp) in ch_get_dma_handle() argument
1058 chp->ch_dip, /* device dev_info */ in ch_get_dma_handle()
1067 chp->ch_name, rv); in ch_get_dma_handle()
1083 ch_free_dma_handles(ch_t *chp) in ch_free_dma_handles() argument
1087 dhe = chp->ch_dh; in ch_free_dma_handles()
1094 chp->ch_dh = NULL; in ch_free_dma_handles()
1110 ch_bind_dma_handle(ch_t *chp, int size, caddr_t vaddr, cmdQ_ce_t *cmp, in ch_bind_dma_handle() argument
1120 mutex_enter(&chp->ch_dh_lck); in ch_bind_dma_handle()
1121 if ((dhe = chp->ch_dh) != NULL) { in ch_bind_dma_handle()
1122 chp->ch_dh = dhe->dhe_next; in ch_bind_dma_handle()
1124 mutex_exit(&chp->ch_dh_lck); in ch_bind_dma_handle()
1145 mutex_enter(&chp->ch_dh_lck); in ch_bind_dma_handle()
1146 dhe->dhe_next = chp->ch_dh; in ch_bind_dma_handle()
1147 chp->ch_dh = dhe; in ch_bind_dma_handle()
1148 mutex_exit(&chp->ch_dh_lck); in ch_bind_dma_handle()
1152 chp->ch_name, rv); in ch_bind_dma_handle()
1162 mutex_enter(&chp->ch_dh_lck); in ch_bind_dma_handle()
1163 dhe->dhe_next = chp->ch_dh; in ch_bind_dma_handle()
1164 chp->ch_dh = dhe; in ch_bind_dma_handle()
1165 mutex_exit(&chp->ch_dh_lck); in ch_bind_dma_handle()
1201 ch_unbind_dma_handle(ch_t *chp, free_dh_t *dhe) in ch_unbind_dma_handle() argument
1207 chp->ch_name); in ch_unbind_dma_handle()
1209 mutex_enter(&chp->ch_dh_lck); in ch_unbind_dma_handle()
1210 dhe->dhe_next = chp->ch_dh; in ch_unbind_dma_handle()
1211 chp->ch_dh = dhe; in ch_unbind_dma_handle()
1212 mutex_exit(&chp->ch_dh_lck); in ch_unbind_dma_handle()
1226 ch_get_dvma_handle(ch_t *chp) in ch_get_dvma_handle() argument
1243 chp->ch_dip, /* device dev_info */ in ch_get_dvma_handle()
1252 chp->ch_name, rv); in ch_get_dvma_handle()
1270 ch_free_dvma_handles(ch_t *chp) in ch_free_dvma_handles() argument
1274 dhe = chp->ch_vdh; in ch_free_dvma_handles()
1281 chp->ch_vdh = NULL; in ch_free_dvma_handles()
1298 ch_bind_dvma_handle(ch_t *chp, int size, caddr_t vaddr, cmdQ_ce_t *cmp, in ch_bind_dvma_handle() argument
1306 mutex_enter(&chp->ch_dh_lck); in ch_bind_dvma_handle()
1307 if ((dhe = chp->ch_vdh) != NULL) { in ch_bind_dvma_handle()
1308 chp->ch_vdh = dhe->dhe_next; in ch_bind_dvma_handle()
1310 mutex_exit(&chp->ch_dh_lck); in ch_bind_dvma_handle()
1349 ch_unbind_dvma_handle(ch_t *chp, free_dh_t *dhe) in ch_unbind_dvma_handle() argument
1355 mutex_enter(&chp->ch_dh_lck); in ch_unbind_dvma_handle()
1356 dhe->dhe_next = chp->ch_vdh; in ch_unbind_dvma_handle()
1357 chp->ch_vdh = dhe; in ch_unbind_dvma_handle()
1358 mutex_exit(&chp->ch_dh_lck); in ch_unbind_dvma_handle()
1369 ch_send_up(ch_t *chp, mblk_t *mp, uint32_t cksum, int flg) in ch_send_up() argument
1376 if (chp->ch_state == PERUNNING) { in ch_send_up()
1383 gld_recv(chp->ch_macp, mp); in ch_send_up()
1393 ch_gld_ok(ch_t *chp) in ch_gld_ok() argument
1395 gld_sched(chp->ch_macp); in ch_gld_ok()
1407 ch_t *chp; in ch_reset() local
1413 chp = (ch_t *)mp->gldm_private; in ch_reset()
1415 if (chp == NULL) { in ch_reset()
1431 if (chp->ch_hpci) { in ch_reset()
1432 pci_config_put32(chp->ch_hpci, 0x44, 3); in ch_reset()
1433 pci_config_put32(chp->ch_hpci, 0x44, 0); in ch_reset()
1446 ch_t *chp = (ch_t *)macinfo->gldm_private; in ch_start() local
1449 mutex_enter(&chp->ch_lock); in ch_start()
1450 chp->ch_refcnt++; in ch_start()
1451 if (chp->ch_refcnt == 1) { in ch_start()
1452 chp->ch_state = PERUNNING; in ch_start()
1453 mutex_exit(&chp->ch_lock); in ch_start()
1454 pe_init((void *)chp); in ch_start()
1456 mutex_exit(&chp->ch_lock); in ch_start()
1458 pe_init((void *)chp); in ch_start()
1461 mutex_enter(&chp->ch_lock); in ch_start()
1462 chp->ch_state = PERUNNING; in ch_start()
1463 mutex_exit(&chp->ch_lock); in ch_start()
1472 ch_t *chp = (ch_t *)mp->gldm_private; in ch_stop() local
1477 mutex_enter(&chp->ch_lock); in ch_stop()
1478 if (chp->ch_state == PEIDLE) { in ch_stop()
1479 mutex_exit(&chp->ch_lock); in ch_stop()
1483 chp->ch_refcnt--; in ch_stop()
1484 if (chp->ch_refcnt == 0) { in ch_stop()
1485 chp->ch_state = PESTOP; in ch_stop()
1486 mutex_exit(&chp->ch_lock); in ch_stop()
1487 pe_stop(chp); in ch_stop()
1489 mutex_exit(&chp->ch_lock); in ch_stop()
1491 chp->ch_state = PESTOP; in ch_stop()
1492 mutex_exit(&chp->ch_lock); in ch_stop()
1493 pe_stop(chp); in ch_stop()
1501 ch_t *chp; in ch_set_mac_address() local
1504 chp = (ch_t *)mp->gldm_private; in ch_set_mac_address()
1509 pe_set_mac(chp, mac); in ch_set_mac_address()
1517 ch_t *chp = (ch_t *)mp->gldm_private; in ch_set_multicast() local
1519 return (pe_set_mc(chp, ep, flg)); in ch_set_multicast()
1557 ch_t *chp = (ch_t *)mp->gldm_private; in ch_set_promiscuous() local
1561 pe_set_promiscuous(chp, 2); in ch_set_promiscuous()
1565 pe_set_promiscuous(chp, 0); in ch_set_promiscuous()
1570 pe_set_promiscuous(chp, 1); in ch_set_promiscuous()
1580 ch_t *chp = (ch_t *)mp->gldm_private; in ch_get_stats() local
1607 if (chp->ch_state != PERUNNING) { in ch_get_stats()
1611 (void) pe_get_stats(chp, in ch_get_stats()
1674 ch_t *chp = (ch_t *)macinfo->gldm_private; in ch_send() local
1690 if (chp->ch_state != PERUNNING) { in ch_send()
1695 if (chp->ch_config.cksum_enabled) { in ch_send()
1696 if (is_T2(chp)) { in ch_send()
1751 chp->sge->intr_cnt.tx_msg_pullups++; in ch_send()
1758 chp->sge->intr_cnt.tx_hdr_pullups++; in ch_send()
1773 chp->sge->intr_cnt.tx_udp_ip_frag++; in ch_send()
1776 chp->sge->intr_cnt.tx_tcp_ip_frag++; in ch_send()
1787 if (pe_start(chp, mp, flg)) in ch_send()
1803 ch_set_name(ch_t *chp, int unit) in ch_set_name() argument
1805 chp->ch_name = (char *)kmem_alloc(sizeof ("chxge00"), KM_SLEEP); in ch_set_name()
1807 bcopy("chxge00", (void *)chp->ch_name, sizeof ("chxge00")); in ch_set_name()
1808 chp->ch_name[5] += unit/10; in ch_set_name()
1809 chp->ch_name[6] += unit%10; in ch_set_name()
1811 bcopy("chxge0", (void *)chp->ch_name, sizeof ("chxge0")); in ch_set_name()
1812 chp->ch_name[5] += unit; in ch_set_name()
1817 ch_free_name(ch_t *chp) in ch_free_name() argument
1819 if (chp->ch_name) in ch_free_name()
1820 kmem_free(chp->ch_name, sizeof ("chxge00")); in ch_free_name()
1821 chp->ch_name = NULL; in ch_free_name()
1832 ch_t *chp = gchp[unit]; in ch_register() local
1833 if (chp != NULL) { in ch_register()
1834 mutex_enter(&chp->ch_lock); in ch_register()
1836 chp->toe_rcv = (void (*)(void *, mblk_t *))toe_rcv; in ch_register()
1837 chp->ch_toeinst = instp; in ch_register()
1838 chp->toe_free = (void (*)(void *, tbuf_t *))toe_free; in ch_register()
1839 chp->toe_tunnel = (int (*)(void *, mblk_t *))toe_tunnel; in ch_register()
1840 chp->ch_tx_overflow_mutex = toe_tx_mx; in ch_register()
1841 chp->ch_tx_overflow_cv = toe_of_cv; in ch_register()
1842 chp->open_device_map |= TOEDEV_DEVMAP_BIT; in ch_register()
1845 chp->ch_refcnt++; in ch_register()
1846 if (chp->ch_refcnt == 1) { in ch_register()
1847 chp->ch_state = PERUNNING; in ch_register()
1848 mutex_exit(&chp->ch_lock); in ch_register()
1849 pe_init((void *)chp); in ch_register()
1851 mutex_exit(&chp->ch_lock); in ch_register()
1868 ch_t *chp; in ch_unregister() local
1871 chp = gchp[i]; in ch_unregister()
1872 if (chp == NULL) in ch_unregister()
1875 mutex_enter(&chp->ch_lock); in ch_unregister()
1877 chp->ch_refcnt--; in ch_unregister()
1878 if (chp->ch_refcnt == 0) { in ch_unregister()
1879 chp->ch_state = PESTOP; in ch_unregister()
1880 mutex_exit(&chp->ch_lock); in ch_unregister()
1881 pe_stop(chp); in ch_unregister()
1883 mutex_exit(&chp->ch_lock); in ch_unregister()
1885 chp->open_device_map &= ~TOEDEV_DEVMAP_BIT; in ch_unregister()
1886 chp->toe_rcv = NULL; in ch_unregister()
1887 chp->ch_toeinst = NULL; in ch_unregister()
1888 chp->toe_free = NULL; in ch_unregister()
1889 chp->toe_tunnel = NULL; in ch_unregister()
1890 chp->ch_tx_overflow_mutex = NULL; in ch_unregister()
1891 chp->ch_tx_overflow_cv = NULL; in ch_unregister()
1900 ch_get_prop(ch_t *chp) in ch_get_prop() argument
1920 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
1923 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
1927 chp->ch_config.enable_dvma = 1; in ch_get_prop()
1930 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
1933 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
1938 chp->ch_config.burstsize_set = 0; in ch_get_prop()
1939 chp->ch_config.transaction_cnt_set = 0; in ch_get_prop()
1948 pdip = ddi_get_parent(chp->ch_dip); in ch_get_prop()
1955 chp->ch_config.burstsize_set = 0; in ch_get_prop()
1956 chp->ch_config.transaction_cnt_set = 0; in ch_get_prop()
1967 chp->ch_config.burstsize_set = 0; in ch_get_prop()
1968 chp->ch_config.transaction_cnt_set = 0; in ch_get_prop()
1979 chp->ch_config.burstsize_set = 0; in ch_get_prop()
1980 chp->ch_config.transaction_cnt_set = 0; in ch_get_prop()
1996 v = pci_config_get32(chp->ch_hpci, 0x64); in ch_get_prop()
1998 chp->ch_config.burstsize_set = 0; in ch_get_prop()
1999 chp->ch_config.transaction_cnt_set = 0; in ch_get_prop()
2004 v = pci_config_get32(chp->ch_hpci, 0x60); in ch_get_prop()
2012 chp->ch_config.burstsize_set = 0; in ch_get_prop()
2013 chp->ch_config.transaction_cnt_set = 0; in ch_get_prop()
2020 chp->ch_config.burstsize_set = 0; in ch_get_prop()
2021 chp->ch_config.transaction_cnt_set = 0; in ch_get_prop()
2028 chp->ch_config.burstsize_set = 0; in ch_get_prop()
2029 chp->ch_config.transaction_cnt_set = 0; in ch_get_prop()
2043 chp->ch_config.burstsize = 1; in ch_get_prop()
2044 chp->ch_config.burstsize_set = 1; in ch_get_prop()
2048 chp->ch_config.transaction_cnt = 1; in ch_get_prop()
2049 chp->ch_config.transaction_cnt_set = 1; in ch_get_prop()
2059 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2062 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2069 chp->ch_config.burstsize_set = 0; in ch_get_prop()
2073 chp->ch_config.burstsize_set = 1; in ch_get_prop()
2074 chp->ch_config.burstsize = 1; in ch_get_prop()
2078 chp->ch_config.burstsize_set = 1; in ch_get_prop()
2079 chp->ch_config.burstsize = 2; in ch_get_prop()
2084 chp->ch_name, val); in ch_get_prop()
2089 chp->ch_name, val); in ch_get_prop()
2097 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2100 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2106 chp->ch_config.transaction_cnt_set = 0; in ch_get_prop()
2110 chp->ch_config.transaction_cnt_set = 1; in ch_get_prop()
2111 chp->ch_config.transaction_cnt = 0; in ch_get_prop()
2115 chp->ch_config.transaction_cnt_set = 1; in ch_get_prop()
2116 chp->ch_config.transaction_cnt = 1; in ch_get_prop()
2120 chp->ch_config.transaction_cnt_set = 1; in ch_get_prop()
2121 chp->ch_config.transaction_cnt = 2; in ch_get_prop()
2125 chp->ch_config.transaction_cnt_set = 1; in ch_get_prop()
2126 chp->ch_config.transaction_cnt = 3; in ch_get_prop()
2130 chp->ch_config.transaction_cnt_set = 1; in ch_get_prop()
2131 chp->ch_config.transaction_cnt = 4; in ch_get_prop()
2135 chp->ch_config.transaction_cnt_set = 1; in ch_get_prop()
2136 chp->ch_config.transaction_cnt = 5; in ch_get_prop()
2140 chp->ch_config.transaction_cnt_set = 1; in ch_get_prop()
2141 chp->ch_config.transaction_cnt = 6; in ch_get_prop()
2145 chp->ch_config.transaction_cnt_set = 1; in ch_get_prop()
2146 chp->ch_config.transaction_cnt = 7; in ch_get_prop()
2151 chp->ch_name, val); in ch_get_prop()
2159 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2162 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2168 chp->ch_config.relaxed_ordering = 0; in ch_get_prop()
2172 chp->ch_config.relaxed_ordering = 1; in ch_get_prop()
2175 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2178 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2186 chp->ch_maximum_mtu = 9198; /* tunable via chxge.conf */ in ch_get_prop()
2187 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2190 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2207 chp->ch_maximum_mtu = val; in ch_get_prop()
2213 chp->ch_mtu = ETHERMTU; in ch_get_prop()
2215 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2218 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2223 chp->ch_mtu = chp->ch_maximum_mtu; in ch_get_prop()
2226 chp->ch_sm_buf_sz = 0x800; in ch_get_prop()
2227 chp->ch_sm_buf_aln = 0x800; in ch_get_prop()
2228 chp->ch_bg_buf_sz = 0x4000; in ch_get_prop()
2229 chp->ch_bg_buf_aln = 0x4000; in ch_get_prop()
2231 chp->ch_sm_buf_sz = 0x200; in ch_get_prop()
2232 chp->ch_sm_buf_aln = 0x200; in ch_get_prop()
2233 chp->ch_bg_buf_sz = 0x800; in ch_get_prop()
2234 chp->ch_bg_buf_aln = 0x800; in ch_get_prop()
2235 if ((chp->ch_mtu > 0x800) && (chp->ch_mtu <= 0x1000)) { in ch_get_prop()
2236 chp->ch_sm_buf_sz = 0x400; in ch_get_prop()
2237 chp->ch_sm_buf_aln = 0x400; in ch_get_prop()
2238 chp->ch_bg_buf_sz = 0x1000; in ch_get_prop()
2239 chp->ch_bg_buf_aln = 0x1000; in ch_get_prop()
2240 } else if ((chp->ch_mtu > 0x1000) && (chp->ch_mtu <= 0x2000)) { in ch_get_prop()
2241 chp->ch_sm_buf_sz = 0x400; in ch_get_prop()
2242 chp->ch_sm_buf_aln = 0x400; in ch_get_prop()
2243 chp->ch_bg_buf_sz = 0x2000; in ch_get_prop()
2244 chp->ch_bg_buf_aln = 0x2000; in ch_get_prop()
2245 } else if (chp->ch_mtu > 0x2000) { in ch_get_prop()
2246 chp->ch_sm_buf_sz = 0x400; in ch_get_prop()
2247 chp->ch_sm_buf_aln = 0x400; in ch_get_prop()
2248 chp->ch_bg_buf_sz = 0x3000; in ch_get_prop()
2249 chp->ch_bg_buf_aln = 0x4000; in ch_get_prop()
2252 chp->ch_config.cksum_enabled = 1; in ch_get_prop()
2254 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2257 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2261 chp->ch_config.cksum_enabled = 0; in ch_get_prop()
2267 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2270 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2280 chp->ch_name); in ch_get_prop()
2288 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2291 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2301 chp->ch_name); in ch_get_prop()
2308 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2311 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2321 chp->ch_name); in ch_get_prop()
2330 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2333 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2343 chp->ch_name); in ch_get_prop()
2352 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2355 val = ddi_getprop(DDI_DEV_T_ANY, chp->ch_dip, DDI_PROP_DONTPASS, in ch_get_prop()
2365 chp->ch_name); in ch_get_prop()
2373 chp->ch_name, tval, tval); in ch_get_prop()
2379 chp->ch_name); in ch_get_prop()