spapr_pci.c (7b2c4cdd794e499883281c18770b2d16adebfaac) | spapr_pci.c (a03509cd2baf48b1e947d9eb203ccb95bd99e5fb) |
---|---|
1/* 2 * QEMU sPAPR PCI host originated from Uninorth PCI host 3 * 4 * Copyright (c) 2011 Alexey Kardashevskiy, IBM Corporation. 5 * Copyright (C) 2011 David Gibson, IBM Corporation. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 1709 unchanged lines hidden (view full) --- 1718 if (state == SPAPR_DR_ENTITY_SENSE_PRESENT 1719 && !spapr_drc_unplug_requested(func_drc)) { 1720 /* 1721 * Attempting to remove function 0 of a multifunction 1722 * device will will cascade into removing all child 1723 * functions, even if their unplug weren't requested 1724 * beforehand. 1725 */ | 1/* 2 * QEMU sPAPR PCI host originated from Uninorth PCI host 3 * 4 * Copyright (c) 2011 Alexey Kardashevskiy, IBM Corporation. 5 * Copyright (C) 2011 David Gibson, IBM Corporation. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a copy 8 * of this software and associated documentation files (the "Software"), to deal --- 1709 unchanged lines hidden (view full) --- 1718 if (state == SPAPR_DR_ENTITY_SENSE_PRESENT 1719 && !spapr_drc_unplug_requested(func_drc)) { 1720 /* 1721 * Attempting to remove function 0 of a multifunction 1722 * device will will cascade into removing all child 1723 * functions, even if their unplug weren't requested 1724 * beforehand. 1725 */ |
1726 spapr_drc_detach(func_drc); | 1726 spapr_drc_unplug_request(func_drc); |
1727 } 1728 } 1729 } 1730 | 1727 } 1728 } 1729 } 1730 |
1731 spapr_drc_detach(drc); | 1731 spapr_drc_unplug_request(drc); |
1732 1733 /* if this isn't func 0, defer unplug event. otherwise signal removal 1734 * for all present functions 1735 */ 1736 if (PCI_FUNC(pdev->devfn) == 0) { 1737 for (i = 7; i >= 0; i--) { 1738 func_drc = drc_from_devfn(phb, chassis, PCI_DEVFN(slotnr, i)); 1739 func_drck = SPAPR_DR_CONNECTOR_GET_CLASS(func_drc); --- 795 unchanged lines hidden --- | 1732 1733 /* if this isn't func 0, defer unplug event. otherwise signal removal 1734 * for all present functions 1735 */ 1736 if (PCI_FUNC(pdev->devfn) == 0) { 1737 for (i = 7; i >= 0; i--) { 1738 func_drc = drc_from_devfn(phb, chassis, PCI_DEVFN(slotnr, i)); 1739 func_drck = SPAPR_DR_CONNECTOR_GET_CLASS(func_drc); --- 795 unchanged lines hidden --- |