Print this page
5255 uts shouldn't open-code ISP2
*** 31,40 ****
--- 31,41 ----
* 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>
*** 3373,3383 ****
* 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);
--- 3374,3384 ----
* 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);
*** 3409,3419 ****
* 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);
--- 3410,3420 ----
* 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);