All of lore.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0
@ 2021-03-19 11:16 ash
  2021-03-19 11:30 ` Jinpu Wang
  0 siblings, 1 reply; 7+ messages in thread
From: ash @ 2021-03-19 11:16 UTC (permalink / raw)
  To: jinpu.wang; +Cc: linux-scsi

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.

> commit 05c6c029a44d9f43715577e33e95eba87f44d285
> Author: Viswas G <Viswas.G@microchip.com>
> 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
>     the I/O, TMF and internal requests are submitted through those. A
global
>     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
>     of CPU cores online and number of MSI-X vectors allocated. Also add
locks
>     per queue instead of using the global lock.
> 
>     Link:
https://lore.kernel.org/r/20201005145011.23674-2-Viswas.G@microchip.com.com
>     Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
>     Signed-off-by: Viswas G <Viswas.G@microchip.com>
>     Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
>     Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

'lspci -vvv' on working kernel:

> 01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA
[Series 6H] (rev 05)
>         Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
>         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR+ FastB2B- DisINTx+
>         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
>         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]
>         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-)
>                 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
>                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
SlotPowerLimit 0.000W
>                 DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
>                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
>                         MaxPayload 128 bytes, MaxReadReq 512 bytes
>                 DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr-
TransPend-
>                 LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Exit
Latency L0s <512ns, L1 <64us
>                         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-
>                          10BitTagComp- 10BitTagReq- OBFF Not Supported,
ExtFmt- EETLPPrefix-
>                          EmergencyPowerReduction Not Supported,
EmergencyPowerReductionInit-
>                          FRS- TPHComp- ExtTPHComp-
>                          AtomicOpsCap: 32bit- 64bit- 128bitCAS-
>                 DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
LTR- OBFF Disabled,
>                          AtomicOpsCtl: ReqEn-
>                 LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-
SpeedDis-
>                          Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
>                          Compliance De-emphasis: -6dB
>                 LnkSta2: Current De-emphasis Level: -3.5dB,
EqualizationComplete- EqualizationPhase1-
>                          EqualizationPhase2- EqualizationPhase3-
LinkEqualizationRequest-
>                          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-
>                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
AdvNonFatalErr-
>                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
AdvNonFatalErr+
>                 AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn-
ECRCChkCap+ ECRCChkEn-
>                         MultHdrRecCap- MultHdrRecEn- TLPPfxPres-
HdrLogCap-
>                 HeaderLog: 00000000 00000000 00000000 00000000
>         Kernel driver in use: pm80xx
>         Kernel modules: pm80xx

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

> 01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA
[Series 6H] (rev 05)
>         Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
>         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
ParErr+ Stepping- SERR+ FastB2B- DisINTx+
>         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
>         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]
>         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-)
>                 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
>                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
SlotPowerLimit 116.000W
>                 DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
>                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
>                         MaxPayload 128 bytes, MaxReadReq 512 bytes
>                 DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr-
TransPend-
>                 LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Exit
Latency L0s <512ns, L1 <64us
>                         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-
>                          10BitTagComp- 10BitTagReq- OBFF Not Supported,
ExtFmt- EETLPPrefix-
>                          EmergencyPowerReduction Not Supported,
EmergencyPowerReductionInit-
>                          FRS- TPHComp- ExtTPHComp-
>                          AtomicOpsCap: 32bit- 64bit- 128bitCAS-
>                 DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
LTR- OBFF Disabled,
>                          AtomicOpsCtl: ReqEn-
>                 LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-
SpeedDis-
>                          Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
>                          Compliance De-emphasis: -6dB
>                 LnkSta2: Current De-emphasis Level: -3.5dB,
EqualizationComplete- EqualizationPhase1-
>                          EqualizationPhase2- EqualizationPhase3-
LinkEqualizationRequest-
>                          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-
>                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
AdvNonFatalErr-
>                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
AdvNonFatalErr+
>                 AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn-
ECRCChkCap+ ECRCChkEn-
>                         MultHdrRecCap- MultHdrRecEn- TLPPfxPres-
HdrLogCap-
>                 HeaderLog: 00000000 00000000 00000000 00000000
>         Kernel modules: pm80xx


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0
  2021-03-19 11:16 [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0 ash
@ 2021-03-19 11:30 ` Jinpu Wang
  2021-03-19 16:54   ` Viswas.G
  0 siblings, 1 reply; 7+ messages in thread
From: Jinpu Wang @ 2021-03-19 11:30 UTC (permalink / raw)
  To: ash, Viswas G, Ruksar.devadi; +Cc: Linux SCSI Mailinglist

Hi Ash,

Thanks for reporting.


On Fri, Mar 19, 2021 at 12:16 PM <ash@ai0.uk> 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.
>
> > commit 05c6c029a44d9f43715577e33e95eba87f44d285
> > Author: Viswas G <Viswas.G@microchip.com>
> > 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
> >     the I/O, TMF and internal requests are submitted through those. A
> global
> >     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
> >     of CPU cores online and number of MSI-X vectors allocated. Also add
> locks
> >     per queue instead of using the global lock.
> >
> >     Link:
> https://lore.kernel.org/r/20201005145011.23674-2-Viswas.G@microchip.com.com
> >     Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
> >     Signed-off-by: Viswas G <Viswas.G@microchip.com>
> >     Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
> >     Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
>
+cc Viswas and Ruksar.

Hi Viswas, hi Ruksar,

Can you please look into it?

Thanks!


> 'lspci -vvv' on working kernel:
>
> > 01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA
> [Series 6H] (rev 05)
> >         Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
> >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
> ParErr+ Stepping- SERR+ FastB2B- DisINTx+
> >         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> >         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]
> >         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-)
> >                 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
> >                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
> SlotPowerLimit 0.000W
> >                 DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
> >                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
> >                         MaxPayload 128 bytes, MaxReadReq 512 bytes
> >                 DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr-
> TransPend-
> >                 LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Exit
> Latency L0s <512ns, L1 <64us
> >                         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-
> >                          10BitTagComp- 10BitTagReq- OBFF Not Supported,
> ExtFmt- EETLPPrefix-
> >                          EmergencyPowerReduction Not Supported,
> EmergencyPowerReductionInit-
> >                          FRS- TPHComp- ExtTPHComp-
> >                          AtomicOpsCap: 32bit- 64bit- 128bitCAS-
> >                 DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
> LTR- OBFF Disabled,
> >                          AtomicOpsCtl: ReqEn-
> >                 LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-
> SpeedDis-
> >                          Transmit Margin: Normal Operating Range,
> EnterModifiedCompliance- ComplianceSOS-
> >                          Compliance De-emphasis: -6dB
> >                 LnkSta2: Current De-emphasis Level: -3.5dB,
> EqualizationComplete- EqualizationPhase1-
> >                          EqualizationPhase2- EqualizationPhase3-
> LinkEqualizationRequest-
> >                          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-
> >                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
> RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> >                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
> RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> >                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> AdvNonFatalErr-
> >                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> AdvNonFatalErr+
> >                 AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn-
> ECRCChkCap+ ECRCChkEn-
> >                         MultHdrRecCap- MultHdrRecEn- TLPPfxPres-
> HdrLogCap-
> >                 HeaderLog: 00000000 00000000 00000000 00000000
> >         Kernel driver in use: pm80xx
> >         Kernel modules: pm80xx
>
> 'lspci -vvv' on non-working kernel (5.12-rc3):
>
> > 01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001 SAS HBA
> [Series 6H] (rev 05)
> >         Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
> >         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
> ParErr+ Stepping- SERR+ FastB2B- DisINTx+
> >         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> <TAbort- <MAbort- >SERR- <PERR- INTx-
> >         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]
> >         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-)
> >                 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
> >                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
> SlotPowerLimit 116.000W
> >                 DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
> >                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
> >                         MaxPayload 128 bytes, MaxReadReq 512 bytes
> >                 DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+ AuxPwr-
> TransPend-
> >                 LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1, Exit
> Latency L0s <512ns, L1 <64us
> >                         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-
> >                          10BitTagComp- 10BitTagReq- OBFF Not Supported,
> ExtFmt- EETLPPrefix-
> >                          EmergencyPowerReduction Not Supported,
> EmergencyPowerReductionInit-
> >                          FRS- TPHComp- ExtTPHComp-
> >                          AtomicOpsCap: 32bit- 64bit- 128bitCAS-
> >                 DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
> LTR- OBFF Disabled,
> >                          AtomicOpsCtl: ReqEn-
> >                 LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-
> SpeedDis-
> >                          Transmit Margin: Normal Operating Range,
> EnterModifiedCompliance- ComplianceSOS-
> >                          Compliance De-emphasis: -6dB
> >                 LnkSta2: Current De-emphasis Level: -3.5dB,
> EqualizationComplete- EqualizationPhase1-
> >                          EqualizationPhase2- EqualizationPhase3-
> LinkEqualizationRequest-
> >                          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-
> >                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-
> RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> >                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt-
> RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> >                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> AdvNonFatalErr-
> >                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> AdvNonFatalErr+
> >                 AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn-
> ECRCChkCap+ ECRCChkEn-
> >                         MultHdrRecCap- MultHdrRecEn- TLPPfxPres-
> HdrLogCap-
> >                 HeaderLog: 00000000 00000000 00000000 00000000
> >         Kernel modules: pm80xx
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0
  2021-03-19 11:30 ` Jinpu Wang
@ 2021-03-19 16:54   ` Viswas.G
  2021-03-24 18:06     ` Viswas.G
  0 siblings, 1 reply; 7+ messages in thread
From: Viswas.G @ 2021-03-19 16:54 UTC (permalink / raw)
  To: jinpu.wang, ash, Ruksar.devadi; +Cc: linux-scsi

Thanks Jinpu. We will look into that and update.

Regards,
Viswas G

> -----Original Message-----
> From: Jinpu Wang <jinpu.wang@cloud.ionos.com>
> Sent: Friday, March 19, 2021 5:00 PM
> To: ash@ai0.uk; Viswas G - I30667 <Viswas.G@microchip.com>; Ruksar
> Devadi - I52327 <Ruksar.devadi@microchip.com>
> Cc: Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>
> 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.
> 
> 
> On Fri, Mar 19, 2021 at 12:16 PM <ash@ai0.uk> 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.
> >
> > > commit 05c6c029a44d9f43715577e33e95eba87f44d285
> > > Author: Viswas G <Viswas.G@microchip.com>
> > > 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
> > >     the I/O, TMF and internal requests are submitted through those.
> > > A
> > global
> > >     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
> > >     of CPU cores online and number of MSI-X vectors allocated. Also
> > > add
> > locks
> > >     per queue instead of using the global lock.
> > >
> > >     Link:
> > https://lore.kernel.org/r/20201005145011.23674-2-Viswas.G@microchip.co
> > m.com
> > >     Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
> > >     Signed-off-by: Viswas G <Viswas.G@microchip.com>
> > >     Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
> > >     Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> >
> +cc Viswas and Ruksar.
> 
> Hi Viswas, hi Ruksar,
> 
> Can you please look into it?
> 
> Thanks!
> 
> 
> > 'lspci -vvv' on working kernel:
> >
> > > 01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001
> > > SAS HBA
> > [Series 6H] (rev 05)
> > >         Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
> > >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
> > ParErr+ Stepping- SERR+ FastB2B- DisINTx+
> > >         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
> > > >TAbort-
> > <TAbort- <MAbort- >SERR- <PERR- INTx-
> > >         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]
> > >         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-)
> > >                 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
> > >                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE+
> > > FLReset-
> > SlotPowerLimit 0.000W
> > >                 DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
> > >                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
> > >                         MaxPayload 128 bytes, MaxReadReq 512 bytes
> > >                 DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+
> > > AuxPwr-
> > TransPend-
> > >                 LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
> > > Exit
> > Latency L0s <512ns, L1 <64us
> > >                         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-
> > >                          10BitTagComp- 10BitTagReq- OBFF Not
> > > Supported,
> > ExtFmt- EETLPPrefix-
> > >                          EmergencyPowerReduction Not Supported,
> > EmergencyPowerReductionInit-
> > >                          FRS- TPHComp- ExtTPHComp-
> > >                          AtomicOpsCap: 32bit- 64bit- 128bitCAS-
> > >                 DevCtl2: Completion Timeout: 50us to 50ms,
> > > TimeoutDis-
> > LTR- OBFF Disabled,
> > >                          AtomicOpsCtl: ReqEn-
> > >                 LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-
> > SpeedDis-
> > >                          Transmit Margin: Normal Operating Range,
> > EnterModifiedCompliance- ComplianceSOS-
> > >                          Compliance De-emphasis: -6dB
> > >                 LnkSta2: Current De-emphasis Level: -3.5dB,
> > EqualizationComplete- EqualizationPhase1-
> > >                          EqualizationPhase2- EqualizationPhase3-
> > LinkEqualizationRequest-
> > >                          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-
> > >                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
> > > UnxCmplt-
> > RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> > >                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt-
> > > UnxCmplt-
> > RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> > >                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> > AdvNonFatalErr-
> > >                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> > AdvNonFatalErr+
> > >                 AERCap: First Error Pointer: 00, ECRCGenCap+
> > > ECRCGenEn-
> > ECRCChkCap+ ECRCChkEn-
> > >                         MultHdrRecCap- MultHdrRecEn- TLPPfxPres-
> > HdrLogCap-
> > >                 HeaderLog: 00000000 00000000 00000000 00000000
> > >         Kernel driver in use: pm80xx
> > >         Kernel modules: pm80xx
> >
> > 'lspci -vvv' on non-working kernel (5.12-rc3):
> >
> > > 01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001
> > > SAS HBA
> > [Series 6H] (rev 05)
> > >         Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
> > >         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop-
> > ParErr+ Stepping- SERR+ FastB2B- DisINTx+
> > >         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
> > > >TAbort-
> > <TAbort- <MAbort- >SERR- <PERR- INTx-
> > >         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]
> > >         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-)
> > >                 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
> > >                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE+
> > > FLReset-
> > SlotPowerLimit 116.000W
> > >                 DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
> > >                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
> > >                         MaxPayload 128 bytes, MaxReadReq 512 bytes
> > >                 DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+
> > > AuxPwr-
> > TransPend-
> > >                 LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s L1,
> > > Exit
> > Latency L0s <512ns, L1 <64us
> > >                         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-
> > >                          10BitTagComp- 10BitTagReq- OBFF Not
> > > Supported,
> > ExtFmt- EETLPPrefix-
> > >                          EmergencyPowerReduction Not Supported,
> > EmergencyPowerReductionInit-
> > >                          FRS- TPHComp- ExtTPHComp-
> > >                          AtomicOpsCap: 32bit- 64bit- 128bitCAS-
> > >                 DevCtl2: Completion Timeout: 50us to 50ms,
> > > TimeoutDis-
> > LTR- OBFF Disabled,
> > >                          AtomicOpsCtl: ReqEn-
> > >                 LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-
> > SpeedDis-
> > >                          Transmit Margin: Normal Operating Range,
> > EnterModifiedCompliance- ComplianceSOS-
> > >                          Compliance De-emphasis: -6dB
> > >                 LnkSta2: Current De-emphasis Level: -3.5dB,
> > EqualizationComplete- EqualizationPhase1-
> > >                          EqualizationPhase2- EqualizationPhase3-
> > LinkEqualizationRequest-
> > >                          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-
> > >                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
> > > UnxCmplt-
> > RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> > >                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt-
> > > UnxCmplt-
> > RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> > >                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> > AdvNonFatalErr-
> > >                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> > AdvNonFatalErr+
> > >                 AERCap: First Error Pointer: 00, ECRCGenCap+
> > > ECRCGenEn-
> > ECRCChkCap+ ECRCChkEn-
> > >                         MultHdrRecCap- MultHdrRecEn- TLPPfxPres-
> > HdrLogCap-
> > >                 HeaderLog: 00000000 00000000 00000000 00000000
> > >         Kernel modules: pm80xx
> >

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0
  2021-03-19 16:54   ` Viswas.G
@ 2021-03-24 18:06     ` Viswas.G
  2021-03-24 21:46       ` Ash Izat
  2021-04-01  3:36       ` Martin K. Petersen
  0 siblings, 2 replies; 7+ messages in thread
