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: <20980858CB6D3A4BAE95CA194937D5E73E9C0A2F@DBDE04.ent.ti.com>
Date:	Thu, 2 May 2013 06:17:27 +0000
From:	"Gupta, Pekon" <pekon@...com>
To:	Huang Shijie <b32955@...escale.com>
CC:	"computersforpeace@...il.com" <computersforpeace@...il.com>,
	"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"dedekind1@...il.com" <dedekind1@...il.com>,
	"dwmw2@...radead.org" <dwmw2@...radead.org>
Subject: RE: [PATCH V4 5/9] mtd: replace the hardcode with the onfi_feature()

> 于 2013年05月02日 13:42, Gupta, Pekon 写道:
> >>>> -	*busw = 0;
> >>>> -	if (le16_to_cpu(p->features)&   1)
> >>>> -		*busw = NAND_BUSWIDTH_16;
> >>>> +
> >>>> +	*busw = (onfi_feature(chip)&   ONFI_FEATURE_16_BIT_BUS) ?
> >>>> +			NAND_BUSWIDTH_16 : 0;
> >>> Is this really needed ? you have already checked the 'onfi_version'
> >> above in
> >>> nand_flash_detect_onfi() ..
> >>> 	if (!chip->onfi_version) {
> >>> 		pr_info("%s: unsupported ONFI version: %d\n",
> >> __func__, val);
> >>> 		return 0;
> >>> 	}
> >>>
> >>>
> >> I think checking the onfi_version has no relationship with this patch. :)
> >> This patch is just replace the hardcode for 16-bit onfi nand check.
> >>
> > [Pekon]: [Patch 3/9]: add a helper to get the supported features
> > I mean, do you really need this helper function ?
> > +static inline int onfi_feature(struct nand_chip *chip)
> > +{
> > +       return chip->onfi_version ? le16_to_cpu(chip-
> >onfi_params.features) : 0;
> > + }
> >
> > Following change should have been enough..
> > *busw = (le16_to_cpu(p->features)&   ONFI_FEATURE_16_BIT_BUS) ?
> > 			NAND_BUSWIDTH_16 : 0;
> yes. for this function, it's enough.
> 
> But we may use the onfi_feature() in other places, such as some drivers.
> That's reason why i added this helper.
> 
[Pekon]: onfi_feature() is actually not useful unless someone re-scans the
param page again. And once the device is probed following should
be used to check if it’s a x16 device.
If (chip->options & NAND_BUSWIDTH_16) 
My view-point was that the code should have less redundancy :-)

Anyways, Thanks for your other patch for reading extended_param_page.
I too wanted that ecc.codeword and ecc.strength should come from 
device's parameters. I'll ack them once, I test using my driver.


with regards, pekon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