From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pd0-x22f.google.com ([2607:f8b0:400e:c02::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X6xAP-0007hT-6P for linux-mtd@lists.infradead.org; Tue, 15 Jul 2014 07:28:49 +0000 Received: by mail-pd0-f175.google.com with SMTP id v10so6567386pde.6 for ; Tue, 15 Jul 2014 00:28:27 -0700 (PDT) Date: Tue, 15 Jul 2014 00:28:23 -0700 From: Brian Norris To: Bean Huo Subject: Re: [PATCH v3] mtd:nor:timeout:fix do_write_buffer() timeout error Message-ID: <20140715072823.GH23883@brian-ubuntu> References: <20140712064639.GD23883@brian-ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: "christian.riesch@omicron.at" , "paul.gortmaker@windriver.com" , "dwmw2@infradead.org" , "linux-mtd@lists.infradead.org" , Stijn Devriendt List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Bean, On Tue, Jul 15, 2014 at 04:23:44AM +0000, Bean Huo wrote: > Thanks for your warmly response about my patch.I have been waiting for your message too long. > It's hard for me to give you a good reason that some flash's CFI parameter is non-zero,and > incorrect.I just found that if flash'buffer is 512 bytes,not 256 bytes,timeout error will happen. > If using CFI's timemout value,that is OK.But for cfi_cmdset_0001.c,it also use timeout value of CFI. > The difference with mine is that if timeout value is not defined in the CFI,the default maxmum timeout > value is 500000us. I understand the points here. But this is just a timeout value, so it isn't a big issue if it's a little too large; but it's a major problem if it's too short. Since this is an aged driver, which has to accomodate all sorts of potentially broken chips, I think a "minimum timeout" is a good idea. And using the current timeout of 2ms (or larger) is fine. So in pseudocode: if (CFI_time_typ != 0 && CFI_time_max != 0) timeout_max = CFI_time_typ + CFI_time_max; else timeout_max = 0; timeout_max = max(timeout_max, 2000); > Because my company's mailbox title exsits chinese words,and i sent this patch for > many times,you don't have one response,so i thought that you maybe couldn't receive my email.later,i > chose my personal email. It is reasonable to worry about bounced mail occasionally. If the mailing list rejected your mail, you should get an automated message. You can also check the archives soon after sending, to make sure your mail shows up: http://lists.infradead.org/pipermail/linux-mtd/ And for LKML email, you can check one of several archives mirrors, like lkml.org. > For this patch,i will do some changes,please every maintainer and commit-signer check. Yes, please send a new version (version 4 now?). But please double check your patch submission, so that it applies correctly this time. Thanks, Brian