1667 request = 2;
1668 break;
1669 }
1670 reg = I40E_READ_REG(hw, I40E_GLPCI_CNF2);
1671 /*
1672 * Should this read fail, we will drop back to using
1673 * MSI or fixed interrupts.
1674 */
1675 if (i40e_check_acc_handle(rh) != DDI_FM_OK) {
1676 ddi_fm_service_impact(i40e->i40e_dip,
1677 DDI_SERVICE_DEGRADED);
1678 return (B_FALSE);
1679 }
1680 request = (reg & I40E_GLPCI_CNF2_MSI_X_PF_N_MASK) >>
1681 I40E_GLPCI_CNF2_MSI_X_PF_N_SHIFT;
1682 request++; /* the register value is n - 1 */
1683 break;
1684 default:
1685 panic("bad interrupt type passed to i40e_alloc_intr_handles: "
1686 "%d", intr_type);
1687 return (B_FALSE);
1688 }
1689
1690 rc = ddi_intr_get_nintrs(devinfo, intr_type, &count);
1691 if (rc != DDI_SUCCESS || count < min) {
1692 i40e_log(i40e, "Get interrupt number failed, "
1693 "returned %d, count %d", rc, count);
1694 return (B_FALSE);
1695 }
1696
1697 rc = ddi_intr_get_navail(devinfo, intr_type, &count);
1698 if (rc != DDI_SUCCESS || count < min) {
1699 i40e_log(i40e, "Get AVAILABLE interrupt number failed, "
1700 "returned %d, count %d", rc, count);
1701 return (B_FALSE);
1702 }
1703
1704 actual = 0;
1705 i40e->i40e_intr_count = 0;
1706 i40e->i40e_intr_count_max = 0;
1707 i40e->i40e_intr_count_min = 0;
|
1667 request = 2;
1668 break;
1669 }
1670 reg = I40E_READ_REG(hw, I40E_GLPCI_CNF2);
1671 /*
1672 * Should this read fail, we will drop back to using
1673 * MSI or fixed interrupts.
1674 */
1675 if (i40e_check_acc_handle(rh) != DDI_FM_OK) {
1676 ddi_fm_service_impact(i40e->i40e_dip,
1677 DDI_SERVICE_DEGRADED);
1678 return (B_FALSE);
1679 }
1680 request = (reg & I40E_GLPCI_CNF2_MSI_X_PF_N_MASK) >>
1681 I40E_GLPCI_CNF2_MSI_X_PF_N_SHIFT;
1682 request++; /* the register value is n - 1 */
1683 break;
1684 default:
1685 panic("bad interrupt type passed to i40e_alloc_intr_handles: "
1686 "%d", intr_type);
1687 }
1688
1689 rc = ddi_intr_get_nintrs(devinfo, intr_type, &count);
1690 if (rc != DDI_SUCCESS || count < min) {
1691 i40e_log(i40e, "Get interrupt number failed, "
1692 "returned %d, count %d", rc, count);
1693 return (B_FALSE);
1694 }
1695
1696 rc = ddi_intr_get_navail(devinfo, intr_type, &count);
1697 if (rc != DDI_SUCCESS || count < min) {
1698 i40e_log(i40e, "Get AVAILABLE interrupt number failed, "
1699 "returned %d, count %d", rc, count);
1700 return (B_FALSE);
1701 }
1702
1703 actual = 0;
1704 i40e->i40e_intr_count = 0;
1705 i40e->i40e_intr_count_max = 0;
1706 i40e->i40e_intr_count_min = 0;
|