diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2017-12-05 12:01:05 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-12-14 23:58:38 -0600 |
commit | f47de2b05f9dcda78df6b8717956fa8f23bcc22f (patch) | |
tree | 3f6682d1516b861011ec26831586af51ec1fa322 /libflash | |
parent | 3e6c3b03bb4cc5d088fc3da7293274adaabf6c5c (diff) | |
download | skiboot-f47de2b05f9dcda78df6b8717956fa8f23bcc22f.zip skiboot-f47de2b05f9dcda78df6b8717956fa8f23bcc22f.tar.gz skiboot-f47de2b05f9dcda78df6b8717956fa8f23bcc22f.tar.bz2 |
libflash/mbox-flash: Move sequence handling to driver level
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'libflash')
-rw-r--r-- | libflash/mbox-flash.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/libflash/mbox-flash.c b/libflash/mbox-flash.c index c8a8dad..3615df7 100644 --- a/libflash/mbox-flash.c +++ b/libflash/mbox-flash.c @@ -59,7 +59,6 @@ struct mbox_flash_data { bool pause; bool busy; bool ack; - uint8_t seq; /* Plus one, commands start at 1 */ void (*handlers[MBOX_COMMAND_COUNT + 1])(struct mbox_flash_data *, struct bmc_mbox_msg*); struct bmc_mbox_msg msg_mem; @@ -199,7 +198,6 @@ static struct bmc_mbox_msg *msg_alloc(struct mbox_flash_data *mbox_flash, * really the performance optimisation you want to make. */ memset(&mbox_flash->msg_mem, 0, sizeof(mbox_flash->msg_mem)); - mbox_flash->msg_mem.seq = ++mbox_flash->seq; mbox_flash->msg_mem.command = command; return &mbox_flash->msg_mem; } @@ -900,14 +898,6 @@ static void mbox_flash_callback(struct bmc_mbox_msg *msg, void *priv) goto out; } - if (msg->seq != mbox_flash->seq) { - /* Uhoh */ - prlog(PR_ERR, "Sequence numbers don't match! Got: %02x Expected: %02x\n", - msg->seq, mbox_flash->seq); - mbox_flash->rc = MBOX_R_SYSTEM_ERROR; - goto out; - } - if (msg->command > MBOX_COMMAND_COUNT) { prlog(PR_ERR, "Got response to unknown command %02x\n", msg->command); mbox_flash->rc = -1; |