]> git.karo-electronics.de Git - linux-beck.git/commitdiff
scsi: smartpqi: correct event acknowledgment timeout issue
authorKevin Barnett <kevin.barnett@microsemi.com>
Wed, 31 Aug 2016 19:54:53 +0000 (14:54 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 2 Sep 2016 10:21:38 +0000 (06:21 -0400)
the driver no longer waits for the firmware to consume
the event ack IU.

Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/smartpqi/smartpqi.h
drivers/scsi/smartpqi/smartpqi_init.c

index 5f965adfab32a7c13f882918794fbc85408e088f..07b6444d3e0ab5f3c52d885879cff5356e048959 100644 (file)
@@ -634,13 +634,6 @@ struct pqi_encryption_info {
 
 #define RAID_MAP_MAX_ENTRIES           1024
 
-#define PQI_RESERVED_IO_SLOTS_LUN_RESET                        1
-#define PQI_RESERVED_IO_SLOTS_EVENT_ACK                        1
-#define PQI_RESERVED_IO_SLOTS_SYNCHRONOUS_REQUESTS     3
-#define PQI_RESERVED_IO_SLOTS                          \
-       (PQI_RESERVED_IO_SLOTS_LUN_RESET + PQI_RESERVED_IO_SLOTS_EVENT_ACK + \
-       PQI_RESERVED_IO_SLOTS_SYNCHRONOUS_REQUESTS)
-
 #define PQI_PHYSICAL_DEVICE_BUS                0
 #define PQI_RAID_VOLUME_BUS            1
 #define PQI_HBA_BUS                    2
@@ -884,6 +877,13 @@ struct pqi_event {
        __le32  additional_event_id;
 };
 
+#define PQI_RESERVED_IO_SLOTS_LUN_RESET                        1
+#define PQI_RESERVED_IO_SLOTS_EVENT_ACK                        PQI_NUM_SUPPORTED_EVENTS
+#define PQI_RESERVED_IO_SLOTS_SYNCHRONOUS_REQUESTS     3
+#define PQI_RESERVED_IO_SLOTS                          \
+       (PQI_RESERVED_IO_SLOTS_LUN_RESET + PQI_RESERVED_IO_SLOTS_EVENT_ACK + \
+       PQI_RESERVED_IO_SLOTS_SYNCHRONOUS_REQUESTS)
+
 struct pqi_ctrl_info {
        unsigned int    ctrl_id;
        struct pci_dev  *pci_dev;
index d759703da287587d7153dd5cfc2ee82a57d39a7b..ea822b19b349850b259043a69de8433d29e6aff9 100644 (file)
@@ -2642,26 +2642,6 @@ static void pqi_start_event_ack(struct pqi_ctrl_info *ctrl_info,
        writel(iq_pi, queue_group->iq_pi[RAID_PATH]);
 
        spin_unlock_irqrestore(&queue_group->submit_lock[RAID_PATH], flags);
-
-       /*
-        * We have to special-case this type of request because the firmware
-        * does not generate an interrupt when this type of request completes.
-        * Therefore, we have to poll until we see that the firmware has
-        * consumed the request before we move on.
-        */
-
-       timeout = (PQI_EVENT_ACK_TIMEOUT * HZ) + jiffies;
-
-       while (1) {
-               if (*queue_group->iq_ci[RAID_PATH] == iq_pi)
-                       break;
-               if (time_after(jiffies, timeout)) {
-                       dev_err(&ctrl_info->pci_dev->dev,
-                               "completing event acknowledge timed out\n");
-                       break;
-               }
-               usleep_range(1000, 2000);
-       }
 }
 
 static void pqi_acknowledge_event(struct pqi_ctrl_info *ctrl_info,