From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Hannes Reinecke <hare@suse.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 3/4] megasas: Add some more functions to keep Windows happy
Date: Tue, 18 May 2010 01:48:41 -0700 [thread overview]
Message-ID: <1274172521.7348.159.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20100518065708.419FE2A371@ochil.suse.de>
On Tue, 2010-05-18 at 08:57 +0200, Hannes Reinecke wrote:
> We shouldn't announce we have BIOS disabled, otherwise
> Windows will barf. And Windows7 insists on sending CLUSTER
> commands, so we can just implement them, too.
>
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---
> hw/megasas.c | 24 ++++++++++++++++++++++--
> hw/mfi.h | 1 +
> 2 files changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/hw/megasas.c b/hw/megasas.c
> index c3b74ef..e91c96b 100644
> --- a/hw/megasas.c
> +++ b/hw/megasas.c
> @@ -556,7 +556,6 @@ static int megasas_dcmd_get_bios_info(MPTState *d, struct megasas_cmd_t *cmd)
>
> memset(&info, 0x0, sizeof(info));
> info.continue_on_error = 1;
> - info.do_not_int_13 = 1;
> memcpy(cmd->iov_buf, (uint8_t *)&info, sizeof(info));
>
> return sizeof(info);
> @@ -572,6 +571,18 @@ static int megasas_dcmd_get_fw_time(MPTState *d, struct megasas_cmd_t *cmd)
> return sizeof(fw_time);
> }
>
> +static int megasas_dcmd_set_fw_time(MPTState *d, struct megasas_cmd_t *cmd)
> +{
> + uint64_t fw_time;
> +
> + memcpy(&fw_time, cmd->frame->dcmd.mbox, sizeof(fw_time));
> + DPRINTF("set fw time %lx\n", fw_time);
> + fw_time = megasas_fw_time();
> + memcpy(cmd->iov_buf, (uint8_t *)&fw_time, sizeof(fw_time));
> +
> + return sizeof(fw_time);
> +}
> +
> static int megasas_dcmd_pd_get_list(MPTState *s, struct megasas_cmd_t *cmd)
> {
> struct mfi_pd_list info;
> @@ -865,7 +876,6 @@ static int megasas_handle_dcmd(MPTState *s, struct megasas_cmd_t *cmd)
> size = megasas_dcmd_set_properties(s, cmd);
> retval = MFI_STAT_OK;
> break;
> - case 0x01080102:
> case MFI_DCMD_CFG_READ:
> case MFI_DCMD_CFG_FOREIGN_READ:
> case MFI_DCMD_CTRL_EVENT_GETINFO:
> @@ -878,6 +888,12 @@ static int megasas_handle_dcmd(MPTState *s, struct megasas_cmd_t *cmd)
> #endif
> retval = MFI_STAT_INVALID_DCMD;
> break;
> + case MFI_DCMD_CLUSTER_RESET_ALL:
> + case MFI_DCMD_CLUSTER_RESET_LD:
> + /* Cluster reset commands have a size of 0 */
> + size = 0;
> + retval = MFI_STAT_OK;
> + break;
> case MFI_DCMD_CTRL_GET_BIOS_INFO:
> size = megasas_dcmd_get_bios_info(s, cmd);
> retval = MFI_STAT_OK;
> @@ -886,6 +902,10 @@ static int megasas_handle_dcmd(MPTState *s, struct megasas_cmd_t *cmd)
> size = megasas_dcmd_get_fw_time(s, cmd);
> retval = MFI_STAT_OK;
> break;
> + case MFI_DCMD_CTRL_SET_TIME:
> + size = megasas_dcmd_set_fw_time(s, cmd);
> + retval = MFI_STAT_OK;
> + break;
> case 0x010e0301:
> case 0x010e0302:
> case 0x010e8481:
> diff --git a/hw/mfi.h b/hw/mfi.h
> index 312563e..0beb1b6 100644
> --- a/hw/mfi.h
> +++ b/hw/mfi.h
> @@ -167,6 +167,7 @@ typedef enum {
> MFI_DCMD_CTRL_SHUTDOWN = 0x01050000,
> MFI_DCMD_HIBERNATE_SHUTDOWN = 0x01060000,
> MFI_DCMD_CTRL_GET_TIME = 0x01080101,
> + MFI_DCMD_CTRL_SET_TIME = 0x01080102,
> MFI_DCMD_CTRL_GET_BIOS_INFO = 0x010c0100,
> MFI_DCMD_CTRL_FACTORY_DEFAULTS = 0x010d0000,
> MFI_DCMD_CTRL_MFC_DEFAULTS_GET = 0x010e0201,
Commited as ef312527acb5
Best,
--nab
prev parent reply other threads:[~2010-05-18 14:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 6:57 [Qemu-devel] [PATCH 3/4] megasas: Add some more functions to keep Windows happy Hannes Reinecke
2010-05-18 8:48 ` Nicholas A. Bellinger [this message]
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=1274172521.7348.159.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=hare@suse.de \
--cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).