Thread (44 messages) 44 messages, 8 authors, 2024-06-07

Re: [PATCH net v5 4/4] net: dsa: microchip: monitor potential faults in half-duplex mode

From: Enguerrand de Ribaucourt <hidden>
Date: 2024-06-05 07:54:00

Hello,

On 05/06/2024 05:31, Arun.Ramadoss@microchip.com wrote:
Hi Enguerrand,

quoted
+int ksz9477_errata_monitor(struct ksz_device *dev, int port,
+                          u64 tx_late_col)
+{
+       u32 pmavbc;
+       u8 status;
+       u16 pqm;
+       int ret;
+
+       ret = ksz_pread8(dev, port, REG_PORT_STATUS_0, &status);
+       if (ret)
+               return ret;
Blank line after return ret will increase readability.
quoted
+       if (!((status & PORT_INTF_SPEED_MASK) ==
PORT_INTF_SPEED_MASK) &&
Why this check is needed. Is it to check reserved value 11b.
Yes indeed, 11b would means that the port is not connected. So here I'm 
isolating ports in half duplex which are properly up.
quoted
+           !(status & PORT_INTF_FULL_DUPLEX)) {
+               dev_warn_once(dev->dev,
+                             "Half-duplex detected on port %d,
transmission halt may occur\n",
+                             port);
  
-- 
Savoir-faire Linux
Enguerrand de Ribaucourt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help