Print this page
6601 Various GLD drivers return EINVAL instead of ENOTSUP for unused mac_prop_id_t's
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/io/nxge/nxge_main.c
          +++ new/usr/src/uts/common/io/nxge/nxge_main.c
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  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 (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
  23   24   */
  24   25  
  25   26  /*
  26   27   * SunOs MT STREAMS NIU/Neptune 10Gb Ethernet Device Driver.
  27   28   */
  28   29  #include        <sys/nxge/nxge_impl.h>
  29   30  #include        <sys/nxge/nxge_hio.h>
  30   31  #include        <sys/nxge/nxge_rxdma.h>
  31   32  #include        <sys/pcie.h>
  32   33  
↓ open down ↓ 5096 lines elided ↑ open up ↑
5129 5130                  err = nxge_param_set_mac(nxgep, NULL, NULL, (char *)pr_val,
5130 5131                      (caddr_t)&param_arr[param_anar_10gfdx]);
5131 5132                  return (err);
5132 5133          }
5133 5134          if (strcmp(pr_name, "_adv_pause_cap") == 0) {
5134 5135                  err = nxge_param_set_mac(nxgep, NULL, NULL, (char *)pr_val,
5135 5136                      (caddr_t)&param_arr[param_anar_pause]);
5136 5137                  return (err);
5137 5138          }
5138 5139  
5139      -        return (EINVAL);
     5140 +        return (ENOTSUP);
5140 5141  }
5141 5142  
5142 5143  static int
5143 5144  nxge_get_priv_prop(p_nxge_t nxgep, const char *pr_name, uint_t pr_valsize,
5144 5145      void *pr_val)
5145 5146  {
5146 5147          p_nxge_param_t  param_arr = nxgep->param_arr;
5147 5148          char            valstr[MAXNAMELEN];
5148      -        int             err = EINVAL;
     5149 +        int             err = ENOTSUP;
5149 5150          uint_t          strsize;
5150 5151  
5151 5152          NXGE_DEBUG_MSG((nxgep, NXGE_CTL,
5152 5153              "==> nxge_get_priv_prop: property %s", pr_name));
5153 5154  
5154 5155          /* function number */
5155 5156          if (strcmp(pr_name, "_function_number") == 0) {
5156 5157                  (void) snprintf(valstr, sizeof (valstr), "%d",
5157 5158                      nxgep->function_num);
5158 5159                  NXGE_DEBUG_MSG((nxgep, NXGE_CTL,
↓ open down ↓ 2072 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX