aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/smartpqi/smartpqi_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/smartpqi/smartpqi_helper.c')
-rw-r--r--sys/dev/smartpqi/smartpqi_helper.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/sys/dev/smartpqi/smartpqi_helper.c b/sys/dev/smartpqi/smartpqi_helper.c
index 741ac0a05a06..9454fa8b63ab 100644
--- a/sys/dev/smartpqi/smartpqi_helper.c
+++ b/sys/dev/smartpqi/smartpqi_helper.c
@@ -1,5 +1,5 @@
/*-
- * Copyright 2016-2023 Microchip Technology, Inc. and/or its subsidiaries.
+ * Copyright 2016-2025 Microchip Technology, Inc. and/or its subsidiaries.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,7 +30,7 @@
* Function used to validate the adapter health.
*/
boolean_t
-pqisrc_ctrl_offline(pqisrc_softstate_t *softs)
+pqisrc_ctrl_offline(pqisrc_softstate_t const *softs)
{
DBG_FUNC("IN\n");
@@ -83,12 +83,10 @@ pqisrc_take_ctrl_offline(pqisrc_softstate_t *softs)
{
DBG_FUNC("IN\n");
- int lockupcode = 0;
-
softs->ctrl_online = false;
if (SIS_IS_KERNEL_PANIC(softs)) {
- lockupcode = PCI_MEM_GET32(softs, &softs->ioa_reg->mb[7], LEGACY_SIS_SRCV_OFFSET_MAILBOX_7);
+ int lockupcode = PCI_MEM_GET32(softs, &softs->ioa_reg->mb[7], LEGACY_SIS_SRCV_OFFSET_MAILBOX_7);
DBG_ERR("Controller FW is not running, Lockup code = %x\n", lockupcode);
}
else {
@@ -172,7 +170,7 @@ pqisrc_wait_on_condition(pqisrc_softstate_t *softs, rcb_t *rcb,
}
if (pqisrc_ctrl_offline(softs)) {
- DBG_ERR("Controller is Offline");
+ DBG_ERR("Controller is Offline\n");
ret = PQI_STATUS_FAILURE;
break;
}
@@ -187,29 +185,29 @@ pqisrc_wait_on_condition(pqisrc_softstate_t *softs, rcb_t *rcb,
/* Function used to validate the device wwid. */
boolean_t
-pqisrc_device_equal(pqi_scsi_dev_t *dev1,
- pqi_scsi_dev_t *dev2)
+pqisrc_device_equal(pqi_scsi_dev_t const *dev1,
+ pqi_scsi_dev_t const *dev2)
{
return dev1->wwid == dev2->wwid;
}
/* Function used to validate the device scsi3addr. */
boolean_t
-pqisrc_scsi3addr_equal(uint8_t *scsi3addr1, uint8_t *scsi3addr2)
+pqisrc_scsi3addr_equal(uint8_t const *scsi3addr1, uint8_t const *scsi3addr2)
{
return memcmp(scsi3addr1, scsi3addr2, 8) == 0;
}
/* Function used to validate hba_lunid */
boolean_t
-pqisrc_is_hba_lunid(uint8_t *scsi3addr)
+pqisrc_is_hba_lunid(uint8_t const *scsi3addr)
{
return pqisrc_scsi3addr_equal(scsi3addr, RAID_CTLR_LUNID);
}
/* Function used to validate type of device */
boolean_t
-pqisrc_is_logical_device(pqi_scsi_dev_t *device)
+pqisrc_is_logical_device(pqi_scsi_dev_t const *device)
{
return !device->is_physical_device;
}
@@ -256,10 +254,10 @@ pqisrc_raidlevel_to_string(uint8_t raid_level)
/* Debug routine for displaying device info */
void pqisrc_display_device_info(pqisrc_softstate_t *softs,
- char *action, pqi_scsi_dev_t *device)
+ char const *action, pqi_scsi_dev_t *device)
{
if (device->is_physical_device) {
- DBG_NOTE("%s scsi BTL %d:%d:%d: %.8s %.16s %-12s "
+ DBG_NOTE("%s scsi B%d:T%d:L%d %.8s %.16s %-12s "
"SSDSmartPathCap%c En%c Exp%c qd=%d\n",
action,
device->bus,
@@ -273,7 +271,7 @@ void pqisrc_display_device_info(pqisrc_softstate_t *softs,
device->expose_device ? '+' : '-',
device->queue_depth);
} else if (device->devtype == RAID_DEVICE) {
- DBG_NOTE("%s scsi BTL %d:%d:%d: %.8s %.16s %-12s "
+ DBG_NOTE("%s scsi B%d:T%d:L%d %.8s %.16s %-12s "
"SSDSmartPathCap%c En%c Exp%c qd=%d\n",
action,
device->bus,
@@ -287,7 +285,7 @@ void pqisrc_display_device_info(pqisrc_softstate_t *softs,
device->expose_device ? '+' : '-',
device->queue_depth);
} else if (device->devtype == CONTROLLER_DEVICE) {
- DBG_NOTE("%s scsi BTL %d:%d:%d: %.8s %.16s %-12s "
+ DBG_NOTE("%s scsi B%d:T%d:L%d %.8s %.16s %-12s "
"SSDSmartPathCap%c En%c Exp%c qd=%d\n",
action,
device->bus,
@@ -301,7 +299,7 @@ void pqisrc_display_device_info(pqisrc_softstate_t *softs,
device->expose_device ? '+' : '-',
device->queue_depth);
} else {
- DBG_NOTE("%s scsi BTL %d:%d:%d: %.8s %.16s %-12s "
+ DBG_NOTE("%s scsi B%d:T%d:L%d %.8s %.16s %-12s "
"SSDSmartPathCap%c En%c Exp%c qd=%d devtype=%d\n",
action,
device->bus,
@@ -335,7 +333,9 @@ check_struct_sizes(void)
64 bit and 32 bit system*/
ASSERT(sizeof(IOCTL_Command_struct)== 86 ||
sizeof(IOCTL_Command_struct)== 82);
- ASSERT(sizeof(struct bmic_host_wellness_driver_version)== 42);
+ ASSERT(sizeof(BIG_IOCTL_Command_struct)== 88 ||
+ sizeof(BIG_IOCTL_Command_struct)== 84);
+ ASSERT(sizeof(struct bmic_host_wellness_driver_version)== 44);
ASSERT(sizeof(struct bmic_host_wellness_time)== 20);
ASSERT(sizeof(struct pqi_dev_adminq_cap)== 8);
ASSERT(sizeof(struct admin_q_param)== 4);
@@ -388,7 +388,7 @@ void
check_device_pending_commands_to_complete(pqisrc_softstate_t *softs, pqi_scsi_dev_t *device)
{
uint32_t tag = softs->max_outstanding_io, active_requests;
- uint64_t timeout = 0, delay_in_usec = 1000; /* In micro Seconds */
+ uint64_t timeout = 0, delay_in_usec = 1000; /* In microseconds */
rcb_t* rcb;
DBG_FUNC("IN\n");