aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Barnett <kevin.barnett@microsemi.com>2018-03-21 14:32:31 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2018-03-21 18:51:37 -0400
commit339faa8150fd56891105bc69fc18f5d51b8a63dd (patch)
tree291cc5c619a318189aa4cfde3db26fc1664c7bbc
parent45dce24df5b7ef569484caed9b44856dbf447e00 (diff)
scsi: smartpqi: workaround fw bug for oq deletion
Skip deleting PQI operational queues when there is an error creating a new queue group. It's not really necessary to delete the queues anyway because they get deleted during the PQI reset that is part of the error recovery path. Signed-off-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/smartpqi/smartpqi_init.c39
1 files changed, 3 insertions, 36 deletions
diff --git a/drivers/scsi/smartpqi/smartpqi_init.c b/drivers/scsi/smartpqi/smartpqi_init.c
index b3aeb88456d8..af4a2ab5e5aa 100644
--- a/drivers/scsi/smartpqi/smartpqi_init.c
+++ b/drivers/scsi/smartpqi/smartpqi_init.c
@@ -3898,29 +3898,6 @@ static int pqi_validate_device_capability(struct pqi_ctrl_info *ctrl_info)
3898 return 0; 3898 return 0;
3899} 3899}
3900 3900
3901static int pqi_delete_operational_queue(struct pqi_ctrl_info *ctrl_info,
3902 bool inbound_queue, u16 queue_id)
3903{
3904 struct pqi_general_admin_request request;
3905 struct pqi_general_admin_response response;
3906
3907 memset(&request, 0, sizeof(request));
3908 request.header.iu_type = PQI_REQUEST_IU_GENERAL_ADMIN;
3909 put_unaligned_le16(PQI_GENERAL_ADMIN_IU_LENGTH,
3910 &request.header.iu_length);
3911 if (inbound_queue)
3912 request.function_code =
3913 PQI_GENERAL_ADMIN_FUNCTION_DELETE_IQ;
3914 else
3915 request.function_code =
3916 PQI_GENERAL_ADMIN_FUNCTION_DELETE_OQ;
3917 put_unaligned_le16(queue_id,
3918 &request.data.delete_operational_queue.queue_id);
3919
3920 return pqi_submit_admin_request_synchronous(ctrl_info, &request,
3921 &response);
3922}
3923
3924static int pqi_create_event_queue(struct pqi_ctrl_info *ctrl_info) 3901static int pqi_create_event_queue(struct pqi_ctrl_info *ctrl_info)
3925{ 3902{
3926 int rc; 3903 int rc;
@@ -4038,7 +4015,7 @@ static int pqi_create_queue_group(struct pqi_ctrl_info *ctrl_info,
4038 if (rc) { 4015 if (rc) {
4039 dev_err(&ctrl_info->pci_dev->dev, 4016 dev_err(&ctrl_info->pci_dev->dev,
4040 "error creating inbound AIO queue\n"); 4017 "error creating inbound AIO queue\n");
4041 goto delete_inbound_queue_raid; 4018 return rc;
4042 } 4019 }
4043 4020
4044 queue_group->iq_pi[AIO_PATH] = ctrl_info->iomem_base + 4021 queue_group->iq_pi[AIO_PATH] = ctrl_info->iomem_base +
@@ -4066,7 +4043,7 @@ static int pqi_create_queue_group(struct pqi_ctrl_info *ctrl_info,
4066 if (rc) { 4043 if (rc) {
4067 dev_err(&ctrl_info->pci_dev->dev, 4044 dev_err(&ctrl_info->pci_dev->dev,
4068 "error changing queue property\n"); 4045 "error changing queue property\n");
4069 goto delete_inbound_queue_aio; 4046 return rc;
4070 } 4047 }
4071 4048
4072 /* 4049 /*
@@ -4096,7 +4073,7 @@ static int pqi_create_queue_group(struct pqi_ctrl_info *ctrl_info,
4096 if (rc) { 4073 if (rc) {
4097 dev_err(&ctrl_info->pci_dev->dev, 4074 dev_err(&ctrl_info->pci_dev->dev,
4098 "error creating outbound queue\n"); 4075 "error creating outbound queue\n");
4099 goto delete_inbound_queue_aio; 4076 return rc;
4100 } 4077 }
4101 4078
4102 queue_group->oq_ci = ctrl_info->iomem_base + 4079 queue_group->oq_ci = ctrl_info->iomem_base +
@@ -4105,16 +4082,6 @@ static int pqi_create_queue_group(struct pqi_ctrl_info *ctrl_info,
4105 &response.data.create_operational_oq.oq_ci_offset); 4082 &response.data.create_operational_oq.oq_ci_offset);
4106 4083
4107 return 0; 4084 return 0;
4108
4109delete_inbound_queue_aio:
4110 pqi_delete_operational_queue(ctrl_info, true,
4111 queue_group->iq_id[AIO_PATH]);
4112
4113delete_inbound_queue_raid:
4114 pqi_delete_operational_queue(ctrl_info, true,
4115 queue_group->iq_id[RAID_PATH]);
4116
4117 return rc;
4118} 4085}
4119 4086
4120static int pqi_create_queues(struct pqi_ctrl_info *ctrl_info) 4087static int pqi_create_queues(struct pqi_ctrl_info *ctrl_info)