From: Eddie James <eajames@linux.vnet.ibm.com>
To: openbmc@lists.ozlabs.org
Cc: joel@jms.id.au, "Edward A. James" <eajames@us.ibm.com>
Subject: [PATCH linux dev-4.10 v2 1/5] drivers: fsi: occ: Fix 1 byte response and rc for O_NONBLOCK
Date: Fri, 9 Jun 2017 13:01:01 -0500 [thread overview]
Message-ID: <1497031265-29545-2-git-send-email-eajames@linux.vnet.ibm.com> (raw)
In-Reply-To: <1497031265-29545-1-git-send-email-eajames@linux.vnet.ibm.com>
From: "Edward A. James" <eajames@us.ibm.com>
Couple of bug fixes.
Signed-off-by: Edward A. James <eajames@us.ibm.com>
---
drivers/fsi/occ.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/fsi/occ.c b/drivers/fsi/occ.c
index fc014b6..a1508f2 100644
--- a/drivers/fsi/occ.c
+++ b/drivers/fsi/occ.c
@@ -188,7 +188,7 @@ static ssize_t occ_read_common(struct occ_client *client, char __user *ubuf,
if (!test_bit(XFR_COMPLETE, &xfr->flags)) {
if (test_bit(CLIENT_NONBLOCKING, &client->flags)) {
- rc = -ERESTARTSYS;
+ rc = -EAGAIN;
goto done;
}
@@ -593,11 +593,13 @@ static void occ_worker(struct work_struct *work)
goto done;
}
- /* already got 3 bytes resp, also need 2 bytes checksum */
- rc = occ_getsram(sbefifo, 0xFFFBF008, &xfr->buf[8],
- resp_data_length - 1);
- if (rc)
- goto done;
+ if (resp_data_length > 1) {
+ /* already got 3 bytes resp, also need 2 bytes checksum */
+ rc = occ_getsram(sbefifo, 0xFFFBF008, &xfr->buf[8],
+ resp_data_length - 1);
+ if (rc)
+ goto done;
+ }
xfr->resp_data_length = resp_data_length + 7;
--
1.8.3.1
next prev parent reply other threads:[~2017-06-09 18:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 18:01 [PATCH linux dev-4.10 v2 0/5] drivers: OCC: Update sensors, fix probing, add P8 Eddie James
2017-06-09 18:01 ` Eddie James [this message]
2017-06-16 5:11 ` [PATCH linux dev-4.10 v2 1/5] drivers: fsi: occ: Fix 1 byte response and rc for O_NONBLOCK Joel Stanley
2017-06-09 18:01 ` [PATCH linux dev-4.10 v2 2/5] drivers: hwmon: occ: Add new sensor versions and non-hwmon attributes Eddie James
2017-06-16 5:36 ` Joel Stanley
2017-06-09 18:01 ` [PATCH linux dev-4.10 v2 3/5] drivers: hwmon: occ: Add P8 OCC access Eddie James
2017-06-09 18:01 ` [PATCH linux dev-4.10 v2 4/5] drivers: occ: hwmon and fsi probing fix Eddie James
2017-06-09 18:01 ` [PATCH linux dev-4.10 v2 5/5] aspeed: update power9 dts and defconfigs for OCC Eddie James
2017-06-16 5:40 ` [PATCH linux dev-4.10 v2 0/5] drivers: OCC: Update sensors, fix probing, add P8 Joel Stanley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497031265-29545-2-git-send-email-eajames@linux.vnet.ibm.com \
--to=eajames@linux.vnet.ibm.com \
--cc=eajames@us.ibm.com \
--cc=joel@jms.id.au \
--cc=openbmc@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.