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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <PH8PR11MB796563EE3D53DDD693AED6799590A@PH8PR11MB7965.namprd11.prod.outlook.com>
Date: Thu, 15 May 2025 22:51:17 +0000
From: <Ronnie.Kunin@...rochip.com>
To: <Rengarajan.S@...rochip.com>, <VaibhaavRam.TL@...rochip.com>,
	<Kumaravel.Thiagarajan@...rochip.com>, <arnd@...db.de>,
	<gregkh@...uxfoundation.org>, <linus.walleij@...aro.org>, <brgl@...ev.pl>,
	<linux-gpio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<UNGLinuxDriver@...rochip.com>
CC: <Rengarajan.S@...rochip.com>
Subject: RE: [PATCH v1 char-misc-next 1/2] misc: microchip: pci1xxxx: Add PCIe
 Hot reset disable support for Rev C0 and later devices


> -----Original Message-----
> From: Ronnie Kunin - C21729 <Ronnie.Kunin@...rochip.com>
> Sent: Tuesday, May 13, 2025 10:26 AM
> > ...
> > +static int pci1xxxx_gpio_get_device_revision(struct pci1xxxx_gpio
> > +*priv) {
> > +	struct device *parent = priv->aux_dev->dev.parent;
> > +	struct pci_dev *pcidev = to_pci_dev(parent);
> > +	int ret;
> > +	u32 val;
> > +
> > +	ret = pci_read_config_dword(pcidev, PCI_DEV_REV_OFFSET, &val);
> > +	if (ret)
> > +		return ret;
> > +
> > +	priv->dev_rev = val;
> > +
> > +	return 0;
> > +}
> > +
> 
> 
> Reiterate my comment close to an year ago for the SPI driver
> https://jira.microchip.com/browse/UNG_BRIDGEPORT-
> 5468?focusedId=4336619&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel#comment-4336619
> 
> "Just so we are clear. using the PCI config Revision ID field is NOT as comprehensive/safe a solution for
> checking the chip revision as checking the internal BAR DEV_REV_REG register's REVID. You are only
> guaranteed Revision ID to match the DEFAULT value of DEV_REG REVID.
> While it would be highly unusual to do that, if a customer were to customize the (VID/PID) / Rev for his
> device they will not."
> 
> If you are going to continue to check revision ID thru config space in more drivers for now, then for each
> one please open a new Jira so that whenever you decide to do it the proper way you do not forget any
> driver that needs to be updated.
> 

My apologies that this comment with microchip private link went out to the community, 
it was meant to be an internal Microchip discussion. 
Just short FYI to the maintainers, my suggestion about a "proper way" which we use in the 
ethernet driver of the PCI11x1x devices for other purposes beyond ID check is not directly 
portable without other major changes in the architecture of the GPIO driver which is overkill 
just for this ID check purpose. Therefore, the implementation Rengarajan proposed in this 
patch is perfectly fine at this time and I have no reservations to merge it in.

Thanks,
Ronnie

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