Skip to content

Commit 120c8a4

Browse files
committed
Merge tag 'fpga-late-fixes-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-linus
Moritz writes: FPGA manager fixes for 5.8 Here are two (late) dfl fixes for the the 5.8 release. Matthew's fix addresses an issue in the reset of a port. Xu'x fix addresses a linter warning. All patches have been reviewed on the mailing list, and have been in the last few linux-next releases (as part of my fixes branch) without issues. Signed-off-by: Moritz Fischer <[email protected]> * tag 'fpga-late-fixes-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga: fpga: dfl: fix bug in port reset handshake fpga: dfl: pci: reduce the scope of variable 'ret'
2 parents b279b1f + 8614afd commit 120c8a4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/fpga/dfl-afu-main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ int __afu_port_disable(struct platform_device *pdev)
8383
* on this port and minimum soft reset pulse width has elapsed.
8484
* Driver polls port_soft_reset_ack to determine if reset done by HW.
8585
*/
86-
if (readq_poll_timeout(base + PORT_HDR_CTRL, v, v & PORT_CTRL_SFTRST,
86+
if (readq_poll_timeout(base + PORT_HDR_CTRL, v,
87+
v & PORT_CTRL_SFTRST_ACK,
8788
RST_POLL_INVL, RST_POLL_TIMEOUT)) {
8889
dev_err(&pdev->dev, "timeout, fail to reset device\n");
8990
return -ETIMEDOUT;

drivers/fpga/dfl-pci.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@ static int cci_pci_sriov_configure(struct pci_dev *pcidev, int num_vfs)
227227
{
228228
struct cci_drvdata *drvdata = pci_get_drvdata(pcidev);
229229
struct dfl_fpga_cdev *cdev = drvdata->cdev;
230-
int ret = 0;
231230

232231
if (!num_vfs) {
233232
/*
@@ -239,6 +238,8 @@ static int cci_pci_sriov_configure(struct pci_dev *pcidev, int num_vfs)
239238
dfl_fpga_cdev_config_ports_pf(cdev);
240239

241240
} else {
241+
int ret;
242+
242243
/*
243244
* before enable SRIOV, put released ports into VF access mode
244245
* first of all.

0 commit comments

Comments
 (0)