> -----Original Message----- > From: Bjorn Helgaas [mailto:bhelgaas@xxxxxxxxxx] > Sent: Friday, December 21, 2012 11:49 AM > To: Don Dutile > Cc: Rose, Gregory V; linux-pci@xxxxxxxxxxxxxxx; Yuval Mintz; > bhutchings@xxxxxxxxxxxxxx; yinghai@xxxxxxxxxx; davem@xxxxxxxxxxxxx > Subject: Re: [PATCH v2] PCI SRIOV device enable and disable via sysfs > > On Thu, Dec 20, 2012 at 2:47 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> > wrote: > > > I made the -EPERM change suggested by Greg and added this to my > > pci/for-3.8 branch. I'll ask Linus to pull it soon after v3.8-rc1. > > After a little off-list discussion about the merits of EINVAL, EPERM, > EBUSY, etc., I adopted Ben's suggestion of EBUSY for this case: > > + if (pdev->sriov->num_VFs) { > + dev_warn(&pdev->dev, "%d VFs already enabled. Disable > before enabling %d VFs\n", > + pdev->sriov->num_VFs, num_vfs); > + return -EBUSY; > > where the idea is "the device is already busy providing N VFs, so you > can't configure it to serve M VFs" > > Does that sound agreeable to everybody? That makes sense, I'm fine with it. - Greg > > Bjorn -- 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