Re: [PATCH v6 34/37] cxlflash: Fix to escalate to LINK_RESET on login timeout

2015-10-23 Thread Tomas Henzl
lable for > use. This fix provides the required escalation. > > Signed-off-by: Manoj N. Kumar > Acked-by: Matthew R. Ochs > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozla

Re: [PATCH v6 33/37] cxlflash: Fix to avoid leaving dangling interrupt resources

2015-10-23 Thread Tomas Henzl
ing the AFU version > evaluation is eliminated as it is not needed. > > Signed-off-by: Matthew R. Ochs > Acked-by: Manoj Kumar > Reviewed-by: Andrew Donnellan Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v6 32/37] cxlflash: Fix to avoid potential deadlock on EEH

2015-10-23 Thread Tomas Henzl
eing recovered or returns a failure if the recovery failed. In > the event that the adapter reset failed, the failure is simply returned > as the ioctl would be unable to continue. > > Reported-by: Brian King > Signed-off-by: Matthew R. Ochs > Signed-off-b

Re: [PATCH v6 31/37] cxlflash: Correct trace string

2015-10-23 Thread Tomas Henzl
g > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Andrew Donnellan Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v6 30/37] cxlflash: Fix to avoid corrupting adapter fops

2015-10-23 Thread Tomas Henzl
r the life of the adapter. In the future, if the CXL services adopt > a private member for their context, that could be used to store the > adapter structure reference and cxlflash could revert to a model that > does not require an embedded fops. > > Signed-off-by: Matthew R. Oc

Re: [PATCH v6 29/37] cxlflash: Fix to double the delay each time

2015-10-23 Thread Tomas Henzl
On 21.10.2015 22:15, Matthew R. Ochs wrote: > From: Manoj Kumar > > The operator used to double the master context response delay > is incorrect and does not result in delay doubling. > > To fix, use a left shift instead of the XOR operator. > > Reported-by: Tomas Henzl

Re: [PATCH v6 27/37] cxlflash: Fix to prevent stale AFU RRQ

2015-10-23 Thread Tomas Henzl
bit. > > To fix, the AFU RRQ in host memory needs to be cleared after each reset. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Daniel Axtens Reviewed-by: Tomas Henzl Tomas ___

Re: [PATCH v6 26/37] cxlflash: Correct spelling, grammar, and alignment mistakes

2015-10-23 Thread Tomas Henzl
; Fix spelling and grammar issues. Update some comments for clarity and > consistency. Remove extra lines and a few unneeded variables/statements. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Andrew Donnella

Re: [PATCH v6 25/37] cxlflash: Fix to prevent EEH recovery failure

2015-10-23 Thread Tomas Henzl
-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Daniel Axtens Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v6 24/37] cxlflash: Fix MMIO and endianness errors

2015-10-23 Thread Tomas Henzl
ppropriate to make driver sparse clean. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Andrew Donnellan Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Li

Re: [PATCH v6 23/37] cxlflash: Fix function prolog parameters and return codes

2015-10-23 Thread Tomas Henzl
roperly reflect parameter > names and return codes. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Andrew Donnellan Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing l

Re: [PATCH v6 22/37] cxlflash: Remove unnecessary scsi_block_requests

2015-10-23 Thread Tomas Henzl
On 21.10.2015 22:14, Matthew R. Ochs wrote: > The host reset handler is called with I/O already blocked, thus > there is no need to explicitly block and unblock I/O in the handler. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King

Re: [PATCH v6 21/37] cxlflash: Correct behavior in device reset handler following EEH

2015-10-23 Thread Tomas Henzl
Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v6 20/37] cxlflash: Fix to prevent workq from accessing freed memory

2015-10-23 Thread Tomas Henzl
rlier in remove and use cancel_work_sync() instead > of flush_work() as there is not a need to process any scheduled work when > shutting down. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King

Re: [PATCH v6 19/37] cxlflash: Correct usage of scsi_host_put()

2015-10-23 Thread Tomas Henzl
ff-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v6 14/37] cxlflash: Fix location of setting resid

2015-10-23 Thread Tomas Henzl
an underrun scenario. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v6 18/37] cxlflash: Fix AFU version access/storage and add check

2015-10-23 Thread Tomas Henzl
and add a check to prevent an incompatible AFU > from being used with this driver. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Daniel Axtens Reviewed-by: Tomas Henzl Tomas _

Re: [PATCH v6 17/37] cxlflash: Remove dual port online dependency

2015-10-23 Thread Tomas Henzl
that despite its void-like behavior, the function was left with a > return code for right now in case its behavior needs to be altered again > in the near future based on testing. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King >

Re: [PATCH v6 16/37] cxlflash: Fix async interrupt bypass logic

2015-10-23 Thread Tomas Henzl
add back in the proper evaluation for an unset bit. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https:

Re: [PATCH v6 15/37] cxlflash: Fix host link up event handling

2015-10-23 Thread Tomas Henzl
o remedy, the host should be rescanned after a link up event. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linux

Re: [PATCH v6 13/37] cxlflash: Fix to avoid stall while waiting on TMF

2015-10-23 Thread Tomas Henzl
le waiting for a TMF completion. When a TMF > times out, report back a failure such that a bigger hammer reset > can occur. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___

Re: [PATCH v6 12/37] cxlflash: Fix to avoid spamming the kernel log

