<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/net/ethernet/micrel, 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>2022-11-03T14:49:19Z</updated>
<entry>
<title>net: ksz884x: fix missing pci_disable_device() on error in pcidev_init()</title>
<updated>2022-11-03T14:49:19Z</updated>
<author>
<name>Yang Yingliang</name>
</author>
<published>2022-10-24T13:13:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8aa3aafe641f57e4e76a14fcb9ded1955edadc67'/>
<id>urn:sha1:8aa3aafe641f57e4e76a14fcb9ded1955edadc67</id>
<content type='text'>
[ Upstream commit 5da6d65590a0698199df44d095e54b0ed1708178 ]

pci_disable_device() need be called while module exiting, switch to use
pcim_enable(), pci_disable_device() will be called in pcim_release()
while unbinding device.

Fixes: 8ca86fd83eae ("net: Micrel KSZ8841/2 PCI Ethernet driver")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Link: https://lore.kernel.org/r/20221024131338.2848959-1-yangyingliang@huawei.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: micrel: fix KS8851_MLL Kconfig</title>
<updated>2022-04-20T07:06:45Z</updated>
<author>
<name>Randy Dunlap</name>
</author>
<published>2022-04-01T05:42:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50ddf451d2255979971b7274ba98debeec211aa1'/>
<id>urn:sha1:50ddf451d2255979971b7274ba98debeec211aa1</id>
<content type='text'>
[ Upstream commit c3efcedd272aa6dd5929e20cf902a52ddaa1197a ]

KS8851_MLL selects MICREL_PHY, which depends on PTP_1588_CLOCK_OPTIONAL,
so make KS8851_MLL also depend on PTP_1588_CLOCK_OPTIONAL since
'select' does not follow any dependency chains.

Fixes kconfig warning and build errors:

WARNING: unmet direct dependencies detected for MICREL_PHY
  Depends on [m]: NETDEVICES [=y] &amp;&amp; PHYLIB [=y] &amp;&amp; PTP_1588_CLOCK_OPTIONAL [=m]
  Selected by [y]:
  - KS8851_MLL [=y] &amp;&amp; NETDEVICES [=y] &amp;&amp; ETHERNET [=y] &amp;&amp; NET_VENDOR_MICREL [=y] &amp;&amp; HAS_IOMEM [=y]

ld: drivers/net/phy/micrel.o: in function `lan8814_ts_info':
micrel.c:(.text+0xb35): undefined reference to `ptp_clock_index'
ld: drivers/net/phy/micrel.o: in function `lan8814_probe':
micrel.c:(.text+0x2586): undefined reference to `ptp_clock_register'

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Jakub Kicinski &lt;kuba@kernel.org&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.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: micrel: check return value after calling platform_get_resource()</title>
<updated>2021-07-20T14:21:07Z</updated>
<author>
<name>Yang Yingliang</name>
</author>
<published>2021-06-07T14:55:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a81f53bb7c66c034ed74e82b9bf9818a5e2f32c'/>
<id>urn:sha1:1a81f53bb7c66c034ed74e82b9bf9818a5e2f32c</id>
<content type='text'>
[ Upstream commit 20f1932e2282c58cb5ac59517585206cf5b385ae ]

It will cause null-ptr-deref if platform_get_resource() returns NULL,
we need check the return value.

Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.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: ks8851-ml: Fix IO operations, again</title>
<updated>2020-04-02T15:20:40Z</updated>
<author>
<name>Marek Vasut</name>
</author>
<published>2020-03-25T14:25:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8b1d5cd9c79c412f8bc845a6d64d12107c200480'/>
<id>urn:sha1:8b1d5cd9c79c412f8bc845a6d64d12107c200480</id>
<content type='text'>
commit 8262e6f9b1034ede34548a04dec4c302d92c9497 upstream.

This patch reverts 58292104832f ("net: ks8851-ml: Fix 16-bit IO operation")
and edacb098ea9c ("net: ks8851-ml: Fix 16-bit data access"), because it
turns out these were only necessary due to buggy hardware. This patch adds
a check for such a buggy hardware to prevent any such mistakes again.

While working further on the KS8851 driver, it came to light that the
KS8851-16MLL is capable of switching bus endianness by a hardware strap,
EESK pin. If this strap is incorrect, the IO accesses require such endian
swapping as is being reverted by this patch. Such swapping also impacts
the performance significantly.

Hence, in addition to removing it, detect that the hardware is broken,
report to user, and fail to bind with such hardware.

Fixes: 58292104832f ("net: ks8851-ml: Fix 16-bit IO operation")
Fixes: edacb098ea9c ("net: ks8851-ml: Fix 16-bit data access")
Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Petr Stetiar &lt;ynezz@true.cz&gt;
Cc: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: ks8851-ml: Fix IRQ handling and locking</title>
<updated>2020-03-20T08:07:57Z</updated>
<author>
<name>Marek Vasut</name>
</author>
<published>2020-02-23T13:38:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4f1547a774ddefb1144c09a9e4a9b8ca1f1caff7'/>
<id>urn:sha1:4f1547a774ddefb1144c09a9e4a9b8ca1f1caff7</id>
<content type='text'>
[ Upstream commit 44343418d0f2f623cb9da6f5000df793131cbe3b ]

The KS8851 requires that packet RX and TX are mutually exclusive.
Currently, the driver hopes to achieve this by disabling interrupt
from the card by writing the card registers and by disabling the
interrupt on the interrupt controller. This however is racy on SMP.

Replace this approach by expanding the spinlock used around the
ks_start_xmit() TX path to ks_irq() RX path to assure true mutual
exclusion and remove the interrupt enabling/disabling, which is
now not needed anymore. Furthermore, disable interrupts also in
ks_net_stop(), which was missing before.

