Print this page
5255 uts shouldn't open-code ISP2
*** 31,40 ****
--- 31,41 ----
* This contains all the routines necessary to implement the Tavor
* ModifyQP() verb. This includes all the code for legal transitions to
* and from Reset, Init, RTR, RTS, SQD, SQErr, and Error.
*/
+ #include <sys/sysmacros.h>
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
#include <sys/modctl.h>
*** 3436,3446 ****
* Then find the next highest power-of-2
*/
if (rdma_ra_in == 0) {
rdma_ra_in = 1;
}
! if ((rdma_ra_in & (rdma_ra_in - 1)) == 0) {
*rra_max = highbit(rdma_ra_in) - 1;
} else {
*rra_max = highbit(rdma_ra_in);
}
return (DDI_SUCCESS);
--- 3437,3447 ----
* Then find the next highest power-of-2
*/
if (rdma_ra_in == 0) {
rdma_ra_in = 1;
}
! if (ISP2(rdma_ra_in)) {
*rra_max = highbit(rdma_ra_in) - 1;
} else {
*rra_max = highbit(rdma_ra_in);
}
return (DDI_SUCCESS);
*** 3472,3482 ****
* Then find the next highest power-of-2
*/
if (rdma_ra_out == 0) {
rdma_ra_out = 1;
}
! if ((rdma_ra_out & (rdma_ra_out - 1)) == 0) {
*sra_max = highbit(rdma_ra_out) - 1;
} else {
*sra_max = highbit(rdma_ra_out);
}
return (DDI_SUCCESS);
--- 3473,3483 ----
* Then find the next highest power-of-2
*/
if (rdma_ra_out == 0) {
rdma_ra_out = 1;
}
! if (ISP2(rdma_ra_out)) {
*sra_max = highbit(rdma_ra_out) - 1;
} else {
*sra_max = highbit(rdma_ra_out);
}
return (DDI_SUCCESS);