2015-10-23 Thread Tomas Henzl
> Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Andrew Donnellan Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v6 11/37] cxlflash: Refine host/device attributes

2015-10-23 Thread Tomas Henzl
mour > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v5 10/34] cxlflash: Make functions static

2015-10-02 Thread Tomas Henzl
ew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v5 09/34] cxlflash: Correct naming of limbo state and waitq

2015-10-02 Thread Tomas Henzl
gned-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Daniel Axtens Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v5 08/34] cxlflash: Fix to avoid CXL services during EEH

2015-10-02 Thread Tomas Henzl
ently executing ioctls. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Daniel Axtens Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v5 07/34] cxlflash: Fix context encode mask width

2015-10-02 Thread Tomas Henzl
viewed-by: Brian King > Reviewed-by: Daniel Axtens Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v5 06/34] cxlflash: Fix to avoid sizeof(bool)

2015-10-02 Thread Tomas Henzl
; Reviewed-by: Daniel Axtens Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v5 05/34] cxlflash: Fix data corruption when vLUN used over multiple cards

2015-10-02 Thread Tomas Henzl
on the > mode word), the problem is avoided. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v5 04/34] cxlflash: Fix potential oops following LUN removal

2015-10-02 Thread Tomas Henzl
eference per-context > for each LUN attached to the context. > > This resolves a potential Oops in the release handler when a > dealing with a LUN that has already been removed. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian Kin

Re: [PATCH v5 03/34] cxlflash: Fix read capacity timeout

2015-10-02 Thread Tomas Henzl
ate the timeout to 30 seconds (matches the value used in sd.c) > and rework the timeout literal to a more appropriate description. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas

Re: [PATCH v5 02/34] cxlflash: Replace magic numbers with literals

2015-10-02 Thread Tomas Henzl
t; Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King > Reviewed-by: Andrew Donnellan Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v5 01/34] cxlflash: Fix to avoid invalid port_sel value

2015-10-02 Thread Tomas Henzl
the subsequent modification of port_sel. > > Signed-off-by: Matthew R. Ochs > Signed-off-by: Manoj N. Kumar > Reviewed-by: Brian King Reviewed-by: Tomas Henzl Tomas ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2 29/30] cxlflash: Fix to avoid state change collision

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:32, Matthew R. Ochs wrote: > The adapter state machine is susceptible to missing and/or > corrupting state updates at runtime. This can lead to a variety > of unintended issues and is due to the lack of a serialization > mechanism to protect the adapter state. > > Use an adapter-wid

Re: [PATCH v2 21/30] cxlflash: Fix to prevent workq from accessing freed memory

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:31, Matthew R. Ochs wrote: > The workq can process work in parallel with a remove event, leading > to a condition where the workq handler can access freed memory. > > To remedy, the workq should be terminated prior to freeing memory. Move > the termination call earlier in remove and

Re: [PATCH v2 11/30] cxlflash: Make functions static

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:28, Matthew R. Ochs wrote: > Found during code inspection, that the following functions are not > being used outside of the file where they are defined. Make them static. > > int cxlflash_send_cmd(struct afu *, struct afu_cmd *); > void cxlflash_wait_resp(struct afu *, struct afu_cm

Re: [PATCH v2 04/30] cxlflash: Fix potential oops following LUN removal

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:27, Matthew R. Ochs wrote: > When a LUN is removed, the sdev that is associated with the LUN > remains intact until its reference count drops to 0. In order > to prevent an sdev from being removed while a context is still > associated with it, obtain an additional reference per-cont

Re: [PATCH v2 03/30] cxlflash: Fix read capacity timeout

2015-09-21 Thread Tomas Henzl
On 16.9.2015 23:26, Matthew R. Ochs wrote: > From: Manoj Kumar > > The timeout value for read capacity is too small. Certain devices > may take longer to respond and thus the command may prematurely > timeout. Additionally the literal used for the timeout is stale. > > Update the timeout to 30 sec

Re: [PATCH v2 09/30] cxlflash: Fix to stop interrupt processing on remove

2015-09-21 Thread Tomas Henzl
On 19.9.2015 01:26, Matthew R. Ochs wrote: >> On Sep 18, 2015, at 6:59 AM, Tomas Henzl wrote: >> On 17.9.2015 19:16, Matthew R. Ochs wrote: >>>> On Sep 17, 2015, at 7:38 AM, Tomas Henzl wrote: >>>> >>>> On 16.9.2015 18:53, Matthew R. Ochs wrote: &

Re: [PATCH v2 09/30] cxlflash: Fix to stop interrupt processing on remove

2015-09-18 Thread Tomas Henzl
On 17.9.2015 19:16, Matthew R. Ochs wrote: >> On Sep 17, 2015, at 7:38 AM, Tomas Henzl wrote: >> >> On 16.9.2015 18:53, Matthew R. Ochs wrote: >>> Interrupt processing can run in parallel to a remove operation. This >>> can lead to a condition where the

Re: [PATCH v2 09/30] cxlflash: Fix to stop interrupt processing on remove

2015-09-17 Thread Tomas Henzl
On 16.9.2015 18:53, Matthew R. Ochs wrote: > Interrupt processing can run in parallel to a remove operation. This > can lead to a condition where the interrupt handler is processing with > memory that has been freed. > > To avoid processing an interrupt while memory may be yanked, check for >