drivers (fsi): occ: Change errno for releasing client during transfer
PATCH 1/1 drivers (fsi): occ: Change errno for releasing client during transfer
From: "Edward A. James" <[email protected]>
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 <[email protected]>
--- drivers/fsi/occ.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/fsi/occ.c +1 -3
@@ -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 ;
Signature · 1 line
1.8.3.1
Reviewed-by Christopher Bostic <[email protected]>
Quoted 25 lines · Eddie James
From: "Edward A. James" <[email protected]>
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 <[email protected]>--- drivers/fsi/occ.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/fsi/occ.c +1
-3@@ -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 ;
Andrew Jeffery
AppliedQuoted 6 lines · Eddie James
From: "Edward A. James" <[email protected]>
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 <[email protected]>
Applied to dev-4.10.
Andrew