Re: [PATCH 2/3] Common code for init and runtime

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-03-19 at 01:50 -0700, Andy Yan wrote:
> From: Andy Yan <ayan@xxxxxxxxxxx>
> 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@xxxxxxxxxxx>
>  Signed-off-by: Ke Wei <kewei@xxxxxxxxxxx>
>  Signed-off-by: Ying Chu <jasonchu@xxxxxxxxxxx>
[...]

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


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux