Comment 0 for bug 1853995

Revision history for this message
Fred Kimmy (kongzizaixian) wrote :

"[Steps to Reproduce]
mkfs.ext4 to the special SAMSUNG M27LH960, and some IO error

[Actual Results]
Io error when the first time of mkfs.ext4

[ 745.809462] hisi_sas_v3_hw 0000:74:02.0: erroneous completion iptt=8 task=00000000975f5cdf dev id=1 CQ hdr: 0x41d03 0x10008 0x1 0x4460000 Error info: 0x0 0x0 0x10000 0x0
[ 776.028794] sas: Enter sas_scsi_recover_host busy: 2 failed: 2
[ 776.034612] sas: trying to find task 0x000000009656953a
[ 776.034613] sas: sas_scsi_find_task: aborting task 0x000000009656953a
[ 776.042785] sas: sas_scsi_find_task: task 0x000000009656953a is done
[ 776.042786] sas: sas_eh_handle_sas_errors: task 0x000000009656953a is done
[ 776.049635] sas: trying to find task 0x00000000975f5cdf
[ 776.049636] sas: sas_scsi_find_task: aborting task 0x00000000975f5cdf
[ 776.056053] sas: sas_scsi_find_task: task 0x00000000975f5cdf is done
[ 776.056054] sas: sas_eh_handle_sas_errors: task 0x00000000975f5cdf is done
[ 776.062900] sas: ata5: end_device-4:0: cmd error handler
[ 776.062914] sas: ata5: end_device-4:0: dev error handler
[ 776.062918] sas: ata6: end_device-4:1: dev error handler
[ 776.062920] ata5.00: exception Emask 0x0 SAct 0xc0000000 SErr 0x0 action 0x6 frozen
[ 776.062924] sas: ata7: end_device-4:2: dev error handler
[ 776.062926] sas: ata8: end_device-4:3: dev error handler
[ 776.070548] ata5.00: failed command: SEND FPDMA QUEUED
[ 776.075669] ata5.00: cmd 64/01:00:00:00:00/00:00:00:00:00/a0 tag 30 ncq dma 512 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 776.090638] ata5.00: status: { DRDY }
[ 776.094290] ata5.00: failed command: SEND FPDMA QUEUED
[ 776.099410] ata5.00: cmd 64/01:00:00:00:00/00:00:00:00:00/a0 tag 31 ncq dma 512 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 776.114399] ata5.00: status: { DRDY }
[ 776.118051] ata5: hard resetting link
[ 776.123198] hisi_sas_v3_hw 0000:74:02.0: phydown: phy0 phy_state=0xfe
[ 776.129609] hisi_sas_v3_hw 0000:74:02.0: ignore flutter phy0 down
[ 776.282642] hisi_sas_v3_hw 0000:74:02.0: phyup: phy0 link_rate=10(sata)
[ 776.289236] sas: sas_form_port: phy0 belongs to port0 already(1)!
[ 776.451784] ata5.00: configured for UDMA/133
[ 776.456043] ata5.00: device reported invalid CHS sector 0
[ 776.461423] ata5.00: device reported invalid CHS sector 0
[ 776.466807] ata5: EH complete
[ 776.469773] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 2 tries: 1
[ 776.498528] hisi_sas_v3_hw 0000:74:02.0: erroneous completion iptt=15 task=000000009656953a dev id=1 CQ hdr: 0x41d03 0x1000f 0x1 0x4460000 Error info: 0x0 0x0 0x10000 0x0
[ 806.740789] sas: Enter sas_scsi_recover_host busy: 2 failed: 2
[ 806.746604] sas: trying to find task 0x00000000975f5cdf
[ 806.746605] sas: sas_scsi_find_task: aborting task 0x00000000975f5cdf
[ 806.754732] sas: sas_scsi_find_task: task 0x00000000975f5cdf is done
[ 806.754733] sas: sas_eh_handle_sas_errors: task 0x00000000975f5cdf is done
[ 806.761582] sas: trying to find task 0x000000009656953a
[ 806.761584] sas: sas_scsi_find_task: aborting task 0x000000009656953a
[ 806.768002] sas: sas_scsi_find_task: task 0x000000009656953a is done
[ 806.768003] sas: sas_eh_handle_sas_errors: task 0x000000009656953a is done
[ 806.774852] sas: ata5: end_device-4:0: cmd error handler
[ 806.774864] sas: ata5: end_device-4:0: dev error handler
[ 806.774868] sas: ata6: end_device-4:1: dev error handler
[ 806.774870] ata5.00: exception Emask 0x0 SAct 0x3 SErr 0x0 action 0x6 frozen
[ 806.774873] ata5.00: failed command: SEND FPDMA QUEUED
[ 806.774875] sas: ata7: end_device-4:2: dev error handler
[ 806.774878] sas: ata8: end_device-4:3: dev error handler
[ 806.787013] ata5.00: cmd 64/01:00:00:00:00/00:00:00:00:00/a0 tag 0 ncq dma 512 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 806.801900] ata5.00: status: { DRDY }
[ 806.805554] ata5.00: failed command: SEND FPDMA QUEUED
[ 806.810674] ata5.00: cmd 64/01:00:00:00:00/00:00:00:00:00/a0 tag 1 ncq dma 512 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 806.825582] ata5.00: status: { DRDY }
[ 806.829237] ata5: hard resetting link
[ 806.834445] hisi_sas_v3_hw 0000:74:02.0: phydown: phy0 phy_state=0xfe
[ 806.840856] hisi_sas_v3_hw 0000:74:02.0: ignore flutter phy0 down
[ 806.994690] hisi_sas_v3_hw 0000:74:02.0: phyup: phy0 link_rate=10(sata)
[ 807.001279] sas: sas_form_port: phy0 belongs to port0 already(1)!
[ 807.163818] ata5.00: configured for UDMA/133
[ 807.168075] ata5.00: device reported invalid CHS sector 0
[ 807.173453] ata5.00: device reported invalid CHS sector 0
[ 807.178838] ata5: EH complete
[ 807.181806] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 2 tries: 1
[ 807.210880] hisi_sas_v3_hw 0000:74:02.0: erroneous completion iptt=38 task=00000000975f5cdf dev id=1 CQ hdr: 0x41d03 0x10026 0x1 0x4460000 Error info: 0x0 0x0 0x10000 0x0
[ 837.460789] sas: Enter sas_scsi_recover_host busy: 2 failed: 2
[ 837.466601] sas: trying to find task 0x000000009656953a
[ 837.466602] sas: sas_scsi_find_task: aborting task 0x000000009656953a
[ 837.474777] sas: sas_scsi_find_task: task 0x000000009656953a is done
[ 837.474778] sas: sas_eh_handle_sas_errors: task 0x000000009656953a is done
[ 837.481625] sas: trying to find task 0x00000000975f5cdf
[ 837.481626] sas: sas_scsi_find_task: aborting task 0x00000000975f5cdf
[ 837.488040] sas: sas_scsi_find_task: task 0x00000000975f5cdf is done
[ 837.488041] sas: sas_eh_handle_sas_errors: task 0x00000000975f5cdf is done
[ 837.494886] sas: ata5: end_device-4:0: cmd error handler
[ 837.494898] sas: ata5: end_device-4:0: dev error handler
[ 837.494901] sas: ata6: end_device-4:1: dev error handler
[ 837.494904] ata5.00: NCQ disabled due to excessive errors
[ 837.494905] sas: ata7: end_device-4:2: dev error handler
[ 837.494909] sas: ata8: end_device-4:3: dev error handler
[ 837.500288] ata5.00: exception Emask 0x0 SAct 0xc SErr 0x0 action 0x6 frozen
[ 837.507309] ata5.00: failed command: SEND FPDMA QUEUED
[ 837.512429] ata5.00: cmd 64/01:00:00:00:00/00:00:00:00:00/a0 tag 2 ncq dma 512 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 837.527332] ata5.00: status: { DRDY }
[ 837.530982] ata5.00: failed command: SEND FPDMA QUEUED
[ 837.536101] ata5.00: cmd 64/01:00:00:00:00/00:00:00:00:00/a0 tag 3 ncq dma 512 out
         res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[ 837.550983] ata5.00: status: { DRDY }
[ 837.554635] ata5: hard resetting link
[ 837.559892] hisi_sas_v3_hw 0000:74:02.0: phydown: phy0 phy_state=0xfe
[ 837.566303] hisi_sas_v3_hw 0000:74:02.0: ignore flutter phy0 down
[ 837.718640] hisi_sas_v3_hw 0000:74:02.0: phyup: phy0 link_rate=10(sata)
[ 837.725233] sas: sas_form_port: phy0 belongs to port0 already(1)!
[ 837.887858] ata5.00: configured for UDMA/133
[ 837.892117] ata5.00: device reported invalid CHS sector 0
[ 837.897503] ata5: EH complete
[ 837.900466] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 2 tries: 1

[Expected Results]
no issue or no IO error

[Reproducibility]
It occurs all the times

[Additional information]
Hardware: D06 CS
Firmware: NA
Kernel: NA

[Resolution]
Currently the NCQ tag is only assigned for FPDMA READ and FPDMA WRITE
commands, and for other NCQ commands (such as FPDMA SEND), their NCQ tags
are set in the delivery command to 0.

So for all the NCQ commands, we also need to assign normal NCQ tag for
them, so drop the command type check in hisi_sas_get_ncq_tag() [drop
hisi_sas_get_ncq_tag() altogether actually], and always use the ATA command
NCQ tag when appropriate."

scsi: hisi_sas: Assign NCQ tag for all NCQ commands