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...@intel.com>
> Signed-off-by: Ken Cox <j...@redhat.com>
> Tested by: Ken Cox <j...@redhat.com>
> ---
>  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
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to