From: Viswas.G @ 2021-03-24 18:06 UTC (permalink / raw)
  To: jinpu.wang, ash, Ruksar.devadi, Vasanthalakshmi.Tharmarajan; +Cc: linux-scsi

[-- Attachment #1: Type: text/plain, Size: 13541 bytes --]

Hi Ash,

Can you please try this patch ?

Regards,
Viswas G

> -----Original Message-----
> From: Viswas G - I30667
> Sent: Friday, March 19, 2021 10:25 PM
> To: Jinpu Wang <jinpu.wang@cloud.ionos.com>; ash@ai0.uk; Ruksar Devadi -
> I52327 <Ruksar.devadi@microchip.com>
> Cc: Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>
> 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
> 
> > -----Original Message-----
> > From: Jinpu Wang <jinpu.wang@cloud.ionos.com>
> > Sent: Friday, March 19, 2021 5:00 PM
> > To: ash@ai0.uk; Viswas G - I30667 <Viswas.G@microchip.com>; Ruksar
> > Devadi - I52327 <Ruksar.devadi@microchip.com>
> > Cc: Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>
> > 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.
> >
> >
> > On Fri, Mar 19, 2021 at 12:16 PM <ash@ai0.uk> 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.
> > >
> > > > commit 05c6c029a44d9f43715577e33e95eba87f44d285
> > > > Author: Viswas G <Viswas.G@microchip.com>
> > > > 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
> > > >     the I/O, TMF and internal requests are submitted through those.
> > > > A
> > > global
> > > >     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
> > > >     of CPU cores online and number of MSI-X vectors allocated.
> > > > Also add
> > > locks
> > > >     per queue instead of using the global lock.
> > > >
> > > >     Link:
> > > https://lore.kernel.org/r/20201005145011.23674-2-Viswas.G@microchip.
> > > co
> > > m.com
> > > >     Acked-by: Jack Wang <jinpu.wang@cloud.ionos.com>
> > > >     Signed-off-by: Viswas G <Viswas.G@microchip.com>
> > > >     Signed-off-by: Ruksar Devadi <Ruksar.devadi@microchip.com>
> > > >     Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> > >
> > +cc Viswas and Ruksar.
> >
> > Hi Viswas, hi Ruksar,
> >
> > Can you please look into it?
> >
> > Thanks!
> >
> >
> > > 'lspci -vvv' on working kernel:
> > >
> > > > 01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001
> > > > SAS HBA
> > > [Series 6H] (rev 05)
> > > >         Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
> > > >         Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV-
> > > > VGASnoop-
> > > ParErr+ Stepping- SERR+ FastB2B- DisINTx+
> > > >         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
> > > > >TAbort-
> > > <TAbort- <MAbort- >SERR- <PERR- INTx-
> > > >         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]
> > > >         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-)
> > > >                 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
> > > >                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE+
> > > > FLReset-
> > > SlotPowerLimit 0.000W
> > > >                 DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
> > > >                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
> > > >                         MaxPayload 128 bytes, MaxReadReq 512 bytes
> > > >                 DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+
> > > > AuxPwr-
> > > TransPend-
> > > >                 LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s
> > > > L1, Exit
> > > Latency L0s <512ns, L1 <64us
> > > >                         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-
> > > >                          10BitTagComp- 10BitTagReq- OBFF Not
> > > > Supported,
> > > ExtFmt- EETLPPrefix-
> > > >                          EmergencyPowerReduction Not Supported,
> > > EmergencyPowerReductionInit-
> > > >                          FRS- TPHComp- ExtTPHComp-
> > > >                          AtomicOpsCap: 32bit- 64bit- 128bitCAS-
> > > >                 DevCtl2: Completion Timeout: 50us to 50ms,
> > > > TimeoutDis-
> > > LTR- OBFF Disabled,
> > > >                          AtomicOpsCtl: ReqEn-
> > > >                 LnkCtl2: Target Link Speed: 5GT/s,
> > > > EnterCompliance-
> > > SpeedDis-
> > > >                          Transmit Margin: Normal Operating Range,
> > > EnterModifiedCompliance- ComplianceSOS-
> > > >                          Compliance De-emphasis: -6dB
> > > >                 LnkSta2: Current De-emphasis Level: -3.5dB,
> > > EqualizationComplete- EqualizationPhase1-
> > > >                          EqualizationPhase2- EqualizationPhase3-
> > > LinkEqualizationRequest-
> > > >                          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-
> > > >                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
> > > > UnxCmplt-
> > > RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> > > >                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt-
> > > > UnxCmplt-
> > > RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> > > >                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> > > AdvNonFatalErr-
> > > >                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> > > AdvNonFatalErr+
> > > >                 AERCap: First Error Pointer: 00, ECRCGenCap+
> > > > ECRCGenEn-
> > > ECRCChkCap+ ECRCChkEn-
> > > >                         MultHdrRecCap- MultHdrRecEn- TLPPfxPres-
> > > HdrLogCap-
> > > >                 HeaderLog: 00000000 00000000 00000000 00000000
> > > >         Kernel driver in use: pm80xx
> > > >         Kernel modules: pm80xx
> > >
> > > 'lspci -vvv' on non-working kernel (5.12-rc3):
> > >
> > > > 01:00.0 Serial Attached SCSI controller: Adaptec PMC-Sierra PM8001
> > > > SAS HBA
> > > [Series 6H] (rev 05)
> > > >         Subsystem: Adaptec PMC-Sierra PM8001 SAS HBA [Series 6H]
> > > >         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV-
> > > > VGASnoop-
> > > ParErr+ Stepping- SERR+ FastB2B- DisINTx+
> > > >         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
> > > > >TAbort-
> > > <TAbort- <MAbort- >SERR- <PERR- INTx-
> > > >         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]
> > > >         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-)
> > > >                 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
> > > >                         ExtTag- AttnBtn- AttnInd- PwrInd- RBE+
> > > > FLReset-
> > > SlotPowerLimit 116.000W
> > > >                 DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
> > > >                         RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
> > > >                         MaxPayload 128 bytes, MaxReadReq 512 bytes
> > > >                 DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq+
> > > > AuxPwr-
> > > TransPend-
> > > >                 LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s
> > > > L1, Exit
> > > Latency L0s <512ns, L1 <64us
> > > >                         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-
> > > >                          10BitTagComp- 10BitTagReq- OBFF Not
> > > > Supported,
> > > ExtFmt- EETLPPrefix-
> > > >                          EmergencyPowerReduction Not Supported,
> > > EmergencyPowerReductionInit-
> > > >                          FRS- TPHComp- ExtTPHComp-
> > > >                          AtomicOpsCap: 32bit- 64bit- 128bitCAS-
> > > >                 DevCtl2: Completion Timeout: 50us to 50ms,
> > > > TimeoutDis-
> > > LTR- OBFF Disabled,
> > > >                          AtomicOpsCtl: ReqEn-
> > > >                 LnkCtl2: Target Link Speed: 5GT/s,
> > > > EnterCompliance-
> > > SpeedDis-
> > > >                          Transmit Margin: Normal Operating Range,
> > > EnterModifiedCompliance- ComplianceSOS-
> > > >                          Compliance De-emphasis: -6dB
> > > >                 LnkSta2: Current De-emphasis Level: -3.5dB,
> > > EqualizationComplete- EqualizationPhase1-
> > > >                          EqualizationPhase2- EqualizationPhase3-
> > > LinkEqualizationRequest-
> > > >                          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-
> > > >                 UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt-
> > > > UnxCmplt-
> > > RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
> > > >                 UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt-
> > > > UnxCmplt-
> > > RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
> > > >                 CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> > > AdvNonFatalErr-
> > > >                 CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout-
> > > AdvNonFatalErr+
> > > >                 AERCap: First Error Pointer: 00, ECRCGenCap+
> > > > ECRCGenEn-
> > > ECRCChkCap+ ECRCChkEn-
> > > >                         MultHdrRecCap- MultHdrRecEn- TLPPfxPres-
> > > HdrLogCap-
> > > >                 HeaderLog: 00000000 00000000 00000000 00000000
> > > >         Kernel modules: pm80xx
> > >

