Re: [PATCH v7 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback

2020-11-26 Thread Ethan Zhao
ce417fbf81a8a46a89535f44b9224ee9fbb55a29.1591307288.git.sathyanarayanan.kuppusw...@linux.intel.com/#t > > Ethan's related(?) patchset, V8 : > https://lore.kernel.org/linux-pci/20201007113158.48933-1-haifeng.z...@intel.com/#t This patchset I think need more discussion and maintainer's (Bjorn's) suggestion or advice. You are welcome to try it and give me the feedback. Thanks, Ethan >

Re: [PATCH v11 4/5] PCI/portdrv: Remove redundant pci_aer_available() check in DPC enable logic

2020-11-02 Thread Ethan Zhao
n one of the possible is if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) && (pcie_ports_dpc_native)) services |= PCIE_PORT_SERVICE_DPC; after your patch ? nothing about AER ? Thanks, Ethan On Thu, Oct 29, 2020 at 1:14 AM Kuppuswamy, Sathyanarayanan wrote: > > > > On 10/27/20

Re: [PATCH] AER: aer_root_reset() non-native handling

2020-11-01 Thread Ethan Zhao
7;s interrupt in response to error messages */ > - pci_read_config_dword(dev, aer + PCI_ERR_ROOT_COMMAND, ®32); > - reg32 &= ~ROOT_PORT_INTR_ON_MESG_MASK; > - pci_write_config_dword(dev, aer + PCI_ERR_ROOT_COMMAND, reg32); There may be some reasons to disable interrupt first

Disinfectant

2020-10-29 Thread Ethan Smith
versatility (suitable for all skin types) combined with an affordable price means that customers make an informed choice of a product among others available on the market. Are you interested in cooperation? Ethan Smith

Re: [PATCH v11 1/5] PCI: Conditionally initialize host bridge native_* members

2020-10-28 Thread Ethan Zhao
On Tue, Oct 27, 2020 at 10:00 PM Kuppuswamy Sathyanarayanan wrote: > > If CONFIG_PCIEPORTBUS is not enabled in kernel then initialing > struct pci_host_bridge PCIe specific native_* members to "1" is > incorrect. So protect the PCIe specific member initialization > with CONFIG_PCIEPORTBUS. > > Sig

Re: [PATCH v10 5/5] PCI/DPC: Move AER/DPC dependency checks out of DPC driver

2020-10-28 Thread Ethan Zhao
On Tue, Oct 27, 2020 at 11:12 AM Kuppuswamy Sathyanarayanan wrote: > > Currently, AER and DPC Capabilities dependency checks is > distributed between DPC and portdrv service drivers. So move > them out of DPC driver. > > Also, since services & PCIE_PORT_SERVICE_AER check already > ensures AER nati

Re: [PATCH v11 4/5] PCI/portdrv: Remove redundant pci_aer_available() check in DPC enable logic

2020-10-28 Thread Ethan Zhao
On Tue, Oct 27, 2020 at 10:00 PM Kuppuswamy Sathyanarayanan wrote: > > In DPC service enable logic, check for > services & PCIE_PORT_SERVICE_AER implies pci_aer_available() How about PCIE_PORT_SERVICE_AER is not configured, but pcie_aer_disable == 0 ? > is true. So there is no need to explicitly c

Re: [PATCH V2 1/2] PCI/AER: Add pcie_is_ecrc_enabled() API

2020-10-28 Thread Ethan Zhao
On Wed, Oct 28, 2020 at 9:48 AM Vidya Sagar wrote: > > Adds pcie_is_ecrc_enabled() API to let other sub-systems (like DesignWare) > to query if ECRC policy is enabled and perform any configuration > required in those respective sub-systems. > > Signed-off-by: Vidya Sagar > --- > V2: > * None from

Re: [PATCH v2] pciehp: Add check for DL_ACTIVE bit in pciehp_check_link_status()

2020-10-20 Thread Ethan Zhao
of this > scenario. Sorry, I couldn't understand the logic here. if DL_ACTIVE was set, PCI_EXP_LNKSTA_LT is to be cleared, vice versa. why need (lnk_status & PCI_EXP_LNKSTA_LT) && !(lnk_status & PCI_EXP_LNKSTA_DLLLA) Double safe ? Thanks, Ethan > > Signed-off-

Re: [PATCH v9 12/15] PCI/RCEC: Add RCiEP's linked RCEC to AER/ERR

