e1000_osdep.c revision 25f2d433de915875c8393f0b0dc14aa155997ad0
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * This file is provided under a CDDLv1 license. When using or
3e14f97f673e8a630f076077de35afdd43dc1587Roger A. Faulkner * redistributing this file, you may do so under this license.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * In redistributing this file this license must be included
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and no other modification of this header file is permitted.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL LICENSE SUMMARY
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright(c) 1999 - 2007 Intel Corporation. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The contents of this file are subject to the terms of Version
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * 1.0 of the Common Development and Distribution License (the "License").
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You should have received a copy of the License with this software.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the License at
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Use is subject to license terms of the CDDLv1.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin#pragma ident "%Z%%M% %I% %E% SMI"
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chine1000_alloc_zeroed_dev_spec_struct(struct e1000_hw *hw, u32 size)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin uint16_t val = hw->bus.pci_cmd_word | CMD_MEM_WRT_INVALIDATE;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin uint16_t val = hw->bus.pci_cmd_word & ~CMD_MEM_WRT_INVALIDATE;
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chine1000_write_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t *value)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chine1000_read_pci_cfg(struct e1000_hw *hw, uint32_t reg, uint16_t *value)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * phy_spd_state - set smart-power-down (SPD) state
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * This only acts on the 82541/47 family and the 82571/72 family.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * For any others, return without doing anything.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return; /* no action */
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The real intent of this routine is to return the value from pci-e
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * config space at offset reg into the capability space.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * ICH devices are "PCI Express"-ish. They have a configuration space,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * but do not contain PCI Express Capability registers, so this returns
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * the equivalent of "not supported"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chine1000_read_pcie_cap_reg(struct e1000_hw *hw, uint32_t reg, uint16_t *value)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin *value = pci_config_get16(OS_DEP(hw)->cfg_handle,
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin return (0);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Enables PCI-Express master access.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * hw: Struct containing variables accessed by shared code
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * returns: - none.