* [PATCH 0/2] hpsa update
@ 2016-07-01 18:37 Don Brace
2016-07-01 18:37 ` [PATCH 1/2] hpsa: correct skipping masked peripherals Don Brace
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Don Brace @ 2016-07-01 18:37 UTC (permalink / raw)
To: jejb, Viswas.G, Mahesh.Rajashekhara, hch, scott.teel,
Kevin.Barnett, Justin.Lindley, scott.benesh, elliott
Cc: linux-scsi
These patches are based on Linus's tree
The changes are:
- enhanced check for skipping masked devices
- corrected hpsa_passthru_ioctl timeouts for fw flash
---
Don Brace (2):
hpsa: correct skipping masked peripherals
hpsa: change hpsa_passthru_ioctl timeout
drivers/scsi/hpsa.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 76 insertions(+), 7 deletions(-)
--
Signature
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] hpsa: correct skipping masked peripherals
2016-07-01 18:37 [PATCH 0/2] hpsa update Don Brace
@ 2016-07-01 18:37 ` Don Brace
2016-07-01 18:37 ` [PATCH 2/2] hpsa: change hpsa_passthru_ioctl timeout Don Brace
2016-07-15 19:41 ` [PATCH 0/2] hpsa update Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Don Brace @ 2016-07-01 18:37 UTC (permalink / raw)
To: jejb, Viswas.G, Mahesh.Rajashekhara, hch, scott.teel,
Kevin.Barnett, Justin.Lindley, scott.benesh, elliott
Cc: linux-scsi
The SA controller spins down RAID drive spares.
A REGNEWD event causes an inquiry to be sent to all physical
drives. This causes the SA controller to spin up the spare.
The controller suspends all I/O to a logical volume until
the spare is spun up. The spin-up can take over 50 seconds.
This can result in one or both of the following:
- SML sends down aborts and resets to the logical volume
and can cause the logical volume to be off-lined.
- a negative impact on the logical volume's I/O performance
each time a REGNEWD is triggered.
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
---
drivers/scsi/hpsa.c | 79 ++++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 74 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index ff8dcd5..375a396 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -4105,6 +4105,70 @@ static int hpsa_set_local_logical_count(struct ctlr_info *h,
return rc;
}
+static bool hpsa_is_disk_spare(struct ctlr_info *h, u8 *lunaddrbytes)
+{
+ struct bmic_identify_physical_device *id_phys;
+ bool is_spare = false;
+ int rc;
+
+ id_phys = kzalloc(sizeof(*id_phys), GFP_KERNEL);
+ if (!id_phys)
+ return false;
+
+ rc = hpsa_bmic_id_physical_device(h,
+ lunaddrbytes,
+ GET_BMIC_DRIVE_NUMBER(lunaddrbytes),
+ id_phys, sizeof(*id_phys));
+ if (rc == 0)
+ is_spare = (id_phys->more_flags >> 6) & 0x01;
+
+ kfree(id_phys);
+ return is_spare;
+}
+
+#define RPL_DEV_FLAG_NON_DISK 0x1
+#define RPL_DEV_FLAG_UNCONFIG_DISK_REPORTING_SUPPORTED 0x2
+#define RPL_DEV_FLAG_UNCONFIG_DISK 0x4
+
+#define BMIC_DEVICE_TYPE_ENCLOSURE 6
+
+static bool hpsa_skip_device(struct ctlr_info *h, u8 *lunaddrbytes,
+ struct ext_report_lun_entry *rle)
+{
+ u8 device_flags;
+ u8 device_type;
+
+ if (!MASKED_DEVICE(lunaddrbytes))
+ return false;
+
+ device_flags = rle->device_flags;
+ device_type = rle->device_type;
+
+ if (device_flags & RPL_DEV_FLAG_NON_DISK) {
+ if (device_type == BMIC_DEVICE_TYPE_ENCLOSURE)
+ return false;
+ return true;
+ }
+
+ if (!(device_flags & RPL_DEV_FLAG_UNCONFIG_DISK_REPORTING_SUPPORTED))
+ return false;
+
+ if (device_flags & RPL_DEV_FLAG_UNCONFIG_DISK)
+ return false;
+
+ /*
+ * Spares may be spun down, we do not want to
+ * do an Inquiry to a RAID set spare drive as
+ * that would have them spun up, that is a
+ * performance hit because I/O to the RAID device
+ * stops while the spin up occurs which can take
+ * over 50 seconds.
+ */
+ if (hpsa_is_disk_spare(h, lunaddrbytes))
+ return true;
+
+ return false;
+}
static void hpsa_update_scsi_devices(struct ctlr_info *h)
{
@@ -4198,6 +4262,7 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
u8 *lunaddrbytes, is_OBDR = 0;
int rc = 0;
int phys_dev_index = i - (raid_ctlr_position == 0);
+ bool skip_device = false;
physical_device = i < nphysicals + (raid_ctlr_position == 0);
@@ -4205,11 +4270,15 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h)
lunaddrbytes = figure_lunaddrbytes(h, raid_ctlr_position,
i, nphysicals, nlogicals, physdev_list, logdev_list);
- /* skip masked non-disk devices */
- if (MASKED_DEVICE(lunaddrbytes) && physical_device &&
- (physdev_list->LUN[phys_dev_index].device_type != 0x06) &&
- (physdev_list->LUN[phys_dev_index].device_flags & 0x01))
- continue;
+ /*
+ * Skip over some devices such as a spare.
+ */
+ if (!tmpdevice->external && physical_device) {
+ skip_device = hpsa_skip_device(h, lunaddrbytes,
+ &physdev_list->LUN[phys_dev_index]);
+ if (skip_device)
+ continue;
+ }
/* Get device type, vendor, model, device id */
rc = hpsa_update_device_info(h, lunaddrbytes, tmpdevice,
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] hpsa: change hpsa_passthru_ioctl timeout
2016-07-01 18:37 [PATCH 0/2] hpsa update Don Brace
2016-07-01 18:37 ` [PATCH 1/2] hpsa: correct skipping masked peripherals Don Brace
@ 2016-07-01 18:37 ` Don Brace
2016-07-15 19:41 ` [PATCH 0/2] hpsa update Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Don Brace @ 2016-07-01 18:37 UTC (permalink / raw)
To: jejb, Viswas.G, Mahesh.Rajashekhara, hch, scott.teel,
Kevin.Barnett, Justin.Lindley, scott.benesh, elliott
Cc: linux-scsi
Was not alloting for FW Flash times.
Reviewed-by: Scott Teel <scott.teel@microsemi.com>
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: Don Brace <don.brace@microsemi.com>
---
drivers/scsi/hpsa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 375a396..030d002 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -6524,7 +6524,7 @@ static int hpsa_passthru_ioctl(struct ctlr_info *h, void __user *argp)
c->SG[0].Ext = cpu_to_le32(HPSA_SG_LAST); /* not chaining */
}
rc = hpsa_scsi_do_simple_cmd(h, c, DEFAULT_REPLY_QUEUE,
- DEFAULT_TIMEOUT);
+ NO_TIMEOUT);
if (iocommand.buf_size > 0)
hpsa_pci_unmap(h->pdev, c, 1, PCI_DMA_BIDIRECTIONAL);
check_ioctl_unit_attention(h, c);
@@ -6657,7 +6657,7 @@ static int hpsa_big_passthru_ioctl(struct ctlr_info *h, void __user *argp)
c->SG[--i].Ext = cpu_to_le32(HPSA_SG_LAST);
}
status = hpsa_scsi_do_simple_cmd(h, c, DEFAULT_REPLY_QUEUE,
- DEFAULT_TIMEOUT);
+ NO_TIMEOUT);
if (sg_used)
hpsa_pci_unmap(h->pdev, c, sg_used, PCI_DMA_BIDIRECTIONAL);
check_ioctl_unit_attention(h, c);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] hpsa update
2016-07-01 18:37 [PATCH 0/2] hpsa update Don Brace
2016-07-01 18:37 ` [PATCH 1/2] hpsa: correct skipping masked peripherals Don Brace
2016-07-01 18:37 ` [PATCH 2/2] hpsa: change hpsa_passthru_ioctl timeout Don Brace
@ 2016-07-15 19:41 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-07-15 19:41 UTC (permalink / raw)
To: Don Brace
Cc: jejb, Viswas.G, Mahesh.Rajashekhara, hch, scott.teel,
Kevin.Barnett, Justin.Lindley, scott.benesh, elliott, linux-scsi
>>>>> "Don" == Don Brace <don.brace@microsemi.com> writes:
Don> These patches are based on Linus's tree The changes are: - enhanced
Don> check for skipping masked devices - corrected hpsa_passthru_ioctl
Don> timeouts for fw flash
Applied to 4.8/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-15 19:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-01 18:37 [PATCH 0/2] hpsa update Don Brace
2016-07-01 18:37 ` [PATCH 1/2] hpsa: correct skipping masked peripherals Don Brace
2016-07-01 18:37 ` [PATCH 2/2] hpsa: change hpsa_passthru_ioctl timeout Don Brace
2016-07-15 19:41 ` [PATCH 0/2] hpsa update Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox