HI Thomas , 


Yes , its surprise removal .

But as far as I know , linux kernel will handle surprise removal of PCIe device without panic.

The driver will suddenly start reading all 0xff and will then need to
abort whatever it was doing. Usually all drivers handle this just fine.

Nothing, the driver individually needs to handle the fact that it might
at any time, start getting invalid data. If it doesn't, it needs to be
fixed. Whether AER  driver that does not handle this properly?


Regards,
Gokul 

On Wed, Aug 1, 2018 at 11:17 PM, Thomas Tai <thomas.tai@oracle.com> wrote:


On 08/01/2018 01:42 AM, gokul cg wrote:
Hi Thomas,

In my hardware, there is i2c power control chip for PCI card, I just powered down using i2c command .

Hi Gokul,
When you power off the card via the i2c, it forcefully power off the card without notify the kernel? That is, during the card power off sequence it manages to send a last AER isr to report the error and die? I am kind of expect the pcie surprise removal or hot plug driver will handle it correctly.

Thanks,
Thomas


Regards,
Gokul