Re: [PATCH 2/4] Staging: unisys: Added check for s-Par platform in each init function.

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

 



On Thu, Apr 24, 2014 at 01:57:10PM -0500, Ken Cox wrote:
> This fixes a problem reported from upstream where a panic occurs if the
> unisys drivers are loaded on a non s-Par system.
> 
> Reported-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
> Signed-off-by: Ken Cox <jkc@xxxxxxxxxx>
> Tested by: Ken Cox <jkc@xxxxxxxxxx>
> ---
>  drivers/staging/unisys/channels/chanstub.c            |  5 +++++
>  drivers/staging/unisys/uislib/uislib.c                |  5 +++++
>  drivers/staging/unisys/virthba/virthba.c              |  4 ++++
>  drivers/staging/unisys/virtpci/virtpci.c              |  4 ++++
>  .../staging/unisys/visorchannel/visorchannel_main.c   |  4 ++++
>  .../staging/unisys/visorchipset/visorchipset_main.c   |  4 ++++
>  drivers/staging/unisys/visorutil/visorkmodutils.c     | 19 +++++++++++++++++++
>  7 files changed, 45 insertions(+)
> 
> diff --git a/drivers/staging/unisys/channels/chanstub.c b/drivers/staging/unisys/channels/chanstub.c
> index f504f49..cf8242b 100644
> --- a/drivers/staging/unisys/channels/chanstub.c
> +++ b/drivers/staging/unisys/channels/chanstub.c
> @@ -23,6 +23,8 @@
>  #include <linux/slab.h>		/* for memcpy */
>  #include <linux/types.h>
>  
> +#include <asm/hypervisor.h>
> +
>  #include "channel.h"
>  #include "chanstub.h"
>  #include "version.h"
> @@ -30,6 +32,9 @@
>  static __init int
>  channel_mod_init(void)
>  {
> +	if (x86_hyper != &x86_hyper_unisys_spar)
> +		return -ENODEV;
> +
>  	return 0;
>  }

This will break the build without the previous patch (well, this driver
is already disabled, but you get the idea...)  So I can't take it,
sorry.

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux