Re: [PATCH] fix tulip suspend/resume

Pavel Machek
2005-06-08T12:20:35Z

Hi!

> > pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state)
> > {
> > if (!pci_find_capability(dev, PCI_CAP_ID_PM))
> > return PCI_D0;
> >
> > switch (state) {
> > case 0: return PCI_D0;
> > case 3: return PCI_D3hot;
> > default:
> > printk("They asked me for state %d\n", state);
> > BUG();
> > }
> > return PCI_D0;
> > }
>
> Gack ! I need to remember to fix that one before I change PMSG_FREEZE
> definition to be different than PMSG_SUSPEND upstream.
>
> Pavel, do you know that there are other ways to deal with errors than
> just BUG()'ing all over the place ? :)

And how would you propose to deal this this error? PCI_ERROR probably
needs to be invented (for acpi people), but I do not think I want
callers to check for it.
Pavel