Print this page
OS-1997 mpt_sas: expose LED controls to libtopo
Reviewed by: Keith Wesolowski <keith.wesolowski@joyent.com>


   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2012 Nexenta Systems, Inc. All rights reserved.

  25  */
  26 
  27 /*
  28  * Copyright (c) 2000 to 2010, LSI Corporation.
  29  * All rights reserved.
  30  *
  31  * Redistribution and use in source and binary forms of all code within
  32  * this file that is exclusively owned by LSI, with or without
  33  * modification, is permitted provided that, in addition to the CDDL 1.0
  34  * License requirements, the following conditions are met:
  35  *
  36  *    Neither the name of the author nor the names of its contributors may be
  37  *    used to endorse or promote products derived from this software without
  38  *    specific prior written permission.
  39  *
  40  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  41  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  42  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  43  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  44  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,


 191                  * m_dr_flag is a flag for DR, make sure the member
 192                  * take the place of dr_flag of mptsas_hash_data.
 193                  */
 194                 uint8_t                 m_dr_flag;      /* dr_flag */
 195                 uint16_t                m_devhdl;
 196                 uint32_t                m_deviceinfo;
 197                 uint8_t                 m_phynum;
 198                 uint32_t                m_dups;
 199                 int32_t                 m_timeout;
 200                 int32_t                 m_timebase;
 201                 int32_t                 m_t_throttle;
 202                 int32_t                 m_t_ncmds;
 203                 int32_t                 m_reset_delay;
 204                 int32_t                 m_t_nwait;
 205 
 206                 uint16_t                m_qfull_retry_interval;
 207                 uint8_t                 m_qfull_retries;
 208                 uint16_t                m_enclosure;
 209                 uint16_t                m_slot_num;
 210                 uint32_t                m_tgt_unconfigured;

 211 
 212                 /*
 213                  * For the common case, the elements in this structure are
 214                  * protected by the per hba instance mutex. In order to make
 215                  * the key code path in ISR lockless, a separate mutex is
 216                  * introdeced to protect those shown in ISR.
 217                  */
 218                 kmutex_t                m_tgt_intr_mutex;
 219 
 220 } mptsas_target_t;
 221 
 222 typedef struct mptsas_smp {
 223         uint64_t        m_sasaddr;      /* hash key1 */
 224         mptsas_phymask_t m_phymask;     /* hash key2 */
 225         uint8_t         reserved1;
 226         uint16_t        m_devhdl;
 227         uint32_t        m_deviceinfo;
 228         uint16_t        m_pdevhdl;
 229         uint32_t        m_pdevinfo;
 230 } mptsas_smp_t;




   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
  25  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  26  */
  27 
  28 /*
  29  * Copyright (c) 2000 to 2010, LSI Corporation.
  30  * All rights reserved.
  31  *
  32  * Redistribution and use in source and binary forms of all code within
  33  * this file that is exclusively owned by LSI, with or without
  34  * modification, is permitted provided that, in addition to the CDDL 1.0
  35  * License requirements, the following conditions are met:
  36  *
  37  *    Neither the name of the author nor the names of its contributors may be
  38  *    used to endorse or promote products derived from this software without
  39  *    specific prior written permission.
  40  *
  41  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  42  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  43  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  44  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  45  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,


 192                  * m_dr_flag is a flag for DR, make sure the member
 193                  * take the place of dr_flag of mptsas_hash_data.
 194                  */
 195                 uint8_t                 m_dr_flag;      /* dr_flag */
 196                 uint16_t                m_devhdl;
 197                 uint32_t                m_deviceinfo;
 198                 uint8_t                 m_phynum;
 199                 uint32_t                m_dups;
 200                 int32_t                 m_timeout;
 201                 int32_t                 m_timebase;
 202                 int32_t                 m_t_throttle;
 203                 int32_t                 m_t_ncmds;
 204                 int32_t                 m_reset_delay;
 205                 int32_t                 m_t_nwait;
 206 
 207                 uint16_t                m_qfull_retry_interval;
 208                 uint8_t                 m_qfull_retries;
 209                 uint16_t                m_enclosure;
 210                 uint16_t                m_slot_num;
 211                 uint32_t                m_tgt_unconfigured;
 212                 uint8_t                 m_led_status;
 213 
 214                 /*
 215                  * For the common case, the elements in this structure are
 216                  * protected by the per hba instance mutex. In order to make
 217                  * the key code path in ISR lockless, a separate mutex is
 218                  * introdeced to protect those shown in ISR.
 219                  */
 220                 kmutex_t                m_tgt_intr_mutex;
 221 
 222 } mptsas_target_t;
 223 
 224 typedef struct mptsas_smp {
 225         uint64_t        m_sasaddr;      /* hash key1 */
 226         mptsas_phymask_t m_phymask;     /* hash key2 */
 227         uint8_t         reserved1;
 228         uint16_t        m_devhdl;
 229         uint32_t        m_deviceinfo;
 230         uint16_t        m_pdevhdl;
 231         uint32_t        m_pdevinfo;
 232 } mptsas_smp_t;