aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
diff options
context:
space:
mode:
authorMerav Sicron <meravs@broadcom.com>2012-03-18 06:33:38 -0400
committerDavid S. Miller <davem@davemloft.net>2012-03-19 16:52:48 -0400
commit51c1a580b1e07d58eb063f9f4a70aea8ad32fe23 (patch)
tree83243fae1f89d3b705117a8f609bc427eb389c98 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
parentd8290ae54c88cab9f199a84125bd5fda9f48b032 (diff)
bnx2x: revised driver prints
We've revised driver prints, changing the mask of existing prints to allow better control over the debug messages, added prints to error scenarios, removed unnecessary prints and corrected some spelling. Please note that this patch contains lines with over 80 characters, as string messages were kept in a single line. Signed-off-by: Merav Sicron <meravs@broadcom.com> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c150
1 files changed, 80 insertions, 70 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
index 484498f6bf1e..3f52fadee3ed 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
@@ -72,8 +72,8 @@ static inline void bnx2x_exe_queue_init(struct bnx2x *bp,
72 o->execute = exec; 72 o->execute = exec;
73 o->get = get; 73 o->get = get;
74 74
75 DP(BNX2X_MSG_SP, "Setup the execution queue with the chunk " 75 DP(BNX2X_MSG_SP, "Setup the execution queue with the chunk length of %d\n",
76 "length of %d\n", exe_len); 76 exe_len);
77} 77}
78 78
79static inline void bnx2x_exe_queue_free_elem(struct bnx2x *bp, 79static inline void bnx2x_exe_queue_free_elem(struct bnx2x *bp,
@@ -203,8 +203,7 @@ static inline int bnx2x_exe_queue_step(struct bnx2x *bp,
203 */ 203 */
204 if (!list_empty(&o->pending_comp)) { 204 if (!list_empty(&o->pending_comp)) {
205 if (test_bit(RAMROD_DRV_CLR_ONLY, ramrod_flags)) { 205 if (test_bit(RAMROD_DRV_CLR_ONLY, ramrod_flags)) {
206 DP(BNX2X_MSG_SP, "RAMROD_DRV_CLR_ONLY requested: " 206 DP(BNX2X_MSG_SP, "RAMROD_DRV_CLR_ONLY requested: resetting a pending_comp list\n");
207 "resetting pending_comp\n");
208 __bnx2x_exe_queue_reset_pending(bp, o); 207 __bnx2x_exe_queue_reset_pending(bp, o);
209 } else { 208 } else {
210 spin_unlock_bh(&o->lock); 209 spin_unlock_bh(&o->lock);
@@ -476,11 +475,14 @@ static int bnx2x_get_n_elements(struct bnx2x *bp, struct bnx2x_vlan_mac_obj *o,
476} 475}
477 476
478/* check_add() callbacks */ 477/* check_add() callbacks */
479static int bnx2x_check_mac_add(struct bnx2x_vlan_mac_obj *o, 478static int bnx2x_check_mac_add(struct bnx2x *bp,
479 struct bnx2x_vlan_mac_obj *o,
480 union bnx2x_classification_ramrod_data *data) 480 union bnx2x_classification_ramrod_data *data)
481{ 481{
482 struct bnx2x_vlan_mac_registry_elem *pos; 482 struct bnx2x_vlan_mac_registry_elem *pos;
483 483
484 DP(BNX2X_MSG_SP, "Checking MAC %pM for ADD command\n", data->mac.mac);
485
484 if (!is_valid_ether_addr(data->mac.mac)) 486 if (!is_valid_ether_addr(data->mac.mac))
485 return -EINVAL; 487 return -EINVAL;
486 488
@@ -492,11 +494,14 @@ static int bnx2x_check_mac_add(struct bnx2x_vlan_mac_obj *o,
492 return 0; 494 return 0;
493} 495}
494 496
495static int bnx2x_check_vlan_add(struct bnx2x_vlan_mac_obj *o, 497static int bnx2x_check_vlan_add(struct bnx2x *bp,
498 struct bnx2x_vlan_mac_obj *o,
496 union bnx2x_classification_ramrod_data *data) 499 union bnx2x_classification_ramrod_data *data)
497{ 500{
498 struct bnx2x_vlan_mac_registry_elem *pos; 501 struct bnx2x_vlan_mac_registry_elem *pos;
499 502
503 DP(BNX2X_MSG_SP, "Checking VLAN %d for ADD command\n", data->vlan.vlan);
504
500 list_for_each_entry(pos, &o->head, link) 505 list_for_each_entry(pos, &o->head, link)
501 if (data->vlan.vlan == pos->u.vlan.vlan) 506 if (data->vlan.vlan == pos->u.vlan.vlan)
502 return -EEXIST; 507 return -EEXIST;
@@ -504,11 +509,15 @@ static int bnx2x_check_vlan_add(struct bnx2x_vlan_mac_obj *o,
504 return 0; 509 return 0;
505} 510}
506 511
507static int bnx2x_check_vlan_mac_add(struct bnx2x_vlan_mac_obj *o, 512static int bnx2x_check_vlan_mac_add(struct bnx2x *bp,
513 struct bnx2x_vlan_mac_obj *o,
508 union bnx2x_classification_ramrod_data *data) 514 union bnx2x_classification_ramrod_data *data)
509{ 515{
510 struct bnx2x_vlan_mac_registry_elem *pos; 516 struct bnx2x_vlan_mac_registry_elem *pos;
511 517
518 DP(BNX2X_MSG_SP, "Checking VLAN_MAC (%pM, %d) for ADD command\n",
519 data->vlan_mac.mac, data->vlan_mac.vlan);
520
512 list_for_each_entry(pos, &o->head, link) 521 list_for_each_entry(pos, &o->head, link)
513 if ((data->vlan_mac.vlan == pos->u.vlan_mac.vlan) && 522 if ((data->vlan_mac.vlan == pos->u.vlan_mac.vlan) &&
514 (!memcmp(data->vlan_mac.mac, pos->u.vlan_mac.mac, 523 (!memcmp(data->vlan_mac.mac, pos->u.vlan_mac.mac,
@@ -521,11 +530,14 @@ static int bnx2x_check_vlan_mac_add(struct bnx2x_vlan_mac_obj *o,
521 530
522/* check_del() callbacks */ 531/* check_del() callbacks */
523static struct bnx2x_vlan_mac_registry_elem * 532static struct bnx2x_vlan_mac_registry_elem *
524 bnx2x_check_mac_del(struct bnx2x_vlan_mac_obj *o, 533 bnx2x_check_mac_del(struct bnx2x *bp,
534 struct bnx2x_vlan_mac_obj *o,
525 union bnx2x_classification_ramrod_data *data) 535 union bnx2x_classification_ramrod_data *data)
526{ 536{
527 struct bnx2x_vlan_mac_registry_elem *pos; 537 struct bnx2x_vlan_mac_registry_elem *pos;
528 538
539 DP(BNX2X_MSG_SP, "Checking MAC %pM for DEL command\n", data->mac.mac);
540
529 list_for_each_entry(pos, &o->head, link) 541 list_for_each_entry(pos, &o->head, link)
530 if (!memcmp(data->mac.mac, pos->u.mac.mac, ETH_ALEN)) 542 if (!memcmp(data->mac.mac, pos->u.mac.mac, ETH_ALEN))
531 return pos; 543 return pos;
@@ -534,11 +546,14 @@ static struct bnx2x_vlan_mac_registry_elem *
534} 546}
535 547
536static struct bnx2x_vlan_mac_registry_elem * 548static struct bnx2x_vlan_mac_registry_elem *
537 bnx2x_check_vlan_del(struct bnx2x_vlan_mac_obj *o, 549 bnx2x_check_vlan_del(struct bnx2x *bp,
550 struct bnx2x_vlan_mac_obj *o,
538 union bnx2x_classification_ramrod_data *data) 551 union bnx2x_classification_ramrod_data *data)
539{ 552{
540 struct bnx2x_vlan_mac_registry_elem *pos; 553 struct bnx2x_vlan_mac_registry_elem *pos;
541 554
555 DP(BNX2X_MSG_SP, "Checking VLAN %d for DEL command\n", data->vlan.vlan);
556
542 list_for_each_entry(pos, &o->head, link) 557 list_for_each_entry(pos, &o->head, link)
543 if (data->vlan.vlan == pos->u.vlan.vlan) 558 if (data->vlan.vlan == pos->u.vlan.vlan)
544 return pos; 559 return pos;
@@ -547,11 +562,15 @@ static struct bnx2x_vlan_mac_registry_elem *
547} 562}
548 563
549static struct bnx2x_vlan_mac_registry_elem * 564static struct bnx2x_vlan_mac_registry_elem *
550 bnx2x_check_vlan_mac_del(struct bnx2x_vlan_mac_obj *o, 565 bnx2x_check_vlan_mac_del(struct bnx2x *bp,
566 struct bnx2x_vlan_mac_obj *o,
551 union bnx2x_classification_ramrod_data *data) 567 union bnx2x_classification_ramrod_data *data)
552{ 568{
553 struct bnx2x_vlan_mac_registry_elem *pos; 569 struct bnx2x_vlan_mac_registry_elem *pos;
554 570
571 DP(BNX2X_MSG_SP, "Checking VLAN_MAC (%pM, %d) for DEL command\n",
572 data->vlan_mac.mac, data->vlan_mac.vlan);
573
555 list_for_each_entry(pos, &o->head, link) 574 list_for_each_entry(pos, &o->head, link)
556 if ((data->vlan_mac.vlan == pos->u.vlan_mac.vlan) && 575 if ((data->vlan_mac.vlan == pos->u.vlan_mac.vlan) &&
557 (!memcmp(data->vlan_mac.mac, pos->u.vlan_mac.mac, 576 (!memcmp(data->vlan_mac.mac, pos->u.vlan_mac.mac,
@@ -562,7 +581,8 @@ static struct bnx2x_vlan_mac_registry_elem *
562} 581}
563 582
564/* check_move() callback */ 583/* check_move() callback */
565static bool bnx2x_check_move(struct bnx2x_vlan_mac_obj *src_o, 584static bool bnx2x_check_move(struct bnx2x *bp,
585 struct bnx2x_vlan_mac_obj *src_o,
566 struct bnx2x_vlan_mac_obj *dst_o, 586 struct bnx2x_vlan_mac_obj *dst_o,
567 union bnx2x_classification_ramrod_data *data) 587 union bnx2x_classification_ramrod_data *data)
568{ 588{
@@ -572,10 +592,10 @@ static bool bnx2x_check_move(struct bnx2x_vlan_mac_obj *src_o,
572 /* Check if we can delete the requested configuration from the first 592 /* Check if we can delete the requested configuration from the first
573 * object. 593 * object.
574 */ 594 */
575 pos = src_o->check_del(src_o, data); 595 pos = src_o->check_del(bp, src_o, data);
576 596
577 /* check if configuration can be added */ 597 /* check if configuration can be added */
578 rc = dst_o->check_add(dst_o, data); 598 rc = dst_o->check_add(bp, dst_o, data);
579 599
580 /* If this classification can not be added (is already set) 600 /* If this classification can not be added (is already set)
581 * or can't be deleted - return an error. 601 * or can't be deleted - return an error.
@@ -587,6 +607,7 @@ static bool bnx2x_check_move(struct bnx2x_vlan_mac_obj *src_o,
587} 607}
588 608
589static bool bnx2x_check_move_always_err( 609static bool bnx2x_check_move_always_err(
610 struct bnx2x *bp,
590 struct bnx2x_vlan_mac_obj *src_o, 611 struct bnx2x_vlan_mac_obj *src_o,
591 struct bnx2x_vlan_mac_obj *dst_o, 612 struct bnx2x_vlan_mac_obj *dst_o,
592 union bnx2x_classification_ramrod_data *data) 613 union bnx2x_classification_ramrod_data *data)
@@ -740,7 +761,7 @@ static void bnx2x_set_one_mac_e2(struct bnx2x *bp,
740 &rule_entry->mac.header); 761 &rule_entry->mac.header);
741 762
742 DP(BNX2X_MSG_SP, "About to %s MAC %pM for Queue %d\n", 763 DP(BNX2X_MSG_SP, "About to %s MAC %pM for Queue %d\n",
743 add ? "add" : "delete", mac, raw->cl_id); 764 (add ? "add" : "delete"), mac, raw->cl_id);
744 765
745 /* Set a MAC itself */ 766 /* Set a MAC itself */
746 bnx2x_set_fw_mac_addr(&rule_entry->mac.mac_msb, 767 bnx2x_set_fw_mac_addr(&rule_entry->mac.mac_msb,
@@ -833,7 +854,7 @@ static inline void bnx2x_vlan_mac_set_rdata_e1x(struct bnx2x *bp,
833 cfg_entry); 854 cfg_entry);
834 855
835 DP(BNX2X_MSG_SP, "%s MAC %pM CLID %d CAM offset %d\n", 856 DP(BNX2X_MSG_SP, "%s MAC %pM CLID %d CAM offset %d\n",
836 add ? "setting" : "clearing", 857 (add ? "setting" : "clearing"),
837 mac, raw->cl_id, cam_offset); 858 mac, raw->cl_id, cam_offset);
838} 859}
839 860
@@ -1152,10 +1173,9 @@ static inline int bnx2x_validate_vlan_mac_add(struct bnx2x *bp,
1152 int rc; 1173 int rc;
1153 1174
1154 /* Check the registry */ 1175 /* Check the registry */
1155 rc = o->check_add(o, &elem->cmd_data.vlan_mac.u); 1176 rc = o->check_add(bp, o, &elem->cmd_data.vlan_mac.u);
1156 if (rc) { 1177 if (rc) {
1157 DP(BNX2X_MSG_SP, "ADD command is not allowed considering " 1178 DP(BNX2X_MSG_SP, "ADD command is not allowed considering current registry state.\n");
1158 "current registry state\n");
1159 return rc; 1179 return rc;
1160 } 1180 }
1161 1181
@@ -1206,10 +1226,9 @@ static inline int bnx2x_validate_vlan_mac_del(struct bnx2x *bp,
1206 /* If this classification can not be deleted (doesn't exist) 1226 /* If this classification can not be deleted (doesn't exist)
1207 * - return a BNX2X_EXIST. 1227 * - return a BNX2X_EXIST.
1208 */ 1228 */
1209 pos = o->check_del(o, &elem->cmd_data.vlan_mac.u); 1229 pos = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u);
1210 if (!pos) { 1230 if (!pos) {
1211 DP(BNX2X_MSG_SP, "DEL command is not allowed considering " 1231 DP(BNX2X_MSG_SP, "DEL command is not allowed considering current registry state\n");
1212 "current registry state\n");
1213 return -EEXIST; 1232 return -EEXIST;
1214 } 1233 }
1215 1234
@@ -1269,9 +1288,9 @@ static inline int bnx2x_validate_vlan_mac_move(struct bnx2x *bp,
1269 * Check if we can perform this operation based on the current registry 1288 * Check if we can perform this operation based on the current registry
1270 * state. 1289 * state.
1271 */ 1290 */
1272 if (!src_o->check_move(src_o, dest_o, &elem->cmd_data.vlan_mac.u)) { 1291 if (!src_o->check_move(bp, src_o, dest_o,
1273 DP(BNX2X_MSG_SP, "MOVE command is not allowed considering " 1292 &elem->cmd_data.vlan_mac.u)) {
1274 "current registry state\n"); 1293 DP(BNX2X_MSG_SP, "MOVE command is not allowed considering current registry state\n");
1275 return -EINVAL; 1294 return -EINVAL;
1276 } 1295 }
1277 1296
@@ -1285,8 +1304,7 @@ static inline int bnx2x_validate_vlan_mac_move(struct bnx2x *bp,
1285 /* Check DEL on source */ 1304 /* Check DEL on source */
1286 query_elem.cmd_data.vlan_mac.cmd = BNX2X_VLAN_MAC_DEL; 1305 query_elem.cmd_data.vlan_mac.cmd = BNX2X_VLAN_MAC_DEL;
1287 if (src_exeq->get(src_exeq, &query_elem)) { 1306 if (src_exeq->get(src_exeq, &query_elem)) {
1288 BNX2X_ERR("There is a pending DEL command on the source " 1307 BNX2X_ERR("There is a pending DEL command on the source queue already\n");
1289 "queue already\n");
1290 return -EINVAL; 1308 return -EINVAL;
1291 } 1309 }
1292 1310
@@ -1299,8 +1317,7 @@ static inline int bnx2x_validate_vlan_mac_move(struct bnx2x *bp,
1299 /* Check ADD on destination */ 1317 /* Check ADD on destination */
1300 query_elem.cmd_data.vlan_mac.cmd = BNX2X_VLAN_MAC_ADD; 1318 query_elem.cmd_data.vlan_mac.cmd = BNX2X_VLAN_MAC_ADD;
1301 if (dest_exeq->get(dest_exeq, &query_elem)) { 1319 if (dest_exeq->get(dest_exeq, &query_elem)) {
1302 BNX2X_ERR("There is a pending ADD command on the " 1320 BNX2X_ERR("There is a pending ADD command on the destination queue already\n");
1303 "destination queue already\n");
1304 return -EINVAL; 1321 return -EINVAL;
1305 } 1322 }
1306 1323
@@ -1475,12 +1492,10 @@ static int bnx2x_optimize_vlan_mac(struct bnx2x *bp,
1475 &pos->cmd_data.vlan_mac.vlan_mac_flags)) { 1492 &pos->cmd_data.vlan_mac.vlan_mac_flags)) {
1476 if ((query.cmd_data.vlan_mac.cmd == 1493 if ((query.cmd_data.vlan_mac.cmd ==
1477 BNX2X_VLAN_MAC_ADD) && !o->put_credit(o)) { 1494 BNX2X_VLAN_MAC_ADD) && !o->put_credit(o)) {
1478 BNX2X_ERR("Failed to return the credit for the " 1495 BNX2X_ERR("Failed to return the credit for the optimized ADD command\n");
1479 "optimized ADD command\n");
1480 return -EINVAL; 1496 return -EINVAL;
1481 } else if (!o->get_credit(o)) { /* VLAN_MAC_DEL */ 1497 } else if (!o->get_credit(o)) { /* VLAN_MAC_DEL */
1482 BNX2X_ERR("Failed to recover the credit from " 1498 BNX2X_ERR("Failed to recover the credit from the optimized DEL command\n");
1483 "the optimized DEL command\n");
1484 return -EINVAL; 1499 return -EINVAL;
1485 } 1500 }
1486 } 1501 }
@@ -1546,7 +1561,7 @@ static inline int bnx2x_vlan_mac_get_registry_elem(
1546 reg_elem->vlan_mac_flags = 1561 reg_elem->vlan_mac_flags =
1547 elem->cmd_data.vlan_mac.vlan_mac_flags; 1562 elem->cmd_data.vlan_mac.vlan_mac_flags;
1548 } else /* DEL, RESTORE */ 1563 } else /* DEL, RESTORE */
1549 reg_elem = o->check_del(o, &elem->cmd_data.vlan_mac.u); 1564 reg_elem = o->check_del(bp, o, &elem->cmd_data.vlan_mac.u);
1550 1565
1551 *re = reg_elem; 1566 *re = reg_elem;
1552 return 0; 1567 return 0;
@@ -1644,7 +1659,8 @@ static int bnx2x_execute_vlan_mac(struct bnx2x *bp,
1644 cmd = elem->cmd_data.vlan_mac.cmd; 1659 cmd = elem->cmd_data.vlan_mac.cmd;
1645 if ((cmd == BNX2X_VLAN_MAC_DEL) || 1660 if ((cmd == BNX2X_VLAN_MAC_DEL) ||
1646 (cmd == BNX2X_VLAN_MAC_MOVE)) { 1661 (cmd == BNX2X_VLAN_MAC_MOVE)) {
1647 reg_elem = o->check_del(o, &elem->cmd_data.vlan_mac.u); 1662 reg_elem = o->check_del(bp, o,
1663 &elem->cmd_data.vlan_mac.u);
1648 1664
1649 WARN_ON(!reg_elem); 1665 WARN_ON(!reg_elem);
1650 1666
@@ -1675,7 +1691,7 @@ error_exit:
1675 if (!restore && 1691 if (!restore &&
1676 ((cmd == BNX2X_VLAN_MAC_ADD) || 1692 ((cmd == BNX2X_VLAN_MAC_ADD) ||
1677 (cmd == BNX2X_VLAN_MAC_MOVE))) { 1693 (cmd == BNX2X_VLAN_MAC_MOVE))) {
1678 reg_elem = o->check_del(cam_obj, 1694 reg_elem = o->check_del(bp, cam_obj,
1679 &elem->cmd_data.vlan_mac.u); 1695 &elem->cmd_data.vlan_mac.u);
1680 if (reg_elem) { 1696 if (reg_elem) {
1681 list_del(&reg_elem->link); 1697 list_del(&reg_elem->link);
@@ -1750,8 +1766,7 @@ int bnx2x_config_vlan_mac(
1750 rc = 1; 1766 rc = 1;
1751 1767
1752 if (test_bit(RAMROD_DRV_CLR_ONLY, ramrod_flags)) { 1768 if (test_bit(RAMROD_DRV_CLR_ONLY, ramrod_flags)) {
1753 DP(BNX2X_MSG_SP, "RAMROD_DRV_CLR_ONLY requested: " 1769 DP(BNX2X_MSG_SP, "RAMROD_DRV_CLR_ONLY requested: clearing a pending bit.\n");
1754 "clearing a pending bit.\n");
1755 raw->clear_pending(raw); 1770 raw->clear_pending(raw);
1756 } 1771 }
1757 1772
@@ -2149,12 +2164,10 @@ static int bnx2x_set_rx_mode_e1x(struct bnx2x *bp,
2149 mac_filters->unmatched_unicast & ~mask; 2164 mac_filters->unmatched_unicast & ~mask;
2150 2165
2151 DP(BNX2X_MSG_SP, "drop_ucast 0x%x\ndrop_mcast 0x%x\n accp_ucast 0x%x\n" 2166 DP(BNX2X_MSG_SP, "drop_ucast 0x%x\ndrop_mcast 0x%x\n accp_ucast 0x%x\n"
2152 "accp_mcast 0x%x\naccp_bcast 0x%x\n", 2167 "accp_mcast 0x%x\naccp_bcast 0x%x\n",
2153 mac_filters->ucast_drop_all, 2168 mac_filters->ucast_drop_all, mac_filters->mcast_drop_all,
2154 mac_filters->mcast_drop_all, 2169 mac_filters->ucast_accept_all, mac_filters->mcast_accept_all,
2155 mac_filters->ucast_accept_all, 2170 mac_filters->bcast_accept_all);
2156 mac_filters->mcast_accept_all,
2157 mac_filters->bcast_accept_all);
2158 2171
2159 /* write the MAC filter structure*/ 2172 /* write the MAC filter structure*/
2160 __storm_memset_mac_filters(bp, mac_filters, p->func_id); 2173 __storm_memset_mac_filters(bp, mac_filters, p->func_id);
@@ -2303,8 +2316,7 @@ static int bnx2x_set_rx_mode_e2(struct bnx2x *bp,
2303 */ 2316 */
2304 bnx2x_rx_mode_set_rdata_hdr_e2(p->cid, &data->header, rule_idx); 2317 bnx2x_rx_mode_set_rdata_hdr_e2(p->cid, &data->header, rule_idx);
2305 2318
2306 DP(BNX2X_MSG_SP, "About to configure %d rules, rx_accept_flags 0x%lx, " 2319 DP(BNX2X_MSG_SP, "About to configure %d rules, rx_accept_flags 0x%lx, tx_accept_flags 0x%lx\n",
2307 "tx_accept_flags 0x%lx\n",
2308 data->header.rule_cnt, p->rx_accept_flags, 2320 data->header.rule_cnt, p->rx_accept_flags,
2309 p->tx_accept_flags); 2321 p->tx_accept_flags);
2310 2322
@@ -2437,8 +2449,8 @@ static int bnx2x_mcast_enqueue_cmd(struct bnx2x *bp,
2437 if (!new_cmd) 2449 if (!new_cmd)
2438 return -ENOMEM; 2450 return -ENOMEM;
2439 2451
2440 DP(BNX2X_MSG_SP, "About to enqueue a new %d command. " 2452 DP(BNX2X_MSG_SP, "About to enqueue a new %d command. macs_list_len=%d\n",
2441 "macs_list_len=%d\n", cmd, macs_list_len); 2453 cmd, macs_list_len);
2442 2454
2443 INIT_LIST_HEAD(&new_cmd->data.macs_head); 2455 INIT_LIST_HEAD(&new_cmd->data.macs_head);
2444 2456
@@ -2653,7 +2665,7 @@ static inline void bnx2x_mcast_hdl_pending_add_e2(struct bnx2x *bp,
2653 cnt++; 2665 cnt++;
2654 2666
2655 DP(BNX2X_MSG_SP, "About to configure %pM mcast MAC\n", 2667 DP(BNX2X_MSG_SP, "About to configure %pM mcast MAC\n",
2656 pmac_pos->mac); 2668 pmac_pos->mac);
2657 2669
2658 list_del(&pmac_pos->link); 2670 list_del(&pmac_pos->link);
2659 2671
@@ -3177,8 +3189,8 @@ static int bnx2x_mcast_validate_e1(struct bnx2x *bp,
3177 * matter. 3189 * matter.
3178 */ 3190 */
3179 if (p->mcast_list_len > o->max_cmd_len) { 3191 if (p->mcast_list_len > o->max_cmd_len) {
3180 BNX2X_ERR("Can't configure more than %d multicast MACs" 3192 BNX2X_ERR("Can't configure more than %d multicast MACs on 57710\n",
3181 "on 57710\n", o->max_cmd_len); 3193 o->max_cmd_len);
3182 return -EINVAL; 3194 return -EINVAL;
3183 } 3195 }
3184 /* Every configured MAC should be cleared if DEL command is 3196 /* Every configured MAC should be cleared if DEL command is
@@ -3426,7 +3438,7 @@ static inline int bnx2x_mcast_refresh_registry_e1(struct bnx2x *bp,
3426 &data->config_table[i].lsb_mac_addr, 3438 &data->config_table[i].lsb_mac_addr,
3427 elem->mac); 3439 elem->mac);
3428 DP(BNX2X_MSG_SP, "Adding registry entry for [%pM]\n", 3440 DP(BNX2X_MSG_SP, "Adding registry entry for [%pM]\n",
3429 elem->mac); 3441 elem->mac);
3430 list_add_tail(&elem->link, 3442 list_add_tail(&elem->link,
3431 &o->registry.exact_match.macs); 3443 &o->registry.exact_match.macs);
3432 } 3444 }
@@ -3567,9 +3579,8 @@ int bnx2x_config_mcast(struct bnx2x *bp,
3567 if ((!p->mcast_list_len) && (!o->check_sched(o))) 3579 if ((!p->mcast_list_len) && (!o->check_sched(o)))
3568 return 0; 3580 return 0;
3569 3581
3570 DP(BNX2X_MSG_SP, "o->total_pending_num=%d p->mcast_list_len=%d " 3582 DP(BNX2X_MSG_SP, "o->total_pending_num=%d p->mcast_list_len=%d o->max_cmd_len=%d\n",
3571 "o->max_cmd_len=%d\n", o->total_pending_num, 3583 o->total_pending_num, p->mcast_list_len, o->max_cmd_len);
3572 p->mcast_list_len, o->max_cmd_len);
3573 3584
3574 /* Enqueue the current command to the pending list if we can't complete 3585 /* Enqueue the current command to the pending list if we can't complete
3575 * it in the current iteration 3586 * it in the current iteration
@@ -4294,9 +4305,8 @@ static int bnx2x_queue_comp_cmd(struct bnx2x *bp,
4294 unsigned long cur_pending = o->pending; 4305 unsigned long cur_pending = o->pending;
4295 4306
4296 if (!test_and_clear_bit(cmd, &cur_pending)) { 4307 if (!test_and_clear_bit(cmd, &cur_pending)) {
4297 BNX2X_ERR("Bad MC reply %d for queue %d in state %d " 4308 BNX2X_ERR("Bad MC reply %d for queue %d in state %d pending 0x%lx, next_state %d\n",
4298 "pending 0x%lx, next_state %d\n", cmd, 4309 cmd, o->cids[BNX2X_PRIMARY_CID_INDEX],
4299 o->cids[BNX2X_PRIMARY_CID_INDEX],
4300 o->state, cur_pending, o->next_state); 4310 o->state, cur_pending, o->next_state);
4301 return -EINVAL; 4311 return -EINVAL;
4302 } 4312 }
@@ -4308,13 +4318,13 @@ static int bnx2x_queue_comp_cmd(struct bnx2x *bp,
4308 BNX2X_ERR("illegal value for next tx_only: %d. max cos was %d", 4318 BNX2X_ERR("illegal value for next tx_only: %d. max cos was %d",
4309 o->next_tx_only, o->max_cos); 4319 o->next_tx_only, o->max_cos);
4310 4320
4311 DP(BNX2X_MSG_SP, "Completing command %d for queue %d, " 4321 DP(BNX2X_MSG_SP,
4312 "setting state to %d\n", cmd, 4322 "Completing command %d for queue %d, setting state to %d\n",
4313 o->cids[BNX2X_PRIMARY_CID_INDEX], o->next_state); 4323 cmd, o->cids[BNX2X_PRIMARY_CID_INDEX], o->next_state);
4314 4324
4315 if (o->next_tx_only) /* print num tx-only if any exist */ 4325 if (o->next_tx_only) /* print num tx-only if any exist */
4316 DP(BNX2X_MSG_SP, "primary cid %d: num tx-only cons %d\n", 4326 DP(BNX2X_MSG_SP, "primary cid %d: num tx-only cons %d\n",
4317 o->cids[BNX2X_PRIMARY_CID_INDEX], o->next_tx_only); 4327 o->cids[BNX2X_PRIMARY_CID_INDEX], o->next_tx_only);
4318 4328
4319 o->state = o->next_state; 4329 o->state = o->next_state;
4320 o->num_tx_only = o->next_tx_only; 4330 o->num_tx_only = o->next_tx_only;
@@ -4529,8 +4539,10 @@ static void bnx2x_q_fill_setup_tx_only(struct bnx2x *bp,
4529 &data->tx, 4539 &data->tx,
4530 &cmd_params->params.tx_only.flags); 4540 &cmd_params->params.tx_only.flags);
4531 4541
4532 DP(BNX2X_MSG_SP, "cid %d, tx bd page lo %x hi %x\n",cmd_params->q_obj->cids[0], 4542 DP(BNX2X_MSG_SP, "cid %d, tx bd page lo %x hi %x",
4533 data->tx.tx_bd_page_base.lo, data->tx.tx_bd_page_base.hi); 4543 cmd_params->q_obj->cids[0],
4544 data->tx.tx_bd_page_base.lo,
4545 data->tx.tx_bd_page_base.hi);
4534} 4546}
4535 4547
4536/** 4548/**
@@ -4677,10 +4689,8 @@ static inline int bnx2x_q_send_setup_tx_only(struct bnx2x *bp,
4677 /* Fill the ramrod data */ 4689 /* Fill the ramrod data */
4678 bnx2x_q_fill_setup_tx_only(bp, params, rdata); 4690 bnx2x_q_fill_setup_tx_only(bp, params, rdata);
4679 4691
4680 DP(BNX2X_MSG_SP, "sending tx-only ramrod: cid %d, client-id %d," 4692 DP(BNX2X_MSG_SP, "sending tx-only ramrod: cid %d, client-id %d, sp-client id %d, cos %d\n",
4681 "sp-client id %d, cos %d\n", 4693 o->cids[cid_index], rdata->general.client_id,
4682 o->cids[cid_index],
4683 rdata->general.client_id,
4684 rdata->general.sp_client_id, rdata->general.cos); 4694 rdata->general.sp_client_id, rdata->general.cos);
4685 4695
4686 /* 4696 /*
@@ -5222,9 +5232,9 @@ static inline int bnx2x_func_state_change_comp(struct bnx2x *bp,
5222 unsigned long cur_pending = o->pending; 5232 unsigned long cur_pending = o->pending;
5223 5233
5224 if (!test_and_clear_bit(cmd, &cur_pending)) { 5234 if (!test_and_clear_bit(cmd, &cur_pending)) {
5225 BNX2X_ERR("Bad MC reply %d for func %d in state %d " 5235 BNX2X_ERR("Bad MC reply %d for func %d in state %d pending 0x%lx, next_state %d\n",
5226 "pending 0x%lx, next_state %d\n", cmd, BP_FUNC(bp), 5236 cmd, BP_FUNC(bp), o->state,
5227 o->state, cur_pending, o->next_state); 5237 cur_pending, o->next_state);
5228 return -EINVAL; 5238 return -EINVAL;
5229 } 5239 }
5230 5240