xref: /onnv-gate/usr/src/uts/common/io/ixgbe/ixgbe_osdep.c (revision 9353:b9caf92a0042)
16621Sbt150084 /*
26621Sbt150084  * CDDL HEADER START
36621Sbt150084  *
4*9353SSamuel.Tu@Sun.COM  * Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
56621Sbt150084  * The contents of this file are subject to the terms of the
66621Sbt150084  * Common Development and Distribution License (the "License").
76621Sbt150084  * You may not use this file except in compliance with the License.
86621Sbt150084  *
96621Sbt150084  * You can obtain a copy of the license at:
106621Sbt150084  *      http://www.opensolaris.org/os/licensing.
116621Sbt150084  * See the License for the specific language governing permissions
126621Sbt150084  * and limitations under the License.
136621Sbt150084  *
146621Sbt150084  * When using or redistributing this file, you may do so under the
156621Sbt150084  * License only. No other modification of this header is permitted.
166621Sbt150084  *
176621Sbt150084  * If applicable, add the following below this CDDL HEADER, with the
186621Sbt150084  * fields enclosed by brackets "[]" replaced with your own identifying
196621Sbt150084  * information: Portions Copyright [yyyy] [name of copyright owner]
206621Sbt150084  *
216621Sbt150084  * CDDL HEADER END
226621Sbt150084  */
236621Sbt150084 
246621Sbt150084 /*
25*9353SSamuel.Tu@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
26*9353SSamuel.Tu@Sun.COM  * Use is subject to license terms.
276621Sbt150084  */
286621Sbt150084 
296621Sbt150084 #include "ixgbe_osdep.h"
306621Sbt150084 #include "ixgbe_api.h"
316621Sbt150084 
326621Sbt150084 uint16_t
ixgbe_read_pci_cfg(struct ixgbe_hw * hw,uint32_t reg)336621Sbt150084 ixgbe_read_pci_cfg(struct ixgbe_hw *hw, uint32_t reg)
346621Sbt150084 {
356621Sbt150084 	return (pci_config_get16(OS_DEP(hw)->cfg_handle, reg));
366621Sbt150084 }
37*9353SSamuel.Tu@Sun.COM 
38*9353SSamuel.Tu@Sun.COM void
ixgbe_write_pci_cfg(struct ixgbe_hw * hw,uint32_t reg,uint32_t val)39*9353SSamuel.Tu@Sun.COM ixgbe_write_pci_cfg(struct ixgbe_hw *hw, uint32_t reg, uint32_t val)
40*9353SSamuel.Tu@Sun.COM {
41*9353SSamuel.Tu@Sun.COM 	pci_config_put16(OS_DEP(hw)->cfg_handle, reg, val);
42*9353SSamuel.Tu@Sun.COM }
43