Commit 56481c29 authored by Ben Hutchings's avatar Ben Hutchings

xen-pciback: Add name prefix to global 'permissive' variable

commit 8014bcc8 upstream.

The variable for the 'permissive' module parameter used to be static
but was recently changed to be extern.  This puts it in the kernel
global namespace if the driver is built-in, so its name should begin
with a prefix identifying the driver.
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Fixes: af6fc858 ("xen-pciback: limit guest control of command register")
Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
parent cf24c628
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
#include "conf_space.h" #include "conf_space.h"
#include "conf_space_quirks.h" #include "conf_space_quirks.h"
bool permissive; bool xen_pcibk_permissive;
module_param(permissive, bool, 0644); module_param_named(permissive, xen_pcibk_permissive, bool, 0644);
/* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word, /* This is where xen_pcibk_read_config_byte, xen_pcibk_read_config_word,
* xen_pcibk_write_config_word, and xen_pcibk_write_config_byte are created. */ * xen_pcibk_write_config_word, and xen_pcibk_write_config_byte are created. */
...@@ -262,7 +262,7 @@ int xen_pcibk_config_write(struct pci_dev *dev, int offset, int size, u32 value) ...@@ -262,7 +262,7 @@ int xen_pcibk_config_write(struct pci_dev *dev, int offset, int size, u32 value)
* This means that some fields may still be read-only because * This means that some fields may still be read-only because
* they have entries in the config_field list that intercept * they have entries in the config_field list that intercept
* the write and do nothing. */ * the write and do nothing. */
if (dev_data->permissive || permissive) { if (dev_data->permissive || xen_pcibk_permissive) {
switch (size) { switch (size) {
case 1: case 1:
err = pci_write_config_byte(dev, offset, err = pci_write_config_byte(dev, offset,
......
...@@ -64,7 +64,7 @@ struct config_field_entry { ...@@ -64,7 +64,7 @@ struct config_field_entry {
void *data; void *data;
}; };
extern bool permissive; extern bool xen_pcibk_permissive;
#define OFFSET(cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->offset) #define OFFSET(cfg_entry) ((cfg_entry)->base_offset+(cfg_entry)->field->offset)
......
...@@ -105,7 +105,7 @@ static int command_write(struct pci_dev *dev, int offset, u16 value, void *data) ...@@ -105,7 +105,7 @@ static int command_write(struct pci_dev *dev, int offset, u16 value, void *data)
cmd->val = value; cmd->val = value;
if (!permissive && (!dev_data || !dev_data->permissive)) if (!xen_pcibk_permissive && (!dev_data || !dev_data->permissive))
return 0; return 0;
/* Only allow the guest to control certain bits. */ /* Only allow the guest to control certain bits. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment