Re: [PATCH] Add pci=sriov=[0|1] to enable or disable SRIOV.

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

 



On Mon, Oct 10, 2011 at 7:58 AM, Prarit Bhargava <prarit@xxxxxxxxxx> wrote:
> To help debugging, add a kernel parameter, pci=sriov=[0|1], which enables or
> disables SRIOV.
>
> Signed-off-by: Prarit Bhargava <prarit@xxxxxxxxxx>
> Cc: ddutile@xxxxxxxxxx
> Cc: bhelgaas@xxxxxxxxxx
> ---
>  Documentation/kernel-parameters.txt |    3 +++
>  drivers/pci/iov.c                   |   31 ++++++++++++++++++++++++++++++-
>  drivers/pci/pci.c                   |    2 ++
>  drivers/pci/pci.h                   |    3 +++
>  4 files changed, 38 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index 854ed5c..7ad2d32 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -2032,6 +2032,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>                                on: Turn ECRC on.
>                realloc         reallocate PCI resources if allocations done by BIOS
>                                are erroneous.
> +               sriov=          [HW]
> +                               Format: [0|1]
> +                               Enable or disable SRIOV support in kernel.
>
>        pcie_aspm=      [PCIE] Forcibly enable or disable PCIe Active State Power
>                        Management.
> diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
> index 42fae47..4a861df 100644
> --- a/drivers/pci/iov.c
> +++ b/drivers/pci/iov.c
> @@ -408,6 +408,20 @@ static void sriov_disable(struct pci_dev *dev)
>        iov->nr_virtfn = 0;
>  }
>
> +unsigned int pci_sriov_enabled = 1;
> +
> +static int __init do_sriov_enable(char *str)
> +{
> +       get_option(&str, &pci_sriov_enabled);
> +       if (!pci_sriov_enabled)
> +               printk(KERN_INFO "SRIOV: Disabled\n");
> +       else
> +               printk(KERN_INFO "SRIOV: Enabled\n");
> +
> +       return 1;
> +}
> +__setup("sriov=", do_sriov_enable);
> +

what is the point sriov=1? are you going to enable sriov forcefully?

pci=nosriov

should be more reasonable.

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


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux