Skip to contentSkip to conversation

pm8001: Adaptec 6805H fails to initialize after v5.10.0

REGRESSION [email protected] 5 participants 7 messages Mar 19, 2021 – Apr 1, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From kernel version 5.10 onwards, none of the drives attached to an Adaptec 6805H HBA appear.

Building and installing the mainline kernel (5.12-rc3) does not fix the issue, neither does the latest longterm (5.10.24).

'dmesg | grep pm8' shows:

[    0.810874] pm80xx 0000:01:00.0: pm80xx: driver version 0.1.40
[    0.811542] pm80xx 0000:01:00.0: enabling device (0000 -> 0002)
[    0.812309] :: pm8001_pci_alloc  525:Setting link rate to default value
[    3.239584] pm80xx0:: pm8001_pci_probe  1112:chip_init failed [ret: -16]
[    3.262231] pm80xx: probe of 0000:01:00.0 failed with error -16

A bisection reveals the issue appears with the commit show below, with this commit reverted, the drives attached to a 6805H appear once again.

Quoted 7 lines

commit 05c6c029a44d9f43715577e33e95eba87f44d285

Author: Viswas G <[email protected]>
Date:   Mon Oct 5 20:20:08 2020 +0530

scsi: pm80xx: Increase number of supported queues

Current driver uses fixed number of Inbound and Outbound queues and

all of

Quoted 1 line

the I/O, TMF and internal requests are submitted through those. A

global

Quoted 5 lines

spin lock is used to control the shared access. This can create a lock contention and it is real bottleneck in the I/O path.

To avoid this, the number of supported Inbound and Outbound queues is increased to 64, and the number of queues used is decided based on

number

Quoted 1 line

of CPU cores online and number of MSI-X vectors allocated. Also add

locks

Quoted 3 lines

per queue instead of using the global lock.

Link:

https://lore.kernel.org/r/[email protected]

Quoted 4 lines

'lspci -vvv' on working kernel:

Quoted 1 line

01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA

[Series 6H] (rev 05)

Quoted 2 lines

Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-

ParErr+ Stepping- SERR+ FastB2B- DisINTx+

Quoted 1 line

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-

<TAbort- <MAbort- >SERR- <PERR- INTx-

Quoted 6 lines
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f7d60000 (64-bit, non-prefetchable) [size=64K]
        Region 2: Memory at f7d50000 (64-bit, non-prefetchable) [size=64K]
        Region 4: Memory at f7d40000 (32-bit, non-prefetchable) [size=64K]
        Region 5: Memory at f7d00000 (32-bit, non-prefetchable)

[size=256K]

Quoted 3 lines

Expansion ROM at f7c00000 [disabled] [size=1M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA

PME(D0+,D1-,D2-,D3hot-,D3cold-)

Quoted 5 lines

Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s

<1us, L1 <8us

Quoted 1 line

ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

SlotPowerLimit 0.000W

Quoted 4 lines

DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr-

TransPend-

Quoted 1 line

LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Exit

Latency L0s <512ns, L1 <64us

Quoted 6 lines

ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (ok), Width x4 (downgraded)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+

NROPrPrP- LTR-

Quoted 1 line

10BitTagComp- 10BitTagReq- OBFF Not Supported,

ExtFmt- EETLPPrefix-

Quoted 1 line

EmergencyPowerReduction Not Supported,

EmergencyPowerReductionInit-

Quoted 3 lines

FRS- TPHComp- ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-

LTR- OBFF Disabled,

Quoted 2 lines

AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-

SpeedDis-

Quoted 1 line

Transmit Margin: Normal Operating Range,

EnterModifiedCompliance- ComplianceSOS-

Quoted 2 lines

Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB,

EqualizationComplete- EqualizationPhase1-

Quoted 1 line

EqualizationPhase2- EqualizationPhase3-

LinkEqualizationRequest-

Quoted 6 lines

Retimer- 2Retimers- CrosslinkRes: unsupported
Capabilities: [ac] MSI-X: Enable+ Count=16 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00004000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 1 line

UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 1 line

UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-

RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

Quoted 1 line

CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr-

Quoted 1 line

CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr+

Quoted 1 line

AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn-

ECRCChkCap+ ECRCChkEn-

Quoted 1 line

MultHdrRecCap- MultHdrRecEn- TLPPfxPres-

HdrLogCap-

Quoted 3 lines
                HeaderLog: 00000000 00000000 00000000 00000000
        Kernel driver in use: pm80xx
        Kernel modules: pm80xx

'lspci -vvv' on non-working kernel (5.12-rc3):

Quoted 1 line

01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA

[Series 6H] (rev 05)

Quoted 2 lines

Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-

ParErr+ Stepping- SERR+ FastB2B- DisINTx+

Quoted 1 line

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-

<TAbort- <MAbort- >SERR- <PERR- INTx-

Quoted 5 lines
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f7d60000 (64-bit, non-prefetchable) [size=64K]
        Region 2: Memory at f7d50000 (64-bit, non-prefetchable) [size=64K]
        Region 4: Memory at f7d40000 (32-bit, non-prefetchable) [size=64K]
        Region 5: Memory at f7d00000 (32-bit, non-prefetchable)

[size=256K]

Quoted 3 lines

Expansion ROM at f7c00000 [disabled] [size=1M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA

PME(D0+,D1-,D2-,D3hot-,D3cold-)

Quoted 5 lines

Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s

<1us, L1 <8us

Quoted 1 line

ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

SlotPowerLimit 116.000W

Quoted 4 lines

DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr-

TransPend-

Quoted 1 line

LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Exit

Latency L0s <512ns, L1 <64us

Quoted 6 lines

ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (ok), Width x4 (downgraded)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+

NROPrPrP- LTR-

Quoted 1 line

10BitTagComp- 10BitTagReq- OBFF Not Supported,

ExtFmt- EETLPPrefix-

Quoted 1 line

EmergencyPowerReduction Not Supported,

EmergencyPowerReductionInit-

Quoted 3 lines

FRS- TPHComp- ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-

LTR- OBFF Disabled,

Quoted 2 lines

AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-

SpeedDis-

Quoted 1 line

Transmit Margin: Normal Operating Range,

EnterModifiedCompliance- ComplianceSOS-

Quoted 2 lines

Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB,

EqualizationComplete- EqualizationPhase1-

Quoted 1 line

EqualizationPhase2- EqualizationPhase3-

LinkEqualizationRequest-

Quoted 6 lines

Retimer- 2Retimers- CrosslinkRes: unsupported
Capabilities: [ac] MSI-X: Enable+ Count=16 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00004000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 1 line

UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 1 line

UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-

RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

Quoted 1 line

CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr-

Quoted 1 line

CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr+

Quoted 1 line

AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn-

ECRCChkCap+ ECRCChkEn-

Quoted 1 line

MultHdrRecCap- MultHdrRecEn- TLPPfxPres-

HdrLogCap-

Quoted 2 lines
                HeaderLog: 00000000 00000000 00000000 00000000
        Kernel modules: pm80xx
maintainer
#1 lore raw

Hi Ash,

Thanks for reporting.

Quoted 32 lines · On Fri, Mar 19, 2021 at 12:16 PM <[email protected]> wrote:

From kernel version 5.10 onwards, none of the drives attached to an Adaptec 6805H HBA appear.

Building and installing the mainline kernel (5.12-rc3) does not fix the issue, neither does the latest longterm (5.10.24).

'dmesg | grep pm8' shows:

[    0.810874] pm80xx 0000:01:00.0: pm80xx: driver version 0.1.40
[    0.811542] pm80xx 0000:01:00.0: enabling device (0000 -> 0002)
[    0.812309] :: pm8001_pci_alloc  525:Setting link rate to default value
[    3.239584] pm80xx0:: pm8001_pci_probe  1112:chip_init failed [ret: -16]
[    3.262231] pm80xx: probe of 0000:01:00.0 failed with error -16

A bisection reveals the issue appears with the commit show below, with this commit reverted, the drives attached to a 6805H appear once again.

Quoted 7 lines

commit 05c6c029a44d9f43715577e33e95eba87f44d285

Author: Viswas G <[email protected]>
Date:   Mon Oct 5 20:20:08 2020 +0530

scsi: pm80xx: Increase number of supported queues

Current driver uses fixed number of Inbound and Outbound queues and

all of

Quoted 1 line

the I/O, TMF and internal requests are submitted through those. A

global

Quoted 5 lines

spin lock is used to control the shared access. This can create a lock contention and it is real bottleneck in the I/O path.

To avoid this, the number of supported Inbound and Outbound queues is increased to 64, and the number of queues used is decided based on

Quoted 12 lines

number

Quoted 1 line

of CPU cores online and number of MSI-X vectors allocated. Also add

locks

Quoted 3 lines

per queue instead of using the global lock.

Link:

https://lore.kernel.org/r/[email protected]

Quoted 4 lines

+cc Viswas and Ruksar.

Hi Viswas, hi Ruksar,

Can you please look into it?

Thanks!

Quoted 164 lines

'lspci -vvv' on working kernel:

Quoted 1 line

01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA

[Series 6H] (rev 05)

Quoted 2 lines

Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-

ParErr+ Stepping- SERR+ FastB2B- DisINTx+

Quoted 1 line

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-

<TAbort- <MAbort- >SERR- <PERR- INTx-

Quoted 6 lines
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f7d60000 (64-bit, non-prefetchable) [size=64K]
        Region 2: Memory at f7d50000 (64-bit, non-prefetchable) [size=64K]
        Region 4: Memory at f7d40000 (32-bit, non-prefetchable) [size=64K]
        Region 5: Memory at f7d00000 (32-bit, non-prefetchable)

[size=256K]

Quoted 3 lines

Expansion ROM at f7c00000 [disabled] [size=1M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA

PME(D0+,D1-,D2-,D3hot-,D3cold-)

Quoted 5 lines

Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s

<1us, L1 <8us

Quoted 1 line

ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

SlotPowerLimit 0.000W

Quoted 4 lines

DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr-

TransPend-

Quoted 1 line

LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Exit

Latency L0s <512ns, L1 <64us

Quoted 6 lines

ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (ok), Width x4 (downgraded)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+

NROPrPrP- LTR-

Quoted 1 line

10BitTagComp- 10BitTagReq- OBFF Not Supported,

ExtFmt- EETLPPrefix-

Quoted 1 line

EmergencyPowerReduction Not Supported,

EmergencyPowerReductionInit-

Quoted 3 lines

FRS- TPHComp- ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-

LTR- OBFF Disabled,

Quoted 2 lines

AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-

SpeedDis-

Quoted 1 line

Transmit Margin: Normal Operating Range,

EnterModifiedCompliance- ComplianceSOS-

Quoted 2 lines

Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB,

EqualizationComplete- EqualizationPhase1-

Quoted 1 line

EqualizationPhase2- EqualizationPhase3-

LinkEqualizationRequest-

Quoted 6 lines

Retimer- 2Retimers- CrosslinkRes: unsupported
Capabilities: [ac] MSI-X: Enable+ Count=16 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00004000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 1 line

UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 1 line

UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-

RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

Quoted 1 line

CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr-

Quoted 1 line

CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr+

Quoted 1 line

AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn-

ECRCChkCap+ ECRCChkEn-

Quoted 1 line

MultHdrRecCap- MultHdrRecEn- TLPPfxPres-

HdrLogCap-

Quoted 3 lines
                HeaderLog: 00000000 00000000 00000000 00000000
        Kernel driver in use: pm80xx
        Kernel modules: pm80xx

'lspci -vvv' on non-working kernel (5.12-rc3):

Quoted 1 line

01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA

[Series 6H] (rev 05)

Quoted 2 lines

Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-

ParErr+ Stepping- SERR+ FastB2B- DisINTx+

Quoted 1 line

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-

<TAbort- <MAbort- >SERR- <PERR- INTx-

Quoted 5 lines
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f7d60000 (64-bit, non-prefetchable) [size=64K]
        Region 2: Memory at f7d50000 (64-bit, non-prefetchable) [size=64K]
        Region 4: Memory at f7d40000 (32-bit, non-prefetchable) [size=64K]
        Region 5: Memory at f7d00000 (32-bit, non-prefetchable)

[size=256K]

Quoted 3 lines

Expansion ROM at f7c00000 [disabled] [size=1M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA

PME(D0+,D1-,D2-,D3hot-,D3cold-)

Quoted 5 lines

Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s

<1us, L1 <8us

Quoted 1 line

ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

SlotPowerLimit 116.000W

Quoted 4 lines

DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr-

TransPend-

Quoted 1 line

LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Exit

Latency L0s <512ns, L1 <64us

Quoted 6 lines

ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (ok), Width x4 (downgraded)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+

NROPrPrP- LTR-

Quoted 1 line

10BitTagComp- 10BitTagReq- OBFF Not Supported,

ExtFmt- EETLPPrefix-

Quoted 1 line

EmergencyPowerReduction Not Supported,

EmergencyPowerReductionInit-

Quoted 3 lines

FRS- TPHComp- ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-

LTR- OBFF Disabled,

Quoted 2 lines

AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-

SpeedDis-

Quoted 1 line

Transmit Margin: Normal Operating Range,

EnterModifiedCompliance- ComplianceSOS-

Quoted 2 lines

Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB,

EqualizationComplete- EqualizationPhase1-

Quoted 1 line

EqualizationPhase2- EqualizationPhase3-

LinkEqualizationRequest-

Quoted 6 lines

Retimer- 2Retimers- CrosslinkRes: unsupported
Capabilities: [ac] MSI-X: Enable+ Count=16 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00004000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 1 line

UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 1 line

UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-

RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

Quoted 1 line

CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr-

Quoted 1 line

CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr+

Quoted 1 line

AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn-

ECRCChkCap+ ECRCChkEn-

Quoted 1 line

MultHdrRecCap- MultHdrRecEn- TLPPfxPres-

HdrLogCap-

Quoted 2 lines
                HeaderLog: 00000000 00000000 00000000 00000000
        Kernel modules: pm80xx
#2 lore raw

Thanks Jinpu. We will look into that and update.

Regards,
Viswas G

Quoted 267 lines

-----Original Message-----
From: Jinpu Wang <[email protected]>
Sent: Friday, March 19, 2021 5:00 PM
To: [email protected]; Viswas G - I30667 <[email protected]>; Ruksar Devadi - I52327 <[email protected]>
Cc: Linux SCSI Mailinglist <[email protected]>
Subject: Re: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Hi Ash,

Thanks for reporting.

Quoted 21 lines · On Fri, Mar 19, 2021 at 12:16 PM <[email protected]> wrote:

From kernel version 5.10 onwards, none of the drives attached to an Adaptec 6805H HBA appear.

Building and installing the mainline kernel (5.12-rc3) does not fix the issue, neither does the latest longterm (5.10.24).

'dmesg | grep pm8' shows:

[    0.810874] pm80xx 0000:01:00.0: pm80xx: driver version 0.1.40
[    0.811542] pm80xx 0000:01:00.0: enabling device (0000 -> 0002)
[    0.812309] :: pm8001_pci_alloc  525:Setting link rate to default value
[    3.239584] pm80xx0:: pm8001_pci_probe  1112:chip_init failed [ret: -16]
[    3.262231] pm80xx: probe of 0000:01:00.0 failed with error -16

A bisection reveals the issue appears with the commit show below, with this commit reverted, the drives attached to a 6805H appear once again.

Quoted 4 lines

commit 05c6c029a44d9f43715577e33e95eba87f44d285

Author: Viswas G <[email protected]>
Date:   Mon Oct 5 20:20:08 2020 +0530
Quoted 12 lines
Quoted 4 lines

scsi: pm80xx: Increase number of supported queues

Current driver uses fixed number of Inbound and Outbound queues
and

all of

Quoted 2 lines

the I/O, TMF and internal requests are submitted through those.
A

global

Quoted 4 lines

spin lock is used to control the shared access. This can create a lock contention and it is real bottleneck in the I/O path.

To avoid this, the number of supported Inbound and Outbound queues

is

Quoted 16 lines
Quoted 2 lines

increased to 64, and the number of queues used is decided based
on

number

Quoted 2 lines

of CPU cores online and number of MSI-X vectors allocated. Also
add

locks

Quoted 3 lines

per queue instead of using the global lock.

Link:

https://lore.kernel.org/r/[email protected]
m.com

Quoted 4 lines

+cc Viswas and Ruksar.

Hi Viswas, hi Ruksar,

Can you please look into it?

Thanks!

Quoted 190 lines

'lspci -vvv' on working kernel:

Quoted 2 lines

01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA

[Series 6H] (rev 05)

Quoted 2 lines

Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-

ParErr+ Stepping- SERR+ FastB2B- DisINTx+

Quoted 2 lines

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast

Quoted 1 line

TAbort-

<TAbort- <MAbort- >SERR- <PERR- INTx-

Quoted 6 lines
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f7d60000 (64-bit, non-prefetchable) [size=64K]
        Region 2: Memory at f7d50000 (64-bit, non-prefetchable) [size=64K]
        Region 4: Memory at f7d40000 (32-bit, non-prefetchable) [size=64K]
        Region 5: Memory at f7d00000 (32-bit, non-prefetchable)

[size=256K]

Quoted 3 lines

Expansion ROM at f7c00000 [disabled] [size=1M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA

PME(D0+,D1-,D2-,D3hot-,D3cold-)

Quoted 6 lines

Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency
L0s

<1us, L1 <8us

Quoted 2 lines

ExtTag- AttnBtn- AttnInd- PwrInd- RBE+
FLReset-

SlotPowerLimit 0.000W

Quoted 5 lines

DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+
AuxPwr-

TransPend-

Quoted 2 lines

LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Exit

Latency L0s <512ns, L1 <64us

Quoted 7 lines

ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (ok), Width x4 (downgraded)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported,
TimeoutDis+

NROPrPrP- LTR-

Quoted 2 lines

10BitTagComp- 10BitTagReq- OBFF Not
Supported,

ExtFmt- EETLPPrefix-

Quoted 1 line

EmergencyPowerReduction Not Supported,

EmergencyPowerReductionInit-

Quoted 4 lines

FRS- TPHComp- ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms,
TimeoutDis-

LTR- OBFF Disabled,

Quoted 2 lines

AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-

SpeedDis-

Quoted 1 line

Transmit Margin: Normal Operating Range,

EnterModifiedCompliance- ComplianceSOS-

Quoted 2 lines

Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB,

EqualizationComplete- EqualizationPhase1-

Quoted 1 line

EqualizationPhase2- EqualizationPhase3-

LinkEqualizationRequest-

Quoted 7 lines

Retimer- 2Retimers- CrosslinkRes: unsupported
Capabilities: [ac] MSI-X: Enable+ Count=16 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00004000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 2 lines

UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 2 lines

UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

Quoted 1 line

CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr-

Quoted 1 line

CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr+

Quoted 2 lines

AERCap: First Error Pointer: 00, ECRCGenCap+
ECRCGenEn-

ECRCChkCap+ ECRCChkEn-

Quoted 1 line

MultHdrRecCap- MultHdrRecEn- TLPPfxPres-

HdrLogCap-

Quoted 3 lines
                HeaderLog: 00000000 00000000 00000000 00000000
        Kernel driver in use: pm80xx
        Kernel modules: pm80xx

'lspci -vvv' on non-working kernel (5.12-rc3):

Quoted 2 lines

01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA

[Series 6H] (rev 05)

Quoted 2 lines

Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-

ParErr+ Stepping- SERR+ FastB2B- DisINTx+

Quoted 2 lines

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast

Quoted 1 line

TAbort-

<TAbort- <MAbort- >SERR- <PERR- INTx-

Quoted 5 lines
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f7d60000 (64-bit, non-prefetchable) [size=64K]
        Region 2: Memory at f7d50000 (64-bit, non-prefetchable) [size=64K]
        Region 4: Memory at f7d40000 (32-bit, non-prefetchable) [size=64K]
        Region 5: Memory at f7d00000 (32-bit, non-prefetchable)

[size=256K]

Quoted 3 lines

Expansion ROM at f7c00000 [disabled] [size=1M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA

PME(D0+,D1-,D2-,D3hot-,D3cold-)

Quoted 6 lines

Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency
L0s

<1us, L1 <8us

Quoted 2 lines

ExtTag- AttnBtn- AttnInd- PwrInd- RBE+
FLReset-

SlotPowerLimit 116.000W

Quoted 5 lines

DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+
AuxPwr-

TransPend-

Quoted 2 lines

LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
Exit

Latency L0s <512ns, L1 <64us

Quoted 7 lines

ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (ok), Width x4 (downgraded)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported,
TimeoutDis+

NROPrPrP- LTR-

Quoted 2 lines

10BitTagComp- 10BitTagReq- OBFF Not
Supported,

ExtFmt- EETLPPrefix-

Quoted 1 line

EmergencyPowerReduction Not Supported,

EmergencyPowerReductionInit-

Quoted 4 lines

FRS- TPHComp- ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms,
TimeoutDis-

LTR- OBFF Disabled,

Quoted 2 lines

AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-

SpeedDis-

Quoted 1 line

Transmit Margin: Normal Operating Range,

EnterModifiedCompliance- ComplianceSOS-

Quoted 2 lines

Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB,

EqualizationComplete- EqualizationPhase1-

Quoted 1 line

EqualizationPhase2- EqualizationPhase3-

LinkEqualizationRequest-

Quoted 7 lines

Retimer- 2Retimers- CrosslinkRes: unsupported
Capabilities: [ac] MSI-X: Enable+ Count=16 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00004000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 2 lines

UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 2 lines

UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

Quoted 1 line

CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr-

Quoted 1 line

CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr+

Quoted 2 lines

AERCap: First Error Pointer: 00, ECRCGenCap+
ECRCGenEn-

ECRCChkCap+ ECRCChkEn-

Quoted 1 line

MultHdrRecCap- MultHdrRecEn- TLPPfxPres-

HdrLogCap-

Quoted 2 lines
                HeaderLog: 00000000 00000000 00000000 00000000
        Kernel modules: pm80xx
#3 lore raw

Hi Ash,

Can you please try this patch ?

Regards,
Viswas G

Quoted 207 lines

-----Original Message-----
From: Viswas G - I30667
Sent: Friday, March 19, 2021 10:25 PM
To: Jinpu Wang <[email protected]>; [email protected]; Ruksar Devadi - I52327 <[email protected]>
Cc: Linux SCSI Mailinglist <[email protected]>
Subject: RE: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0

Thanks Jinpu. We will look into that and update.

Regards,
Viswas G

Quoted 13 lines

-----Original Message-----
From: Jinpu Wang <[email protected]>
Sent: Friday, March 19, 2021 5:00 PM
To: [email protected]; Viswas G - I30667 <[email protected]>; Ruksar Devadi - I52327 <[email protected]>
Cc: Linux SCSI Mailinglist <[email protected]>
Subject: Re: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after
v5.10.0

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Quoted 22 lines

Hi Ash,

Thanks for reporting.

Quoted 16 lines · On Fri, Mar 19, 2021 at 12:16 PM <[email protected]> wrote:

From kernel version 5.10 onwards, none of the drives attached to an Adaptec 6805H HBA appear.

Building and installing the mainline kernel (5.12-rc3) does not fix the issue, neither does the latest longterm (5.10.24).

'dmesg | grep pm8' shows:

[    0.810874] pm80xx 0000:01:00.0: pm80xx: driver version 0.1.40
[    0.811542] pm80xx 0000:01:00.0: enabling device (0000 -> 0002)
[    0.812309] :: pm8001_pci_alloc  525:Setting link rate to default value
[    3.239584] pm80xx0:: pm8001_pci_probe  1112:chip_init failed [ret: -16]
[    3.262231] pm80xx: probe of 0000:01:00.0 failed with error -16

A bisection reveals the issue appears with the commit show below, with this commit reverted, the drives attached to a 6805H appear once

again.

Quoted 36 lines
Quoted 5 lines
Quoted 5 lines

commit 05c6c029a44d9f43715577e33e95eba87f44d285

Author: Viswas G <[email protected]>
Date:   Mon Oct 5 20:20:08 2020 +0530
Quoted 13 lines
Quoted 4 lines

scsi: pm80xx: Increase number of supported queues

Current driver uses fixed number of Inbound and Outbound
queues and

all of

Quoted 2 lines

the I/O, TMF and internal requests are submitted through those.
A

global

Quoted 5 lines

spin lock is used to control the shared access. This can create a lock contention and it is real bottleneck in the I/O path.

To avoid this, the number of supported Inbound and Outbound
queues

is

Quoted 5 lines
Quoted 2 lines

increased to 64, and the number of queues used is decided
based on

number

Quoted 2 lines

of CPU cores online and number of MSI-X vectors allocated.
Also add

Quoted 12 lines

locks

Quoted 3 lines

per queue instead of using the global lock.

Link:

https://lore.kernel.org/r/20201005145011.23674-2-Viswas.G@microchip.
co
m.com

Quoted 4 lines
Quoted 24 lines

+cc Viswas and Ruksar.

Hi Viswas, hi Ruksar,

Can you please look into it?

Thanks!

Quoted 15 lines

'lspci -vvv' on working kernel:

Quoted 2 lines

01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA

[Series 6H] (rev 05)

Quoted 3 lines

Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
VGASnoop-

ParErr+ Stepping- SERR+ FastB2B- DisINTx+

Quoted 2 lines

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast

Quoted 1 line

TAbort-

<TAbort- <MAbort- >SERR- <PERR- INTx-

Quoted 3 lines

Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 16
Region 0: Memory at f7d60000 (64-bit, non-prefetchable)

[size=64K]

Quoted 1 line
Quoted 1 line
Quoted 1 line
        Region 2: Memory at f7d50000 (64-bit, non-prefetchable)

[size=64K]

Quoted 1 line
Quoted 1 line
Quoted 1 line
        Region 4: Memory at f7d40000 (32-bit, non-prefetchable)

[size=64K]

Quoted 92 lines
Quoted 92 lines
Quoted 1 line
        Region 5: Memory at f7d00000 (32-bit, non-prefetchable)

[size=256K]

Quoted 3 lines

Expansion ROM at f7c00000 [disabled] [size=1M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA

PME(D0+,D1-,D2-,D3hot-,D3cold-)

Quoted 6 lines

Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency
L0s

<1us, L1 <8us

Quoted 2 lines

ExtTag- AttnBtn- AttnInd- PwrInd- RBE+
FLReset-

SlotPowerLimit 0.000W

Quoted 5 lines

DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+
AuxPwr-

TransPend-

Quoted 2 lines

LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s
L1, Exit

Latency L0s <512ns, L1 <64us

Quoted 7 lines

ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (ok), Width x4 (downgraded)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported,
TimeoutDis+

NROPrPrP- LTR-

Quoted 2 lines

10BitTagComp- 10BitTagReq- OBFF Not
Supported,

ExtFmt- EETLPPrefix-

Quoted 1 line

EmergencyPowerReduction Not Supported,

EmergencyPowerReductionInit-

Quoted 4 lines

FRS- TPHComp- ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms,
TimeoutDis-

LTR- OBFF Disabled,

Quoted 3 lines

AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 5GT/s,
EnterCompliance-

SpeedDis-

Quoted 1 line

Transmit Margin: Normal Operating Range,

EnterModifiedCompliance- ComplianceSOS-

Quoted 2 lines

Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB,

EqualizationComplete- EqualizationPhase1-

Quoted 1 line

EqualizationPhase2- EqualizationPhase3-

LinkEqualizationRequest-

Quoted 7 lines

Retimer- 2Retimers- CrosslinkRes: unsupported
Capabilities: [ac] MSI-X: Enable+ Count=16 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00004000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 2 lines

UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 2 lines

UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

Quoted 1 line

CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr-

Quoted 1 line

CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr+

Quoted 2 lines

AERCap: First Error Pointer: 00, ECRCGenCap+
ECRCGenEn-

ECRCChkCap+ ECRCChkEn-

Quoted 1 line

MultHdrRecCap- MultHdrRecEn- TLPPfxPres-

HdrLogCap-

Quoted 3 lines
                HeaderLog: 00000000 00000000 00000000 00000000
        Kernel driver in use: pm80xx
        Kernel modules: pm80xx

'lspci -vvv' on non-working kernel (5.12-rc3):

Quoted 2 lines

01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA

[Series 6H] (rev 05)

Quoted 3 lines

Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV-
VGASnoop-

ParErr+ Stepping- SERR+ FastB2B- DisINTx+

Quoted 2 lines

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast

Quoted 1 line

TAbort-

Quoted 88 lines
Quoted 3 lines
Quoted 3 lines

<TAbort- <MAbort- >SERR- <PERR- INTx-

Quoted 2 lines

Interrupt: pin A routed to IRQ 16
Region 0: Memory at f7d60000 (64-bit, non-prefetchable)

[size=64K]

Quoted 1 line
Quoted 1 line
Quoted 1 line
        Region 2: Memory at f7d50000 (64-bit, non-prefetchable)

[size=64K]

Quoted 1 line
Quoted 1 line
Quoted 1 line
        Region 4: Memory at f7d40000 (32-bit, non-prefetchable)

[size=64K]

Quoted 80 lines
Quoted 80 lines
Quoted 1 line
        Region 5: Memory at f7d00000 (32-bit, non-prefetchable)

[size=256K]

Quoted 3 lines

Expansion ROM at f7c00000 [disabled] [size=1M]
Capabilities: [40] Power Management version 3
Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA

PME(D0+,D1-,D2-,D3hot-,D3cold-)

Quoted 6 lines

Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency
L0s

<1us, L1 <8us

Quoted 2 lines

ExtTag- AttnBtn- AttnInd- PwrInd- RBE+
FLReset-

SlotPowerLimit 116.000W

Quoted 5 lines

DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+
AuxPwr-

TransPend-

Quoted 2 lines

LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s
L1, Exit

Latency L0s <512ns, L1 <64us

Quoted 7 lines

ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp-
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (ok), Width x4 (downgraded)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported,
TimeoutDis+

NROPrPrP- LTR-

Quoted 2 lines

10BitTagComp- 10BitTagReq- OBFF Not
Supported,

ExtFmt- EETLPPrefix-

Quoted 1 line

EmergencyPowerReduction Not Supported,

EmergencyPowerReductionInit-

Quoted 4 lines

FRS- TPHComp- ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms,
TimeoutDis-

LTR- OBFF Disabled,

Quoted 3 lines

AtomicOpsCtl: ReqEn-
LnkCtl2: Target Link Speed: 5GT/s,
EnterCompliance-

SpeedDis-

Quoted 1 line

Transmit Margin: Normal Operating Range,

EnterModifiedCompliance- ComplianceSOS-

Quoted 2 lines

Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB,

EqualizationComplete- EqualizationPhase1-

Quoted 1 line

EqualizationPhase2- EqualizationPhase3-

LinkEqualizationRequest-

Quoted 7 lines

Retimer- 2Retimers- CrosslinkRes: unsupported
Capabilities: [ac] MSI-X: Enable+ Count=16 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00004000
Capabilities: [100 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 2 lines

UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

Quoted 2 lines

UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt-
UnxCmplt-

RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

Quoted 1 line

CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr-

Quoted 1 line

CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout-

AdvNonFatalErr+

Quoted 2 lines

AERCap: First Error Pointer: 00, ECRCGenCap+
ECRCGenEn-

ECRCChkCap+ ECRCChkEn-

Quoted 1 line

MultHdrRecCap- MultHdrRecEn- TLPPfxPres-

HdrLogCap-

Quoted 2 lines
                HeaderLog: 00000000 00000000 00000000 00000000
        Kernel modules: pm80xx

From f93d13247ad88ea3fe3c2e8c25ba8988972d0a7f Mon Sep 17 00:00:00 2001
From: Viswas G <[email protected]>
Date: Wed, 24 Mar 2021 23:36:05 +0530
Subject: [PATCH 1/1] pm80xx: Fix chip initialization failure

Inbound and outbound queues are not properly configured and that leads to MPI configuration failure.

---
 drivers/scsi/pm8001/pm8001_hwi.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/scsi/pm8001/pm8001_hwi.c +4 -4
index 49bf2f70a470..31e5455d280c 100644
@@ -223,7 +223,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
 		PM8001_EVENT_LOG_SIZE;
 	pm8001_ha->main_cfg_tbl.pm8001_tbl.iop_event_log_option		= 0x01;
 	pm8001_ha->main_cfg_tbl.pm8001_tbl.fatal_err_interrupt		= 0x01;
-	for (i = 0; i < PM8001_MAX_INB_NUM; i++) {
+	for (i = 0; i < pm8001_ha->max_q_num; i++) {
 		pm8001_ha->inbnd_q_tbl[i].element_pri_size_cnt	=
 			PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x00<<30);
 		pm8001_ha->inbnd_q_tbl[i].upper_base_addr	=
@@ -249,7 +249,7 @@ static void init_default_table_values(struct pm8001_hba_info *pm8001_ha)
 		pm8001_ha->inbnd_q_tbl[i].producer_idx		= 0;
 		pm8001_ha->inbnd_q_tbl[i].consumer_index	= 0;
 	}
-	for (i = 0; i < PM8001_MAX_OUTB_NUM; i++) {
+	for (i = 0; i < pm8001_ha->max_q_num; i++) {
 		pm8001_ha->outbnd_q_tbl[i].element_size_cnt	=
 			PM8001_MPI_QUEUE | (pm8001_ha->iomb_size << 16) | (0x01<<30);
 		pm8001_ha->outbnd_q_tbl[i].upper_base_addr	=
@@ -671,9 +671,9 @@ static int pm8001_chip_init(struct pm8001_hba_info *pm8001_ha)
 	read_outbnd_queue_table(pm8001_ha);
 	/* update main config table ,inbound table and outbound table */
 	update_main_config_table(pm8001_ha);
-	for (i = 0; i < PM8001_MAX_INB_NUM; i++)
+	for (i = 0; i < pm8001_ha->max_q_num; i++)
 		update_inbnd_queue_table(pm8001_ha, i);
-	for (i = 0; i < PM8001_MAX_OUTB_NUM; i++)
+	for (i = 0; i < pm8001_ha->max_q_num; i++)
 		update_outbnd_queue_table(pm8001_ha, i);
 	/* 8081 controller donot require these operations */
 	if (deviceid != 0x8081 && deviceid != 0x0042) {
Signature · 1 line
2.16.3
author
#4 lore raw

Hi Viswas,

Patch applied on top of 5.12-rc4 and it is working perfectly now. Double checked and without the patch the issue is still present in 5.12-rc4.

Thank you very much for the prompt response.

Is there any chance this will be backported to longterm (5.10) once it is merged?

Cheers,

Ash Izat

Quoted 15 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: 24 March 2021 18:07
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]
Subject: RE: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0

Hi Ash,

Can you please try this patch ?

Regards,
Viswas G

#5 lore raw

Hi Ash, hi Viswas,

Quoted 9 lines · Ash Izat

Hi Viswas,

Patch applied on top of 5.12-rc4 and it is working perfectly now. Double checked and without the patch the issue is still present in 5.12-rc4.

Thank you very much for the prompt response.

Is there any chance this will be backported to longterm (5.10) once it is merged?

Thanks for testing. Viswas please submit a formal patch with Reported-and-tested-by from Ash,
With the Fixes: 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues")
And add Cc: [email protected] # 5.10+

So it will be picked up when it is accepted by mainline, LTS maintainer will pick it up for stable 5.10+

Regards!
Jinpu

Quoted 18 lines
Quoted 16 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: 24 March 2021 18:07
To: [email protected]; [email protected]; [email protected]; [email protected]
Cc: [email protected]
Subject: RE: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0

Hi Ash,

Can you please try this patch ?

Regards,
Viswas G