Print this page
7127  remove -Wno-missing-braces from Makefile.uts


1060  * It enables interrupts. Should be the last step while starting chip.
1061  */
1062 static void
1063 bfe_enable_chip_intrs(bfe_t *bfe)
1064 {
1065         /* Enable the chip and core */
1066         OUTL(bfe, BFE_ENET_CTRL, BFE_ENET_ENABLE);
1067 
1068         /* Enable interrupts */
1069         OUTL(bfe, BFE_INTR_MASK, BFE_IMASK_DEF);
1070 }
1071 
1072 /*
1073  * Common code to take care of setting RX side mode (filter).
1074  */
1075 static void
1076 bfe_set_rx_mode(bfe_t *bfe)
1077 {
1078         uint32_t val;
1079         int i;
1080         ether_addr_t mac[ETHERADDRL] = {0, 0, 0, 0, 0, 0};
1081 
1082         /*
1083          * We don't touch RX filter if we were asked to suspend. It's fine
1084          * if chip is not active (no interface is plumbed on us).
1085          */
1086         if (bfe->bfe_chip_state == BFE_CHIP_SUSPENDED)
1087                 return;
1088 
1089         val = INL(bfe, BFE_RXCONF);
1090 
1091         val &= ~BFE_RXCONF_PROMISC;
1092         val &= ~BFE_RXCONF_DBCAST;
1093 
1094         if ((bfe->bfe_chip_mode & BFE_RX_MODE_ENABLE) == 0) {
1095                 OUTL(bfe, BFE_CAM_CTRL, 0);
1096                 FLUSH(bfe, BFE_CAM_CTRL);
1097         } else if (bfe->bfe_chip_mode & BFE_RX_MODE_PROMISC) {
1098                 val |= BFE_RXCONF_PROMISC;
1099                 val &= ~BFE_RXCONF_DBCAST;
1100         } else {


3100         0,              /* devo_refcnt */
3101         NULL,           /* devo_getinfo */
3102         nulldev,        /* devo_identify */
3103         nulldev,        /* devo_probe */
3104         bfe_attach,     /* devo_attach */
3105         bfe_detach,     /* devo_detach */
3106         nodev,          /* devo_reset */
3107         &bfe_cb_ops,        /* devo_cb_ops */
3108         NULL,           /* devo_bus_ops */
3109         ddi_power,      /* devo_power */
3110         bfe_quiesce     /* devo_quiesce */
3111 };
3112 
3113 static struct modldrv bfe_modldrv = {
3114         &mod_driverops,
3115         bfe_ident,
3116         &bfe_dev_ops
3117 };
3118 
3119 static struct modlinkage modlinkage = {
3120         MODREV_1, (void *)&bfe_modldrv, NULL
3121 };
3122 
3123 int
3124 _info(struct modinfo *modinfop)
3125 {
3126         return (mod_info(&modlinkage, modinfop));
3127 }
3128 
3129 int
3130 _init(void)
3131 {
3132         int     status;
3133 
3134         mac_init_ops(&bfe_dev_ops, MODULE_NAME);
3135         status = mod_install(&modlinkage);
3136         if (status == DDI_FAILURE)
3137                 mac_fini_ops(&bfe_dev_ops);
3138         return (status);
3139 }
3140 


1060  * It enables interrupts. Should be the last step while starting chip.
1061  */
1062 static void
1063 bfe_enable_chip_intrs(bfe_t *bfe)
1064 {
1065         /* Enable the chip and core */
1066         OUTL(bfe, BFE_ENET_CTRL, BFE_ENET_ENABLE);
1067 
1068         /* Enable interrupts */
1069         OUTL(bfe, BFE_INTR_MASK, BFE_IMASK_DEF);
1070 }
1071 
1072 /*
1073  * Common code to take care of setting RX side mode (filter).
1074  */
1075 static void
1076 bfe_set_rx_mode(bfe_t *bfe)
1077 {
1078         uint32_t val;
1079         int i;
1080         ether_addr_t mac[ETHERADDRL] = {{0, 0, 0, 0, 0, 0}};
1081 
1082         /*
1083          * We don't touch RX filter if we were asked to suspend. It's fine
1084          * if chip is not active (no interface is plumbed on us).
1085          */
1086         if (bfe->bfe_chip_state == BFE_CHIP_SUSPENDED)
1087                 return;
1088 
1089         val = INL(bfe, BFE_RXCONF);
1090 
1091         val &= ~BFE_RXCONF_PROMISC;
1092         val &= ~BFE_RXCONF_DBCAST;
1093 
1094         if ((bfe->bfe_chip_mode & BFE_RX_MODE_ENABLE) == 0) {
1095                 OUTL(bfe, BFE_CAM_CTRL, 0);
1096                 FLUSH(bfe, BFE_CAM_CTRL);
1097         } else if (bfe->bfe_chip_mode & BFE_RX_MODE_PROMISC) {
1098                 val |= BFE_RXCONF_PROMISC;
1099                 val &= ~BFE_RXCONF_DBCAST;
1100         } else {


3100         0,              /* devo_refcnt */
3101         NULL,           /* devo_getinfo */
3102         nulldev,        /* devo_identify */
3103         nulldev,        /* devo_probe */
3104         bfe_attach,     /* devo_attach */
3105         bfe_detach,     /* devo_detach */
3106         nodev,          /* devo_reset */
3107         &bfe_cb_ops,        /* devo_cb_ops */
3108         NULL,           /* devo_bus_ops */
3109         ddi_power,      /* devo_power */
3110         bfe_quiesce     /* devo_quiesce */
3111 };
3112 
3113 static struct modldrv bfe_modldrv = {
3114         &mod_driverops,
3115         bfe_ident,
3116         &bfe_dev_ops
3117 };
3118 
3119 static struct modlinkage modlinkage = {
3120         MODREV_1, { (void *)&bfe_modldrv, NULL }
3121 };
3122 
3123 int
3124 _info(struct modinfo *modinfop)
3125 {
3126         return (mod_info(&modlinkage, modinfop));
3127 }
3128 
3129 int
3130 _init(void)
3131 {
3132         int     status;
3133 
3134         mac_init_ops(&bfe_dev_ops, MODULE_NAME);
3135         status = mod_install(&modlinkage);
3136         if (status == DDI_FAILURE)
3137                 mac_fini_ops(&bfe_dev_ops);
3138         return (status);
3139 }
3140