static void nx_fw_cmd_reset_ctx(struct netxen_adapter *adapter) { netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION, adapter->ahw.pci_func, NX_DESTROY_CTX_RESET, 0, NX_CDRP_CMD_DESTROY_RX_CTX); netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION, adapter->ahw.pci_func, NX_DESTROY_CTX_RESET, 0, NX_CDRP_CMD_DESTROY_TX_CTX); }
static void nx_fw_cmd_destroy_tx_ctx(struct netxen_adapter *adapter) { if (netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION, adapter->tx_context_id, NX_DESTROY_CTX_RESET, 0, NX_CDRP_CMD_DESTROY_TX_CTX)) { printk(KERN_WARNING "%s: Failed to destroy tx ctx in firmware\n", netxen_nic_driver_name); } }
int nx_fw_cmd_set_phy(struct netxen_adapter *adapter, u32 reg, u32 val) { u32 rcode; rcode = netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION, reg, val, 0, NX_CDRP_CMD_WRITE_PHY); if (rcode != NX_RCODE_SUCCESS) return -EIO; return 0; }
int nx_fw_cmd_query_phy(struct netxen_adapter *adapter, u32 reg, u32 *val) { u32 rcode; rcode = netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION, reg, 0, 0, NX_CDRP_CMD_READ_PHY); if (rcode != NX_RCODE_SUCCESS) return -EIO; return NXRD32(adapter, NX_ARG1_CRB_OFFSET); }
int nx_fw_cmd_set_mtu(struct netxen_adapter *adapter, int mtu) { u32 rcode = NX_RCODE_SUCCESS; struct netxen_recv_context *recv_ctx = &adapter->recv_ctx; if (recv_ctx->state == NX_HOST_CTX_STATE_ACTIVE) rcode = netxen_issue_cmd(adapter, adapter->ahw.pci_func, NXHAL_VERSION, recv_ctx->context_id, mtu, 0, NX_CDRP_CMD_SET_MTU); if (rcode != NX_RCODE_SUCCESS) return -EIO; return 0; }