Note that a massive improvement here would be to re-use the KS8851
driver approach, which is to move the TX path into a worker thread,
interrupt handling to threaded interrupt, and synchronize everything
with mutexes, but that would be a much bigger rework, for a separate
patch.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Petr Stetiar &lt;ynezz@true.cz&gt;
Cc: YueHaibing &lt;yuehaibing@huawei.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: ks8851-ml: Fix 16-bit IO operation</title>
<updated>2020-03-11T06:53:10Z</updated>
<author>
<name>Marek Vasut</name>
</author>
<published>2020-02-15T16:54:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=75a526e91b83ed70f83a774fbae63a20e020a5ad'/>
<id>urn:sha1:75a526e91b83ed70f83a774fbae63a20e020a5ad</id>
<content type='text'>
[ Upstream commit 58292104832fef6cb4a89f736012c0e0724c3442 ]

The Micrel KSZ8851-16MLLI datasheet DS00002357B page 12 states that
BE[3:0] signals are active high. This contradicts the measurements
of the behavior of the actual chip, where these signals behave as
active low. For example, to read the CIDER register, the bus must
expose 0xc0c0 during the address phase, which means BE[3:0]=4'b1100.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Petr Stetiar &lt;ynezz@true.cz&gt;
Cc: YueHaibing &lt;yuehaibing@huawei.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: ks8851-ml: Fix 16-bit data access</title>
<updated>2020-03-11T06:53:09Z</updated>
<author>
<name>Marek Vasut</name>
</author>
<published>2020-02-15T16:54:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=af23cdf4a49c6264d48db9cb83e52fd807b16591'/>
<id>urn:sha1:af23cdf4a49c6264d48db9cb83e52fd807b16591</id>
<content type='text'>
[ Upstream commit edacb098ea9c31589276152f09b4439052c0f2b1 ]

The packet data written to and read from Micrel KSZ8851-16MLLI must be
byte-swapped in 16-bit mode, add this byte-swapping.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Petr Stetiar &lt;ynezz@true.cz&gt;
Cc: YueHaibing &lt;yuehaibing@huawei.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: ks8851-ml: Remove 8-bit bus accessors</title>
<updated>2020-03-11T06:53:09Z</updated>
<author>
<name>Marek Vasut</name>
</author>
<published>2020-02-15T16:54:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2db02153e99bdd65ca0e3734d23921ec8d3612ed'/>
<id>urn:sha1:2db02153e99bdd65ca0e3734d23921ec8d3612ed</id>
<content type='text'>
[ Upstream commit 69233bba6543a37755158ca3382765387b8078df ]

This driver is mixing 8-bit and 16-bit bus accessors for reasons unknown,
however the speculation is that this was some sort of attempt to support
the 8-bit bus mode.

As per the KS8851-16MLL documentation, all two registers accessed via the
8-bit accessors are internally 16-bit registers, so reading them using
16-bit accessors is fine. The KS_CCR read can be converted to 16-bit read
outright, as it is already a concatenation of two 8-bit reads of that
register. The KS_RXQCR accesses are 8-bit only, however writing the top
8 bits of the register is OK as well, since the driver caches the entire
16-bit register value anyway.

Finally, the driver is not used by any hardware in the kernel right now.
The only hardware available to me is one with 16-bit bus, so I have no
way to test the 8-bit bus mode, however it is unlikely this ever really
worked anyway. If the 8-bit bus mode is ever required, it can be easily
added by adjusting the 16-bit accessors to do 2 consecutive accesses,
which is how this should have been done from the beginning.

Signed-off-by: Marek Vasut &lt;marex@denx.de&gt;
Cc: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Petr Stetiar &lt;ynezz@true.cz&gt;
Cc: YueHaibing &lt;yuehaibing@huawei.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: micrel: fix return type of ndo_start_xmit function</title>
<updated>2019-11-25T08:52:46Z</updated>
<author>
<name>YueHaibing</name>
</author>
<published>2018-09-21T02:42:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49c9fe4957d003e24e9cb5755fb1326e6c9e047c'/>
<id>urn:sha1:49c9fe4957d003e24e9cb5755fb1326e6c9e047c</id>
<content type='text'>
[ Upstream commit 2b49117a5abee8478b0470cba46ac74f93b4a479 ]

The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, so make sure the implementation in
this driver has returns 'netdev_tx_t' value, and change the function
return type to netdev_tx_t.

Found by coccinelle.

Signed-off-by: YueHaibing &lt;yuehaibing@huawei.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: ks8851: Set initial carrier state to down</title>
<updated>2019-05-04T06:49:08Z</updated>
<author>
<name>Lukas Wunner</name>
</author>
<published>2019-03-20T14:02:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3c43491f7dbebfd3e4d2223faf8363ccc5c08cd'/>
<id>urn:sha1:a3c43491f7dbebfd3e4d2223faf8363ccc5c08cd</id>
<content type='text'>
[ Upstream commit 9624bafa5f6418b9ca5b3f66d1f6a6a2e8bf6d4c ]

The ks8851 chip's initial carrier state is down. A Link Change Interrupt
is signaled once interrupts are enabled if the carrier is up.

The ks8851 driver has it backwards by assuming that the initial carrier
state is up. The state is therefore misrepresented if the interface is
opened with no cable attached. Fix it.

The Link Change interrupt is sometimes not signaled unless the P1MBSR
register (which contains the Link Status bit) is read on -&gt;ndo_open().
This might be a hardware erratum. Read the register by calling
mii_check_link(), which has the desirable side effect of setting the
carrier state to down if the cable was detached while the interface was
closed.

Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Cc: Frank Pavlic &lt;f.pavlic@kunbus.de&gt;
Cc: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Cc: Tristram Ha &lt;Tristram.Ha@microchip.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin (Microsoft) &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
