forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/net/ethernet/chelsio/cxgb3/t3_hw.c
....@@ -1082,7 +1082,7 @@
10821082 CH_WARN(adapter, "found newer FW version(%u.%u), "
10831083 "driver compiled for version %u.%u\n", major, minor,
10841084 FW_VERSION_MAJOR, FW_VERSION_MINOR);
1085
- return 0;
1085
+ return 0;
10861086 }
10871087 return -EINVAL;
10881088 }
....@@ -2195,7 +2195,7 @@
21952195
21962196 /**
21972197 * clear_sge_ctxt - completely clear an SGE context
2198
- * @adapter: the adapter
2198
+ * @adap: the adapter
21992199 * @id: the context id
22002200 * @type: the context type
22012201 *
....@@ -2484,6 +2484,7 @@
24842484 * @adapter: the adapter
24852485 * @id: the context id
24862486 * @op: the operation to perform
2487
+ * @credits: credit value to write
24872488 *
24882489 * Perform the selected operation on an SGE completion queue context.
24892490 * The caller is responsible for ensuring only one context operation
....@@ -2885,7 +2886,7 @@
28852886 * t3_load_mtus - write the MTU and congestion control HW tables
28862887 * @adap: the adapter
28872888 * @mtus: the unrestricted values for the MTU table
2888
- * @alphs: the values for the congestion control alpha parameter
2889
+ * @alpha: the values for the congestion control alpha parameter
28892890 * @beta: the values for the congestion control beta parameter
28902891 * @mtu_cap: the maximum permitted effective MTU
28912892 *
....@@ -2966,7 +2967,7 @@
29662967
29672968 /**
29682969 * t3_set_proto_sram - set the contents of the protocol sram
2969
- * @adapter: the adapter
2970
+ * @adap: the adapter
29702971 * @data: the protocol image
29712972 *
29722973 * Write the contents of the protocol SRAM.
....@@ -3483,7 +3484,7 @@
34833484 /**
34843485 * init_link_config - initialize a link's SW state
34853486 * @lc: structure holding the link state
3486
- * @ai: information about the current card
3487
+ * @caps: information about the current card
34873488 *
34883489 * Initializes the SW state maintained for each link, including the link's
34893490 * capabilities and default speed/duplex/flow-control/autonegotiation
....@@ -3619,7 +3620,7 @@
36193620
36203621 static int init_parity(struct adapter *adap)
36213622 {
3622
- int i, err, addr;
3623
+ int i, err, addr;
36233624
36243625 if (t3_read_reg(adap, A_SG_CONTEXT_CMD) & F_CONTEXT_CMD_BUSY)
36253626 return -EBUSY;
....@@ -3677,6 +3678,8 @@
36773678 MAC_STATS_ACCUM_SECS : (MAC_STATS_ACCUM_SECS * 10);
36783679 adapter->params.pci.vpd_cap_addr =
36793680 pci_find_capability(adapter->pdev, PCI_CAP_ID_VPD);
3681
+ if (!adapter->params.pci.vpd_cap_addr)
3682
+ return -ENODEV;
36803683 ret = get_vpd_params(adapter, &adapter->params.vpd);
36813684 if (ret < 0)
36823685 return ret;
....@@ -3806,6 +3809,6 @@
38063809 p->phy.ops->power_down(&p->phy, 1);
38073810 }
38083811
3809
-return 0;
3812
+ return 0;
38103813 }
38113814