]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: pm8001: Set up tags before using them
authorJohn Garry <john.garry@huawei.com>
Fri, 10 Jun 2022 16:46:40 +0000 (00:46 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 17 Jun 2022 01:45:09 +0000 (21:45 -0400)
commit165b26e47872b5f2a61e26247bfadefebebcb57e
tree85ccbffccb254c13822b608bc72b619e9751094a
parent57b69652adab5ad5cb9b425d246ca6a0cff1d1bc
scsi: pm8001: Set up tags before using them

The current code is buggy in that the tags are set up after they are needed
in pm80xx_chip_init() -> pm80xx_set_sas_protocol_timer_config().  The tag
depth is earlier read in pm80xx_chip_init() -> read_main_config_table().

Add a post init callback to do the pm80xx work which needs to be done after
reading the tags. I don't see a better way to do this.

Link: https://lore.kernel.org/r/1654879602-33497-3-git-send-email-john.garry@huawei.com
Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/pm8001/pm8001_hwi.c
drivers/scsi/pm8001/pm8001_init.c
drivers/scsi/pm8001/pm8001_sas.h
drivers/scsi/pm8001/pm80xx_hwi.c