Re: [PATCH 3/4] Simplify rtas_change_msi() error semantics

2007-10-02 Thread Benjamin Herrenschmidt
On Tue, 2007-10-02 at 17:40 +1000, Michael Ellerman wrote: > > rtas_disable_msi() asks firmware to configure 0 MSIs on the device, > that > hopefully succeeds. AFAIK configuring 0 MSIs is as close as we can get > to disabling MSI via RTAS. > > Perhaps that should also (re)enable INTX? Not sure.

Re: [PATCH 3/4] Simplify rtas_change_msi() error semantics

2007-10-02 Thread Michael Ellerman
On Tue, 2007-10-02 at 16:24 +1000, Benjamin Herrenschmidt wrote: > On Tue, 2007-10-02 at 15:58 +1000, Michael Ellerman wrote: > > > Looks allright, just a question tho... what do we do if it fails ? > > Do we > > > try to fallback to a lower number of MSIs ? Or what ? Dead device ? > > > > That's

Re: [PATCH 3/4] Simplify rtas_change_msi() error semantics

2007-10-01 Thread Benjamin Herrenschmidt
On Tue, 2007-10-02 at 15:58 +1000, Michael Ellerman wrote: > > Looks allright, just a question tho... what do we do if it fails ? > Do we > > try to fallback to a lower number of MSIs ? Or what ? Dead device ? > > That's all up to the device driver. In theory the driver could try again > with a l

Re: [PATCH 3/4] Simplify rtas_change_msi() error semantics

2007-10-01 Thread Michael Ellerman
On Tue, 2007-10-02 at 15:23 +1000, Benjamin Herrenschmidt wrote: > On Thu, 2007-09-20 at 16:36 +1000, Michael Ellerman wrote: > > Currently rtas_change_msi() returns either the error code from RTAS, or if > > the RTAS call succeeded the number of irqs that were configured by RTAS. > > This makes ch

Re: [PATCH 3/4] Simplify rtas_change_msi() error semantics

2007-10-01 Thread Benjamin Herrenschmidt
On Thu, 2007-09-20 at 16:36 +1000, Michael Ellerman wrote: > Currently rtas_change_msi() returns either the error code from RTAS, or if > the RTAS call succeeded the number of irqs that were configured by RTAS. > This makes checking the return value more complicated than it needs to be. > > Inste

[PATCH 3/4] Simplify rtas_change_msi() error semantics

2007-09-19 Thread Michael Ellerman
Currently rtas_change_msi() returns either the error code from RTAS, or if the RTAS call succeeded the number of irqs that were configured by RTAS. This makes checking the return value more complicated than it needs to be. Instead, have rtas_change_msi() check that the number of irqs configured by