Re: [PATCHv3 1/3] firmware_class: move NO_CACHE from private to driver_data_req_params

2017-06-26 Thread Li, Yi
hi Greg On 6/23/2017 10:41 AM, Greg KH wrote: On Fri, Jun 16, 2017 at 05:58:29PM -0500, yi1...@linux.intel.com wrote: From: Yi Li This adds DRIVER_DATA_REQ_NO_CACHE flag with .req flag under struct driver_data_req_params. When this flag is set, the driver_data driver will not cache the firmwa

Re: [PATCH v9 1/5] firmware: add extensible driver data params

2017-06-20 Thread Li, Yi
On 6/19/2017 8:48 PM, AKASHI Takahiro wrote: On Mon, Jun 19, 2017 at 05:51:08PM -0500, Li, Yi wrote: Hi Greg, On 6/17/2017 2:38 PM, Greg KH wrote: On Tue, Jun 13, 2017 at 09:40:11PM +0200, Luis R. Rodriguez wrote: On Tue, Jun 13, 2017 at 11:05:48AM +0200, Greg KH wrote: On Mon, Jun 05

Re: [PATCH v9 1/5] firmware: add extensible driver data params

2017-06-19 Thread Li, Yi
Hi Greg, On 6/17/2017 2:38 PM, Greg KH wrote: On Tue, Jun 13, 2017 at 09:40:11PM +0200, Luis R. Rodriguez wrote: On Tue, Jun 13, 2017 at 11:05:48AM +0200, Greg KH wrote: On Mon, Jun 05, 2017 at 02:39:33PM -0700, Luis R. Rodriguez wrote: As the firmware API evolves we keep extending functions

Re: [PATCH v9 1/5] firmware: add extensible driver data params

2017-06-14 Thread Li, Yi
? Or do we expose this as a flag on a regular async call? With the approach I take we expose the internal functionality clearly and later Li Yi folds it as public API through a parameter for the async API. Later he extends iwlwifi with just 2 lines of code to get this functionality. This would lat

Re: [PATCHv2 0/3] Enable no_cache flag to driver_data

2017-06-07 Thread Li, Yi
On 6/7/2017 12:59 PM, Luis R. Rodriguez wrote: On Tue, Jun 06, 2017 at 02:31:54PM -0500, Li, Yi wrote: We use the cache upon suspend to cache the firmware so that upon resume a request will use that cache, to avoid the file lookup on disk. Doing a test with qemu suspend + resume is possible but

Re: [PATCHv2 0/3] Enable no_cache flag to driver_data

2017-06-06 Thread Li, Yi
Hi Luis, On 5/24/2017 2:03 PM, Luis R. Rodriguez wrote: On Sat, May 20, 2017 at 01:46:56AM -0500, yi1...@linux.intel.com wrote: From: Yi Li Changes in v2: - Rebase to Luis R. Rodriguez's 20170501-driver-data-try2 branch - Expose DRIVER_DATA_REQ_NO_CACHE flag to public driver

Re: [PATCHv2 0/3] Enable no_cache flag to driver_data

2017-05-26 Thread Li, Yi
hi Luis On 5/25/2017 5:43 PM, Luis R. Rodriguez wrote: On Thu, May 25, 2017 at 3:30 PM, Li, Yi wrote: This patch is for "disabling the cache" for streaming and iwlwifi case, adding the test to verify the cache function should be a separate patch, right? I can look more into the

Re: [PATCHv2 0/3] Enable no_cache flag to driver_data

2017-05-25 Thread Li, Yi
hi Luis On 5/24/2017 2:03 PM, Luis R. Rodriguez wrote: On Sat, May 20, 2017 at 01:46:56AM -0500, yi1...@linux.intel.com wrote: From: Yi Li Changes in v2: - Rebase to Luis R. Rodriguez's 20170501-driver-data-try2 branch - Expose DRIVER_DATA_REQ_NO_CACHE flag to public driver_

Re: [PATCHv2 3/3] fpga_mgr: Add streaming support through the new driver_data API

