3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * CDDL HEADER START
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * The contents of this file are subject to the terms of the
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * Common Development and Distribution License (the "License").
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * You may not use this file except in compliance with the License.
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * See the License for the specific language governing permissions
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * and limitations under the License.
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * When distributing Covered Code, include this CDDL HEADER in each
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * If applicable, add the following below this CDDL HEADER, with the
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * fields enclosed by brackets "[]" replaced with your own identifying
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * information: Portions Copyright [yyyy] [name of copyright owner]
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * CDDL HEADER END
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * Use is subject to license terms.
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha/* private devlink info interfaces */
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjhaextern "C" {
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha#define SBD_CFG_LINK_RE "^cfg/((((N[0-9]+[.])?(SB|IB))?[0-9]+)|[abcd])$"
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha#define USB_CFG_LINK_RE "^cfg/((usb[0-9]+)/([0-9]+)([.]([0-9])+)*)$"
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha#define SATA_CFG_LINK_RE "^cfg/((sata[0-9]+)/([0-9]+)([.]([0-9])+)*)$"
4bb7efa72ed531c10f097919636e67724ec4c25aGarrett D'Amore#define SDCARD_CFG_LINK_RE "^cfg/sdcard[0-9]+/[0-9]+$"
ad86e48d1214c1b0ec33af482240d16fd15cb6ffpjha "^cfg/(.*(pci[0-9]|pcie[0-9]|Slot[0-9]|\\<pci\\>|\\<pcie\\>).*)$"
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha/* converts size in bits to a mask covering those bit positions */
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * macros for the ieee1275 "reg" property
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * naming format and semantics:
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * REG_<cell>_SIZE_<field> = bit size of <field> in <cell>
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * REG_<cell>_OFF_<field> = starting bit position of <field> in <cell>
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * REG_<cell>_<field>(r) = returns the value of <field> in <cell> using:
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha * (((r) >> REG_<cell>_OFF_<field>) & SIZE2MASK(REG_<cell>_SIZE_<field>))
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha (((r) >> REG_PHYSHI_OFF_PCIDEV) & SIZE2MASK(REG_PHYSHI_SIZE_PCIDEV))
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha/* rp = ptr to 5-tuple int array */
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha#define REG_PCIDEV(rp) (REG_PHYSHI_PCIDEV(REG_PHYSHI(rp)))
3c4226f98775d47a05fa88f9f72479f1a250eaa5pjha#endif /* _CFG_LINK_H */