Print this page
5255 uts shouldn't open-code ISP2

@@ -723,12 +723,11 @@
             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))) {
+        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,12 +736,11 @@
         }
 
         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))) {
+            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,12 +749,11 @@
         }
 
         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))) {
+            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,