From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Andy Yan <ayan@marvell.com>
Cc: jeff@garzik.org, Tejun Heo <tj@kernel.org>,
linux-scsi@vger.kernel.org, Michael Wang <qswang@marvell.com>,
Jacky Feng <jfeng@marvell.com>, Ying Chu <jasonchu@marvell.com>,
Ke Wei <kewei@marvell.com>
Subject: Re: [PATCH 2/3] Common code for init and runtime
Date: Mon, 23 Mar 2009 00:46:19 +0000 [thread overview]
Message-ID: <1237769179.4712.10.camel@localhost.localdomain> (raw)
In-Reply-To: <FE3F06125A99254E8D92161AA4569C6F0693DCE9@sc-exch02.marvell.com>
On Thu, 2009-03-19 at 01:50 -0700, Andy Yan wrote:
> From: Andy Yan <ayan@marvell.com>
> Date: Thu, 19 Mar 2009 21:49:44 +0800
> Subject: [PATCH 2/3] Common code for init and runtime
> This patch contains the common code for pci init and disk IO, all
> supported
> chips share the same code, the disk flash is supported. Error handling
> is
> enhanced with this patch.
>
> Signed-off-by: Andy Yan <ayan@marvell.com>
> Signed-off-by: Ke Wei <kewei@marvell.com>
> Signed-off-by: Ying Chu <jasonchu@marvell.com>
[...]
I gave it a cursory review, it seems a reasonable copy of mvsas.c
You need to lose all the kernel version dependent code, since you're
aiming this at the current kernel (2.6.29-rc):
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
> +#include "sas_task.c"
> +#endif
> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
> +static void mvs_work_queue(struct work_struct *work)
> +{
> + struct delayed_work *dw = container_of(work, struct
> delayed_work, work);
> +#else
> +static void mvs_work_queue(void *arg)
> +{
> + struct delayed_work *dw = arg;
> +#endif
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
> +#include <scsi.h>
> +#define sg_page(sg) sg->page
> +#define for_each_sg(sglist, sg, nr, __i) \
> + for (__i = 0, sg = (sglist); __i < (nr); __i++, sg++)
> +#endif
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
> +#define SAS_PROTOCOL_ALL SAS_PROTO_ALL
> +#endif
> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 20)
> +#define MV_INIT_DELAYED_WORK(w, f, d) INIT_DELAYED_WORK(w, f)
> +#else
> +#define MV_INIT_DELAYED_WORK(w, f, d) INIT_DELAYED_WORK(w, f, (void *)
> d)
> +#endif
etc.
James
prev parent reply other threads:[~2009-03-23 0:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 8:50 [PATCH 2/3] Common code for init and runtime Andy Yan
2009-03-23 0:46 ` James Bottomley [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=1237769179.4712.10.camel@localhost.localdomain \
--to=james.bottomley@hansenpartnership.com \
--cc=ayan@marvell.com \
--cc=jasonchu@marvell.com \
--cc=jeff@garzik.org \
--cc=jfeng@marvell.com \
--cc=kewei@marvell.com \
--cc=linux-scsi@vger.kernel.org \
--cc=qswang@marvell.com \
--cc=tj@kernel.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