Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-19 Thread poza
On 2018-01-19 10:14, Sinan Kaya wrote: On 1/18/2018 11:23 PM, p...@codeaurora.org wrote: On 2018-01-18 23:33, Sinan Kaya wrote: On 1/18/2018 1:00 PM, p...@codeaurora.org wrote: I think you would put into include/linux/pci.h only if there is an external use of constant outside of drivers/pci

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-19 Thread poza
On 2018-01-19 10:14, Sinan Kaya wrote: On 1/18/2018 11:23 PM, p...@codeaurora.org wrote: On 2018-01-18 23:33, Sinan Kaya wrote: On 1/18/2018 1:00 PM, p...@codeaurora.org wrote: I think you would put into include/linux/pci.h only if there is an external use of constant outside of drivers/pci

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread Sinan Kaya
On 1/18/2018 11:23 PM, p...@codeaurora.org wrote: > On 2018-01-18 23:33, Sinan Kaya wrote: >> On 1/18/2018 1:00 PM, p...@codeaurora.org wrote: I think you would put into include/linux/pci.h only if there is an external use of constant outside of drivers/pci directory. Otherwise, you

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread Sinan Kaya
On 1/18/2018 11:23 PM, p...@codeaurora.org wrote: > On 2018-01-18 23:33, Sinan Kaya wrote: >> On 1/18/2018 1:00 PM, p...@codeaurora.org wrote: I think you would put into include/linux/pci.h only if there is an external use of constant outside of drivers/pci directory. Otherwise, you

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread poza
On 2018-01-18 23:33, Sinan Kaya wrote: On 1/18/2018 1:00 PM, p...@codeaurora.org wrote: I think you would put into include/linux/pci.h only if there is an external use of constant outside of drivers/pci directory. Otherwise, you should keep the setting inside one of the header files in

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread poza
On 2018-01-18 23:33, Sinan Kaya wrote: On 1/18/2018 1:00 PM, p...@codeaurora.org wrote: I think you would put into include/linux/pci.h only if there is an external use of constant outside of drivers/pci directory. Otherwise, you should keep the setting inside one of the header files in

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread Sinan Kaya
On 1/18/2018 1:00 PM, p...@codeaurora.org wrote: >> I think you would put into include/linux/pci.h only if there is an external >> use of constant outside of drivers/pci directory. Otherwise, you should keep >> the setting inside one of the header files in drivers/pci directory. >> >> I don't see

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread Sinan Kaya
On 1/18/2018 1:00 PM, p...@codeaurora.org wrote: >> I think you would put into include/linux/pci.h only if there is an external >> use of constant outside of drivers/pci directory. Otherwise, you should keep >> the setting inside one of the header files in drivers/pci directory. >> >> I don't see

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread poza
On 2018-01-18 22:01, Sinan Kaya wrote: On 1/18/2018 12:57 AM, p...@codeaurora.org wrote: On 2018-01-18 10:47, p...@codeaurora.org wrote: On 2018-01-17 22:16, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: +++ b/include/linux/dpc.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier:

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread poza
On 2018-01-18 22:01, Sinan Kaya wrote: On 1/18/2018 12:57 AM, p...@codeaurora.org wrote: On 2018-01-18 10:47, p...@codeaurora.org wrote: On 2018-01-17 22:16, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: +++ b/include/linux/dpc.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier:

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread Sinan Kaya
On 1/18/2018 12:57 AM, p...@codeaurora.org wrote: > On 2018-01-18 10:47, p...@codeaurora.org wrote: >> On 2018-01-17 22:16, Sinan Kaya wrote: >>> On 1/17/2018 5:37 AM, Oza Pawandeep wrote: +++ b/include/linux/dpc.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-18 Thread Sinan Kaya
On 1/18/2018 12:57 AM, p...@codeaurora.org wrote: > On 2018-01-18 10:47, p...@codeaurora.org wrote: >> On 2018-01-17 22:16, Sinan Kaya wrote: >>> On 1/17/2018 5:37 AM, Oza Pawandeep wrote: +++ b/include/linux/dpc.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread poza
On 2018-01-18 10:52, p...@codeaurora.org wrote: On 2018-01-17 22:15, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: + driver = pci_find_dpc_service(udev); +#endif #if IS_ENABLED(CONFIG_PCIEAER) - /* Use the aer driver of the component firstly */ -

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread poza
On 2018-01-18 10:52, p...@codeaurora.org wrote: On 2018-01-17 22:15, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: + driver = pci_find_dpc_service(udev); +#endif #if IS_ENABLED(CONFIG_PCIEAER) - /* Use the aer driver of the component firstly */ -

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread poza
On 2018-01-18 10:47, p...@codeaurora.org wrote: On 2018-01-17 22:16, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: +++ b/include/linux/dpc.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DPC_H_ +#define _DPC_H_ + +#define DPC_FATAL 4 + +#endif

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread poza
On 2018-01-18 10:47, p...@codeaurora.org wrote: On 2018-01-17 22:16, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: +++ b/include/linux/dpc.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DPC_H_ +#define _DPC_H_ + +#define DPC_FATAL 4 + +#endif

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread poza
On 2018-01-17 22:15, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: + driver = pci_find_dpc_service(udev); +#endif #if IS_ENABLED(CONFIG_PCIEAER) - /* Use the aer driver of the component firstly */ - driver = pci_find_aer_service(udev); I think we need

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread poza
On 2018-01-17 22:15, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: + driver = pci_find_dpc_service(udev); +#endif #if IS_ENABLED(CONFIG_PCIEAER) - /* Use the aer driver of the component firstly */ - driver = pci_find_aer_service(udev); I think we need

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread poza
On 2018-01-17 22:16, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: +++ b/include/linux/dpc.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DPC_H_ +#define _DPC_H_ + +#define DPC_FATAL 4 + +#endif //_DPC_H_ + can you keep this in drivers/pci.h

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread poza
On 2018-01-17 22:16, Sinan Kaya wrote: On 1/17/2018 5:37 AM, Oza Pawandeep wrote: +++ b/include/linux/dpc.h @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef _DPC_H_ +#define _DPC_H_ + +#define DPC_FATAL 4 + +#endif //_DPC_H_ + can you keep this in drivers/pci.h

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread Sinan Kaya
On 1/17/2018 5:37 AM, Oza Pawandeep wrote: > +++ b/include/linux/dpc.h > @@ -0,0 +1,9 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > + > +#ifndef _DPC_H_ > +#define _DPC_H_ > + > +#define DPC_FATAL4 > + > +#endif //_DPC_H_ > + can you keep this in drivers/pci.h and get rid of this

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread Sinan Kaya
On 1/17/2018 5:37 AM, Oza Pawandeep wrote: > +++ b/include/linux/dpc.h > @@ -0,0 +1,9 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > + > +#ifndef _DPC_H_ > +#define _DPC_H_ > + > +#define DPC_FATAL4 > + > +#endif //_DPC_H_ > + can you keep this in drivers/pci.h and get rid of this

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread Sinan Kaya
On 1/17/2018 5:37 AM, Oza Pawandeep wrote: > + driver = pci_find_dpc_service(udev); > +#endif > #if IS_ENABLED(CONFIG_PCIEAER) > - /* Use the aer driver of the component firstly */ > - driver = pci_find_aer_service(udev); I think we need a pci_find_service function that

Re: [PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread Sinan Kaya
On 1/17/2018 5:37 AM, Oza Pawandeep wrote: > + driver = pci_find_dpc_service(udev); > +#endif > #if IS_ENABLED(CONFIG_PCIEAER) > - /* Use the aer driver of the component firstly */ > - driver = pci_find_aer_service(udev); I think we need a pci_find_service function that

[PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread Oza Pawandeep
Current DPC driver does not do recovery, e.g. calling end-point's driver's callbacks, which sanitize the sw. DPC driver implements link_reset callback, and calls pci_do_recovery. Signed-off-by: Oza Pawandeep diff --git a/drivers/pci/pcie/pcie-dpc.c

[PATCH v5 3/4] PCI/DPC: Unify and plumb error handling into DPC

2018-01-17 Thread Oza Pawandeep
Current DPC driver does not do recovery, e.g. calling end-point's driver's callbacks, which sanitize the sw. DPC driver implements link_reset callback, and calls pci_do_recovery. Signed-off-by: Oza Pawandeep diff --git a/drivers/pci/pcie/pcie-dpc.c b/drivers/pci/pcie/pcie-dpc.c index