Lines Matching refs:chp
84 static void ch_free_dma_handles(ch_t *chp);
85 static void ch_set_name(ch_t *chp, int unit);
86 static void ch_free_name(ch_t *chp);
87 static void ch_get_prop(ch_t *chp);
90 static void ch_free_dvma_handles(ch_t *chp);
364 ch_t *chp; in ch_attach() local
399 chp = (ch_t *)kmem_zalloc(sizeof (ch_t), KM_SLEEP); in ch_attach()
401 if (chp == NULL) { in ch_attach()
412 gchp[unit] = chp; in ch_attach()
415 PRINT(("attach macinfo: %p chp: %p\n", macinfo, chp)); in ch_attach()
417 chp->ch_dip = dip; in ch_attach()
418 chp->ch_macp = macinfo; in ch_attach()
419 chp->ch_unit = unit; in ch_attach()
420 ch_set_name(chp, unit); in ch_attach()
432 &chp->ch_hpci); /* ptr to data access handle */ in ch_attach()
441 chp->ch_name, rv); in ch_attach()
443 ch_free_name(chp); in ch_attach()
444 kmem_free(chp, sizeof (ch_t)); in ch_attach()
450 ch_get_prop(chp); in ch_attach()
453 macinfo->gldm_private = (caddr_t)chp; in ch_attach()
469 macinfo->gldm_maxpkt = chp->ch_mtu; in ch_attach()
483 pci_config_put32(chp->ch_hpci, 0x44, 3); in ch_attach()
484 pci_config_put32(chp->ch_hpci, 0x44, 0); in ch_attach()
490 VendorID = pci_config_get16(chp->ch_hpci, 0); in ch_attach()
491 DeviceID = pci_config_get16(chp->ch_hpci, 2); in ch_attach()
492 SubDeviceID = pci_config_get16(chp->ch_hpci, 0x2e); in ch_attach()
493 Command = pci_config_get16(chp->ch_hpci, 4); in ch_attach()
502 &chp->ch_bar0, /* address of offset */ in ch_attach()
506 &chp->ch_hbar0); /* ptr to data access handle */ in ch_attach()
516 chp->ch_name, rv); in ch_attach()
518 pci_config_teardown(&chp->ch_hpci); in ch_attach()
519 ch_free_name(chp); in ch_attach()
520 kmem_free(chp, sizeof (ch_t)); in ch_attach()
527 Version = ddi_get32(chp->ch_hbar0, in ch_attach()
528 (uint32_t *)(chp->ch_bar0+0x6c)); in ch_attach()
531 (void) ddi_dev_regsize(dip, 1, &chp->ch_bar0sz); in ch_attach()
533 PRINT(("PCI BAR0 space addr: %p\n", chp->ch_bar0)); in ch_attach()
534 PRINT(("PCI BAR0 space size: %x\n", chp->ch_bar0sz)); in ch_attach()
543 &chp->ch_icookp); /* ptr to interrupt block cookie */ in ch_attach()
553 chp->ch_name, rv); in ch_attach()
555 ddi_regs_map_free(&chp->ch_hbar0); in ch_attach()
556 pci_config_teardown(&chp->ch_hpci); in ch_attach()
557 ch_free_name(chp); in ch_attach()
558 kmem_free(chp, sizeof (ch_t)); in ch_attach()
582 chp->ch_name, rv); in ch_attach()
584 ddi_regs_map_free(&chp->ch_hbar0); in ch_attach()
585 pci_config_teardown(&chp->ch_hpci); in ch_attach()
586 ch_free_name(chp); in ch_attach()
587 kmem_free(chp, sizeof (ch_t)); in ch_attach()
594 mutex_init(&chp->ch_lock, NULL, MUTEX_DRIVER, in ch_attach()
595 (void *)chp->ch_icookp); in ch_attach()
596 mutex_init(&chp->ch_intr, NULL, MUTEX_DRIVER, in ch_attach()
597 (void *)chp->ch_icookp); in ch_attach()
598 mutex_init(&chp->ch_mc_lck, NULL, MUTEX_DRIVER, NULL); in ch_attach()
599 mutex_init(&chp->ch_dh_lck, NULL, MUTEX_DRIVER, NULL); in ch_attach()
600 mutex_init(&chp->mac_lock, NULL, MUTEX_DRIVER, NULL); in ch_attach()
604 if (pe_attach(chp)) { in ch_attach()
611 chp->ch_name); in ch_attach()
613 mutex_destroy(&chp->ch_lock); in ch_attach()
614 mutex_destroy(&chp->ch_intr); in ch_attach()
615 mutex_destroy(&chp->ch_mc_lck); in ch_attach()
616 mutex_destroy(&chp->ch_dh_lck); in ch_attach()
617 mutex_destroy(&chp->mac_lock); in ch_attach()
618 ddi_remove_intr(dip, 0, chp->ch_icookp); in ch_attach()
619 ddi_regs_map_free(&chp->ch_hbar0); in ch_attach()
620 pci_config_teardown(&chp->ch_hpci); in ch_attach()
621 ch_free_name(chp); in ch_attach()
622 kmem_free(chp, sizeof (ch_t)); in ch_attach()
631 macinfo->gldm_vendor_addr = pe_get_mac(chp); in ch_attach()
633 macinfo->gldm_cookie = chp->ch_icookp; in ch_attach()
638 if (is_T2(chp)) { in ch_attach()
639 if (chp->ch_config.cksum_enabled) in ch_attach()
643 chp->ch_config.cksum_enabled = 0; in ch_attach()
658 macinfo->gldm_maxpkt = chp->ch_mtu = 1500; in ch_attach()
671 chp->ch_name, rv); in ch_attach()
673 pe_detach(chp); in ch_attach()
675 mutex_destroy(&chp->ch_lock); in ch_attach()
676 mutex_destroy(&chp->ch_intr); in ch_attach()
677 mutex_destroy(&chp->ch_mc_lck); in ch_attach()
678 mutex_destroy(&chp->ch_dh_lck); in ch_attach()
679 mutex_destroy(&chp->mac_lock); in ch_attach()
680 ddi_remove_intr(dip, 0, chp->ch_icookp); in ch_attach()
681 ddi_regs_map_free(&chp->ch_hbar0); in ch_attach()
682 pci_config_teardown(&chp->ch_hpci); in ch_attach()
683 ch_free_name(chp); in ch_attach()
684 kmem_free(chp, sizeof (ch_t)); in ch_attach()
704 if ((chp = (ch_t *)ddi_get_driver_private(dip)) == NULL) in ch_attach()
707 mutex_enter(&chp->ch_lock); in ch_attach()
708 chp->ch_flags &= ~PESUSPENDED; in ch_attach()
709 mutex_exit(&chp->ch_lock); in ch_attach()
732 ch_t *chp; in ch_quiesce() local
736 chp = (ch_t *)macinfo->gldm_private; in ch_quiesce()
741 gchp[chp->ch_unit] = NULL; in ch_quiesce()
745 chp->ch_state = PEIDLE; in ch_quiesce()
752 pci_config_put32(chp->ch_hpci, 0x44, 3); in ch_quiesce()
753 pci_config_put32(chp->ch_hpci, 0x44, 0); in ch_quiesce()
761 chp->ch_refcnt = 0; in ch_quiesce()
762 chp->ch_state = PESTOP; in ch_quiesce()
765 t1_interrupts_disable(chp); in ch_quiesce()
768 t1_write_reg_4(chp->sge->obj, A_SG_CONTROL, 0x0); in ch_quiesce()
769 t1_write_reg_4(chp->sge->obj, A_SG_INT_CAUSE, 0x0); in ch_quiesce()
778 ch_t *chp; in ch_detach() local
782 chp = (ch_t *)macinfo->gldm_private; in ch_detach()
790 mutex_enter(&chp->ch_lock); in ch_detach()
791 if (chp->ch_refcnt > 0) { in ch_detach()
792 mutex_exit(&chp->ch_lock); in ch_detach()
795 mutex_exit(&chp->ch_lock); in ch_detach()
796 gchp[chp->ch_unit] = NULL; in ch_detach()
802 mutex_enter(&chp->ch_lock); in ch_detach()
803 chp->ch_state = PEIDLE; in ch_detach()
804 mutex_exit(&chp->ch_lock); in ch_detach()
812 pci_config_put32(chp->ch_hpci, 0x44, 3); in ch_detach()
813 pci_config_put32(chp->ch_hpci, 0x44, 0); in ch_detach()
822 ddi_remove_intr(dip, 0, chp->ch_icookp); in ch_detach()
827 pe_detach(chp); in ch_detach()
829 ddi_regs_map_free(&chp->ch_hbar0); in ch_detach()
830 pci_config_teardown(&chp->ch_hpci); in ch_detach()
831 mutex_destroy(&chp->ch_lock); in ch_detach()
832 mutex_destroy(&chp->ch_intr); in ch_detach()
833 mutex_destroy(&chp->ch_mc_lck); in ch_detach()
834 mutex_destroy(&chp->ch_dh_lck); in ch_detach()
835 mutex_destroy(&chp->mac_lock); in ch_detach()
836 ch_free_dma_handles(chp); in ch_detach()
838 ch_free_dvma_handles(chp); in ch_detach()
840 ch_free_name(chp); in ch_detach()
841 kmem_free(chp, sizeof (ch_t)); in ch_detach()
850 if ((chp = (ch_t *)ddi_get_driver_private(dip)) == NULL) in ch_detach()
852 mutex_enter(&chp->ch_lock); in ch_detach()
853 chp->ch_flags |= PESUSPENDED; in ch_detach()
854 mutex_exit(&chp->ch_lock); in ch_detach()
880 ch_alloc_dma_mem(ch_t *chp, int type, int flags, int size, uint64_t *paddr, in ch_alloc_dma_mem() argument
900 align = chp->ch_sm_buf_aln; in ch_alloc_dma_mem()
902 align = chp->ch_bg_buf_aln; in ch_alloc_dma_mem()
905 chp->ch_name); in ch_alloc_dma_mem()
927 chp->ch_dip, /* device dev_info structure */ in ch_alloc_dma_mem()
936 chp->ch_name, rv); in ch_alloc_dma_mem()
962 chp->ch_name, rv); in ch_alloc_dma_mem()
983 chp->ch_name, rv); in ch_alloc_dma_mem()
991 chp->ch_name, count); in ch_alloc_dma_mem()
1033 ch_get_dma_handle(ch_t *chp) in ch_get_dma_handle() argument
1056 chp->ch_dip, /* device dev_info */ in ch_get_dma_handle()
1065 chp->ch_name, rv); in ch_get_dma_handle()
1081 ch_free_dma_handles(ch_t *chp) in ch_free_dma_handles() argument
1085 dhe = chp->ch_dh; in ch_free_dma_handles()
1092 chp->ch_dh = NULL; in ch_free_dma_handles()
1108 ch_bind_dma_handle(ch_t *chp, int size, caddr_t vaddr, cmdQ_ce_t *cmp, in ch_bind_dma_handle() argument
1118 mutex_enter(&chp->ch_dh_lck); in ch_bind_dma_handle()
1119 if ((dhe = chp->ch_dh) != NULL) { in ch_bind_dma_handle()
1120 chp->ch_dh = dhe->dhe_next; in ch_bind_dma_handle()
1122 mutex_exit(&chp->ch_dh_lck); in ch_bind_dma_handle()
1143 mutex_enter(&chp->ch_dh_lck); in ch_bind_dma_handle()
1144 dhe->dhe_next = chp->ch_dh; in ch_bind_dma_handle()
1145 chp->ch_dh = dhe; in ch_bind_dma_handle()
1146 mutex_exit(&chp->ch_dh_lck); in ch_bind_dma_handle()
1150 chp->ch_name, rv); in ch_bind_dma_handle()
1160 mutex_enter(&chp->ch_dh_lck); in ch_bind_dma_handle()
1161 dhe->dhe_next = chp->ch_dh; in ch_bind_dma_handle()
1162 chp->ch_dh = dhe; in ch_bind_dma_handle()
1163 mutex_exit(&chp->ch_dh_lck); in ch_bind_dma_handle()
1199 ch_unbind_dma_handle(ch_t *chp, free_dh_t *dhe) in ch_unbind_dma_handle() argument
1205 chp->ch_name); in ch_unbind_dma_handle()
1207 mutex_enter(&chp->ch_dh_lck); in ch_unbind_dma_handle()
1208 dhe->dhe_next = chp->ch_dh; in ch_unbind_dma_handle()
1209 chp->ch_dh = dhe; in ch_unbind_dma_handle()
1210 mutex_exit(&chp->ch_dh_lck); in ch_unbind_dma_handle()
1224 ch_get_dvma_handle(ch_t *chp) in ch_get_dvma_handle() argument
1241 chp->ch_dip, /* device dev_info */ in ch_get_dvma_handle()
1250 chp->ch_name, rv); in ch_get_dvma_handle()
1268 ch_free_dvma_handles(ch_t *chp) in ch_free_dvma_handles() argument
1272 dhe = chp->ch_vdh; in ch_free_dvma_handles()
1279 chp->ch_vdh = NULL; in ch_free_dvma_handles()
1296 ch_bind_dvma_handle(ch_t *chp, int size, caddr_t vaddr, cmdQ_ce_t *cmp, in ch_bind_dvma_handle() argument
1304 mutex_enter(&chp->ch_dh_lck); in ch_bind_dvma_handle()
1305 if ((dhe = chp->ch_vdh) != NULL) { in ch_bind_dvma_handle()
1306 chp->ch_vdh = dhe->dhe_next; in ch_bind_dvma_handle()
1308 mutex_exit(&chp->ch_dh_lck); in ch_bind_dvma_handle()
1347 ch_unbind_dvma_handle(ch_t *chp, free_dh_t *dhe) in ch_unbind_dvma_handle() argument
1353 mutex_enter(&chp->ch_dh_lck); in ch_unbind_dvma_handle()
1354 dhe->dhe_next = chp->ch_vdh; in ch_unbind_dvma_handle()
1355 chp->ch_vdh = dhe; in ch_unbind_dvma_handle()
1356 mutex_exit(&chp->ch_dh_lck); in ch_unbind_dvma_handle()
1367 ch_send_up(ch_t *chp, mblk_t *mp, uint32_t cksum, int flg) in ch_send_up() argument
1374 if (chp->ch_state == PERUNNING) { in ch_send_up()
1382 gld_recv(chp->ch_macp, mp); in ch_send_up()
1392 ch_gld_ok(ch_t *chp) in ch_gld_ok() argument
1394 gld_sched(chp->ch_macp); in ch_gld_ok()
1406 ch_t *chp; in ch_reset() local
1412 chp = (ch_t *)mp->gldm_private; in ch_reset()
1414 if (chp == NULL) { in ch_reset()
1430 if (chp->ch_hpci) { in ch_reset()
1431 pci_config_put32(chp->ch_hpci, 0x44, 3); in ch_reset()
1432 pci_config_put32(chp->ch_hpci, 0x44, 0); in ch_reset()
1445 ch_t *chp = (ch_t *)macinfo->gldm_private; in ch_start() local
1448 mutex_enter(&chp->ch_lock); in ch_start()
1449 chp->ch_refcnt++; in ch_start()
1450 if (chp->ch_refcnt == 1) { in ch_start()
1451 chp->ch_state = PERUNNING; in ch_start()
1452 mutex_exit(&chp->ch_lock); in ch_start()
1453 pe_init((void *)chp); in ch_start()
1455 mutex_exit(&chp->ch_lock); in ch_start()
1457 pe_init((void *)chp); in ch_start()
1460 mutex_enter(&chp->ch_lock); in ch_start()
1461 chp->ch_state = PERUNNING; in ch_start()
1462 mutex_exit(&chp->ch_lock); in ch_start()
1471 ch_t *chp = (ch_t *)mp->gldm_private; in ch_stop() local
1476 mutex_enter(&chp->ch_lock); in ch_stop()
1477 if (chp->ch_state == PEIDLE) { in ch_stop()
1478 mutex_exit(&chp->ch_lock); in ch_stop()
1482 chp->ch_refcnt--; in ch_stop()
1483 if (chp->ch_refcnt == 0) { in ch_stop()
1484 chp->ch_state = PESTOP; in ch_stop()
1485 mutex_exit(&chp->ch_lock); in ch_stop()
1486 pe_stop(chp); in ch_stop()
1488 mutex_exit(&chp->ch_lock); in ch_stop()
1490 chp->ch_state = PESTOP; in ch_stop()
1491 mutex_exit(&chp->ch_lock); in ch_stop()
1492 pe_stop(chp); in ch_stop()
1500 ch_t *chp; in ch_set_mac_address() local
1503 chp = (ch_t *)mp->gldm_private; in ch_set_mac_address()
1508 pe_set_mac(chp, mac); in ch_set_mac_address()
1516 ch_t *chp = (ch_t *)mp->gldm_private; in ch_set_multicast() local
1518 return (pe_set_mc(chp, ep, flg)); in ch_set_multicast()
1556 ch_t *chp = (ch_t *)mp->gldm_private; in ch_set_promiscuous() local
1560 pe_set_promiscuous(chp, 2); in ch_set_promiscuous()
1564 pe_set_promiscuous(chp, 0); in ch_set_promiscuous()
1569 pe_set_promiscuous(chp, 1); in ch_set_promiscuous()
1579 ch_t *chp = (ch_t *)mp->gldm_private; in ch_get_stats() local
1606 if (chp->ch_state != PERUNNING) { in ch_get_stats()
1610 (void) pe_get_stats(chp, in ch_get_stats()
1673 ch_t *chp = (ch_t *)macinfo->gldm_private; in ch_send() local
1689 if (chp->ch_state != PERUNNING) { in ch_send()
1694 if (chp->ch_config.cksum_enabled) { in ch_send()
1695 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()