2017-05-24 Thread Li, Yi
On 5/23/2017 10:25 AM, Alan Tull wrote: On Tue, May 23, 2017 at 10:21 AM, Alan Tull wrote: + + mgr->state = FPGA_MGR_STATE_FIRMWARE_REQ; + while (length > 0) { This could be "do { ... } while ((params.fw_size >= FIRMWARE_CHUNK_SZ) && (length > 0));" since that's what it's really

Re: [PATCHv2 3/3] fpga_mgr: Add streaming support through the new driver_data API

2017-05-24 Thread Li, Yi
On 5/23/2017 10:25 AM, Alan Tull wrote: On Tue, May 23, 2017 at 10:21 AM, Alan Tull wrote: + + mgr->state = FPGA_MGR_STATE_FIRMWARE_REQ; + while (length > 0) { This could be "do { ... } while ((params.fw_size >= FIRMWARE_CHUNK_SZ) && (length > 0));" since that's what it's really

Re: [PATCHv2 3/3] fpga_mgr: Add streaming support through the new driver_data API

2017-05-22 Thread Li, Yi
hi Alan On 5/22/2017 4:09 PM, Alan Tull wrote: On Sat, May 20, 2017 at 1:49 AM, wrote: Hi Yi, From: Yi Li Since the FPGA image are getting bigger in size, this add an new API fpga_mgr_firmware_stream You could replace the guts of the current fpga_mgr_firmware_load() with this new API (k

Re: [PATCH v6 3/5] test: add new driver_data load tester

2017-05-17 Thread Li, Yi
hi Luis On 5/11/2017 12:11 PM, Luis R. Rodriguez wrote: On Thu, May 11, 2017 at 07:46:27PM +0900, AKASHI Takahiro wrote: Luis, On Fri, Apr 28, 2017 at 03:45:35AM +0200, Luis R. Rodriguez wrote: +To test an async call one could do:: + +echo anything > /lib/firmware/test-driver_data.bi

Re: [PATCH v7 1/5] firmware: add extensible driver data params

2017-05-11 Thread Li, Yi
On 5/2/2017 3:49 AM, Luis R. Rodriguez wrote: As the firmware API evolves we keep extending functions with more arguments. Stop this nonsense by proving an extensible data structure which can be used to represent both user parameters and private internal parameters. We introduce 3 data structu

Re: [PATCH 04/16] fpga: intel: pcie: parse feature list and create platform device for features.

2017-05-04 Thread Li, Yi
hi Hao On 3/30/2017 7:08 AM, Wu Hao wrote: From: Xiao Guangrong Device Featuer List structure creates a link list of feature headers within the MMIO space to provide an extensiable way of adding features. The Intel FPGA PCIe driver walks through the feature headers to enumerate feature devic

Re: [PATCH v3] fpga manager: Add Altera CvP driver

2017-04-21 Thread Li, Yi
On 4/20/2017 12:29 PM, matthew.gerl...@linux.intel.com wrote: On Thu, 20 Apr 2017, Anatolij Gustschin wrote: Add FPGA manager driver for loading Arria/Cyclone/Stratix FPGAs via CvP. Signed-off-by: Anatolij Gustschin --- Hi Anatolij, Since you say the driver works with Arria-10, I though

Re: [RFC 1/2] firmware class: Add stream_firmware API.

2017-03-27 Thread Li, Yi
hi Luis, On 3/27/2017 2:36 PM, Luis R. Rodriguez wrote: On Thu, Mar 09, 2017 at 06:18:09PM -0600, yi1...@linux.intel.com wrote: From: Yi Li Add function to load firmware in multiple chucks instead of loading the whole big firmware file at once. Signed-off-by: Yi Li --- drivers/base/firm

Re: [RFC 1/2] firmware class: Add stream_firmware API.

2017-03-22 Thread Li, Yi
Alan On 3/20/2017 1:34 PM, Alan Tull wrote: On Mon, Mar 20, 2017 at 1:00 PM, Alan Tull wrote: +int +stream_firmware(const struct firmware **firmware_p, const char *name, +struct device *device, size_t offset, size_t length) +{ + size_t ret; + + /* Need to pin this

Re: [RFC 1/2] firmware class: Add stream_firmware API.

2017-03-14 Thread Li, Yi
hi Matthew, On 3/13/2017 4:09 PM, matthew.gerl...@linux.intel.com wrote: On Fri, 10 Mar 2017, Li, Yi wrote: Hi Matthew Hi Yi, On 3/10/2017 11:44 AM, matthew.gerl...@linux.intel.com wrote: On Thu, 9 Mar 2017, yi1...@linux.intel.com wrote: From: Yi Li Hi Yi, Just one question

Re: [RFC 2/2] fpga manager: Add fpga_mgr_firmware_stream API

2017-03-13 Thread Li, Yi
Thanks Alan for the comments. On 3/13/2017 1:00 PM, Alan Tull wrote: On Thu, Mar 9, 2017 at 6:18 PM, wrote: Hi Yi, Thanks for your RFC. I believe this functionality is badly needed. I had a few comments about the chunk size and some nits about comments below... From: Yi Li Add fpga_mg

Re: [RFC 1/2] firmware class: Add stream_firmware API.

2017-03-10 Thread Li, Yi
Hi Matthew On 3/10/2017 11:44 AM, matthew.gerl...@linux.intel.com wrote: On Thu, 9 Mar 2017, yi1...@linux.intel.com wrote: From: Yi Li Hi Yi, Just one question below. Matthew Gerlach Add function to load firmware in multiple chucks instead of loading the whole big firmware file at

Re: [RFC 4/8] doc: fpga-mgr: separate getting/locking FPGA manager

2017-02-17 Thread Li, Yi
hi Alan On 2/15/2017 10:14 AM, Alan Tull wrote: Document that getting a reference to a FPGA Manager has been separated from locking the FPGA Mangager for use. fpga_mgr_lock/unlock functions get/release mutex. of_fpga_mgr_get, fpga_mgr_get, and fpga_mgr_put no longer lock the FPGA manager mute