<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/faraday, branch linux-4.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-11-24T12:02:59Z</updated>
<entry>
<title>net: ftgmac100: Fix crash when removing driver</title>
<updated>2020-11-24T12:02:59Z</updated>
<author>
<name>Joel Stanley</name>
</author>
<published>2020-11-17T02:44:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=808aadeddccba2e7b3bf3453e743fdb08d0bedba'/>
<id>urn:sha1:808aadeddccba2e7b3bf3453e743fdb08d0bedba</id>
<content type='text'>
[ Upstream commit 3d5179458d22dc0b4fdc724e4bed4231a655112a ]

When removing the driver we would hit BUG_ON(!list_empty(&amp;dev-&gt;ptype_specific))
in net/core/dev.c due to still having the NC-SI packet handler
registered.

 # echo 1e660000.ethernet &gt; /sys/bus/platform/drivers/ftgmac100/unbind
  ------------[ cut here ]------------
  kernel BUG at net/core/dev.c:10254!
  Internal error: Oops - BUG: 0 [#1] SMP ARM
  CPU: 0 PID: 115 Comm: sh Not tainted 5.10.0-rc3-next-20201111-00007-g02e0365710c4 #46
  Hardware name: Generic DT based system
  PC is at netdev_run_todo+0x314/0x394
  LR is at cpumask_next+0x20/0x24
  pc : [&lt;806f5830&gt;]    lr : [&lt;80863cb0&gt;]    psr: 80000153
  sp : 855bbd58  ip : 00000001  fp : 855bbdac
  r10: 80c03d00  r9 : 80c06228  r8 : 81158c54
  r7 : 00000000  r6 : 80c05dec  r5 : 80c05d18  r4 : 813b9280
  r3 : 813b9054  r2 : 8122c470  r1 : 00000002  r0 : 00000002
  Flags: Nzcv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment none
  Control: 00c5387d  Table: 85514008  DAC: 00000051
  Process sh (pid: 115, stack limit = 0x7cb5703d)
 ...
  Backtrace:
  [&lt;806f551c&gt;] (netdev_run_todo) from [&lt;80707eec&gt;] (rtnl_unlock+0x18/0x1c)
   r10:00000051 r9:854ed710 r8:81158c54 r7:80c76bb0 r6:81158c10 r5:8115b410
   r4:813b9000
  [&lt;80707ed4&gt;] (rtnl_unlock) from [&lt;806f5db8&gt;] (unregister_netdev+0x2c/0x30)
  [&lt;806f5d8c&gt;] (unregister_netdev) from [&lt;805a8180&gt;] (ftgmac100_remove+0x20/0xa8)
   r5:8115b410 r4:813b9000
  [&lt;805a8160&gt;] (ftgmac100_remove) from [&lt;805355e4&gt;] (platform_drv_remove+0x34/0x4c)

Fixes: bd466c3fb5a4 ("net/faraday: Support NCSI mode")
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Link: https://lore.kernel.org/r/20201117024448.1170761-1-joel@jms.id.au
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: faraday: ftmac100: remove netif_running(netdev) check before disabling interrupts</title>
<updated>2018-12-13T08:20:26Z</updated>
<author>
<name>Vincent Chen</name>
</author>
<published>2018-11-21T01:38:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=94d9befeaabe06ca6d352b8613905bd30f84b684'/>
<id>urn:sha1:94d9befeaabe06ca6d352b8613905bd30f84b684</id>
<content type='text'>
[ Upstream commit 426a593e641ebf0d9288f0a2fcab644a86820220 ]

In the original ftmac100_interrupt(), the interrupts are only disabled when
the condition "netif_running(netdev)" is true. However, this condition
causes kerenl hang in the following case. When the user requests to
disable the network device, kernel will clear the bit __LINK_STATE_START
from the dev-&gt;state and then call the driver's ndo_stop function. Network
device interrupts are not blocked during this process. If an interrupt
occurs between clearing __LINK_STATE_START and stopping network device,
kernel cannot disable the interrupts due to the condition
"netif_running(netdev)" in the ISR. Hence, kernel will hang due to the
continuous interruption of the network device.

In order to solve the above problem, the interrupts of the network device
should always be disabled in the ISR without being restricted by the
condition "netif_running(netdev)".

[V2]
Remove unnecessary curly braces.

Signed-off-by: Vincent Chen &lt;vincentc@andestech.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net/faraday: Add missing include of of.h</title>
<updated>2018-03-22T08:17:46Z</updated>
<author>
<name>Andrew Lunn</name>
</author>
<published>2017-04-02T18:20:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e09b864df341b5c9321593514f173d8a049952b'/>
<id>urn:sha1:6e09b864df341b5c9321593514f173d8a049952b</id>
<content type='text'>
[ Upstream commit d39004ab136ebb6949a7dda9d24376f3d6209295 ]

Breaking the include loop netdevice.h, dsa.h, devlink.h broke this
driver, it depends on includes brought in by these headers. Adding
linux/of.h fixes it.

Fixes: ed0e39e97d34 ("net: break include loop netdevice.h, dsa.h, devlink.h")
Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@microsoft.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net/faraday: Stop NCSI device on shutdown</title>
<updated>2016-10-04T06:11:51Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2016-10-04T00:25:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2c15f25b2923435515298589dcaa2eace6a948c1'/>
<id>urn:sha1:2c15f25b2923435515298589dcaa2eace6a948c1</id>
<content type='text'>
This stops NCSI device when closing the network device so that the
NCSI device can be reenabled later.

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/faraday: Mask out PHYSTS_CHG interrupt</title>
<updated>2016-09-22T07:31:14Z</updated>
<author>
<name>Joel Stanley</name>
</author>
<published>2016-09-21T23:05:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=edcd692fe4816ba6cb240b7a1d8b984ee7082763'/>
<id>urn:sha1:edcd692fe4816ba6cb240b7a1d8b984ee7082763</id>
<content type='text'>
The PHYSTS_CHG (the ftgmac100's PHY IRQ) is telling the system to go
look at the PHY registers for a link status change.

The interrupt was causing issues on Aspeed SoC where some board designs
had an active high configuration, some active low, and in some cases
repurposed for other functions. When misconfigured Linux would chew 100%
of CPU cycles servicing interrupts:

 [   20.280000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG
 [   20.280000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG
 [   20.280000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG
 [   20.300000] ftgmac100 1e660000.ethernet eth0: [ISR] = 0x200: PHYSTS_CHG

While in the ftgmac100 IP can be configured for high, low and edge
sensitivity the current driver always polls the PHY, so we chose to mask
out the interrupt.

See https://patchwork.ozlabs.org/patch/672099/ for more discussion.

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/faraday: Configure old MDIO interface on Aspeed SoCs</title>
<updated>2016-09-22T07:31:14Z</updated>
<author>
<name>Joel Stanley</name>
</author>
<published>2016-09-21T23:05:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e07dc63ba22df2d8bc931821b22938d4ce37a934'/>
<id>urn:sha1:e07dc63ba22df2d8bc931821b22938d4ce37a934</id>
<content type='text'>
The Aspeed SoCs have a new MDIO interface as an option in the G4 and G5
SoCs. The old one is still available, so select it in order to remain
compatible with the ftgmac100 driver.

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/faraday: Clear stale interrupts</title>
<updated>2016-09-22T07:31:14Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2016-09-21T23:05:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=08c9c126004e999f0c05b369d1e0cc757e6040cc'/>
<id>urn:sha1:08c9c126004e999f0c05b369d1e0cc757e6040cc</id>
<content type='text'>
There is stale interrupt (PHYSTS_CHG in ISR, bit#6 in 0x0) from
the bootloader (uboot) when enabling the MAC. The stale interrupts
aren't part of kernel and should be cleared.

This clears the stale interrupts in ISR (0x0) when enabling the MAC.

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/faraday: Adapt for Aspeed SoCs</title>
<updated>2016-09-22T07:31:14Z</updated>
<author>
<name>Joel Stanley</name>
</author>
<published>2016-09-21T23:05:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2a0ab8ebbec634127987fc8dbbd09a7fd7274e3d'/>
<id>urn:sha1:2a0ab8ebbec634127987fc8dbbd09a7fd7274e3d</id>
<content type='text'>
The RXDES and TXDES registers bits in the ftgmac100 indicates EDO{R,T}R
at bit position 15 for the Faraday Tech IP. However, the version of this
IP present in the Aspeed SoCs has these bits at position 30 in the
registers.

It appers that ast2400 SoCs support both positions, with the 15th bit
marked as reserved but still functional. In the ast2500 this bit is
reused for another function, so we need a work around.

This was confirmed with engineers from Aspeed that using bit 30 is
correct for both the ast2400 and ast2500 SoCs.

Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/faraday: Make EDO{R,T}R bits configurable</title>
<updated>2016-09-22T07:31:14Z</updated>
<author>
<name>Andrew Jeffery</name>
</author>
<published>2016-09-21T23:04:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7906a4da0ef845d01e76f2187c23cc71ae00fa1d'/>
<id>urn:sha1:7906a4da0ef845d01e76f2187c23cc71ae00fa1d</id>
<content type='text'>
These bits are #defined at a fixed location. In order to support future
hardware that has chosen to move these bits around move the bits into a
member of the struct ftgmac100.

Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net/faraday: Separate rx page storage from rxdesc</title>
<updated>2016-09-22T07:31:14Z</updated>
<author>
<name>Andrew Jeffery</name>
</author>
<published>2016-09-21T23:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ada66b54c44add8702612940a08d077b4d6ecd0e'/>
<id>urn:sha1:ada66b54c44add8702612940a08d077b4d6ecd0e</id>
<content type='text'>
The ftgmac100 hardware revision in e.g. the Aspeed AST2500 no longer
reserves all bits in RXDES#2 but instead uses the bottom 16 bits to
store MAC frame metadata. Avoid corruption by shifting struct page
pointers out to their own member in struct ftgmac100.

Signed-off-by: Andrew Jeffery &lt;andrew@aj.id.au&gt;
Signed-off-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
