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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/1394/t1394.c
          +++ new/usr/src/uts/common/io/1394/t1394.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24   24   */
  25   25  
  26      -#pragma ident   "%Z%%M% %I%     %E% SMI"
  27      -
  28   26  /*
  29   27   * t1394.c
  30   28   *    1394 Target Driver Interface
  31   29   *    This file contains all of the 1394 Software Framework routines called
  32   30   *    by target drivers
  33   31   */
  34   32  
       33 +#include <sys/sysmacros.h>
  35   34  #include <sys/conf.h>
  36   35  #include <sys/ddi.h>
  37   36  #include <sys/sunddi.h>
  38   37  #include <sys/types.h>
  39   38  #include <sys/kmem.h>
  40   39  #include <sys/disp.h>
  41   40  #include <sys/tnf_probe.h>
  42   41  
  43   42  #include <sys/1394/t1394.h>
  44   43  #include <sys/1394/s1394.h>
↓ open down ↓ 1857 lines elided ↑ open up ↑
1902 1901                      "Invalid channel mask");
1903 1902                  TNF_PROBE_0_DEBUG(t1394_alloc_isoch_cec_exit,
1904 1903                      S1394_TNF_SL_ISOCH_STACK, "");
1905 1904                  return (DDI_FAILURE);
1906 1905          }
1907 1906  
1908 1907          /* Test conditions specific to T1394_NO_IRM_ALLOC */
1909 1908          temp = props->cec_channel_mask;
1910 1909          if (props->cec_options & T1394_NO_IRM_ALLOC) {
1911 1910                  /* If T1394_NO_IRM_ALLOC, then only one bit should be set */
1912      -                if ((temp & (temp - 1)) != 0) {
     1911 +                if (!ISP2(temp)) {
1913 1912                          TNF_PROBE_1(t1394_alloc_isoch_cec_error,
1914 1913                              S1394_TNF_SL_ISOCH_ERROR, "", tnf_string, msg,
1915 1914                              "Invalid channel mask");
1916 1915                          TNF_PROBE_0_DEBUG(t1394_alloc_isoch_cec_exit,
1917 1916                              S1394_TNF_SL_ISOCH_STACK, "");
1918 1917                          return (DDI_FAILURE);
1919 1918                  }
1920 1919  
1921 1920                  /* If T1394_NO_IRM_ALLOC, then speeds should be equal */
1922 1921                  if (props->cec_min_speed != props->cec_max_speed) {
↓ open down ↓ 1857 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX