git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/bnxt: fix settingĀ link speed
[dpdk.git]
/
drivers
/
net
/
bnxt
/
bnxt_cpr.c
diff --git
a/drivers/net/bnxt/bnxt_cpr.c
b/drivers/net/bnxt/bnxt_cpr.c
index
0f7b5e9
..
40e5350
100644
(file)
--- a/
drivers/net/bnxt/bnxt_cpr.c
+++ b/
drivers/net/bnxt/bnxt_cpr.c
@@
-76,6
+76,12
@@
void bnxt_handle_async_event(struct bnxt *bp,
PMD_DRV_LOG(INFO, "Port conn async event\n");
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY:
PMD_DRV_LOG(INFO, "Port conn async event\n");
break;
case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_RESET_NOTIFY:
+ /* Ignore reset notify async events when stopping the port */
+ if (!bp->eth_dev->data->dev_started) {
+ bp->flags |= BNXT_FLAG_FATAL_ERROR;
+ return;
+ }
+
event_data = rte_le_to_cpu_32(async_cmp->event_data1);
/* timestamp_lo/hi values are in units of 100ms */
bp->fw_reset_max_msecs = async_cmp->timestamp_hi ?
event_data = rte_le_to_cpu_32(async_cmp->event_data1);
/* timestamp_lo/hi values are in units of 100ms */
bp->fw_reset_max_msecs = async_cmp->timestamp_hi ?
@@
-154,14
+160,14
@@
void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
uint16_t req_len;
int rc;
uint16_t req_len;
int rc;
- if (bp->pf
.
active_vfs <= 0) {
+ if (bp->pf
->
active_vfs <= 0) {
PMD_DRV_LOG(ERR, "Forwarded VF with no active VFs\n");
return;
}
/* Qualify the fwd request */
fw_vf_id = rte_le_to_cpu_16(fwd_cmpl->source_id);
PMD_DRV_LOG(ERR, "Forwarded VF with no active VFs\n");
return;
}
/* Qualify the fwd request */
fw_vf_id = rte_le_to_cpu_16(fwd_cmpl->source_id);
- vf_id = fw_vf_id - bp->pf
.
first_vf_id;
+ vf_id = fw_vf_id - bp->pf
->
first_vf_id;
req_len = (rte_le_to_cpu_16(fwd_cmpl->req_len_type) &
HWRM_FWD_REQ_CMPL_REQ_LEN_MASK) >>
req_len = (rte_le_to_cpu_16(fwd_cmpl->req_len_type) &
HWRM_FWD_REQ_CMPL_REQ_LEN_MASK) >>
@@
-170,15
+176,15
@@
void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
req_len = sizeof(fwreq->encap_request);
/* Locate VF's forwarded command */
req_len = sizeof(fwreq->encap_request);
/* Locate VF's forwarded command */
- fwd_cmd = (struct input *)bp->pf
.
vf_info[vf_id].req_buf;
+ fwd_cmd = (struct input *)bp->pf
->
vf_info[vf_id].req_buf;
- if (fw_vf_id < bp->pf
.
first_vf_id ||
- fw_vf_id >=
(bp->pf.first_vf_id) + bp->pf.
active_vfs) {
+ if (fw_vf_id < bp->pf
->
first_vf_id ||
+ fw_vf_id >=
bp->pf->first_vf_id + bp->pf->
active_vfs) {
PMD_DRV_LOG(ERR,
"FWD req's source_id 0x%x out of range 0x%x - 0x%x (%d %d)\n",
PMD_DRV_LOG(ERR,
"FWD req's source_id 0x%x out of range 0x%x - 0x%x (%d %d)\n",
- fw_vf_id, bp->pf
.
first_vf_id,
- (bp->pf
.first_vf_id) + bp->pf.
active_vfs - 1,
- bp->pf
.first_vf_id, bp->pf.
active_vfs);
+ fw_vf_id, bp->pf
->
first_vf_id,
+ (bp->pf
->first_vf_id) + bp->pf->
active_vfs - 1,
+ bp->pf
->first_vf_id, bp->pf->
active_vfs);
goto reject;
}
goto reject;
}
@@
-213,7
+219,7
@@
void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
if (rc) {
PMD_DRV_LOG(ERR,
"Failed to send FWD req VF 0x%x, type 0x%x.\n",
if (rc) {
PMD_DRV_LOG(ERR,
"Failed to send FWD req VF 0x%x, type 0x%x.\n",
- fw_vf_id - bp->pf
.
first_vf_id,
+ fw_vf_id - bp->pf
->
first_vf_id,
rte_le_to_cpu_16(fwd_cmd->req_type));
}
return;
rte_le_to_cpu_16(fwd_cmd->req_type));
}
return;
@@
-224,7
+230,7
@@
reject:
if (rc) {
PMD_DRV_LOG(ERR,
"Failed to send REJECT req VF 0x%x, type 0x%x.\n",
if (rc) {
PMD_DRV_LOG(ERR,
"Failed to send REJECT req VF 0x%x, type 0x%x.\n",
- fw_vf_id - bp->pf
.
first_vf_id,
+ fw_vf_id - bp->pf
->
first_vf_id,
rte_le_to_cpu_16(fwd_cmd->req_type));
}
rte_le_to_cpu_16(fwd_cmd->req_type));
}