Re: [PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Matthew R. Ochs
On Jun 8, 2015, at 5:05 AM, Michael Neuling wrote: Reviewed-by: Michael Neuling mi...@neuling.org Thanks again for helping us to review the code. The core cxl changes needed for this are in mpe's powerpc next branch queued up for 4.2. They are in linux next-20150605. To compile this

Re: [PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Manoj Kumar
Brian: Thank you for your review. Comments are inline. - Manoj On 6/8/2015 12:54 PM, Brian King wrote: Looking pretty good. A few more comments. Thanks, Brian + spin_lock_irqsave(cfg-tmf_waitq.lock, lock_flags); + if (cfg-tmf_active) +

Re: [PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Brian King
Looking pretty good. A few more comments. Thanks, Brian On 06/05/2015 04:46 PM, Matthew R. Ochs wrote: +/** + * cxlflash_queuecommand() - sends a mid-layer request + * @host:SCSI host associated with device. + * @scp: SCSI command to send. + * + * Return: + * 0 on success + *

[PATCH v5] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Matthew R. Ochs
SCSI device driver to support filesystem access on the IBM CXL Flash adapter. Reviewed-by: Michael Neuling mi...@neuling.org Signed-off-by: Matthew R. Ochs mro...@linux.vnet.ibm.com Signed-off-by: Manoj N. Kumar ma...@linux.vnet.ibm.com --- drivers/scsi/Kconfig|1 +

Re: [PATCH v5] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Brian King
On 06/08/2015 05:30 PM, Matthew R. Ochs wrote: + +/** + * cxlflash_send_cmd() - sends an AFU command + * @afu: AFU associated with the host. + * @cmd: AFU command to send. + * + * Return: + * 0 on success + * -1 on failure + */ +int cxlflash_send_cmd(struct afu *afu, struct

Re: [PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Manoj Kumar
On 6/8/2015 12:54 PM, Brian King wrote: + + rcr = send_tmf(afu, scp, TMF_LUN_RESET); + if (unlikely(rcr)) + rc = FAILED; Do you need to wait for all commands to the LUN to be returned before returning from here? You could put a simple loop here, polling until there

Re: [PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Brian King
On 06/08/2015 04:41 PM, Manoj Kumar wrote: On 6/8/2015 12:54 PM, Brian King wrote: + +rcr = send_tmf(afu, scp, TMF_LUN_RESET); +if (unlikely(rcr)) +rc = FAILED; Do you need to wait for all commands to the LUN to be returned before returning from here? You could put a

RE: [PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Stephen Bates
Hi I just wanted to add support for this patchset. There are others considering implementing block IO devices that use the CAPI (CXL) interface and having this patch-set upstream will be very useful in the future. Supported-by: Stephen Bates stephen.ba...@pmcs.com Cheers Stephen

Re: [PATCH v5] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Manoj Kumar
Brian: Thanks for the quick review. Comments below. - Manoj On 6/8/2015 5:56 PM, Brian King wrote: +retry: + newval = atomic64_dec_if_positive(afu-room); + if (!newval) { + do { + room = readq_be(afu-host_map-cmd_room); +

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-08 Thread Dov Levenglick
On Sun, Jun 7, 2015 at 10:32 AM, yga...@codeaurora.org wrote: 2015-06-05 5:53 GMT+09:00 yga...@codeaurora.org: Hi Yaniv, 2015-06-03 18:37 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct platform_device *pdev) goto

[PATCH 6/6] Fix unsafe fw_event_list usage

2015-06-08 Thread Calvin Owens
Since the fw_event deletes itself from the list, cleanup_queue() can walk onto garbage pointers or walk off into freed memory. This refactors the code in _scsih_fw_event_cleanup_queue() to not iterate over the fw_event_list without a lock. Signed-off-by: Calvin Owens calvinow...@fb.com ---

[PATCH 2/6] Refactor code to use new sas_device refcount

2015-06-08 Thread Calvin Owens
This patch refactors the code in the driver to use the new reference count on the sas_device struct. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_base.h | 4 +- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 329 ---

[PATCH 1/6] Add refcount to sas_device struct

2015-06-08 Thread Calvin Owens
These objects can be referenced concurrently throughout the driver, we need a way to make sure threads can't delete them out from under each other. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_base.h | 16 1 file changed, 16 insertions(+) diff

[PATCH 5/6] Refactor code to use new fw_event refcount

2015-06-08 Thread Calvin Owens
This refactors the fw_event code to use the new refcount. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c

[RESEND][PATCH 0/6] Fixes for memory corruption in mpt2sas

2015-06-08 Thread Calvin Owens
Hello all, This patchset attempts to address problems we've been having with panics due to memory corruption from the mpt2sas driver. I will provide a similar set of fixes for mpt3sas, since we see similar issues there as well. Porting this to mpt3sas will be trivial since the part of the driver

[PATCH 4/6] Add refcount to fw_event_work struct

2015-06-08 Thread Calvin Owens
The fw_event_work struct is concurrently referenced at shutdown, so add a refcount to protect it. Signed-off-by: Calvin Owens calvinow...@fb.com --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 28 1 file changed, 28 insertions(+) diff --git

[PATCH 3/6] Fix unsafe sas_device_list usage

2015-06-08 Thread Calvin Owens
We cannot iterate over the list without holding a lock for the entire duration, or we risk corrupting random memory if items are added or deleted as we iterate. This refactors code such that it always holds the lock when iterating on or accessing the sas_device_list. Signed-off-by: Calvin Owens

RE: [PATCH] qla4xxx: pass timeout as HZ independent value

2015-06-08 Thread Nilesh Javali
-Original Message- From: Nicholas Mc Guire [mailto:hof...@osadl.org] Sent: Thursday, May 28, 2015 1:40 AM To: Dept-Eng QLogic Storage Upstream Cc: James E.J. Bottomley; linux-scsi; linux-kernel; Nicholas Mc Guire Subject: [PATCH] qla4xxx: pass timeout as HZ independent value

Re: [PATCH v4] cxlflash: Base support for IBM CXL Flash Adapter

2015-06-08 Thread Michael Neuling
On Fri, 2015-06-05 at 16:46 -0500, Matthew R. Ochs wrote: SCSI device driver to support filesystem access on the IBM CXL Flash adapter. Few minor nits below but other than that it looks good to me. The CXL parts are good and the rest of the driver is looking decent. FWIW: Reviewed-by: Michael

RE:

2015-06-08 Thread Practice Trinity (NHS SOUTH SEFTON CCG)
$1.5 C.A.D for you email ( leonh2...@gmail.com ) for info This message may contain confidential information. If you are not the intended recipient please inform the sender

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-08 Thread Rob Herring
On Thu, Jun 4, 2015 at 9:32 AM, Akinobu Mita akinobu.m...@gmail.com wrote: Hi Yaniv, 2015-06-03 18:37 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct platform_device *pdev) goto out; } - hba-vops =

Re: [PATCH v3 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-08 Thread Akinobu Mita
2015-06-08 1:27 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: static int ufshcd_pltfrm_remove(struct platform_device *pdev) { struct ufs_hba *hba = platform_get_drvdata(pdev); + struct device_node *node = pdev-dev.of_node; + struct device_node *ufs_variant_node; +

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-08 Thread Akinobu Mita
2015-06-08 0:32 GMT+09:00 yga...@codeaurora.org: 1) If ufshcd-pltfrm driver is loaded before ufs-qcom, (what actually happens always), then the calling to of_platform_populate() which is added, guarantees that ufs-qcom probe will be called and finish, before ufshcd_pltfrm probe continues.

Re: [PATCH v2 4/4] scsi: ufs: probe and init of variant driver from the platform device

2015-06-08 Thread Rob Herring
On Sun, Jun 7, 2015 at 10:32 AM, yga...@codeaurora.org wrote: 2015-06-05 5:53 GMT+09:00 yga...@codeaurora.org: Hi Yaniv, 2015-06-03 18:37 GMT+09:00 Yaniv Gardi yga...@codeaurora.org: @@ -321,7 +313,22 @@ static int ufshcd_pltfrm_probe(struct platform_device *pdev) goto