Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ce66f9c authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'xgene-next'



Iyappan Subramanian says:

====================
Fix warning and issues

This patch set fixes the following warning and issues,

  1. Fix compiler warnings
  	- drivers: net: xgene: Fix compiler warnings
  2. unmap DMA memory on xgene_Enet_delete_bufpoool()
	- drivers: net: xgene: fix: Add dma_unmap_single
  3. Delete descriptor rings and buffer pools on error
	- drivers: net: xgene: fix: Delete descriptor rings and buffer pools
  4. Fix error desconstruction on probe()
 	- drivers: net: xgene: Fix error deconstruction path
  5. Fix RSS indirection table fields
 	- drivers: net: xgene: Fix RSS indirection table fields
  6. Change the port init sequence as per hardware specification
	- drivers: net: xgene: Change port init sequence
  7. Fix link not recovered after link is down issue
	- drivers: net: xgene: XFI PCS reset when link is down
  8. Fix link up is reported when no SFP+ module is plugged in issue
	- drivers: net: xgene: Poll link status via GPIO
	- dtb: xgene: Add rxlos-gpios property
	- Documentation: dtb: xgene: Add rxlos GPIO mapping
  9. Fix backward compatibility when used with older driver
	- drivers: net: xgene: Fix backward compatibility
	- dtb: xgene: Fix backward compatibility

v2: Address review comments from v1
	- Fixed compiler warnings
	- Removed kbuild fix patch, since Arnd submitted the same
	- Changed Kconfig to select GPIOLIB (to fix kbuild warning)
	- Added rxlos-gpio documentation
	- Fixed backward compatibility with older driver

v1:
	- Initial version
====================

Signed-off-by: default avatarIyappan Subramanian <isubramanian@apm.com>
Tested-by: default avatarFushen Chen <fchen@apm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 1c238763 5ac6caab
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -47,6 +47,9 @@ Optional properties:
	    Valid values are between 0 to 7, that maps to
	    273, 589, 899, 1222, 1480, 1806, 2147, 2464 ps
	    Default value is 2, which corresponds to 899 ps
- rxlos-gpios: Input gpio from SFP+ module to indicate availability of
	       incoming signal.


Example:
	menetclk: menetclk {
+1 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@

&xgenet {
	status = "ok";
	rxlos-gpios = <&sbgpio 12 1>;
};

&mmc0 {
+1 −1
Original line number Diff line number Diff line
@@ -923,7 +923,7 @@
			/* mac address will be overwritten by the bootloader */
			local-mac-address = [00 00 00 00 00 00];
			phy-connection-type = "rgmii";
			phy-handle = <&menet0phy>,<&menetphy>;
			phy-handle = <&menetphy>,<&menet0phy>;
			mdio {
				compatible = "apm,xgene-mdio";
				#address-cells = <1>;
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ config NET_XGENE
	depends on ARCH_XGENE || COMPILE_TEST
	select PHYLIB
	select MDIO_XGENE
	select GPIOLIB
	help
	  This is the Ethernet driver for the on-chip ethernet interface on the
	  APM X-Gene SoC.
+12 −5
Original line number Diff line number Diff line
@@ -32,13 +32,20 @@ static void xgene_cle_sband_to_hw(u8 frag, enum xgene_cle_prot_version ver,
		SET_VAL(SB_HDRLEN, len);
}

static void xgene_cle_idt_to_hw(u32 dstqid, u32 fpsel,
static void xgene_cle_idt_to_hw(struct xgene_enet_pdata *pdata,
				u32 dstqid, u32 fpsel,
				u32 nfpsel, u32 *idt_reg)
{
	if (pdata->enet_id == XGENE_ENET1) {
		*idt_reg = SET_VAL(IDT_DSTQID, dstqid) |
			   SET_VAL(IDT_FPSEL1, fpsel)  |
			   SET_VAL(IDT_NFPSEL1, nfpsel);
	} else {
		*idt_reg = SET_VAL(IDT_DSTQID, dstqid) |
			   SET_VAL(IDT_FPSEL, fpsel)   |
			   SET_VAL(IDT_NFPSEL, nfpsel);
	}
}

static void xgene_cle_dbptr_to_hw(struct xgene_enet_pdata *pdata,
				  struct xgene_cle_dbptr *dbptr, u32 *buf)
@@ -344,7 +351,7 @@ static int xgene_cle_set_rss_idt(struct xgene_enet_pdata *pdata)
		nfpsel = 0;
		idt_reg = 0;

		xgene_cle_idt_to_hw(dstqid, fpsel, nfpsel, &idt_reg);
		xgene_cle_idt_to_hw(pdata, dstqid, fpsel, nfpsel, &idt_reg);
		ret = xgene_cle_dram_wr(&pdata->cle, &idt_reg, 1, i,
					RSS_IDT, CLE_CMD_WR);
		if (ret)
Loading