2020-10-19 Thread Ethan Zhao
On Sat, Oct 17, 2020 at 6:29 AM Bjorn Helgaas wrote: > > [+cc Christoph, Ethan, Sinan, Keith; sorry should have cc'd you to > begin with since you're looking at this code too. Particularly > interested in your thoughts about whether we should be touching >

Re: [PATCH v6 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling

2020-10-15 Thread Ethan Zhao
On Thu, Oct 15, 2020 at 1:53 PM Kuppuswamy, Sathyanarayanan wrote: > > > > On 10/14/20 10:05 PM, Ethan Zhao wrote: > > On Thu, Oct 15, 2020 at 11:04 AM Kuppuswamy, Sathyanarayanan > > wrote: > >> > >> > >> > >> On 10/14/20 6:58

Re: [PATCH v6 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling

2020-10-15 Thread Ethan Zhao
nto here, pciehp driver also gets DLLSC /PDC and may run into SUPPRISE_REMOVAL first. so there would be duplicated pci_stop_and_remove_bus_device(pdev); Don't say it would naturally be okay. check it. > + } > + > + result = reset_link(udev); > + > +

Re: [PATCH v6 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling

2020-10-14 Thread Ethan Zhao
On Thu, Oct 15, 2020 at 11:04 AM Kuppuswamy, Sathyanarayanan wrote: > > > > On 10/14/20 6:58 PM, Ethan Zhao wrote: > > On Thu, Oct 15, 2020 at 1:06 AM Kuppuswamy, Sathyanarayanan > > wrote: > >> > >> > >> > >> On 10/14/20 8:07

Re: [PATCH v6 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling

2020-10-14 Thread Ethan Zhao
On Thu, Oct 15, 2020 at 1:06 AM Kuppuswamy, Sathyanarayanan wrote: > > > > On 10/14/20 8:07 AM, Ethan Zhao wrote: > > On Wed, Oct 14, 2020 at 5:00 PM Kuppuswamy Sathyanarayanan > > wrote: > >> > >> Commit bdb5ac85777d ("PCI/ERR: Handle fatal error r

Re: [PATCH v6 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling

2020-10-14 Thread Ethan Zhao
rozen, data); > -} > - > static int report_normal_detected(struct pci_dev *dev, void *data) > { > return report_error_detected(dev, pci_channel_io_normal, data); > @@ -146,9 +141,59 @@ static int report_resume(struct pci_dev *dev, vo

Re: [PATCH v4 1/2] PCI/ERR: Call pci_bus_reset() before calling ->slot_reset() callback

2020-10-14 Thread Ethan Zhao
used [-Wunused-function] static pci_ers_result_t pcie_do_fatal_recovery(struct pci_dev *dev, Thanks, Ethan On Tue, Oct 13, 2020 at 10:18 PM Kuppuswamy, Sathyanarayanan wrote: > > > > On 10/12/20 2:05 PM, Raj, Ashok wrote: > > On Sun, Oct 11, 2020 at 10:03:40PM -0700, > >

Re: [PATCH v4 2/2] PCI/ERR: Split the fatal and non-fatal error recovery handling

2020-10-14 Thread Ethan Zhao
n" functionality in fatal error recovery handler. This patch only reverts the commit bdb5ac85777d ? or you'd better separate the revert and code you added. Thanks, Ethan > > Also holding pci_lock_rescan_remove() will prevent the race between hotplug > and DPC handler. &g

Re: [PATCH v8 2/6] PCI/DPC: define a function to check and wait till port finish DPC handling

2020-10-08 Thread Ethan Zhao
On Thu, Oct 8, 2020 at 2:16 AM Kuppuswamy, Sathyanarayanan wrote: > > > On 10/7/20 4:31 AM, Ethan Zhao wrote: > > Once root port DPC capability is enabled and triggered, at the beginning > > of DPC is triggered, the DPC status bits are set by hardware and then > > sen

Re: [PATCH v8 2/6] PCI/DPC: define a function to check and wait till port finish DPC handling

2020-10-07 Thread Ethan Zhao
On Thu, Oct 8, 2020 at 2:16 AM Kuppuswamy, Sathyanarayanan wrote: > > > On 10/7/20 4:31 AM, Ethan Zhao wrote: > > Once root port DPC capability is enabled and triggered, at the beginning > > of DPC is triggered, the DPC status bits are set by hardware and then > > sen

Re: [PATCH v8 1/6] PCI/ERR: get device before call device driver to avoid NULL pointer dereference

2020-10-07 Thread Ethan Zhao
On Thu, Oct 8, 2020 at 1:24 AM Kuppuswamy, Sathyanarayanan wrote: > > > On 10/7/20 4:31 AM, Ethan Zhao wrote: > > During DPC error injection test we found there is race condition between > > pciehp and DPC driver, NULL pointer dereference caused panic as following > >

[PATCH v8 6/6] PCI/ERR: don't mix io state not changed and no driver together

2020-10-07 Thread Ethan Zhao
When we see 'can't recover (no error_detected callback)' on console, Maybe the reason is io state is not changed by calling pci_dev_set_io_state(), that is confused. fix it. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Chagnes: v2: no change. v3:

[PATCH v8 0/6] Fix DPC hotplug race and enhance error handling

2020-10-07 Thread Ethan Zhao
e function change code of pci_dev_set_io_state(). per Ashok's request, add more description to this cover-letter part. Thanks, Ethan Ethan Zhao (6): PCI/ERR: get device before call device driver to avoid NULL pointer dereference PCI/DPC: define a function to check and wait till port

[PATCH v8 5/6] PCI/ERR: only return true when dev io state is really changed

2020-10-07 Thread Ethan Zhao
ed-off-by: Ethan Zhao --- Changnes: v2: revise description and code according to suggestion from Andy. v3: change code to simpler. v4: no change. v5: no change. v6: no change. v7: changed based on Bjorn's code and truth table. v8: according to Bjorn's suggestion, rebase on another simpli

[PATCH v8 4/6] PCI/ERR: simplify function pci_dev_set_io_state() with if

2020-10-07 Thread Ethan Zhao
No function change. Signed-off-by: Ethan Zhao --- Changes: v8: based on Bjorn's code and truth table, simplify the logic of function pci_dev_set_io_state(), no function change. drivers/pci/pci.h | 54 --- 1 file changed, 23 insertions(+

[PATCH v8 1/6] PCI/ERR: get device before call device driver to avoid NULL pointer dereference

2020-10-07 Thread Ethan Zhao
ev_put(). So does pci_dev_get() before using the device instance to avoid NULL pointer dereference. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Changes: v2: revise doc according to Andy's suggestion. v3: no change. v4: no change. v5: no change. v6: m

[PATCH v8 2/6] PCI/DPC: define a function to check and wait till port finish DPC handling

2020-10-07 Thread Ethan Zhao
atus and wait till the hardware and software completed the procedure. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- changes: v2???align ICS code name to public doc. v3: no change. v4: response to Christoph's (Christoph Hellwig ) tip, move pci_wait_port_ou

[PATCH v8 3/6] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-10-07 Thread Ethan Zhao
r malfunction. Brute DPC error injection script: for i in {0..100} do setpci -s 64:02.0 0x196.w=000a setpci -s 65:00.0 0x04.w=0544 mount /dev/nvme0n1p1 /root/nvme sleep 1 done Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Changes: v2:

Re: [PATCH v7 4/5] PCI: only return true when dev io state is really changed

2020-10-07 Thread Ethan Zhao
Bjorn, On Sun, Oct 4, 2020 at 12:44 AM Bjorn Helgaas wrote: > > On Sat, Oct 03, 2020 at 03:55:13AM -0400, Ethan Zhao wrote: > > When uncorrectable error happens, AER driver and DPC driver interrupt > > handlers likely call > > > >pcie_do_re

Re: [PATCH v7 3/5] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-10-07 Thread Ethan Zhao
Lukas, On Mon, Oct 5, 2020 at 3:13 AM Lukas Wunner wrote: > > On Sat, Oct 03, 2020 at 03:55:12AM -0400, Ethan Zhao wrote: > > When root port has DPC capability and it is enabled, then triggered by > > errors, DPC DLLSC and PDC etc interrupts will be sent to DPC driver, pciehp

Re: [PATCH v7 0/5] Fix DPC hotplug race and enhance error handling

2020-10-07 Thread Ethan Zhao
Raj, On Sun, Oct 4, 2020 at 12:57 PM Raj, Ashok wrote: > > Hi Ethan > > On Sat, Oct 03, 2020 at 03:55:09AM -0400, Ethan Zhao wrote: > > Hi,folks, > > > > This simple patch set fixed some serious security issues found when DPC > > error injection and NVMe SSD

[PATCH v7 5/5] PCI/ERR: don't mix io state not changed and no driver together

2020-10-03 Thread Ethan Zhao
When we see 'can't recover (no error_detected callback)' on console, Maybe the reason is io state is not changed by calling pci_dev_set_io_state(), that is confused. fix it. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Chagnes: v2: no change. v3:

[PATCH v7 4/5] PCI: only return true when dev io state is really changed

2020-10-03 Thread Ethan Zhao
ed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Alexandru Gagniuc Reviewed-by: Andy Shevchenko --- Changnes: v2: revise description and code according to suggestion from Andy. v3: change code to simpler. v4: no change. v5: no change. v6: no change. v7: changed

[PATCH v7 1/5] PCI/ERR: get device before call device driver to avoid NULL pointer dereference

2020-10-03 Thread Ethan Zhao
ev_put(). So does pci_dev_get() before using the device instance to avoid NULL pointer dereference. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Changes: v2: revise doc according to Andy's suggestion. v3: no change. v4: no change. v5: no change. v6: moved

[PATCH v7 3/5] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-10-03 Thread Ethan Zhao
r malfunction. Brute DPC error injection script: for i in {0..100} do setpci -s 64:02.0 0x196.w=000a setpci -s 65:00.0 0x04.w=0544 mount /dev/nvme0n1p1 /root/nvme sleep 1 done Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Changes: v2:

[PATCH v7 2/5] PCI/DPC: define a function to check and wait till port finish DPC handling

2020-10-03 Thread Ethan Zhao
atus and wait till the hardware and software completed the procedure. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- changes: v2:align ICS code name to public doc. v3: no change. v4: response to Christoph's (Christoph Hellwig ) tip, move pci_wait_port_outdpc

[PATCH v7 0/5] Fix DPC hotplug race and enhance error handling

2020-10-03 Thread Ethan Zhao
on Bjorn's code and truth table. change the patch[5/5] about the debug output information. Thanks, Ethan Ethan Zhao (5): PCI/ERR: get device before call device driver to avoid NULL pointer dereference PCI/DPC: define a function to check and wait till port finish DPC handlin

Re: [PATCH v6 4/5] PCI: only return true when dev io state is really changed

2020-10-03 Thread Ethan Zhao
Bjorn, On Sat, Oct 3, 2020 at 1:29 AM Bjorn Helgaas wrote: > > [+cc Sinan] > > On Wed, Sep 30, 2020 at 03:05:36AM -0400, Ethan Zhao wrote: > > When uncorrectable error happens, AER driver and DPC driver interrupt > > handlers likely call > > > >pcie

Re: [PATCH v6 4/5] PCI: only return true when dev io state is really changed

2020-10-02 Thread Ethan Zhao
Sinan, On Sat, Oct 3, 2020 at 12:08 AM Sinan Kaya wrote: > > On 9/30/2020 3:05 AM, Ethan Zhao wrote: > > When uncorrectable error happens, AER driver and DPC driver interrupt > > handlers likely call > > > >pcie_do_recovery() > >->pci_walk_

[PATCH v6 3/5] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-30 Thread Ethan Zhao
r malfunction. Brute DPC error injection script: for i in {0..100} do setpci -s 64:02.0 0x196.w=000a setpci -s 65:00.0 0x04.w=0544 mount /dev/nvme0n1p1 /root/nvme sleep 1 done Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Changes: v2:

[PATCH v6 0/5] Fix DPC hotplug race and enhance error handling

2020-09-30 Thread Ethan Zhao
o DPC driver and its declaration to pci.h. (tip from Christoph Hellwig ). v5: fix building issue reported by l...@intel.com with some config. v6: move patch[3/5] as the first patch according to Lukas's suggestion. and rewrite the comment part of patch[3/5]. Ethan Zhao (5): PCI/ERR:

[PATCH v6 5/5] PCI/ERR: don't mix io state not changed and no driver together

2020-09-30 Thread Ethan Zhao
When we see 'can't recover (no error_detected callback)' on console, Maybe the reason is io state is not changed by calling pci_dev_set_io_state(), that is confused. fix it. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Chagnes: v2: no change. v3:

[PATCH v6 2/5] PCI/DPC: define a function to check and wait till port finish DPC handling

2020-09-30 Thread Ethan Zhao
atus and wait till the hardware and software completed the procedure. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- changes: v2:align ICS code name to public doc. v3: no change. v4: response to Christoph's (Christoph Hellwig ) tip, move pci_wait_port_outdpc

[PATCH v6 4/5] PCI: only return true when dev io state is really changed

2020-09-30 Thread Ethan Zhao
ate is pci_channel_io_frozen, that will cause AER or DPC handler re-enter the error detecting and recovery procedure one after another. The result is the recovery flow mixed between AER and DPC. So simplify the pci_dev_set_io_state() function to only return true when dev->error_state is changed. Signed-off-

[PATCH v6 1/5] PCI/ERR: get device before call device driver to avoid NULL pointer dereference

2020-09-30 Thread Ethan Zhao
pci_dev_put(). So does pci_dev_get() before using the device instance to avoid NULL pointer dereference. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- v2: revise doc according to Andy's suggestion. v3: no change. v4: no change. v5: no change. v6: moved

Re: [PATCH 2/5 V2] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-29 Thread Ethan Zhao
On Tue, Sep 29, 2020 at 6:08 PM Lukas Wunner wrote: > > On Tue, Sep 29, 2020 at 05:46:41PM +0800, Ethan Zhao wrote: > > On Tue, Sep 29, 2020 at 4:29 PM Lukas Wunner wrote: > > > On Sun, Sep 27, 2020 at 11:27:46AM -0400, Sinan Kaya wrote: > > > > On 9/2

Re: [PATCH 3/5] PCI/ERR: get device before call device driver to avoid null pointer reference

2020-09-29 Thread Ethan Zhao
On Tue, Sep 29, 2020 at 6:48 PM Andy Shevchenko wrote: > > On Tue, Sep 29, 2020 at 05:38:00PM +0800, Ethan Zhao wrote: > > On Tue, Sep 29, 2020 at 4:51 PM Andy Shevchenko > > wrote: > > > On Tue, Sep 29, 2020 at 10:35:14AM +0800, Ethan Zhao wrote: > > > >

Re: [PATCH 2/5 V2] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-29 Thread Ethan Zhao
On Tue, Sep 29, 2020 at 4:29 PM Lukas Wunner wrote: > > On Sun, Sep 27, 2020 at 11:27:46AM -0400, Sinan Kaya wrote: > > On 9/26/2020 11:28 PM, Ethan Zhao wrote: > > > --- a/drivers/pci/hotplug/pciehp_hpc.c > > > +++ b/drivers/pci/hotplug/pciehp_hpc.c > > >

Re: [PATCH 3/5] PCI/ERR: get device before call device driver to avoid null pointer reference

2020-09-29 Thread Ethan Zhao
Andy, On Tue, Sep 29, 2020 at 4:51 PM Andy Shevchenko wrote: > > On Tue, Sep 29, 2020 at 10:35:14AM +0800, Ethan Zhao wrote: > > Preferred style, there will be cleared comment in v6. > > Avoid top postings. > > > On Sat, Sep 26, 2020 at 12:42 AM Andy Shevchenko >

Re: [PATCH 2/5 V2] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-28 Thread Ethan Zhao
mp;pci_bus_sem); } EXPORT_SYMBOL_GPL(pci_lock_rescan_remove); void pci_unlock_rescan_remove(void) { - mutex_unlock(&pci_rescan_remove_lock); + /*mutex_unlock(&pci_rescan_remove_lock); */ + up_write(&pci_bus_sem); } EXPORT_SYMBOL_GPL(pci_unlock_rescan_remove); Thanks, Ethan

Re: [PATCH 3/5] PCI/ERR: get device before call device driver to avoid null pointer reference

2020-09-28 Thread Ethan Zhao
Preferred style, there will be cleared comment in v6. Thanks, Ethan On Sat, Sep 26, 2020 at 12:42 AM Andy Shevchenko wrote: > > On Thu, Sep 24, 2020 at 10:34:21PM -0400, Ethan Zhao wrote: > > During DPC error injection test we found there is race condition between > > pci

Re: [PATCH 1/5 V2] PCI: define a function to check and wait till port finish DPC handling

2020-09-28 Thread Ethan Zhao
Fixed this concern by moving the function to DPC driver and its declaration to pci.h. see v5 Thanks, Ethan On Sun, Sep 27, 2020 at 2:27 PM Christoph Hellwig wrote: > > > +#ifdef CONFIG_PCIE_DPC > > +static inline bool pci_wait_port_outdpc(struct pci_dev *pdev) > > +{ >

Re: [PATCH 2/5 V2] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-28 Thread Ethan Zhao
ndition is detected between DPC and > hotplug, I recommend synchronizing them. The locks are the first place to root cause and try to fix. but not so easy to refactor the remove-scan-semaphore and the bus-walk-mutex. too expensive work. --- rework every piece of code that uses them. Thanks, Ethan > > -- > Sathyanarayanan Kuppuswamy > Linux Kernel Developer >

Re: [PATCH 3/5 V55555] PCI/ERR: get device before call device driver to avoid NULL pointer reference

2020-09-28 Thread Ethan Zhao
On Mon, Sep 28, 2020 at 4:46 PM Andy Shevchenko wrote: > > On Mon, Sep 28, 2020 at 7:13 AM Ethan Zhao wrote: > > Same comments as per v4. > Also you have an issue in versioning here. Use -v parameter to `git > format-patch`, it will do it for you nicely. Aha, git has go

Re: [PATCH 2/5 V5] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-28 Thread Ethan Zhao
On Mon, Sep 28, 2020 at 4:45 PM Andy Shevchenko wrote: > > On Mon, Sep 28, 2020 at 7:10 AM Ethan Zhao wrote: > > We didn't settle on the v4, why v5? We could fix it with v6, v5 is used to fix other things. > > > When root port has DPC capability and it is enabled, th

Re: [PATCH v3 1/1] PCI/ERR: Fix reset logic in pcie_do_recovery() call

2020-09-28 Thread Ethan Zhao
eted. But > currently driver state is not properly restored. So I attempted > to restore it using pci_reset_bus(). Seems you should fix something at device driver side, not do double-reset in DPC driver, one reset is done by hardware, and you want to do another by DPC driver ? Why hard

[PATCH 5/5 V5] PCI/ERR: don't mix io state not changed and no driver together

2020-09-27 Thread Ethan Zhao
When we see 'can't recover (no error_detected callback)' on console, Maybe the reason is io state is not changed by calling pci_dev_set_io_state(), that is confused. fix it. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Chagnes: V2: no change. V3:

[PATCH 2/5 V5] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-27 Thread Ethan Zhao
recovery action first, then DPC driver handling the call-back from device drivers, clear the DPC status, at the end, pciehp handle the DLLSC and PDC etc. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Changes: V2: revise doc according to Andy's suggestion. V3: no ch

[PATCH 1/5 V5] PCI: define a function to check and wait till port finish DPC handling

2020-09-27 Thread Ethan Zhao
atus and wait till the hardware and software completed the procedure. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- changes: V2:align ICS code name to public doc. V3: no change. V4: response to Christoph's (Christoph Hellwig ) tip, move pci_wait_port_ou

[PATCH 0/5 V5] Fix DPC hotplug race and enhance error handling

2020-09-27 Thread Ethan Zhao
d its declaration to pci.h. (tip from Christoph Hellwig ). V5: fix building issue reported by l...@intel.com with some config. Thanks, Ethan Ethan Zhao (5): PCI: define a function to check and wait till port finish DPC handling PCI: pciehp: check and wait port status out of DPC before han

[PATCH 4/5 V4] PCI: only return true when dev io state is really changed

2020-09-27 Thread Ethan Zhao
ate is pci_channel_io_frozen, that will cause AER or DPC handler re-enter the error detecting and recovery procedure one after another. The result is the recovery flow mixed between AER and DPC. So simplify the pci_dev_set_io_state() function to only return true when dev->error_state is changed. Signed-off-

[PATCH 3/5 V55555] PCI/ERR: get device before call device driver to avoid NULL pointer reference

2020-09-27 Thread Ethan Zhao
C error injection script: for i in {0..100} do setpci -s 64:02.0 0x196.w=000a setpci -s 65:00.0 0x04.w=0544 mount /dev/nvme0n1p1 /root/nvme sleep 1 done Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Changes: V2: revise doc according

[PATCH 5/5 V4] PCI/ERR: don't mix io state not changed and no driver together

2020-09-27 Thread Ethan Zhao
When we see 'can't recover (no error_detected callback)' on console, Maybe the reason is io state is not changed by calling pci_dev_set_io_state(), that is confused. fix it. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Chagnes: V2: no change. V3:

[PATCH 3/5 V4] PCI/ERR: get device before call device driver to avoid NULL pointer reference

2020-09-27 Thread Ethan Zhao
C error injection script: for i in {0..100} do setpci -s 64:02.0 0x196.w=000a setpci -s 65:00.0 0x04.w=0544 mount /dev/nvme0n1p1 /root/nvme sleep 1 done Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Andy Shevchenko --- Chan

[PATCH 4/5 V4] PCI: only return true when dev io state is really changed

2020-09-27 Thread Ethan Zhao
ate is pci_channel_io_frozen, that will cause AER or DPC handler re-enter the error detecting and recovery procedure one after another. The result is the recovery flow mixed between AER and DPC. So simplify the pci_dev_set_io_state() function to only return true when dev->error_state is changed. Signed-off-

[PATCH 2/5 V4] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-27 Thread Ethan Zhao
recovery action first, then DPC driver handling the call-back from device drivers, clear the DPC status, at the end, pciehp handle the DLLSC and PDC etc. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Andy Shevchenko --- Changes: V2: revise doc according to An

[PATCH 0/5 V4] Fix DPC hotplug race and enhance error handling

2020-09-27 Thread Ethan Zhao
d its declaration to pci.h. (tip from Christoph Hellwig ). Thanks, Ethan Ethan Zhao (5): PCI: define a function to check and wait till port finish DPC handling PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC PCI/ERR: get device before call device driver to

[PATCH 1/5 V4] PCI: define a function to check and wait till port finish DPC handling

2020-09-27 Thread Ethan Zhao
atus and wait till the hardware and software completed the procedure. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Andy Shevchenko Reviewed-by: Christoph Hellwig --- changes: V2:align ICS code name to public doc. V3: no change. V4: response to Christo

[PATCH 5/5 V3] PCI/ERR: don't mix io state not changed and no driver together

2020-09-26 Thread Ethan Zhao
When we see 'can't recover (no error_detected callback)' on console, Maybe the reason is io state is not changed by calling pci_dev_set_io_state(), that is confused. fix it. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Chagnes: V2: no change.

[PATCH 3/5 V3] PCI/ERR: get device before call device driver to avoid NULL pointer reference

2020-09-26 Thread Ethan Zhao
C error injection script: for i in {0..100} do setpci -s 64:02.0 0x196.w=000a setpci -s 65:00.0 0x04.w=0544 mount /dev/nvme0n1p1 /root/nvme sleep 1 done Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Andy Shevchenko --- Chan

[PATCH 4/5 V3] PCI: only return true when dev io state is really changed

2020-09-26 Thread Ethan Zhao
ate is pci_channel_io_frozen, that will cause AER or DPC handler re-enter the error detecting and recovery procedure one after another. The result is the recovery flow mixed between AER and DPC. So simplify the pci_dev_set_io_state() function to only return true when dev->error_state is changed. Signed-off-

[PATCH 0/5 V3] Fix DPC hotplug race and enhance error handling

2020-09-26 Thread Ethan Zhao
eep 1 done Other details see every commits description part. This patch set could be applied to stable 5.9-rc6 directly. Help to review and test. V2: changed according to review by Andy Shevchenko. V3: changed patch 4/5 to simpler coding. Thanks, Ethan Ethan Zhao (5): PCI: define a functi

[PATCH 2/5 V3] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-26 Thread Ethan Zhao
recovery action first, then DPC driver handling the call-back from device drivers, clear the DPC status, at the end, pciehp handle the DLLSC and PDC etc. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Andy Shevchenko --- Changes: V2: revise doc according to An

[PATCH 1/5 V3] PCI: define a function to check and wait till port finish DPC handling

2020-09-26 Thread Ethan Zhao
atus and wait till the hardware and software completed the procedure. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Andy Shevchenko --- changes: V2:align ICS code name to public doc. V3: no change. include/linux/pci.h | 31 ++

[PATCH 2/5 V2] PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC

2020-09-26 Thread Ethan Zhao
recovery action first, then DPC driver handling the call-back from device drivers, clear the DPC status, at the end, pciehp handle the DLLSC and PDC etc. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Andy Shevchenko --- Changes: V2: revise doc according to An

[PATCH 3/5 V2] PCI/ERR: get device before call device driver to avoid NULL pointer reference

2020-09-26 Thread Ethan Zhao
C error injection script: for i in {0..100} do setpci -s 64:02.0 0x196.w=000a setpci -s 65:00.0 0x04.w=0544 mount /dev/nvme0n1p1 /root/nvme sleep 1 done Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Andy Shevchenko --- Chan

[PATCH 5/5 V2] PCI/ERR: don't mix io state not changed and no driver together

2020-09-26 Thread Ethan Zhao
When we see 'can't recover (no error_detected callback)' on console, Maybe the reason is io state is not changed by calling pci_dev_set_io_state(), that is confused. fix it. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang --- Chagnes: V2: no change. d

[PATCH 4/5 V2] PCI: only return true when dev io state is really changed

2020-09-26 Thread Ethan Zhao
ate is pci_channel_io_frozen, that will cause AER or DPC handler re-enter the error detecting and recovery procedure one after another. The result is the recovery flow mixed between AER and DPC. So simplify the pci_dev_set_io_state() function to only return true when dev->error_state is changed. Signed-off-

[PATCH 1/5 V2] PCI: define a function to check and wait till port finish DPC handling

2020-09-26 Thread Ethan Zhao
atus and wait till the hardware and software completed the procedure. Signed-off-by: Ethan Zhao Tested-by: Wen Jin Tested-by: Shanshan Zhang Reviewed-by: Andy Shevchenko --- changes: V2:align ICS code name to public doc. include/linux/pci.h | 31 +++ 1 file changed

[PATCH 0/5 V2] Fix DPC hotplug race and enhance error handling

2020-09-26 Thread Ethan Zhao
eep 1 done Other details see every commits description part. This patch set could be applied to stable 5.9-rc6 directly. Help to review and test. V2: changed according to review by Andy Shevchenko. Thanks, Ethan Ethan Zhao (5): PCI: define a function to check and wait till port finish DPC han

[PATCH 5/5] PCI/ERR: don't mix io state not changed and no driver together

2020-09-24 Thread Ethan Zhao
When we see 'can't recover (no error_detected callback)' on console, Maybe the reason is io state is not changed by calling pci_dev_set_io_state(), that is confused. fix it. Signed-off-by: Ethan Zhao Tested-by: Wen jin Tested-by: Shanshan Zhang --- drivers/pci/pcie/err.c | 6

[PATCH 4/5] PCI: only return true when dev io state is really changed

2020-09-24 Thread Ethan Zhao
, that will cause AER or DPC handler re-enter the error detecting and recovery procedure one after another. The result is the recovery flow mixed between AER and DPC. So simplify the pci_dev_set_io_state() function to only return true when dev->error_state is changed. Signed-off-by: Ethan Zhao

[PATCH 0/5] Fix DPC hotplug race and enhance error hanlding

2020-09-24 Thread Ethan Zhao
9-rc6 directly. Help to review and test. Thanks, Ethan Ethan Zhao (5): PCI: define a function to check and wait till port finish DPC handling PCI: pciehp: check and wait port status out of DPC before handling DLLSC and PDC PCI/ERR: get device before call device driver to avoid null po

[PATCH] Revert "block: revert back to synchronous request_queue removal"

2020-09-08 Thread Ethan Zhao
From: Ethan Zhao 'commit e8c7d14ac6c3 ("block: revert back to synchronous request_queue removal")' introduced panic issue to NVMe hotplug as following(hit after just 2 times NVMe SSD hotplug under stable 5.9-RC2): BUG: sleeping function called from invalid context a

[PATCH v2] drivers: staging: comedi: fixed duplicate words from checkpatch

2020-08-24 Thread Ethan Edwards
Fixed various different checkpatch duplicate word warnings, the TODO file said to fix checkpatch warnings. Signed-off-by: Ethan Edwards --- Old email has lines about CC'ing the mailing lists, patch v2 fixes this. drivers/staging/comedi/comedi.h | 4 ++-- drivers/staging/c

[PATCH] drivers: staging: comedi: fixed duplicate words from checkpatch

2020-08-22 Thread Ethan Edwards
Fixed various different checkpatch duplicate word warnings, the TODO file said to fix checkpatch warnings. My old email didn't CC the mailing lists, ignore the old one, sorry. Signed-off-by: Ethan Edwards --- drivers/staging/comedi/comedi.h | 4 ++-- drivers/staging/c

[PATCH] security: selinux: ss: conditional.c fixed a checkpatch warning

2020-07-09 Thread Ethan Edwards
`sizeof buf` changed to `sizeof(buf)` Signed-off-by: Ethan Edwards --- security/selinux/ss/conditional.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index 0cc7cdd58465..90a2f5927e55 100644 --- a

[PATCH] security: selinux: ss: conditional.c fixed a checkpatch warning

2020-06-24 Thread Ethan Edwards
`sizeof buf` changed to `sizeof(buf)` Signed-off-by: Ethan Edwards --- security/selinux/ss/conditional.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index 0cc7cdd58465..90a2f5927e55 100644 --- a

Ethan

2020-06-01 Thread Ethan Oquist
Sent from my iPad

[PATCH] FS: BTRFS: ulist.c: Fixed a brace coding style and space before tab

2020-05-22 Thread Ethan Edwards
From: Ethan Edwards --- fs/btrfs/ulist.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/btrfs/ulist.c b/fs/btrfs/ulist.c index 3374c9e9be67..1e0484c8d244 100644 --- a/fs/btrfs/ulist.c +++ b/fs/btrfs/ulist.c @@ -22,7 +22,7 @@ * ULIST_ITER_INIT(&u

[PATCH] HID: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter

2019-09-05 Thread Ethan Warth
>From 32bdfb1d652cc38ab13f8616df58dee726201785 Mon Sep 17 00:00:00 2001 From: Ethan Warth Date: Wed, 4 Sep 2019 16:07:45 -0500 Subject: [PATCH] HID: add support for 0079:1846 Mayflash/Dragonrise USB Gamecube Adapter Mayflash/Dragonrise seems to have yet another device ID for one of th

[PATCH tip/core/rcu 1/1] rcu: Remove unused variable rcu_perf_writer_state

2019-08-07 Thread Ethan Hansen
The variable rcu_perf_writer_state is declared and initialized, but is never actually referenced. Remove it to clean code. Signed-off-by: Ethan Hansen <1ethanhan...@gmail.com> --- kernel/rcu/rcuperf.c | 8 1 file changed, 8 deletions(-) diff --git a/kernel/rcu/rcuperf.c b/kern

[PATCH tip/core/rcu 1/1] rcu: Remove unused function hlist_bl_del_init_rcu

2019-08-02 Thread Ethan Hansen
The function hlist_bl_del_init_rcu is declared in rculist_bl.h, but never used. Remove hlist_bl_del_init_rcu to clean code. Signed-off-by: Ethan Hansen <1ethanhan...@gmail.com> --- include/linux/rculist_bl.h | 28 1 file changed, 28 deletions(-) diff --git a/i

[PATCH tip/core/rcu 1/1] rcu: Remove unused function rcutorture_record_progress

2019-08-01 Thread Ethan Hansen
The function rcutorture_record_progress is declared in rcu.h, but is never used. Remove rcutorture_record_progress to clean code. Signed-off-by: Ethan Hansen <1ethanhan...@gmail.com> --- kernel/rcu/rcu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/rcu/rcu.h b/kernel/rcu

[PATCH] replace timeconst bc script with an sh script

2019-06-19 Thread Ethan Sommer
removes the bc build dependency introduced when timeconst.pl was replaced by timeconst.bc Signed-off-by: Ethan Sommer --- Kbuild | 4 +- kernel/time/timeconst.bc | 117 -- kernel/time/timeconst.sh | 118

Re:reply ok.....

2018-07-15 Thread Ethan
Hello, I am Mr.Ethan Mbuya the Chief Operating Officer in Accounting Unit of Standard Bank of South Africa (SBSA) This message might meet you in utmost surprise. However, it's just my urgent need for a foreign partner that made me to contact you for this transaction. An account was opened in

Re: [PATCH] ARM: mvebu: declare asm symbols as character arrays in pmsu.c

2018-06-27 Thread Ethan Tuttle
Hi Gregory. On Tue, Jun 26, 2018 at 11:20 PM, Gregory CLEMENT wrote: > Hi Ethan, > > On mar., juin 19 2018, Ethan Tuttle wrote: > >> With CONFIG_FORTIFY_SOURCE, memcpy uses the declared size of operands to >> detect buffer overflows. If src or dest is declared as a c

[PATCH] ARM: mvebu: declare asm symbols as character arrays in pmsu.c

2018-06-19 Thread Ethan Tuttle
/0x1a8) (do_one_initcall) from (kernel_init_freeable+0x1bc/0x254) (kernel_init_freeable) from (kernel_init+0x8/0x114) (kernel_init) from (ret_from_fork+0x14/0x2c) Signed-off-by: Ethan Tuttle Tested-by: Ethan Tuttle --- arch/arm/mach-mvebu/pmsu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

Re: [PATCH 04/27] Restrict /dev/mem and /dev/kmem when the kernel is locked down

2017-10-24 Thread Ethan Zhao
David, May I ask a question here -- Is it intentionally enabling the read-only mode, so userspace tools like dmidecode could work with kernel_is_locked_down ? while it was impossible to work with the attached patch applied. Is it a security policy change with secure boot ? Thanks, Ethan On

[tip:sched/core] sched/sysctl: Check user input value of sysctl_sched_time_avg

2017-09-29 Thread tip-bot for Ethan Zhao
Commit-ID: 5ccba44ba118a500050076b0344632459779 Gitweb: https://git.kernel.org/tip/5ccba44ba118a500050076b0344632459779 Author: Ethan Zhao AuthorDate: Mon, 4 Sep 2017 13:59:34 +0800 Committer: Ingo Molnar CommitDate: Fri, 29 Sep 2017 13:20:13 +0200 sched/sysctl: Check user

Re: [PATCH v2] sched: check user input value of sysctl_sched_time_avg

2017-09-06 Thread Ethan Zhao
On 2017/9/7 3:50, Luis R. Rodriguez wrote: On Mon, Sep 04, 2017 at 03:54:23PM +0800, Ethan Zhao wrote: Peter, On 2017/9/4 15:49, Peter Zijlstra wrote: On Sat, Sep 02, 2017 at 02:57:32PM +0800, Ethan Zhao wrote: diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 6648fbb..609bed2 100644

  1   2   3   4   5   >