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]
Message-ID: <ZrMzrJlbOpd8V0n9@kekkonen.localdomain>
Date: Wed, 7 Aug 2024 08:43:24 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Alexander Stein <alexander.stein@...tq-group.com>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	Benjamin Bara <bbara93@...il.com>,
	Hans de Goede <hdegoede@...hat.com>,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	Benjamin Bara <benjamin.bara@...data.com>
Subject: Re: [PATCH 2/2] media: i2c: imx290: Check for availability in probe()

Hi,

On Wed, Aug 07, 2024 at 10:33:51AM +0200, Alexander Stein wrote:
> Hi Benjamin,
> 
> Am Mittwoch, 7. August 2024, 10:10:28 CEST schrieb Benjamin Bara:
> > Currently, the V4L2 subdevice is also created when the device is not
> > available/connected. In this case, dmesg shows the following:
> > 
> > [   10.419510] imx290 7-001a: Error writing reg 0x301c: -6
> > [   10.428981] imx290 7-001a: Error writing reg 0x3020: -6
> > [   10.442712] imx290 7-001a: Error writing reg 0x3018: -6
> > [   10.454018] imx290 7-001a: Error writing reg 0x3020: -6
> > 
> > which seems to come from imx290_ctrl_update() after the subdev init is
> > finished. However, as the errors are ignored, the subdev is initialized
> > but simply does not work. From userspace perspective, there is no
> > visible difference between a working and not-working subdevice (except
> > when trying it out or watching for the error message).
> > 
> > This commit adds a simple availability check before starting with the
> > subdev initialization to error out instead.
> 
> There is already a patch reading the ID register at [1]. This also reads the
> ID register. But I don't have any documentation regarding that register,
> neither address nor values definitions. If there is known information about
> that I would prefer reading the ID and compare it to expected values.
> 
> Best regards,
> Alexander
> 
> [1] https://gitlab.com/ideasonboard/nxp/linux/-/commit/85ce725f1de7c16133bfb92b2ab0d3d84efcdb47

I'd also prefer reading a register and indeed comparing the read value with
the expected value.

-- 
Regards,

Sakari Ailus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