158#if EFSYS_OPT_SIENA 159 case EFX_FAMILY_SIENA: 160 eevop = (efx_ev_ops_t *)&__efx_ev_siena_ops; 161 break; 162#endif /* EFSYS_OPT_SIENA */ 163 164#if EFSYS_OPT_HUNTINGTON 165 case EFX_FAMILY_HUNTINGTON: 166 eevop = (efx_ev_ops_t *)&__efx_ev_ef10_ops; 167 break; 168#endif /* EFSYS_OPT_HUNTINGTON */ 169 170#if EFSYS_OPT_MEDFORD 171 case EFX_FAMILY_MEDFORD: 172 eevop = (efx_ev_ops_t *)&__efx_ev_ef10_ops; 173 break; 174#endif /* EFSYS_OPT_MEDFORD */ 175 176 default: 177 EFSYS_ASSERT(0); 178 rc = ENOTSUP; 179 goto fail1; 180 } 181 182 EFSYS_ASSERT3U(enp->en_ev_qcount, ==, 0); 183 184 if ((rc = eevop->eevo_init(enp)) != 0) 185 goto fail2; 186 187 enp->en_eevop = eevop; 188 enp->en_mod_flags |= EFX_MOD_EV; 189 return (0); 190 191fail2: 192 EFSYS_PROBE(fail2); 193 194fail1: 195 EFSYS_PROBE1(fail1, efx_rc_t, rc); 196 197 enp->en_eevop = NULL; 198 enp->en_mod_flags &= ~EFX_MOD_EV; 199 return (rc); 200} 201 202 void 203efx_ev_fini( 204 __in efx_nic_t *enp) 205{ 206 efx_ev_ops_t *eevop = enp->en_eevop; 207 208 EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); 209 EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR); 210 EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_EV); 211 EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_RX)); 212 EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_TX)); 213 EFSYS_ASSERT3U(enp->en_ev_qcount, ==, 0); 214 215 eevop->eevo_fini(enp); 216 217 enp->en_eevop = NULL; 218 enp->en_mod_flags &= ~EFX_MOD_EV; 219} 220 221 222 __checkReturn efx_rc_t 223efx_ev_qcreate( 224 __in efx_nic_t *enp, 225 __in unsigned int index, 226 __in efsys_mem_t *esmp, 227 __in size_t n, 228 __in uint32_t id, 229 __deref_out efx_evq_t **eepp) 230{ 231 efx_ev_ops_t *eevop = enp->en_eevop; 232 efx_nic_cfg_t *encp = &(enp->en_nic_cfg); 233 efx_evq_t *eep; 234 efx_rc_t rc; 235 236 EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); 237 EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_EV); 238 239 EFSYS_ASSERT3U(enp->en_ev_qcount + 1, <, encp->enc_evq_limit); 240 241 /* Allocate an EVQ object */ 242 EFSYS_KMEM_ALLOC(enp->en_esip, sizeof (efx_evq_t), eep); 243 if (eep == NULL) { 244 rc = ENOMEM; 245 goto fail1; 246 } 247 248 eep->ee_magic = EFX_EVQ_MAGIC; 249 eep->ee_enp = enp; 250 eep->ee_index = index; 251 eep->ee_mask = n - 1; 252 eep->ee_esmp = esmp; 253 254 if ((rc = eevop->eevo_qcreate(enp, index, esmp, n, id, eep)) != 0) 255 goto fail2; 256 257 enp->en_ev_qcount++; 258 *eepp = eep; 259 260 return (0); 261 262fail2: 263 EFSYS_PROBE(fail2); 264 EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_evq_t), eep); 265fail1: 266 EFSYS_PROBE1(fail1, efx_rc_t, rc); 267 return (rc); 268} 269 270 void 271efx_ev_qdestroy( 272 __in efx_evq_t *eep) 273{ 274 efx_nic_t *enp = eep->ee_enp; 275 efx_ev_ops_t *eevop = enp->en_eevop; 276 277 EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); 278 279 EFSYS_ASSERT(enp->en_ev_qcount != 0); 280 --enp->en_ev_qcount; 281 282 eevop->eevo_qdestroy(eep); 283 284 /* Free the EVQ object */ 285 EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_evq_t), eep); 286} 287 288 __checkReturn efx_rc_t 289efx_ev_qprime( 290 __in efx_evq_t *eep, 291 __in unsigned int count) 292{ 293 efx_nic_t *enp = eep->ee_enp; 294 efx_ev_ops_t *eevop = enp->en_eevop; 295 efx_rc_t rc; 296 297 EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); 298 299 if (!(enp->en_mod_flags & EFX_MOD_INTR)) { 300 rc = EINVAL; 301 goto fail1; 302 } 303 304 if ((rc = eevop->eevo_qprime(eep, count)) != 0) 305 goto fail2; 306 307 return (0); 308 309fail2: 310 EFSYS_PROBE(fail2); 311fail1: 312 EFSYS_PROBE1(fail1, efx_rc_t, rc); 313 return (rc); 314} 315 316 __checkReturn boolean_t 317efx_ev_qpending( 318 __in efx_evq_t *eep, 319 __in unsigned int count) 320{ 321 size_t offset; 322 efx_qword_t qword; 323 324 EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); 325 326 offset = (count & eep->ee_mask) * sizeof (efx_qword_t); 327 EFSYS_MEM_READQ(eep->ee_esmp, offset, &qword); 328 329 return (EFX_EV_PRESENT(qword)); 330} 331 332#if EFSYS_OPT_EV_PREFETCH 333 334 void 335efx_ev_qprefetch( 336 __in efx_evq_t *eep, 337 __in unsigned int count) 338{ 339 efx_nic_t *enp = eep->ee_enp; 340 unsigned int offset; 341 342 EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); 343 344 offset = (count & eep->ee_mask) * sizeof (efx_qword_t); 345 EFSYS_MEM_PREFETCH(eep->ee_esmp, offset); 346} 347 348#endif /* EFSYS_OPT_EV_PREFETCH */ 349 350 void 351efx_ev_qpoll( 352 __in efx_evq_t *eep, 353 __inout unsigned int *countp, 354 __in const efx_ev_callbacks_t *eecp, 355 __in_opt void *arg) 356{ 357 EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); 358 359 /* 360 * FIXME: Huntington will require support for hardware event batching 361 * and merging, which will need a different ev_qpoll implementation. 362 * 363 * Without those features the Falcon/Siena code can be used unchanged. 364 */ 365 EFX_STATIC_ASSERT(ESF_DZ_EV_CODE_LBN == FSF_AZ_EV_CODE_LBN); 366 EFX_STATIC_ASSERT(ESF_DZ_EV_CODE_WIDTH == FSF_AZ_EV_CODE_WIDTH); 367 368 EFX_STATIC_ASSERT(ESE_DZ_EV_CODE_RX_EV == FSE_AZ_EV_CODE_RX_EV); 369 EFX_STATIC_ASSERT(ESE_DZ_EV_CODE_TX_EV == FSE_AZ_EV_CODE_TX_EV); 370 EFX_STATIC_ASSERT(ESE_DZ_EV_CODE_DRIVER_EV == FSE_AZ_EV_CODE_DRIVER_EV); 371 EFX_STATIC_ASSERT(ESE_DZ_EV_CODE_DRV_GEN_EV == 372 FSE_AZ_EV_CODE_DRV_GEN_EV); 373#if EFSYS_OPT_MCDI 374 EFX_STATIC_ASSERT(ESE_DZ_EV_CODE_MCDI_EV == 375 FSE_AZ_EV_CODE_MCDI_EVRESPONSE); 376#endif 377 falconsiena_ev_qpoll(eep, countp, eecp, arg); 378} 379 380 void 381efx_ev_qpost( 382 __in efx_evq_t *eep, 383 __in uint16_t data) 384{ 385 efx_nic_t *enp = eep->ee_enp; 386 efx_ev_ops_t *eevop = enp->en_eevop; 387 388 EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); 389 390 EFSYS_ASSERT(eevop != NULL && 391 eevop->eevo_qpost != NULL); 392 393 eevop->eevo_qpost(eep, data); 394} 395 396 __checkReturn efx_rc_t 397efx_ev_qmoderate( 398 __in efx_evq_t *eep, 399 __in unsigned int us) 400{ 401 efx_nic_t *enp = eep->ee_enp; 402 efx_ev_ops_t *eevop = enp->en_eevop; 403 efx_rc_t rc; 404 405 EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); 406 407 if ((rc = eevop->eevo_qmoderate(eep, us)) != 0) 408 goto fail1; 409 410 return (0); 411 412fail1: 413 EFSYS_PROBE1(fail1, efx_rc_t, rc); 414 return (rc); 415} 416 417#if EFSYS_OPT_QSTATS 418 void 419efx_ev_qstats_update( 420 __in efx_evq_t *eep, 421 __inout_ecount(EV_NQSTATS) efsys_stat_t *stat) 422 423{ efx_nic_t *enp = eep->ee_enp; 424 efx_ev_ops_t *eevop = enp->en_eevop; 425 426 EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); 427 428 eevop->eevo_qstats_update(eep, stat); 429} 430 431#endif /* EFSYS_OPT_QSTATS */ 432
|
434 435static __checkReturn efx_rc_t 436falconsiena_ev_init( 437 __in efx_nic_t *enp) 438{ 439 efx_oword_t oword; 440 441 /* 442 * Program the event queue for receive and transmit queue 443 * flush events. 444 */ 445 EFX_BAR_READO(enp, FR_AZ_DP_CTRL_REG, &oword); 446 EFX_SET_OWORD_FIELD(oword, FRF_AZ_FLS_EVQ_ID, 0); 447 EFX_BAR_WRITEO(enp, FR_AZ_DP_CTRL_REG, &oword); 448 449 return (0); 450 451} 452 453static __checkReturn boolean_t 454falconsiena_ev_rx_not_ok( 455 __in efx_evq_t *eep, 456 __in efx_qword_t *eqp, 457 __in uint32_t label, 458 __in uint32_t id, 459 __inout uint16_t *flagsp) 460{ 461 boolean_t ignore = B_FALSE; 462 463 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_TOBE_DISC) != 0) { 464 EFX_EV_QSTAT_INCR(eep, EV_RX_TOBE_DISC); 465 EFSYS_PROBE(tobe_disc); 466 /* 467 * Assume this is a unicast address mismatch, unless below 468 * we find either FSF_AZ_RX_EV_ETH_CRC_ERR or 469 * EV_RX_PAUSE_FRM_ERR is set. 470 */ 471 (*flagsp) |= EFX_ADDR_MISMATCH; 472 } 473 474 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_FRM_TRUNC) != 0) { 475 EFSYS_PROBE2(frm_trunc, uint32_t, label, uint32_t, id); 476 EFX_EV_QSTAT_INCR(eep, EV_RX_FRM_TRUNC); 477 (*flagsp) |= EFX_DISCARD; 478 479#if EFSYS_OPT_RX_SCATTER 480 /* 481 * Lookout for payload queue ran dry errors and ignore them. 482 * 483 * Sadly for the header/data split cases, the descriptor 484 * pointer in this event refers to the header queue and 485 * therefore cannot be easily detected as duplicate. 486 * So we drop these and rely on the receive processing seeing 487 * a subsequent packet with FSF_AZ_RX_EV_SOP set to discard 488 * the partially received packet. 489 */ 490 if ((EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_SOP) == 0) && 491 (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_JUMBO_CONT) == 0) && 492 (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_BYTE_CNT) == 0)) 493 ignore = B_TRUE; 494#endif /* EFSYS_OPT_RX_SCATTER */ 495 } 496 497 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_ETH_CRC_ERR) != 0) { 498 EFX_EV_QSTAT_INCR(eep, EV_RX_ETH_CRC_ERR); 499 EFSYS_PROBE(crc_err); 500 (*flagsp) &= ~EFX_ADDR_MISMATCH; 501 (*flagsp) |= EFX_DISCARD; 502 } 503 504 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_PAUSE_FRM_ERR) != 0) { 505 EFX_EV_QSTAT_INCR(eep, EV_RX_PAUSE_FRM_ERR); 506 EFSYS_PROBE(pause_frm_err); 507 (*flagsp) &= ~EFX_ADDR_MISMATCH; 508 (*flagsp) |= EFX_DISCARD; 509 } 510 511 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_BUF_OWNER_ID_ERR) != 0) { 512 EFX_EV_QSTAT_INCR(eep, EV_RX_BUF_OWNER_ID_ERR); 513 EFSYS_PROBE(owner_id_err); 514 (*flagsp) |= EFX_DISCARD; 515 } 516 517 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_IP_HDR_CHKSUM_ERR) != 0) { 518 EFX_EV_QSTAT_INCR(eep, EV_RX_IPV4_HDR_CHKSUM_ERR); 519 EFSYS_PROBE(ipv4_err); 520 (*flagsp) &= ~EFX_CKSUM_IPV4; 521 } 522 523 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_TCP_UDP_CHKSUM_ERR) != 0) { 524 EFX_EV_QSTAT_INCR(eep, EV_RX_TCP_UDP_CHKSUM_ERR); 525 EFSYS_PROBE(udp_chk_err); 526 (*flagsp) &= ~EFX_CKSUM_TCPUDP; 527 } 528 529 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_IP_FRAG_ERR) != 0) { 530 EFX_EV_QSTAT_INCR(eep, EV_RX_IP_FRAG_ERR); 531 532 /* 533 * If IP is fragmented FSF_AZ_RX_EV_IP_FRAG_ERR is set. This 534 * causes FSF_AZ_RX_EV_PKT_OK to be clear. This is not an error 535 * condition. 536 */ 537 (*flagsp) &= ~(EFX_PKT_TCP | EFX_PKT_UDP | EFX_CKSUM_TCPUDP); 538 } 539 540 return (ignore); 541} 542 543static __checkReturn boolean_t 544falconsiena_ev_rx( 545 __in efx_evq_t *eep, 546 __in efx_qword_t *eqp, 547 __in const efx_ev_callbacks_t *eecp, 548 __in_opt void *arg) 549{ 550 efx_nic_t *enp = eep->ee_enp; 551 uint32_t id; 552 uint32_t size; 553 uint32_t label; 554 boolean_t ok; 555#if EFSYS_OPT_RX_SCATTER 556 boolean_t sop; 557 boolean_t jumbo_cont; 558#endif /* EFSYS_OPT_RX_SCATTER */ 559 uint32_t hdr_type; 560 boolean_t is_v6; 561 uint16_t flags; 562 boolean_t ignore; 563 boolean_t should_abort; 564 565 EFX_EV_QSTAT_INCR(eep, EV_RX); 566 567 /* Basic packet information */ 568 id = EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_DESC_PTR); 569 size = EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_BYTE_CNT); 570 label = EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_Q_LABEL); 571 ok = (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_PKT_OK) != 0); 572 573#if EFSYS_OPT_RX_SCATTER 574 sop = (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_SOP) != 0); 575 jumbo_cont = (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_JUMBO_CONT) != 0); 576#endif /* EFSYS_OPT_RX_SCATTER */ 577 578 hdr_type = EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_HDR_TYPE); 579 580 is_v6 = (enp->en_family != EFX_FAMILY_FALCON && 581 EFX_QWORD_FIELD(*eqp, FSF_CZ_RX_EV_IPV6_PKT) != 0); 582 583 /* 584 * If packet is marked as OK and packet type is TCP/IP or 585 * UDP/IP or other IP, then we can rely on the hardware checksums. 586 */ 587 switch (hdr_type) { 588 case FSE_AZ_RX_EV_HDR_TYPE_IPV4V6_TCP: 589 flags = EFX_PKT_TCP | EFX_CKSUM_TCPUDP; 590 if (is_v6) { 591 EFX_EV_QSTAT_INCR(eep, EV_RX_TCP_IPV6); 592 flags |= EFX_PKT_IPV6; 593 } else { 594 EFX_EV_QSTAT_INCR(eep, EV_RX_TCP_IPV4); 595 flags |= EFX_PKT_IPV4 | EFX_CKSUM_IPV4; 596 } 597 break; 598 599 case FSE_AZ_RX_EV_HDR_TYPE_IPV4V6_UDP: 600 flags = EFX_PKT_UDP | EFX_CKSUM_TCPUDP; 601 if (is_v6) { 602 EFX_EV_QSTAT_INCR(eep, EV_RX_UDP_IPV6); 603 flags |= EFX_PKT_IPV6; 604 } else { 605 EFX_EV_QSTAT_INCR(eep, EV_RX_UDP_IPV4); 606 flags |= EFX_PKT_IPV4 | EFX_CKSUM_IPV4; 607 } 608 break; 609 610 case FSE_AZ_RX_EV_HDR_TYPE_IPV4V6_OTHER: 611 if (is_v6) { 612 EFX_EV_QSTAT_INCR(eep, EV_RX_OTHER_IPV6); 613 flags = EFX_PKT_IPV6; 614 } else { 615 EFX_EV_QSTAT_INCR(eep, EV_RX_OTHER_IPV4); 616 flags = EFX_PKT_IPV4 | EFX_CKSUM_IPV4; 617 } 618 break; 619 620 case FSE_AZ_RX_EV_HDR_TYPE_OTHER: 621 EFX_EV_QSTAT_INCR(eep, EV_RX_NON_IP); 622 flags = 0; 623 break; 624 625 default: 626 EFSYS_ASSERT(B_FALSE); 627 flags = 0; 628 break; 629 } 630 631#if EFSYS_OPT_RX_SCATTER 632 /* Report scatter and header/lookahead split buffer flags */ 633 if (sop) 634 flags |= EFX_PKT_START; 635 if (jumbo_cont) 636 flags |= EFX_PKT_CONT; 637#endif /* EFSYS_OPT_RX_SCATTER */ 638 639 /* Detect errors included in the FSF_AZ_RX_EV_PKT_OK indication */ 640 if (!ok) { 641 ignore = falconsiena_ev_rx_not_ok(eep, eqp, label, id, &flags); 642 if (ignore) { 643 EFSYS_PROBE4(rx_complete, uint32_t, label, uint32_t, id, 644 uint32_t, size, uint16_t, flags); 645 646 return (B_FALSE); 647 } 648 } 649 650 /* If we're not discarding the packet then it is ok */ 651 if (~flags & EFX_DISCARD) 652 EFX_EV_QSTAT_INCR(eep, EV_RX_OK); 653 654 /* Detect multicast packets that didn't match the filter */ 655 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_MCAST_PKT) != 0) { 656 EFX_EV_QSTAT_INCR(eep, EV_RX_MCAST_PKT); 657 658 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_MCAST_HASH_MATCH) != 0) { 659 EFX_EV_QSTAT_INCR(eep, EV_RX_MCAST_HASH_MATCH); 660 } else { 661 EFSYS_PROBE(mcast_mismatch); 662 flags |= EFX_ADDR_MISMATCH; 663 } 664 } else { 665 flags |= EFX_PKT_UNICAST; 666 } 667 668 /* 669 * The packet parser in Siena can abort parsing packets under 670 * certain error conditions, setting the PKT_NOT_PARSED bit 671 * (which clears PKT_OK). If this is set, then don't trust 672 * the PKT_TYPE field. 673 */ 674 if (enp->en_family != EFX_FAMILY_FALCON && !ok) { 675 uint32_t parse_err; 676 677 parse_err = EFX_QWORD_FIELD(*eqp, FSF_CZ_RX_EV_PKT_NOT_PARSED); 678 if (parse_err != 0) 679 flags |= EFX_CHECK_VLAN; 680 } 681 682 if (~flags & EFX_CHECK_VLAN) { 683 uint32_t pkt_type; 684 685 pkt_type = EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_PKT_TYPE); 686 if (pkt_type >= FSE_AZ_RX_EV_PKT_TYPE_VLAN) 687 flags |= EFX_PKT_VLAN_TAGGED; 688 } 689 690 EFSYS_PROBE4(rx_complete, uint32_t, label, uint32_t, id, 691 uint32_t, size, uint16_t, flags); 692 693 EFSYS_ASSERT(eecp->eec_rx != NULL); 694 should_abort = eecp->eec_rx(arg, label, id, size, flags); 695 696 return (should_abort); 697} 698 699static __checkReturn boolean_t 700falconsiena_ev_tx( 701 __in efx_evq_t *eep, 702 __in efx_qword_t *eqp, 703 __in const efx_ev_callbacks_t *eecp, 704 __in_opt void *arg) 705{ 706 uint32_t id; 707 uint32_t label; 708 boolean_t should_abort; 709 710 EFX_EV_QSTAT_INCR(eep, EV_TX); 711 712 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_COMP) != 0 && 713 EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_PKT_ERR) == 0 && 714 EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_PKT_TOO_BIG) == 0 && 715 EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_WQ_FF_FULL) == 0) { 716 717 id = EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_DESC_PTR); 718 label = EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_Q_LABEL); 719 720 EFSYS_PROBE2(tx_complete, uint32_t, label, uint32_t, id); 721 722 EFSYS_ASSERT(eecp->eec_tx != NULL); 723 should_abort = eecp->eec_tx(arg, label, id); 724 725 return (should_abort); 726 } 727 728 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_COMP) != 0) 729 EFSYS_PROBE3(bad_event, unsigned int, eep->ee_index, 730 uint32_t, EFX_QWORD_FIELD(*eqp, EFX_DWORD_1), 731 uint32_t, EFX_QWORD_FIELD(*eqp, EFX_DWORD_0)); 732 733 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_PKT_ERR) != 0) 734 EFX_EV_QSTAT_INCR(eep, EV_TX_PKT_ERR); 735 736 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_PKT_TOO_BIG) != 0) 737 EFX_EV_QSTAT_INCR(eep, EV_TX_PKT_TOO_BIG); 738 739 if (EFX_QWORD_FIELD(*eqp, FSF_AZ_TX_EV_WQ_FF_FULL) != 0) 740 EFX_EV_QSTAT_INCR(eep, EV_TX_WQ_FF_FULL); 741 742 EFX_EV_QSTAT_INCR(eep, EV_TX_UNEXPECTED); 743 return (B_FALSE); 744} 745 746static __checkReturn boolean_t 747falconsiena_ev_global( 748 __in efx_evq_t *eep, 749 __in efx_qword_t *eqp, 750 __in const efx_ev_callbacks_t *eecp, 751 __in_opt void *arg) 752{ 753 efx_nic_t *enp = eep->ee_enp; 754 efx_port_t *epp = &(enp->en_port); 755 boolean_t should_abort; 756 757 EFX_EV_QSTAT_INCR(eep, EV_GLOBAL); 758 should_abort = B_FALSE; 759 760 /* Check for a link management event */ 761 if (EFX_QWORD_FIELD(*eqp, FSF_BZ_GLB_EV_XG_MNT_INTR) != 0) { 762 EFX_EV_QSTAT_INCR(eep, EV_GLOBAL_MNT); 763 764 EFSYS_PROBE(xg_mgt); 765 766 epp->ep_mac_poll_needed = B_TRUE; 767 } 768 769 return (should_abort); 770} 771 772static __checkReturn boolean_t 773falconsiena_ev_driver( 774 __in efx_evq_t *eep, 775 __in efx_qword_t *eqp, 776 __in const efx_ev_callbacks_t *eecp, 777 __in_opt void *arg) 778{ 779 boolean_t should_abort; 780 781 EFX_EV_QSTAT_INCR(eep, EV_DRIVER); 782 should_abort = B_FALSE; 783 784 switch (EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBCODE)) { 785 case FSE_AZ_TX_DESCQ_FLS_DONE_EV: { 786 uint32_t txq_index; 787 788 EFX_EV_QSTAT_INCR(eep, EV_DRIVER_TX_DESCQ_FLS_DONE); 789 790 txq_index = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBDATA); 791 792 EFSYS_PROBE1(tx_descq_fls_done, uint32_t, txq_index); 793 794 EFSYS_ASSERT(eecp->eec_txq_flush_done != NULL); 795 should_abort = eecp->eec_txq_flush_done(arg, txq_index); 796 797 break; 798 } 799 case FSE_AZ_RX_DESCQ_FLS_DONE_EV: { 800 uint32_t rxq_index; 801 uint32_t failed; 802 803 rxq_index = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_RX_DESCQ_ID); 804 failed = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_RX_FLUSH_FAIL); 805 806 EFSYS_ASSERT(eecp->eec_rxq_flush_done != NULL); 807 EFSYS_ASSERT(eecp->eec_rxq_flush_failed != NULL); 808 809 if (failed) { 810 EFX_EV_QSTAT_INCR(eep, EV_DRIVER_RX_DESCQ_FLS_FAILED); 811 812 EFSYS_PROBE1(rx_descq_fls_failed, uint32_t, rxq_index); 813 814 should_abort = eecp->eec_rxq_flush_failed(arg, 815 rxq_index); 816 } else { 817 EFX_EV_QSTAT_INCR(eep, EV_DRIVER_RX_DESCQ_FLS_DONE); 818 819 EFSYS_PROBE1(rx_descq_fls_done, uint32_t, rxq_index); 820 821 should_abort = eecp->eec_rxq_flush_done(arg, rxq_index); 822 } 823 824 break; 825 } 826 case FSE_AZ_EVQ_INIT_DONE_EV: 827 EFSYS_ASSERT(eecp->eec_initialized != NULL); 828 should_abort = eecp->eec_initialized(arg); 829 830 break; 831 832 case FSE_AZ_EVQ_NOT_EN_EV: 833 EFSYS_PROBE(evq_not_en); 834 break; 835 836 case FSE_AZ_SRM_UPD_DONE_EV: { 837 uint32_t code; 838 839 EFX_EV_QSTAT_INCR(eep, EV_DRIVER_SRM_UPD_DONE); 840 841 code = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBDATA); 842 843 EFSYS_ASSERT(eecp->eec_sram != NULL); 844 should_abort = eecp->eec_sram(arg, code); 845 846 break; 847 } 848 case FSE_AZ_WAKE_UP_EV: { 849 uint32_t id; 850 851 id = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBDATA); 852 853 EFSYS_ASSERT(eecp->eec_wake_up != NULL); 854 should_abort = eecp->eec_wake_up(arg, id); 855 856 break; 857 } 858 case FSE_AZ_TX_PKT_NON_TCP_UDP: 859 EFSYS_PROBE(tx_pkt_non_tcp_udp); 860 break; 861 862 case FSE_AZ_TIMER_EV: { 863 uint32_t id; 864 865 id = EFX_QWORD_FIELD(*eqp, FSF_AZ_DRIVER_EV_SUBDATA); 866 867 EFSYS_ASSERT(eecp->eec_timer != NULL); 868 should_abort = eecp->eec_timer(arg, id); 869 870 break; 871 } 872 case FSE_AZ_RX_DSC_ERROR_EV: 873 EFX_EV_QSTAT_INCR(eep, EV_DRIVER_RX_DSC_ERROR); 874 875 EFSYS_PROBE(rx_dsc_error); 876 877 EFSYS_ASSERT(eecp->eec_exception != NULL); 878 should_abort = eecp->eec_exception(arg, 879 EFX_EXCEPTION_RX_DSC_ERROR, 0); 880 881 break; 882 883 case FSE_AZ_TX_DSC_ERROR_EV: 884 EFX_EV_QSTAT_INCR(eep, EV_DRIVER_TX_DSC_ERROR); 885 886 EFSYS_PROBE(tx_dsc_error); 887 888 EFSYS_ASSERT(eecp->eec_exception != NULL); 889 should_abort = eecp->eec_exception(arg, 890 EFX_EXCEPTION_TX_DSC_ERROR, 0); 891 892 break; 893 894 default: 895 break; 896 } 897 898 return (should_abort); 899} 900 901static __checkReturn boolean_t 902falconsiena_ev_drv_gen( 903 __in efx_evq_t *eep, 904 __in efx_qword_t *eqp, 905 __in const efx_ev_callbacks_t *eecp, 906 __in_opt void *arg) 907{ 908 uint32_t data; 909 boolean_t should_abort; 910 911 EFX_EV_QSTAT_INCR(eep, EV_DRV_GEN); 912 913 data = EFX_QWORD_FIELD(*eqp, FSF_AZ_EV_DATA_DW0); 914 if (data >= ((uint32_t)1 << 16)) { 915 EFSYS_PROBE3(bad_event, unsigned int, eep->ee_index, 916 uint32_t, EFX_QWORD_FIELD(*eqp, EFX_DWORD_1), 917 uint32_t, EFX_QWORD_FIELD(*eqp, EFX_DWORD_0)); 918 return (B_TRUE); 919 } 920 921 EFSYS_ASSERT(eecp->eec_software != NULL); 922 should_abort = eecp->eec_software(arg, (uint16_t)data); 923 924 return (should_abort); 925} 926 927#if EFSYS_OPT_MCDI 928 929static __checkReturn boolean_t 930falconsiena_ev_mcdi( 931 __in efx_evq_t *eep, 932 __in efx_qword_t *eqp, 933 __in const efx_ev_callbacks_t *eecp, 934 __in_opt void *arg) 935{ 936 efx_nic_t *enp = eep->ee_enp; 937 unsigned code; 938 boolean_t should_abort = B_FALSE; 939 940 EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA); 941 942 if (enp->en_family != EFX_FAMILY_SIENA) 943 goto out; 944 945 EFSYS_ASSERT(eecp->eec_link_change != NULL); 946 EFSYS_ASSERT(eecp->eec_exception != NULL); 947#if EFSYS_OPT_MON_STATS 948 EFSYS_ASSERT(eecp->eec_monitor != NULL); 949#endif 950 951 EFX_EV_QSTAT_INCR(eep, EV_MCDI_RESPONSE); 952 953 code = EFX_QWORD_FIELD(*eqp, MCDI_EVENT_CODE); 954 switch (code) { 955 case MCDI_EVENT_CODE_BADSSERT: 956 efx_mcdi_ev_death(enp, EINTR); 957 break; 958 959 case MCDI_EVENT_CODE_CMDDONE: 960 efx_mcdi_ev_cpl(enp, 961 MCDI_EV_FIELD(eqp, CMDDONE_SEQ), 962 MCDI_EV_FIELD(eqp, CMDDONE_DATALEN), 963 MCDI_EV_FIELD(eqp, CMDDONE_ERRNO)); 964 break; 965 966 case MCDI_EVENT_CODE_LINKCHANGE: { 967 efx_link_mode_t link_mode; 968 969 siena_phy_link_ev(enp, eqp, &link_mode); 970 should_abort = eecp->eec_link_change(arg, link_mode); 971 break; 972 } 973 case MCDI_EVENT_CODE_SENSOREVT: { 974#if EFSYS_OPT_MON_STATS 975 efx_mon_stat_t id; 976 efx_mon_stat_value_t value; 977 efx_rc_t rc; 978 979 if ((rc = mcdi_mon_ev(enp, eqp, &id, &value)) == 0) 980 should_abort = eecp->eec_monitor(arg, id, value); 981 else if (rc == ENOTSUP) { 982 should_abort = eecp->eec_exception(arg, 983 EFX_EXCEPTION_UNKNOWN_SENSOREVT, 984 MCDI_EV_FIELD(eqp, DATA)); 985 } else 986 EFSYS_ASSERT(rc == ENODEV); /* Wrong port */ 987#else 988 should_abort = B_FALSE; 989#endif 990 break; 991 } 992 case MCDI_EVENT_CODE_SCHEDERR: 993 /* Informational only */ 994 break; 995 996 case MCDI_EVENT_CODE_REBOOT: 997 efx_mcdi_ev_death(enp, EIO); 998 break; 999 1000 case MCDI_EVENT_CODE_MAC_STATS_DMA: 1001#if EFSYS_OPT_MAC_STATS 1002 if (eecp->eec_mac_stats != NULL) { 1003 eecp->eec_mac_stats(arg, 1004 MCDI_EV_FIELD(eqp, MAC_STATS_DMA_GENERATION)); 1005 } 1006#endif 1007 break; 1008 1009 case MCDI_EVENT_CODE_FWALERT: { 1010 uint32_t reason = MCDI_EV_FIELD(eqp, FWALERT_REASON); 1011 1012 if (reason == MCDI_EVENT_FWALERT_REASON_SRAM_ACCESS) 1013 should_abort = eecp->eec_exception(arg, 1014 EFX_EXCEPTION_FWALERT_SRAM, 1015 MCDI_EV_FIELD(eqp, FWALERT_DATA)); 1016 else 1017 should_abort = eecp->eec_exception(arg, 1018 EFX_EXCEPTION_UNKNOWN_FWALERT, 1019 MCDI_EV_FIELD(eqp, DATA)); 1020 break; 1021 } 1022 1023 default: 1024 EFSYS_PROBE1(mc_pcol_error, int, code); 1025 break; 1026 } 1027 1028out: 1029 return (should_abort); 1030} 1031 1032#endif /* EFSYS_OPT_MCDI */ 1033 1034static __checkReturn efx_rc_t 1035falconsiena_ev_qprime( 1036 __in efx_evq_t *eep, 1037 __in unsigned int count) 1038{ 1039 efx_nic_t *enp = eep->ee_enp; 1040 uint32_t rptr; 1041 efx_dword_t dword; 1042 1043 rptr = count & eep->ee_mask; 1044 1045 EFX_POPULATE_DWORD_1(dword, FRF_AZ_EVQ_RPTR, rptr); 1046 1047 EFX_BAR_TBL_WRITED(enp, FR_AZ_EVQ_RPTR_REG, eep->ee_index, 1048 &dword, B_FALSE); 1049 1050 return (0); 1051} 1052 1053#define EFX_EV_BATCH 8 1054 1055static void 1056falconsiena_ev_qpoll( 1057 __in efx_evq_t *eep, 1058 __inout unsigned int *countp, 1059 __in const efx_ev_callbacks_t *eecp, 1060 __in_opt void *arg) 1061{ 1062 efx_qword_t ev[EFX_EV_BATCH]; 1063 unsigned int batch; 1064 unsigned int total; 1065 unsigned int count; 1066 unsigned int index; 1067 size_t offset; 1068 1069 EFSYS_ASSERT(countp != NULL); 1070 EFSYS_ASSERT(eecp != NULL); 1071 1072 count = *countp; 1073 do { 1074 /* Read up until the end of the batch period */ 1075 batch = EFX_EV_BATCH - (count & (EFX_EV_BATCH - 1)); 1076 offset = (count & eep->ee_mask) * sizeof (efx_qword_t); 1077 for (total = 0; total < batch; ++total) { 1078 EFSYS_MEM_READQ(eep->ee_esmp, offset, &(ev[total])); 1079 1080 if (!EFX_EV_PRESENT(ev[total])) 1081 break; 1082 1083 EFSYS_PROBE3(event, unsigned int, eep->ee_index, 1084 uint32_t, EFX_QWORD_FIELD(ev[total], EFX_DWORD_1), 1085 uint32_t, EFX_QWORD_FIELD(ev[total], EFX_DWORD_0)); 1086 1087 offset += sizeof (efx_qword_t); 1088 } 1089 1090#if EFSYS_OPT_EV_PREFETCH && (EFSYS_OPT_EV_PREFETCH_PERIOD > 1) 1091 /* 1092 * Prefetch the next batch when we get within PREFETCH_PERIOD 1093 * of a completed batch. If the batch is smaller, then prefetch 1094 * immediately. 1095 */ 1096 if (total == batch && total < EFSYS_OPT_EV_PREFETCH_PERIOD) 1097 EFSYS_MEM_PREFETCH(eep->ee_esmp, offset); 1098#endif /* EFSYS_OPT_EV_PREFETCH */ 1099 1100 /* Process the batch of events */ 1101 for (index = 0; index < total; ++index) { 1102 boolean_t should_abort; 1103 uint32_t code; 1104 1105#if EFSYS_OPT_EV_PREFETCH 1106 /* Prefetch if we've now reached the batch period */ 1107 if (total == batch && 1108 index + EFSYS_OPT_EV_PREFETCH_PERIOD == total) { 1109 offset = (count + batch) & eep->ee_mask; 1110 offset *= sizeof (efx_qword_t); 1111 1112 EFSYS_MEM_PREFETCH(eep->ee_esmp, offset); 1113 } 1114#endif /* EFSYS_OPT_EV_PREFETCH */ 1115 1116 EFX_EV_QSTAT_INCR(eep, EV_ALL); 1117 1118 code = EFX_QWORD_FIELD(ev[index], FSF_AZ_EV_CODE); 1119 switch (code) { 1120 case FSE_AZ_EV_CODE_RX_EV: 1121 should_abort = eep->ee_rx(eep, 1122 &(ev[index]), eecp, arg); 1123 break; 1124 case FSE_AZ_EV_CODE_TX_EV: 1125 should_abort = eep->ee_tx(eep, 1126 &(ev[index]), eecp, arg); 1127 break; 1128 case FSE_AZ_EV_CODE_DRIVER_EV: 1129 should_abort = eep->ee_driver(eep, 1130 &(ev[index]), eecp, arg); 1131 break; 1132 case FSE_AZ_EV_CODE_DRV_GEN_EV: 1133 should_abort = eep->ee_drv_gen(eep, 1134 &(ev[index]), eecp, arg); 1135 break; 1136#if EFSYS_OPT_MCDI 1137 case FSE_AZ_EV_CODE_MCDI_EVRESPONSE: 1138 should_abort = eep->ee_mcdi(eep, 1139 &(ev[index]), eecp, arg); 1140 break; 1141#endif 1142 case FSE_AZ_EV_CODE_GLOBAL_EV: 1143 if (eep->ee_global) { 1144 should_abort = eep->ee_global(eep, 1145 &(ev[index]), eecp, arg); 1146 break; 1147 } 1148 /* else fallthrough */ 1149 default: 1150 EFSYS_PROBE3(bad_event, 1151 unsigned int, eep->ee_index, 1152 uint32_t, 1153 EFX_QWORD_FIELD(ev[index], EFX_DWORD_1), 1154 uint32_t, 1155 EFX_QWORD_FIELD(ev[index], EFX_DWORD_0)); 1156 1157 EFSYS_ASSERT(eecp->eec_exception != NULL); 1158 (void) eecp->eec_exception(arg, 1159 EFX_EXCEPTION_EV_ERROR, code); 1160 should_abort = B_TRUE; 1161 } 1162 if (should_abort) { 1163 /* Ignore subsequent events */ 1164 total = index + 1; 1165 break; 1166 } 1167 } 1168 1169 /* 1170 * Now that the hardware has most likely moved onto dma'ing 1171 * into the next cache line, clear the processed events. Take 1172 * care to only clear out events that we've processed 1173 */ 1174 EFX_SET_QWORD(ev[0]); 1175 offset = (count & eep->ee_mask) * sizeof (efx_qword_t); 1176 for (index = 0; index < total; ++index) { 1177 EFSYS_MEM_WRITEQ(eep->ee_esmp, offset, &(ev[0])); 1178 offset += sizeof (efx_qword_t); 1179 } 1180 1181 count += total; 1182 1183 } while (total == batch); 1184 1185 *countp = count; 1186} 1187 1188static void 1189falconsiena_ev_qpost( 1190 __in efx_evq_t *eep, 1191 __in uint16_t data) 1192{ 1193 efx_nic_t *enp = eep->ee_enp; 1194 efx_qword_t ev; 1195 efx_oword_t oword; 1196 1197 EFX_POPULATE_QWORD_2(ev, FSF_AZ_EV_CODE, FSE_AZ_EV_CODE_DRV_GEN_EV, 1198 FSF_AZ_EV_DATA_DW0, (uint32_t)data); 1199 1200 EFX_POPULATE_OWORD_3(oword, FRF_AZ_DRV_EV_QID, eep->ee_index, 1201 EFX_DWORD_0, EFX_QWORD_FIELD(ev, EFX_DWORD_0), 1202 EFX_DWORD_1, EFX_QWORD_FIELD(ev, EFX_DWORD_1)); 1203 1204 EFX_BAR_WRITEO(enp, FR_AZ_DRV_EV_REG, &oword); 1205} 1206 1207static __checkReturn efx_rc_t 1208falconsiena_ev_qmoderate( 1209 __in efx_evq_t *eep, 1210 __in unsigned int us) 1211{ 1212 efx_nic_t *enp = eep->ee_enp; 1213 efx_nic_cfg_t *encp = &(enp->en_nic_cfg); 1214 unsigned int locked; 1215 efx_dword_t dword; 1216 efx_rc_t rc; 1217 1218 if (us > encp->enc_evq_timer_max_us) { 1219 rc = EINVAL; 1220 goto fail1; 1221 } 1222 1223 /* If the value is zero then disable the timer */ 1224 if (us == 0) { 1225 if (enp->en_family == EFX_FAMILY_FALCON) 1226 EFX_POPULATE_DWORD_2(dword, 1227 FRF_AB_TC_TIMER_MODE, FFE_AB_TIMER_MODE_DIS, 1228 FRF_AB_TC_TIMER_VAL, 0); 1229 else 1230 EFX_POPULATE_DWORD_2(dword, 1231 FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_DIS, 1232 FRF_CZ_TC_TIMER_VAL, 0); 1233 } else { 1234 uint32_t timer_val; 1235 1236 /* Calculate the timer value in quanta */ 1237 timer_val = us * 1000 / encp->enc_evq_timer_quantum_ns; 1238 1239 /* Moderation value is base 0 so we need to deduct 1 */ 1240 if (timer_val > 0) 1241 timer_val--; 1242 1243 if (enp->en_family == EFX_FAMILY_FALCON) 1244 EFX_POPULATE_DWORD_2(dword, 1245 FRF_AB_TC_TIMER_MODE, FFE_AB_TIMER_MODE_INT_HLDOFF, 1246 FRF_AB_TIMER_VAL, timer_val); 1247 else 1248 EFX_POPULATE_DWORD_2(dword, 1249 FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_INT_HLDOFF, 1250 FRF_CZ_TC_TIMER_VAL, timer_val); 1251 } 1252 1253 locked = (eep->ee_index == 0) ? 1 : 0; 1254 1255 EFX_BAR_TBL_WRITED(enp, FR_BZ_TIMER_COMMAND_REGP0, 1256 eep->ee_index, &dword, locked); 1257 1258 return (0); 1259 1260fail1: 1261 EFSYS_PROBE1(fail1, efx_rc_t, rc); 1262 1263 return (rc); 1264} 1265 1266static __checkReturn efx_rc_t 1267falconsiena_ev_qcreate( 1268 __in efx_nic_t *enp, 1269 __in unsigned int index, 1270 __in efsys_mem_t *esmp, 1271 __in size_t n, 1272 __in uint32_t id, 1273 __in efx_evq_t *eep) 1274{ 1275 efx_nic_cfg_t *encp = &(enp->en_nic_cfg); 1276 uint32_t size; 1277 efx_oword_t oword; 1278 efx_rc_t rc; 1279 1280 EFX_STATIC_ASSERT(ISP2(EFX_EVQ_MAXNEVS)); 1281 EFX_STATIC_ASSERT(ISP2(EFX_EVQ_MINNEVS)); 1282 1283 if (!ISP2(n) || (n < EFX_EVQ_MINNEVS) || (n > EFX_EVQ_MAXNEVS)) { 1284 rc = EINVAL; 1285 goto fail1; 1286 } 1287 if (index >= encp->enc_evq_limit) { 1288 rc = EINVAL; 1289 goto fail2; 1290 } 1291#if EFSYS_OPT_RX_SCALE 1292 if (enp->en_intr.ei_type == EFX_INTR_LINE && 1293 index >= EFX_MAXRSS_LEGACY) { 1294 rc = EINVAL; 1295 goto fail3; 1296 } 1297#endif 1298 for (size = 0; (1 << size) <= (EFX_EVQ_MAXNEVS / EFX_EVQ_MINNEVS); 1299 size++) 1300 if ((1 << size) == (int)(n / EFX_EVQ_MINNEVS)) 1301 break; 1302 if (id + (1 << size) >= encp->enc_buftbl_limit) { 1303 rc = EINVAL; 1304 goto fail4; 1305 } 1306 1307 /* Set up the handler table */ 1308 eep->ee_rx = falconsiena_ev_rx; 1309 eep->ee_tx = falconsiena_ev_tx; 1310 eep->ee_driver = falconsiena_ev_driver; 1311 eep->ee_global = falconsiena_ev_global; 1312 eep->ee_drv_gen = falconsiena_ev_drv_gen; 1313#if EFSYS_OPT_MCDI 1314 eep->ee_mcdi = falconsiena_ev_mcdi; 1315#endif /* EFSYS_OPT_MCDI */ 1316 1317 /* Set up the new event queue */ 1318 if (enp->en_family != EFX_FAMILY_FALCON) { 1319 EFX_POPULATE_OWORD_1(oword, FRF_CZ_TIMER_Q_EN, 1); 1320 EFX_BAR_TBL_WRITEO(enp, FR_AZ_TIMER_TBL, index, &oword, B_TRUE); 1321 } 1322 1323 EFX_POPULATE_OWORD_3(oword, FRF_AZ_EVQ_EN, 1, FRF_AZ_EVQ_SIZE, size, 1324 FRF_AZ_EVQ_BUF_BASE_ID, id); 1325 1326 EFX_BAR_TBL_WRITEO(enp, FR_AZ_EVQ_PTR_TBL, index, &oword, B_TRUE); 1327 1328 return (0); 1329 1330fail4: 1331 EFSYS_PROBE(fail4); 1332#if EFSYS_OPT_RX_SCALE 1333fail3: 1334 EFSYS_PROBE(fail3); 1335#endif 1336fail2: 1337 EFSYS_PROBE(fail2); 1338fail1: 1339 EFSYS_PROBE1(fail1, efx_rc_t, rc); 1340 1341 return (rc); 1342} 1343
|