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

@@ -20,10 +20,11 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/mkdev.h>
 #include <sys/stat.h>
 #include <sys/sunddi.h>
 #include <vm/seg_kmem.h>

@@ -586,11 +587,11 @@
         int rval = SUCCESS;
         uint64_t local_data;
         pci_cfgacc_req_t req;
         uint32_t max_offset;
 
-        if ((size <= 0) || (size > 8) || ((size & (size - 1)) != 0)) {
+        if ((size <= 0) || (size > 8) || !ISP2(size)) {
                 prg->status = PCITOOL_INVALID_SIZE;
                 return (ENOTSUP);
         }
 
         /*