Lines Matching +full:host +full:- +full:command

1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 1999 - 2018 Intel Corporation. */
7 * e1000_calculate_checksum - Calculate checksum for buffer
25 return (u8)(0 - sum); in e1000_calculate_checksum()
29 * e1000_mng_enable_host_if - Checks host interface is enabled
32 * Returns 0 upon success, else -E1000_ERR_HOST_INTERFACE_COMMAND
34 * This function checks whether the HOST IF is enabled for command operation
35 * and also checks whether the previous command is completed. It busy waits
36 * in case of previous command is not completed.
43 if (!hw->mac.arc_subsystem_valid) { in e1000_mng_enable_host_if()
45 return -E1000_ERR_HOST_INTERFACE_COMMAND; in e1000_mng_enable_host_if()
48 /* Check that the host interface is enabled. */ in e1000_mng_enable_host_if()
52 return -E1000_ERR_HOST_INTERFACE_COMMAND; in e1000_mng_enable_host_if()
54 /* check the previous command is completed */ in e1000_mng_enable_host_if()
63 e_dbg("Previous command timeout failed.\n"); in e1000_mng_enable_host_if()
64 return -E1000_ERR_HOST_INTERFACE_COMMAND; in e1000_mng_enable_host_if()
71 * e1000e_check_mng_mode_generic - Generic check management mode
86 * e1000e_enable_tx_pkt_filtering - Enable packet filtering on Tx
90 * and host interface is enabled.
94 struct e1000_host_mng_dhcp_cookie *hdr = &hw->mng_cookie; in e1000e_enable_tx_pkt_filtering()
95 u32 *buffer = (u32 *)&hw->mng_cookie; in e1000e_enable_tx_pkt_filtering()
100 hw->mac.tx_pkt_filtering = true; in e1000e_enable_tx_pkt_filtering()
103 if (!hw->mac.ops.check_mng_mode(hw)) { in e1000e_enable_tx_pkt_filtering()
104 hw->mac.tx_pkt_filtering = false; in e1000e_enable_tx_pkt_filtering()
105 return hw->mac.tx_pkt_filtering; in e1000e_enable_tx_pkt_filtering()
108 /* If we can't read from the host interface for whatever in e1000e_enable_tx_pkt_filtering()
113 hw->mac.tx_pkt_filtering = false; in e1000e_enable_tx_pkt_filtering()
114 return hw->mac.tx_pkt_filtering; in e1000e_enable_tx_pkt_filtering()
123 hdr_csum = hdr->checksum; in e1000e_enable_tx_pkt_filtering()
124 hdr->checksum = 0; in e1000e_enable_tx_pkt_filtering()
131 if ((hdr_csum != csum) || (hdr->signature != E1000_IAMT_SIGNATURE)) { in e1000e_enable_tx_pkt_filtering()
132 hw->mac.tx_pkt_filtering = true; in e1000e_enable_tx_pkt_filtering()
133 return hw->mac.tx_pkt_filtering; in e1000e_enable_tx_pkt_filtering()
137 if (!(hdr->status & E1000_MNG_DHCP_COOKIE_STATUS_PARSING)) in e1000e_enable_tx_pkt_filtering()
138 hw->mac.tx_pkt_filtering = false; in e1000e_enable_tx_pkt_filtering()
140 return hw->mac.tx_pkt_filtering; in e1000e_enable_tx_pkt_filtering()
144 * e1000_mng_write_cmd_header - Writes manageability command header
146 * @hdr: pointer to the host interface command header
148 * Writes the command header after does the checksum calculation.
155 /* Write the whole command header structure with new checksum. */ in e1000_mng_write_cmd_header()
157 hdr->checksum = e1000_calculate_checksum((u8 *)hdr, length); in e1000_mng_write_cmd_header()
160 /* Write the relevant command block into the ram area. */ in e1000_mng_write_cmd_header()
170 * e1000_mng_host_if_write - Write to the manageability host interface
172 * @buffer: pointer to the host interface buffer
177 * This function writes the buffer content at the offset given on the host if.
192 return -E1000_ERR_PARAM; in e1000_mng_host_if_write()
205 length -= j - prev_bytes; in e1000_mng_host_if_write()
210 length -= remaining; in e1000_mng_host_if_write()
215 /* The device driver writes the relevant command block into the in e1000_mng_host_if_write()
242 * e1000e_mng_write_dhcp_info - Writes DHCP info to host interface
244 * @buffer: pointer to the host interface
247 * Writes the DHCP information to the host interface.
261 /* Enable the host interface */ in e1000e_mng_write_dhcp_info()
266 /* Populate the host interface with the contents of "buffer". */ in e1000e_mng_write_dhcp_info()
272 /* Write the manageability command header */ in e1000e_mng_write_dhcp_info()
277 /* Tell the ARC a new command is pending. */ in e1000e_mng_write_dhcp_info()
285 * e1000e_enable_mng_pass_thru - Check if management passthrough is needed
301 if (hw->mac.has_fwsm) { in e1000e_enable_mng_pass_thru()
309 } else if ((hw->mac.type == e1000_82574) || in e1000e_enable_mng_pass_thru()
310 (hw->mac.type == e1000_82583)) { in e1000e_enable_mng_pass_thru()