]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: libsas: Use enum for response frame DATAPRES field
authorJohn Garry <john.garry@huawei.com>
Thu, 17 Feb 2022 15:42:30 +0000 (23:42 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 19 Feb 2022 20:59:34 +0000 (15:59 -0500)
commitecaed0aba91ebdf3d5cb75a1d093e209c026bf3e
tree150d6a2eb568f740a033b3405d6f46f8e721be9f
parenta3563f8df1546b04a9bf61389179130f141733de
scsi: libsas: Use enum for response frame DATAPRES field

As defined in table 126 of the SAS spec 1.1, use an enum for the DATAPRES
field, which makes reading the code easier.

Also change sas_ssp_task_response() to use a switch statement, which is
more suitable (than if-else), as suggested by Christoph.

Link: https://lore.kernel.org/r/1645112566-115804-3-git-send-email-john.garry@huawei.com
Suggested-by: Xiang Chen <chenxiang66@hisilicon.com>
Tested-by: Yihang Li <liyihang6@hisilicon.com>
Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aic94xx/aic94xx_tmf.c
drivers/scsi/isci/request.c
drivers/scsi/libsas/sas_task.c
drivers/scsi/mvsas/mv_sas.c
include/scsi/sas.h