Lines Matching refs:softc

102 	struct bnxt_softc *softc = NULL;  in bnxt_mgmt_process_dcb()  local
113 softc = bnxt_find_dev(mgmt_dcb.hdr.domain, mgmt_dcb.hdr.bus, in bnxt_mgmt_process_dcb()
115 if (!softc) { in bnxt_mgmt_process_dcb()
123 bnxt_dcb_ieee_getets(softc, &mgmt_dcb.req.ets); in bnxt_mgmt_process_dcb()
126 bnxt_dcb_ieee_setets(softc, &mgmt_dcb.req.ets); in bnxt_mgmt_process_dcb()
129 bnxt_dcb_ieee_getpfc(softc, &mgmt_dcb.req.pfc); in bnxt_mgmt_process_dcb()
132 bnxt_dcb_ieee_setpfc(softc, &mgmt_dcb.req.pfc); in bnxt_mgmt_process_dcb()
135 bnxt_dcb_ieee_setapp(softc, &mgmt_dcb.req.app_tlv.app[0]); in bnxt_mgmt_process_dcb()
138 bnxt_dcb_ieee_delapp(softc, &mgmt_dcb.req.app_tlv.app[0]); in bnxt_mgmt_process_dcb()
141 bnxt_dcb_ieee_listapp(softc, &mgmt_dcb.req.app_tlv.app[0], in bnxt_mgmt_process_dcb()
146 device_printf(softc->dev, "%s:%d Invalid op 0x%x\n", in bnxt_mgmt_process_dcb()
153 device_printf(softc->dev, "%s:%d Failed to copy response to user\n", in bnxt_mgmt_process_dcb()
167 struct bnxt_softc *softc = NULL; in bnxt_mgmt_process_hwrm() local
181 softc = bnxt_find_dev(mgmt_req.hdr.domain, mgmt_req.hdr.bus, in bnxt_mgmt_process_hwrm()
183 if (!softc) { in bnxt_mgmt_process_hwrm()
190 device_printf(softc->dev, "%s:%d Failed to copy data from user\n", in bnxt_mgmt_process_hwrm()
197 device_printf(softc->dev, "%s:%d Invalid length\n", in bnxt_mgmt_process_hwrm()
203 device_printf(softc->dev, "%s:%d Max num_dma_indications " in bnxt_mgmt_process_hwrm()
212 device_printf(softc->dev, "%s:%d Failed to copy data from user\n", in bnxt_mgmt_process_hwrm()
231 device_printf(softc->dev, "%s:%d Failed to copy" in bnxt_mgmt_process_hwrm()
238 ret = iflib_dma_alloc(softc->ctx, msg->dma[0].length, &dma_data, in bnxt_mgmt_process_hwrm()
241 device_printf(softc->dev, "%s:%d iflib_dma_alloc" in bnxt_mgmt_process_hwrm()
252 device_printf(softc->dev, "%s:%d Failed to copy" in bnxt_mgmt_process_hwrm()
264 ret = bnxt_hwrm_passthrough(softc, req, msg->len_req, resp, msg->len_resp, msg->timeout); in bnxt_mgmt_process_hwrm()
273 device_printf(softc->dev, "%s:%d Failed to copy data" in bnxt_mgmt_process_hwrm()
282 device_printf(softc->dev, "%s:%d Failed to copy response to user\n", in bnxt_mgmt_process_hwrm()
304 struct bnxt_softc *softc = NULL; in bnxt_mgmt_get_dev_info() local
320 softc = bnxt_find_dev(0, 0, 0, dev_info.nic_info.dev_name); in bnxt_mgmt_get_dev_info()
321 if (!softc) { in bnxt_mgmt_get_dev_info()
328 strncpy(dev_info.nic_info.driver_name, device_get_name(softc->dev), 64); in bnxt_mgmt_get_dev_info()
329 dev_info.pci_info.domain_no = softc->domain; in bnxt_mgmt_get_dev_info()
330 dev_info.pci_info.bus_no = softc->bus; in bnxt_mgmt_get_dev_info()
331 dev_info.pci_info.device_no = softc->slot; in bnxt_mgmt_get_dev_info()
332 dev_info.pci_info.function_no = softc->function; in bnxt_mgmt_get_dev_info()
333 dev_info.pci_info.vendor_id = pci_get_vendor(softc->dev); in bnxt_mgmt_get_dev_info()
334 dev_info.pci_info.device_id = pci_get_device(softc->dev); in bnxt_mgmt_get_dev_info()
335 dev_info.pci_info.sub_system_vendor_id = pci_get_subvendor(softc->dev); in bnxt_mgmt_get_dev_info()
336 dev_info.pci_info.sub_system_device_id = pci_get_subdevice(softc->dev); in bnxt_mgmt_get_dev_info()
337 dev_info.pci_info.revision = pci_read_config(softc->dev, PCIR_REVID, 1); in bnxt_mgmt_get_dev_info()
340 if (pci_find_extcap(softc->dev, PCIZ_SERNUM, &dev_sn_offset)) { in bnxt_mgmt_get_dev_info()
341 device_printf(softc->dev, "%s:%d device serial number is not found" in bnxt_mgmt_get_dev_info()
344 dev_sn_lo = pci_read_config(softc->dev, dev_sn_offset + 4, 4); in bnxt_mgmt_get_dev_info()
345 dev_sn_hi = pci_read_config(softc->dev, dev_sn_offset + 8, 4); in bnxt_mgmt_get_dev_info()
358 if_t ifp = iflib_get_ifp(softc->ctx); in bnxt_mgmt_get_dev_info()
360 memcpy(dev_info.nic_info.mac, softc->func.mac_addr, ETHER_ADDR_LEN); in bnxt_mgmt_get_dev_info()
362 if (pci_find_cap(softc->dev, PCIY_EXPRESS, &capreg)) { in bnxt_mgmt_get_dev_info()
363 device_printf(softc->dev, "%s:%d pci link capability is not found" in bnxt_mgmt_get_dev_info()
366 lnk = pci_read_config(softc->dev, capreg + PCIER_LINK_STA, 2); in bnxt_mgmt_get_dev_info()
372 device_printf(softc->dev, "%s:%d Failed to copy data to user\n", in bnxt_mgmt_get_dev_info()