Re: [PATCH] cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline

2015-09-07 Thread Michael Ellerman
On Mon, 2015-09-07 at 16:33 +1000, Ian Munsie wrote: > No worries. I've been caught out by something similar in the past when I > assumed that something like this: > > if (foo) > /* >* A big long >* multiline >* block comment! >*/ >do_something() > >

Re: [PATCH] cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline

2015-09-06 Thread Ian Munsie
No worries. I've been caught out by something similar in the past when I assumed that something like this: if (foo) /* * A big long * multiline * block comment! */ do_something() would surely already have curly brackets around it ;-) Excerpts

Re: [PATCH] cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline

2015-09-06 Thread Ian Munsie
That looks better :) Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline

2015-09-06 Thread Andrew Donnellan
cxl_pci_enable_device_hook() is called when attempting to enable an AFU sitting on a vPHB. At present, the state of the underlying CXL card's PCI channel is only checked when it calls cxl_afu_check_and_enable() at the very end, after it has already set DMA options and initialised a default context.

Re: [PATCH] cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline

2015-09-06 Thread Andrew Donnellan
On 07/09/15 09:58, Ian Munsie wrote: Excerpts from andrew.donnellan's message of 2015-09-04 16:20:24 +1000: +if (!cxl_adapter_link_ok(afu->adapter)) +dev_warn(&dev->dev, "%s: Device link is down, refusing to enable AFU\n", __func__); +return false; Based on the indentati

Re: [PATCH] cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline

2015-09-06 Thread Ian Munsie
Excerpts from andrew.donnellan's message of 2015-09-04 16:20:24 +1000: > +if (!cxl_adapter_link_ok(afu->adapter)) > +dev_warn(&dev->dev, "%s: Device link is down, refusing to enable > AFU\n", __func__); > +return false; Based on the indentation it looks like you meant to add s

[PATCH] cxl: abort cxl_pci_enable_device_hook() if PCI channel is offline

2015-09-03 Thread Andrew Donnellan
cxl_pci_enable_device_hook() is called when attempting to enable an AFU sitting on a vPHB. At present, the state of the underlying CXL card's PCI channel is only checked when it calls cxl_afu_check_and_enable() at the very end, after it has already set DMA options and initialised a default context.