[patch]mpt2sas/mpt2sas_base.c temporarily mask the corrected AER bitwhile driver initializing to suppress AER

From: Ethan Zhao
Date: Thu Nov 15 2012 - 20:22:47 EST


Hi, Lsi guys,

On our servers (Sun fire X3-2/2L/2B, Sun fire X4-2/2L/2B ),
while loading mpt2sas driver, the _diag_reset action always triggers
correct AER,
So mask CRER bit before the reset action and restore it after
successful resetting.
Please help to check the attached patch, I have tested with
upstream kernel 3.7RC4.

Before applying the patch:

mpt2sas0: 64 BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (32836676 kB)
mpt2sas 0000:50:00.0: irq 106 for MSI/MSI-X
mpt2sas0-msix0: PCI-MSI-X enabled: IRQ 106
mpt2sas0: iomem(0x00000000c7cc0000), mapped(0xffffc900144d8000), size(16384)
mpt2sas0: ioport(0x0000000000005000), size(256)
mpt2sas0: sending diag reset !!
pcieport 0000:00:03.2: AER: Corrected error received: id=001a
pcieport 0000:00:03.2: PCIe Bus Error: severity=Corrected, type=Physical
Layer, id=001a(Receiver ID)
pcieport 0000:00:03.2: device [8086:3c0a] error
status/mask=00000001/00000000
pcieport 0000:00:03.2: [ 0] Receiver Error
mpt2sas0: diag reset: SUCCESS
mpt2sas0: Allocated physical memory: size(2998 kB)
mpt2sas0: Current Controller Queue Depth(1331), Max Controller Queue
Depth(1408)
mpt2sas0: Scatter Gather Elements per IO(128)
mpt2sas0: LSISAS2008: FWVersion(11.05.02.00), ChipRevision(0x03),
BiosVersion(07.21.03.00)


Applied the patch:


mpt2sas0: 64 BIT PCI BUS DMA ADDRESSING SUPPORTED, total mem (32836676 kB)
mpt2sas 0000:50:00.0: irq 106 for MSI/MSI-X
mpt2sas0-msix0: PCI-MSI-X enabled: IRQ 106
mpt2sas0: iomem(0x00000000c7cc0000), mapped(0xffffc900144d8000), size(16384)
mpt2sas0: ioport(0x0000000000005000), size(256)
mpt2sas0: sending diag reset !!
mpt2sas0: diag reset: SUCCESS
mpt2sas0: Allocated physical memory: size(2998 kB)
mpt2sas0: Current Controller Queue Depth(1331), Max Controller Queue
Depth(1408)
mpt2sas0: Scatter Gather Elements per IO(128)
mpt2sas0: LSISAS2008: FWVersion(11.05.02.00), ChipRevision(0x03),
BiosVersion(07.21.03.00)


Thanks,
Ethan
-------------------------------------------------------------------