On Thu, Aug 22, 2019 at 04:11:45PM -0500, Eric Blake wrote: > On 8/22/19 2:59 PM, Daniel Henrique Barboza wrote: > > There is nothing wrong with how sPAPR handles multifunction PCI > > hot unplugs. The problem is that x86 does it simpler. Instead of > > removing each non-zero function and then removing function zero, > > x86 can remove any function of the slot to trigger the hot unplug. > > > > > +++ b/hw/ppc/spapr_pci.c > > @@ -1700,11 +1700,13 @@ static void spapr_pci_unplug_request(HotplugHandler *plug_handler, > > state = func_drck->dr_entity_sense(func_drc); > > if (state == SPAPR_DR_ENTITY_SENSE_PRESENT > > && !spapr_drc_unplug_requested(func_drc)) { > > - error_setg(errp, > > - "PCI: slot %d, function %d still present. " > > - "Must unplug all non-0 functions first.", > > - slotnr, i); > > - return; > > + /* > > + * Attempting to remove function 0 of a multifunction > > + * device will will cascade into removing all child > > + * functions, even if their unplug weren't requested > > s/weren't/wasn't/ Actually, I think this is technically a subjunctive, which would make it "were" rather than "was". Modern English usage doesn't really do the subjunctive, though. With my maintainer hat on, rather than pedant hat, the meaning is clear so I really don't care, especially from a contributer whose first language isn't English. > > > + * beforehand. > > + */ > > + spapr_drc_detach(func_drc); > > } > > } > > } > > > -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson