Print this page
5255 uts shouldn't open-code ISP2
*** 723,734 ****
dip, DDI_PROP_DONTPASS, rxbcopythreshold_propname,
UNM_RX_BCOPY_THRESHOLD);
tx_desc = ddi_prop_get_int(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS,
txringsize_propname, MAX_CMD_DESCRIPTORS_HOST);
! if (tx_desc >= 256 && tx_desc <= MAX_CMD_DESCRIPTORS &&
! !(tx_desc & (tx_desc - 1))) {
adapter->MaxTxDescCount = tx_desc;
} else {
cmn_err(CE_WARN, "%s%d: TxRingSize defaulting to %d, since "
".conf value is not 2 power aligned in range 256 - %d\n",
adapter->name, adapter->instance, MAX_CMD_DESCRIPTORS_HOST,
--- 723,733 ----
dip, DDI_PROP_DONTPASS, rxbcopythreshold_propname,
UNM_RX_BCOPY_THRESHOLD);
tx_desc = ddi_prop_get_int(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS,
txringsize_propname, MAX_CMD_DESCRIPTORS_HOST);
! if (tx_desc >= 256 && tx_desc <= MAX_CMD_DESCRIPTORS && ISP2(tx_desc)) {
adapter->MaxTxDescCount = tx_desc;
} else {
cmn_err(CE_WARN, "%s%d: TxRingSize defaulting to %d, since "
".conf value is not 2 power aligned in range 256 - %d\n",
adapter->name, adapter->instance, MAX_CMD_DESCRIPTORS_HOST,
*** 737,748 ****
}
rx_desc = ddi_prop_get_int(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS,
rxringsize_propname, maxrx);
if (rx_desc >= NX_MIN_DRIVER_RDS_SIZE &&
! rx_desc <= NX_MAX_SUPPORTED_RDS_SIZE &&
! !(rx_desc & (rx_desc - 1))) {
adapter->MaxRxDescCount = rx_desc;
} else {
cmn_err(CE_WARN, "%s%d: RxRingSize defaulting to %d, since "
".conf value is not 2 power aligned in range %d - %d\n",
adapter->name, adapter->instance, MAX_RCV_DESCRIPTORS,
--- 736,746 ----
}
rx_desc = ddi_prop_get_int(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS,
rxringsize_propname, maxrx);
if (rx_desc >= NX_MIN_DRIVER_RDS_SIZE &&
! rx_desc <= NX_MAX_SUPPORTED_RDS_SIZE && ISP2(rx_desc)) {
adapter->MaxRxDescCount = rx_desc;
} else {
cmn_err(CE_WARN, "%s%d: RxRingSize defaulting to %d, since "
".conf value is not 2 power aligned in range %d - %d\n",
adapter->name, adapter->instance, MAX_RCV_DESCRIPTORS,
*** 751,762 ****
}
rx_jdesc = ddi_prop_get_int(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS,
jumborxringsize_propname, MAX_JUMBO_RCV_DESCRIPTORS);
if (rx_jdesc >= NX_MIN_DRIVER_RDS_SIZE &&
! rx_jdesc <= NX_MAX_SUPPORTED_JUMBO_RDS_SIZE &&
! !(rx_jdesc & (rx_jdesc - 1))) {
adapter->MaxJumboRxDescCount = rx_jdesc;
} else {
cmn_err(CE_WARN, "%s%d: JumboRingSize defaulting to %d, since "
".conf value is not 2 power aligned in range %d - %d\n",
adapter->name, adapter->instance, MAX_JUMBO_RCV_DESCRIPTORS,
--- 749,759 ----
}
rx_jdesc = ddi_prop_get_int(DDI_DEV_T_ANY, dip, DDI_PROP_DONTPASS,
jumborxringsize_propname, MAX_JUMBO_RCV_DESCRIPTORS);
if (rx_jdesc >= NX_MIN_DRIVER_RDS_SIZE &&
! rx_jdesc <= NX_MAX_SUPPORTED_JUMBO_RDS_SIZE && ISP2(rx_jdesc)) {
adapter->MaxJumboRxDescCount = rx_jdesc;
} else {
cmn_err(CE_WARN, "%s%d: JumboRingSize defaulting to %d, since "
".conf value is not 2 power aligned in range %d - %d\n",
adapter->name, adapter->instance, MAX_JUMBO_RCV_DESCRIPTORS,