Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1525630
| From | Colin King <colin.king@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] liquidio CN23XX: check if PENDING bit is clear using logical and |
| Date | 2016-11-18 19:50 +0100 |
| Message-ID | <sEWoy-2qv-11@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
From: Colin Ian King <colin.king@canonical.com>
the mbox state should be bitwise anded rather than logically anded
with OCTEON_MBOX_STATE_RESPONSE_PENDING. Fix this by using the
correct & operator instead of &&.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
index 5309384..73696b42 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_mailbox.c
@@ -301,7 +301,7 @@ int octeon_mbox_process_message(struct octeon_mbox *mbox)
sizeof(struct octeon_mbox_cmd));
if (!mbox_cmd.msg.s.resp_needed) {
mbox->state &= ~OCTEON_MBOX_STATE_REQUEST_RECEIVED;
- if (!(mbox->state &&
+ if (!(mbox->state &
OCTEON_MBOX_STATE_RESPONSE_PENDING))
mbox->state = OCTEON_MBOX_STATE_IDLE;
writeq(OCTEON_PFVFSIG, mbox->mbox_read_reg);
--
2.10.2
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] liquidio CN23XX: check if PENDING bit is clear using logical and Colin King <colin.king@canonical.com> - 2016-11-18 19:50 +0100 Re: [PATCH] liquidio CN23XX: check if PENDING bit is clear using logical and David Miller <davem@davemloft.net> - 2016-11-18 20:10 +0100
csiph-web