scsi: hisi_sas: Use device lock to protect slot alloc/free
authorXiang Chen <chenxiang66@hisilicon.com>
Wed, 9 May 2018 15:10:49 +0000 (23:10 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 18 May 2018 15:22:09 +0000 (11:22 -0400)
commite85d93b21267fff56110e3a258b9fad8adbfbce3
tree1ccb90316de70e0085c6212e665d0573aa7e8347
parentfa222db0b036899cd4020a380568699ffb1de08d
scsi: hisi_sas: Use device lock to protect slot alloc/free

The IPTT of a slot is unique, and we currently use hisi_hba lock to
protect it.

Now slot is managed on hisi_sas_device.list, so use DQ lock to protect
for allocating and freeing the slot.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hisi_sas/hisi_sas_main.c
drivers/scsi/hisi_sas/hisi_sas_v3_hw.c