aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-06-19 18:15:34 -0400
committerDavid S. Miller <davem@davemloft.net>2018-06-19 18:15:34 -0400
commitd563e7a2ffd6275c195fe264e6cc8886eae877c5 (patch)
tree2c0e6fcb0b039e772e5d69d0c97f19df29614f7d
parent7e85dc8cb35abf16455f1511f0670b57c1a84608 (diff)
parentff54d5cd9ec15546abc870452dd0b66eef4b4606 (diff)
Merge branch 'qed-fixes'
Sudarsana Reddy Kalluru says: ==================== qed*: Fix series. The patch series fixes few issues in the qed/qede drivers. Please consider applying this series to "net". ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_dcbx.c11
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_ll2.c11
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_main.c12
3 files changed, 23 insertions, 11 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
index 8f31406ec894..f0b01385d5cb 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
@@ -255,9 +255,8 @@ qed_dcbx_get_app_protocol_type(struct qed_hwfn *p_hwfn,
255 *type = DCBX_PROTOCOL_ROCE_V2; 255 *type = DCBX_PROTOCOL_ROCE_V2;
256 } else { 256 } else {
257 *type = DCBX_MAX_PROTOCOL_TYPE; 257 *type = DCBX_MAX_PROTOCOL_TYPE;
258 DP_ERR(p_hwfn, 258 DP_ERR(p_hwfn, "No action required, App TLV entry = 0x%x\n",
259 "No action required, App TLV id = 0x%x app_prio_bitmap = 0x%x\n", 259 app_prio_bitmap);
260 id, app_prio_bitmap);
261 return false; 260 return false;
262 } 261 }
263 262
@@ -1479,8 +1478,8 @@ static u8 qed_dcbnl_getcap(struct qed_dev *cdev, int capid, u8 *cap)
1479 *cap = 0x80; 1478 *cap = 0x80;
1480 break; 1479 break;
1481 case DCB_CAP_ATTR_DCBX: 1480 case DCB_CAP_ATTR_DCBX:
1482 *cap = (DCB_CAP_DCBX_LLD_MANAGED | DCB_CAP_DCBX_VER_CEE | 1481 *cap = (DCB_CAP_DCBX_VER_CEE | DCB_CAP_DCBX_VER_IEEE |
1483 DCB_CAP_DCBX_VER_IEEE | DCB_CAP_DCBX_STATIC); 1482 DCB_CAP_DCBX_STATIC);
1484 break; 1483 break;
1485 default: 1484 default:
1486 *cap = false; 1485 *cap = false;
@@ -1548,8 +1547,6 @@ static u8 qed_dcbnl_getdcbx(struct qed_dev *cdev)
1548 if (!dcbx_info) 1547 if (!dcbx_info)
1549 return 0; 1548 return 0;
1550 1549
1551 if (dcbx_info->operational.enabled)
1552 mode |= DCB_CAP_DCBX_LLD_MANAGED;
1553 if (dcbx_info->operational.ieee) 1550 if (dcbx_info->operational.ieee)
1554 mode |= DCB_CAP_DCBX_VER_IEEE; 1551 mode |= DCB_CAP_DCBX_VER_IEEE;
1555 if (dcbx_info->operational.cee) 1552 if (dcbx_info->operational.cee)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_ll2.c b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
index c97ebd681c47..012973d75ad0 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_ll2.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_ll2.c
@@ -201,8 +201,9 @@ void qed_ll2b_complete_rx_packet(void *cxt, struct qed_ll2_comp_rx_data *data)
201 201
202 skb = build_skb(buffer->data, 0); 202 skb = build_skb(buffer->data, 0);
203 if (!skb) { 203 if (!skb) {
204 rc = -ENOMEM; 204 DP_INFO(cdev, "Failed to build SKB\n");
205 goto out_post; 205 kfree(buffer->data);
206 goto out_post1;
206 } 207 }
207 208
208 data->u.placement_offset += NET_SKB_PAD; 209 data->u.placement_offset += NET_SKB_PAD;
@@ -224,8 +225,14 @@ void qed_ll2b_complete_rx_packet(void *cxt, struct qed_ll2_comp_rx_data *data)
224 cdev->ll2->cbs->rx_cb(cdev->ll2->cb_cookie, skb, 225 cdev->ll2->cbs->rx_cb(cdev->ll2->cb_cookie, skb,
225 data->opaque_data_0, 226 data->opaque_data_0,
226 data->opaque_data_1); 227 data->opaque_data_1);
228 } else {
229 DP_VERBOSE(p_hwfn, (NETIF_MSG_RX_STATUS | NETIF_MSG_PKTDATA |
230 QED_MSG_LL2 | QED_MSG_STORAGE),
231 "Dropping the packet\n");
232 kfree(buffer->data);
227 } 233 }
228 234
235out_post1:
229 /* Update Buffer information and update FW producer */ 236 /* Update Buffer information and update FW producer */
230 buffer->data = new_data; 237 buffer->data = new_data;
231 buffer->phys_addr = new_phys_addr; 238 buffer->phys_addr = new_phys_addr;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_main.c b/drivers/net/ethernet/qlogic/qed/qed_main.c
index b04d57ca5176..5c10fd7210c3 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_main.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_main.c
@@ -567,8 +567,16 @@ static irqreturn_t qed_single_int(int irq, void *dev_instance)
567 /* Fastpath interrupts */ 567 /* Fastpath interrupts */
568 for (j = 0; j < 64; j++) { 568 for (j = 0; j < 64; j++) {
569 if ((0x2ULL << j) & status) { 569 if ((0x2ULL << j) & status) {
570 hwfn->simd_proto_handler[j].func( 570 struct qed_simd_fp_handler *p_handler =
571 hwfn->simd_proto_handler[j].token); 571 &hwfn->simd_proto_handler[j];
572
573 if (p_handler->func)
574 p_handler->func(p_handler->token);
575 else
576 DP_NOTICE(hwfn,
577 "Not calling fastpath handler as it is NULL [handler #%d, status 0x%llx]\n",
578 j, status);
579
572 status &= ~(0x2ULL << j); 580 status &= ~(0x2ULL << j);
573 rc = IRQ_HANDLED; 581 rc = IRQ_HANDLED;
574 } 582 }