From: Andrew Morton <akpm@linux-foundation.org>
To: linux-box <bo.yang@lsi.com>
Cc: linux-scsi@vger.kernel.org, James.Bottomley@SteelEye.com,
linux-kernel@vger.kernel.org, sumant.patro@lsi.com
Subject: Re: [PATCH 1/4] scsi: megaraid_sas -- add hibernation support
Date: Fri, 14 Sep 2007 03:27:17 -0700 [thread overview]
Message-ID: <20070914032717.e007de65.akpm@linux-foundation.org> (raw)
In-Reply-To: <1189513284.6082.4.camel@dhcp-75-534.se.lsil.com>
On Tue, 11 Sep 2007 12:21:24 +0000 linux-box <bo.yang@lsi.com> wrote:
> The megaraid_sas driver doesn't support the hibernation, the suspend/resume
> routine implemented to support the hibernation.
>
> Signed-off-by: Bo Yang <bo.yang@lsi.com>
>
> ---
> drivers/scsi/megaraid/megaraid_sas.c | 309 +++++++++++++++++++------
> drivers/scsi/megaraid/megaraid_sas.h | 1
> 2 files changed, 240 insertions(+), 70 deletions(-)
> diff -rupN linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.c linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.c
> --- linux-2.6.22_orig/drivers/scsi/megaraid/megaraid_sas.c 2007-07-01 22:25:57.000000000 -0400
> +++ linux-2.6.22_new/drivers/scsi/megaraid/megaraid_sas.c 2007-07-31 23:57:11.000000000 -0400
> @@ -1804,6 +1804,81 @@ static void megasas_complete_cmd_dpc(uns
> }
>
> /**
> + * megasas_issue_init_mfi - Initializes the FW
> + * @instance: Adapter soft state
> + *
> + * Issues the INIT MFI cmd
> + */
> +static int
> +megasas_issue_init_mfi(struct megasas_instance *instance)
> +{
> + u32 context;
> +
> + struct megasas_cmd *cmd;
> +
> + struct megasas_init_frame *init_frame;
> + struct megasas_init_queue_info *initq_info;
> + dma_addr_t init_frame_h;
> + dma_addr_t initq_info_h;
> +
> + /*
> + * Prepare a init frame. Note the init frame points to queue info
> + * structure. Each frame has SGL allocated after first 64 bytes. For
> + * this frame - since we don't need any SGL - we use SGL's space as
> + * queue info structure
> + *
> + * We will not get a NULL command below. We just created the pool.
> + */
> + cmd = megasas_get_cmd(instance);
> +
> + init_frame = (struct megasas_init_frame *)cmd->frame;
This would be better as
init_frame = &cmd->frame.init;
please review the whole driver for this.
> + initq_info = (struct megasas_init_queue_info *)
> + ((unsigned long)init_frame + 64);
And here we could do
initq_info = (struct megasas_init_queue_info *)(init_frame + 1);
although that's not really a lot nicer.
next prev parent reply other threads:[~2007-09-14 10:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 12:21 [PATCH 1/4] scsi: megaraid_sas -- add hibernation support linux-box
2007-09-14 10:27 ` Andrew Morton [this message]
2007-09-14 14:42 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2007-07-01 16:31 bo yang
2007-07-03 22:16 ` Andrew Morton
2007-07-04 18:21 ` Pavel Machek
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=20070914032717.e007de65.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=James.Bottomley@SteelEye.com \
--cc=bo.yang@lsi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sumant.patro@lsi.com \
/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