All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux dev-4.10] drivers (fsi): occ: Change errno for releasing client during transfer
@ 2017-10-31 17:34 Eddie James
  2017-10-31 21:03 ` Christopher Bostic
  2017-11-01  7:35 ` Andrew Jeffery
  0 siblings, 2 replies; 3+ messages in thread
From: Eddie James @ 2017-10-31 17:34 UTC (permalink / raw)
  To: openbmc; +Cc: joel, andrew, Edward A. James

From: "Edward A. James" <eajames@us.ibm.com>

Clients were receiving the ECANCELED errno when the client is removed
during a transfer. Use ENODEV instead, as ECANCELED is for AIO ops.

Signed-off-by: Edward A. James <eajames@us.ibm.com>
---
 drivers/fsi/occ.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/fsi/occ.c b/drivers/fsi/occ.c
index 1fe1a54..adc64f3 100644
--- a/drivers/fsi/occ.c
+++ b/drivers/fsi/occ.c
@@ -240,9 +240,7 @@ static ssize_t occ_read_common(struct occ_client *client, char __user *ubuf,
 		spin_lock_irq(&client->lock);
 
 		if (!test_bit(XFR_COMPLETE, &xfr->flags)) {
-			if (test_bit(XFR_CANCELED, &xfr->flags))
-				rc = -ECANCELED;
-			else if (occ->cancel)
+			if (occ->cancel || test_bit(XFR_CANCELED, &xfr->flags))
 				rc = -ENODEV;
 			else
 				rc = -EINTR;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH linux dev-4.10] drivers (fsi): occ: Change errno for releasing client during transfer
  2017-10-31 17:34 [PATCH linux dev-4.10] drivers (fsi): occ: Change errno for releasing client during transfer Eddie James
@ 2017-10-31 21:03 ` Christopher Bostic
  2017-11-01  7:35 ` Andrew Jeffery
  1 sibling, 0 replies; 3+ messages in thread
From: Christopher Bostic @ 2017-10-31 21:03 UTC (permalink / raw)
  To: Eddie James, openbmc; +Cc: andrew, Edward A. James

Reviewed-by: Christopher Bostic <cbostic@linux.vnet.ibm.com>


On 10/31/17 12:34 PM, Eddie James wrote:
> From: "Edward A. James" <eajames@us.ibm.com>
>
> Clients were receiving the ECANCELED errno when the client is removed
> during a transfer. Use ENODEV instead, as ECANCELED is for AIO ops.
>
> Signed-off-by: Edward A. James <eajames@us.ibm.com>
> ---
>   drivers/fsi/occ.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/fsi/occ.c b/drivers/fsi/occ.c
> index 1fe1a54..adc64f3 100644
> --- a/drivers/fsi/occ.c
> +++ b/drivers/fsi/occ.c
> @@ -240,9 +240,7 @@ static ssize_t occ_read_common(struct occ_client *client, char __user *ubuf,
>   		spin_lock_irq(&client->lock);
>
>   		if (!test_bit(XFR_COMPLETE, &xfr->flags)) {
> -			if (test_bit(XFR_CANCELED, &xfr->flags))
> -				rc = -ECANCELED;
> -			else if (occ->cancel)
> +			if (occ->cancel || test_bit(XFR_CANCELED, &xfr->flags))
>   				rc = -ENODEV;
>   			else
>   				rc = -EINTR;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH linux dev-4.10] drivers (fsi): occ: Change errno for releasing client during transfer
  2017-10-31 17:34 [PATCH linux dev-4.10] drivers (fsi): occ: Change errno for releasing client during transfer Eddie James
  2017-10-31 21:03 ` Christopher Bostic
@ 2017-11-01  7:35 ` Andrew Jeffery
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Jeffery @ 2017-11-01  7:35 UTC (permalink / raw)
  To: Eddie James, openbmc; +Cc: joel, Edward A. James

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

On Tue, 2017-10-31 at 12:34 -0500, Eddie James wrote:
> From: "Edward A. James" <eajames@us.ibm.com>
> 
> Clients were receiving the ECANCELED errno when the client is removed
> during a transfer. Use ENODEV instead, as ECANCELED is for AIO ops.
> 
> Signed-off-by: Edward A. James <eajames@us.ibm.com>

Applied to dev-4.10.

Andrew

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-11-01  7:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 17:34 [PATCH linux dev-4.10] drivers (fsi): occ: Change errno for releasing client during transfer Eddie James
2017-10-31 21:03 ` Christopher Bostic
2017-11-01  7:35 ` Andrew Jeffery

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.