Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*


1368  */
1369 void
1370 fcoei_process_event_port(fcoei_event_t *ae)
1371 {
1372         fcoei_soft_state_t      *ss = (fcoei_soft_state_t *)ae->ae_obj;
1373 
1374         if (ss->ss_eport->eport_link_speed == FCOE_PORT_SPEED_1G) {
1375                 ae->ae_specific |= FC_STATE_1GBIT_SPEED;
1376         } else if (ss->ss_eport->eport_link_speed ==
1377             FCOE_PORT_SPEED_10G) {
1378                 ae->ae_specific |= FC_STATE_10GBIT_SPEED;
1379         }
1380 
1381         if (ss->ss_flags & SS_FLAG_LV_BOUND) {
1382                 ss->ss_bind_info.port_statec_cb(ss->ss_port,
1383                     (uint32_t)ae->ae_specific);
1384         } else {
1385                 FCOEI_LOG(__FUNCTION__, "ss %p not bound now", ss);
1386         }
1387 
1388         atomic_add_32(&ss->ss_port_event_counter, -1);
1389         kmem_free(ae, sizeof (fcoei_event_t));
1390 }


1368  */
1369 void
1370 fcoei_process_event_port(fcoei_event_t *ae)
1371 {
1372         fcoei_soft_state_t      *ss = (fcoei_soft_state_t *)ae->ae_obj;
1373 
1374         if (ss->ss_eport->eport_link_speed == FCOE_PORT_SPEED_1G) {
1375                 ae->ae_specific |= FC_STATE_1GBIT_SPEED;
1376         } else if (ss->ss_eport->eport_link_speed ==
1377             FCOE_PORT_SPEED_10G) {
1378                 ae->ae_specific |= FC_STATE_10GBIT_SPEED;
1379         }
1380 
1381         if (ss->ss_flags & SS_FLAG_LV_BOUND) {
1382                 ss->ss_bind_info.port_statec_cb(ss->ss_port,
1383                     (uint32_t)ae->ae_specific);
1384         } else {
1385                 FCOEI_LOG(__FUNCTION__, "ss %p not bound now", ss);
1386         }
1387 
1388         atomic_dec_32(&ss->ss_port_event_counter);
1389         kmem_free(ae, sizeof (fcoei_event_t));
1390 }