lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 8 Feb 2024 15:56:27 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Köry Maincent <kory.maincent@...tlin.com>
Cc: netdev@...r.kernel.org, Taras Chornyi <taras.chornyi@...ision.eu>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: Prestera driver fail to probe twice

On Thu, Feb 08, 2024 at 10:10:05AM +0100, Köry Maincent wrote:
> Hello Andrew,
> 
> On Thu, 8 Feb 2024 00:32:43 +0100
> Andrew Lunn <andrew@...n.ch> wrote:
> 
> > On Tue, Feb 06, 2024 at 04:54:06PM +0100, Köry Maincent wrote:
> > > Hello,
> > > 
> > > It seems the prestera driver has never been tested as a module or in a
> > > probe defer case:  
> > 
> > Hi Köry
> > 
> > Could you hack a -EPROBE_DEFER failure? If you can show that does not
> > work, the driver is clearly broken because phylink could return that.
> 
> That is how I have noticed the issue. I was trying to test my PSE pd692x0
> driver as a module that prestera depends on (I will drop the PoE v3 soon).
> The PSE core is returning -EPROBE_DEFER in case we can not find the PSE
> provider.
> 
> Here is a boot dmesg for example:
> 
> [    1.898897] Prestera DX 0000:01:00.0: Loading mrvl/prestera/mvsw_prestera_fw-v4.1.img ...
> [    1.907155] Prestera DX 0000:01:00.0: FW version '4.1.0'
> [    5.535427] Prestera DX 0000:01:00.0: Prestera FW is ready
> [   13.458823] Prestera DX 0000:01:00.0: using random base mac address
> [   13.596594] prestera_port_sfp_bind : 403 -EPROBE_DEFER (The hack to get the PSE is in this function)
> [   13.632517] ahci f2540000.sata: supply ahci not found, using dummy regulator
> [   13.639759] ahci f2540000.sata: supply phy not found, using dummy regulator
> [   13.646846] platform f2540000.sata:sata-port@0: supply target not found, using dummy regulator
> [   13.655866] platform f2540000.sata:sata-port@1: supply target not found, using dummy regulator
> [   13.666105] ahci f2540000.sata: masking port_map 0x3 -> 0x3
> [   13.671960] ahci f2540000.sata: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl platform mode
> [   13.680598] ahci f2540000.sata: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
> [   13.690393] scsi host1: ahci
> [   13.693744] scsi host2: ahci
> [   13.696789] ata1: SATA max UDMA/133 mmio [mem 0xf2540000-0xf256ffff] port 0x100 irq 40 lpm-pol 0
> [   13.705640] ata2: SATA max UDMA/133 mmio [mem 0xf2540000-0xf256ffff] port 0x180 irq 40 lpm-pol 0
> [   13.787389] mvpp2 f2000000.ethernet: using 8 per-cpu buffers
> [   13.813450] mvpp2 f2000000.ethernet eth0: Using random mac address a2:00:a8:8c:7f:ca
> [   13.862023] i2c i2c-2: Added multiplexed i2c bus 3
> [   13.867101] i2c i2c-2: Added multiplexed i2c bus 4
> [   13.872104] i2c i2c-2: Added multiplexed i2c bus 5
> [   13.877181] i2c i2c-2: Added multiplexed i2c bus 6
> [   13.882034] i2c-mux-gpio i2c-mux: 4 port mux on mv64xxx_i2c adapter adapter
> [   14.030349] ata2: SATA link down (SStatus 0 SControl 300)
> [   14.195606] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
> [   14.201982] ata1.00: ATA-9: M.2 (S42) 3TE7, S20730A, max UDMA/133
> [   14.208142] ata1.00: 53742528 sectors, multi 16: LBA48 NCQ (depth 32)
> [   14.214832] ata1.00: configured for UDMA/133
> [   14.219477] scsi 1:0:0:0: Direct-Access     ATA      M.2 (S42) 3TE7   30A  PQ: 0 ANSI: 5
> [   14.228723] sd 1:0:0:0: [sdb] 53742528 512-byte logical blocks: (27.5 GB/25.6 GiB)
> [   14.236465] sd 1:0:0:0: [sdb] Write Protect is off
> [   14.241341] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> [   14.250491] sd 1:0:0:0: [sdb] Preferred minimum I/O size 512 bytes
> [   14.259197]  sdb: sdb1 sdb2 sdb3 sdb4
> [   14.263962] sd 1:0:0:0: [sdb] Attached SCSI removable disk
> [   18.896377] Prestera DX 0000:01:00.0: waiting for FW loader is timed out
> [   18.903242] Prestera DX: probe of 0000:01:00.0 failed with error -110

Thanks. That clearly shows that the Prestera driver is broken.

Either there needs to be a way to determine if the firmware has been
downloaded, or the firmware download needs to be moved to the end of
the probe function once all resources are available and its no longer
possible to have an -EPROBE_DEFER.

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