[-- Attachment #2: 0001-pm80xx-Fix-chip-initialization-failure.patch --]
[-- Type: application/octet-stream, Size: 2179 bytes --]

From f93d13247ad88ea3fe3c2e8c25ba8988972d0a7f Mon Sep 17 00:00:00 2001
From: Viswas G <Viswas.G@microchip.com>
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(-)

diff --git a/drivers/scsi/pm8001/pm8001_hwi.c b/drivers/scsi/pm8001/pm8001_hwi.c
index 49bf2f70a470..31e5455d280c 100644
--- a/drivers/scsi/pm8001/pm8001_hwi.c
+++ b/drivers/scsi/pm8001/pm8001_hwi.c
@@ -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) {
-- 
2.16.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0
  2021-03-24 18:06     ` Viswas.G
@ 2021-03-24 21:46       ` Ash Izat
  2021-03-25  6:04         ` Jinpu Wang
  2021-04-01  3:36       ` Martin K. Petersen
  1 sibling, 1 reply; 7+ messages in thread
From: Ash Izat @ 2021-03-24 21:46 UTC (permalink / raw)
  To: Viswas.G, jinpu.wang, Ruksar.devadi, Vasanthalakshmi.Tharmarajan
  Cc: linux-scsi

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

> -----Original Message-----
> From: Viswas.G@microchip.com <Viswas.G@microchip.com>
> Sent: 24 March 2021 18:07
> To: jinpu.wang@cloud.ionos.com; ash@ai0.uk; Ruksar.devadi@microchip.com;
> Vasanthalakshmi.Tharmarajan@microchip.com
> Cc: linux-scsi@vger.kernel.org
> Subject: RE: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after
> v5.10.0
> 
> Hi Ash,
> 
> Can you please try this patch ?
> 
> Regards,
> Viswas G



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0
  2021-03-24 21:46       ` Ash Izat
@ 2021-03-25  6:04         ` Jinpu Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Jinpu Wang @ 2021-03-25  6:04 UTC (permalink / raw)
  To: Ash Izat, Viswas G
  Cc: Jack Wang, Ruksar Devadi, Vasanthalakshmi.Tharmarajan,
	Linux SCSI Mailinglist

Hi Ash, hi Viswas,
On Wed, Mar 24, 2021 at 10:46 PM Ash Izat <ash@ai0.uk> wrote:
>
> 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: stable@vger.kernel.org # 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
>
> > -----Original Message-----
> > From: Viswas.G@microchip.com <Viswas.G@microchip.com>
> > Sent: 24 March 2021 18:07
> > To: jinpu.wang@cloud.ionos.com; ash@ai0.uk; Ruksar.devadi@microchip.com;
> > Vasanthalakshmi.Tharmarajan@microchip.com
> > Cc: linux-scsi@vger.kernel.org
> > Subject: RE: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after
> > v5.10.0
> >
> > Hi Ash,
> >
> > Can you please try this patch ?
> >
> > Regards,
> > Viswas G
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0
  2021-03-24 18:06     ` Viswas.G
  2021-03-24 21:46       ` Ash Izat
@ 2021-04-01  3:36       ` Martin K. Petersen
  1 sibling, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2021-04-01  3:36 UTC (permalink / raw)
  To: Viswas.G
  Cc: jinpu.wang, ash, Ruksar.devadi, Vasanthalakshmi.Tharmarajan, linux-scsi


Viswas,

> Can you please try this patch ?

Please formally submit this fix with the amendments Jinpu requested:

Reported-and-tested-by: Ash Izat <ash@ai0.uk>
Fixes: 05c6c029a44d ("scsi: pm80xx: Increase number of supported queues")
Cc: stable@vger.kernel.org # 5.10+

Thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-01  3:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 11:16 [REGRESSION] pm8001: Adaptec 6805H fails to initialize after v5.10.0 ash
2021-03-19 11:30 ` Jinpu Wang
2021-03-19 16:54   ` Viswas.G
2021-03-24 18:06     ` Viswas.G
2021-03-24 21:46       ` Ash Izat
2021-03-25  6:04         ` Jinpu Wang
2021-04-01  3:36       ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.