mrsas: clean up empty lines in .c and .h files

This commit is contained in:
Mateusz Guzik 2020-09-01 22:06:23 +00:00
parent 3cb02df9ae
commit 139b723f80
5 changed files with 1 additions and 70 deletions

View File

@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
#include <sys/taskqueue.h> #include <sys/taskqueue.h>
#include <sys/smp.h> #include <sys/smp.h>
/* /*
* Function prototypes * Function prototypes
*/ */
@ -177,7 +176,6 @@ void
mrsas_write_64bit_req_desc(struct mrsas_softc *sc, u_int32_t req_desc_lo, mrsas_write_64bit_req_desc(struct mrsas_softc *sc, u_int32_t req_desc_lo,
u_int32_t req_desc_hi); u_int32_t req_desc_hi);
SYSCTL_NODE(_hw, OID_AUTO, mrsas, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, SYSCTL_NODE(_hw, OID_AUTO, mrsas, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"MRSAS Driver Parameters"); "MRSAS Driver Parameters");
@ -314,7 +312,6 @@ mrsas_read_reg(struct mrsas_softc *sc, int offset)
return ((u_int32_t)bus_space_read_4(bus_tag, bus_handle, offset)); return ((u_int32_t)bus_space_read_4(bus_tag, bus_handle, offset));
} }
/* /*
* Interrupt Disable/Enable/Clear Functions * Interrupt Disable/Enable/Clear Functions
* *
@ -650,7 +647,6 @@ mrsas_get_seq_num(struct mrsas_softc *sc,
return retcode; return retcode;
} }
/* /*
* mrsas_register_aen: Register for asynchronous event notification * mrsas_register_aen: Register for asynchronous event notification
* @sc: Adapter soft state * @sc: Adapter soft state
@ -685,7 +681,6 @@ mrsas_register_aen(struct mrsas_softc *sc, u_int32_t seq_num,
curr_aen.word = class_locale_word; curr_aen.word = class_locale_word;
if (sc->aen_cmd) { if (sc->aen_cmd) {
prev_aen.word = sc->aen_cmd->frame->dcmd.mbox.w[1]; prev_aen.word = sc->aen_cmd->frame->dcmd.mbox.w[1];
/* /*
@ -779,7 +774,6 @@ mrsas_start_aen(struct mrsas_softc *sc)
struct mrsas_evt_log_info eli; struct mrsas_evt_log_info eli;
union mrsas_evt_class_locale class_locale; union mrsas_evt_class_locale class_locale;
/* Get the latest sequence number from FW */ /* Get the latest sequence number from FW */
memset(&eli, 0, sizeof(eli)); memset(&eli, 0, sizeof(eli));
@ -905,7 +899,6 @@ mrsas_attach(device_t dev)
case MRSAS_AERO_10E7: case MRSAS_AERO_10E7:
device_printf(dev, "Adapter is in non-secure mode\n"); device_printf(dev, "Adapter is in non-secure mode\n");
return SUCCESS; return SUCCESS;
} }
mrsas_get_tunables(sc); mrsas_get_tunables(sc);
@ -1263,7 +1256,6 @@ mrsas_free_mem(struct mrsas_softc *sc)
if (sc->verbuf_tag != NULL) if (sc->verbuf_tag != NULL)
bus_dma_tag_destroy(sc->verbuf_tag); bus_dma_tag_destroy(sc->verbuf_tag);
/* /*
* Free sense buffer memory * Free sense buffer memory
*/ */
@ -2487,7 +2479,6 @@ mrsas_init_fw(struct mrsas_softc *sc)
} }
megasas_setup_jbod_map(sc); megasas_setup_jbod_map(sc);
memset(sc->target_list, 0, memset(sc->target_list, 0,
MRSAS_MAX_TM_TARGETS * sizeof(struct mrsas_target)); MRSAS_MAX_TM_TARGETS * sizeof(struct mrsas_target));
for (i = 0; i < MRSAS_MAX_TM_TARGETS; i++) for (i = 0; i < MRSAS_MAX_TM_TARGETS; i++)
@ -3132,7 +3123,6 @@ mrsas_ocr_thread(void *arg)
fw_state = fw_status & MFI_STATE_MASK; fw_state = fw_status & MFI_STATE_MASK;
if (fw_state == MFI_STATE_FAULT || sc->do_timedout_reset || if (fw_state == MFI_STATE_FAULT || sc->do_timedout_reset ||
mrsas_atomic_read(&sc->target_reset_outstanding)) { mrsas_atomic_read(&sc->target_reset_outstanding)) {
/* First, freeze further IOs to come to the SIM */ /* First, freeze further IOs to come to the SIM */
mrsas_xpt_freeze(sc); mrsas_xpt_freeze(sc);
@ -3526,7 +3516,6 @@ mrsas_wait_for_outstanding(struct mrsas_softc *sc, u_int8_t check_reason)
int i, outstanding, retval = 0; int i, outstanding, retval = 0;
u_int32_t fw_state, count, MSIxIndex; u_int32_t fw_state, count, MSIxIndex;
for (i = 0; i < MRSAS_RESET_WAIT_TIME; i++) { for (i = 0; i < MRSAS_RESET_WAIT_TIME; i++) {
if (sc->remove_in_progress) { if (sc->remove_in_progress) {
mrsas_dprint(sc, MRSAS_OCR, mrsas_dprint(sc, MRSAS_OCR,
@ -3592,7 +3581,6 @@ mrsas_release_mfi_cmd(struct mrsas_mfi_cmd *cmd_mfi)
struct mrsas_softc *sc = cmd_mfi->sc; struct mrsas_softc *sc = cmd_mfi->sc;
struct mrsas_mpt_cmd *cmd_mpt; struct mrsas_mpt_cmd *cmd_mpt;
mtx_lock(&sc->mfi_cmd_pool_lock); mtx_lock(&sc->mfi_cmd_pool_lock);
/* /*
* Release the mpt command (if at all it is allocated * Release the mpt command (if at all it is allocated
@ -4094,7 +4082,6 @@ mrsas_complete_mptmfi_passthru(struct mrsas_softc *sc, struct mrsas_mfi_cmd *cmd
if ((cmd->frame->dcmd.opcode == if ((cmd->frame->dcmd.opcode ==
MR_DCMD_SYSTEM_PD_MAP_GET_INFO) && MR_DCMD_SYSTEM_PD_MAP_GET_INFO) &&
(cmd->frame->dcmd.mbox.b[0] == 1)) { (cmd->frame->dcmd.mbox.b[0] == 1)) {
mtx_lock(&sc->raidmap_lock); mtx_lock(&sc->raidmap_lock);
sc->jbod_seq_cmd = NULL; sc->jbod_seq_cmd = NULL;
mrsas_release_mfi_cmd(cmd); mrsas_release_mfi_cmd(cmd);
@ -5022,7 +5009,6 @@ mrsas_aen_handler(struct mrsas_softc *sc)
} }
/* /*
* mrsas_complete_aen: Completes AEN command * mrsas_complete_aen: Completes AEN command
* input: Adapter soft state * input: Adapter soft state

View File

@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$");
#include <dev/pci/pcivar.h> /* For pci_get macros! */ #include <dev/pci/pcivar.h> /* For pci_get macros! */
#include <dev/pci/pcireg.h> #include <dev/pci/pcireg.h>
#define IOCTL_SEMA_DESCRIPTION "mrsas semaphore for MFI pool" #define IOCTL_SEMA_DESCRIPTION "mrsas semaphore for MFI pool"
/* /*
@ -101,7 +100,6 @@ __FBSDID("$FreeBSD$");
#define MRSAS_AERO_10E6 0x10E6 #define MRSAS_AERO_10E6 0x10E6
#define MRSAS_AERO_10E7 0x10E7 #define MRSAS_AERO_10E7 0x10E7
/* /*
* Firmware State Defines * Firmware State Defines
*/ */
@ -167,7 +165,6 @@ do { \
device_printf(sc->mrsas_dev, msg, ##args); \ device_printf(sc->mrsas_dev, msg, ##args); \
} while (0) } while (0)
/**************************************************************************** /****************************************************************************
* Raid Context structure which describes MegaRAID specific IO Paramenters * Raid Context structure which describes MegaRAID specific IO Paramenters
* This resides at offset 0x60 where the SGL normally starts in MPT IO Frames * This resides at offset 0x60 where the SGL normally starts in MPT IO Frames
@ -242,7 +239,6 @@ typedef union _RAID_CONTEXT_UNION {
RAID_CONTEXT_G35 raid_context_g35; RAID_CONTEXT_G35 raid_context_g35;
} RAID_CONTEXT_UNION, *PRAID_CONTEXT_UNION; } RAID_CONTEXT_UNION, *PRAID_CONTEXT_UNION;
/************************************************************************* /*************************************************************************
* MPI2 Defines * MPI2 Defines
************************************************************************/ ************************************************************************/
@ -296,7 +292,6 @@ typedef union _RAID_CONTEXT_UNION {
#define MPI2_POINTER * #define MPI2_POINTER *
#endif #endif
/*************************************** /***************************************
* MPI2 Structures * MPI2 Structures
***************************************/ ***************************************/
@ -762,7 +757,6 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest_t;
#define MRSAS_MAX_LD_IDS (MRSAS_MAX_LD_CHANNELS * \ #define MRSAS_MAX_LD_IDS (MRSAS_MAX_LD_CHANNELS * \
MRSAS_MAX_DEV_PER_CHANNEL) MRSAS_MAX_DEV_PER_CHANNEL)
#define VD_EXT_DEBUG 0 #define VD_EXT_DEBUG 0
#define TM_DEBUG 1 #define TM_DEBUG 1
@ -904,7 +898,6 @@ typedef struct _MR_FW_RAID_MAP {
MR_LD_SPAN_MAP ldSpanMap[1]; MR_LD_SPAN_MAP ldSpanMap[1];
} MR_FW_RAID_MAP; } MR_FW_RAID_MAP;
typedef struct _MR_FW_RAID_MAP_EXT { typedef struct _MR_FW_RAID_MAP_EXT {
/* Not used in new map */ /* Not used in new map */
u_int32_t reserved; u_int32_t reserved;
@ -935,7 +928,6 @@ typedef struct _MR_FW_RAID_MAP_EXT {
MR_LD_SPAN_MAP ldSpanMap[MAX_LOGICAL_DRIVES_EXT]; MR_LD_SPAN_MAP ldSpanMap[MAX_LOGICAL_DRIVES_EXT];
} MR_FW_RAID_MAP_EXT; } MR_FW_RAID_MAP_EXT;
typedef struct _MR_DRV_RAID_MAP { typedef struct _MR_DRV_RAID_MAP {
/* /*
* Total size of this structure, including this field. This feild * Total size of this structure, including this field. This feild
@ -979,7 +971,6 @@ typedef struct _MR_DRV_RAID_MAP {
#pragma pack(1) #pragma pack(1)
typedef struct _MR_DRV_RAID_MAP_ALL { typedef struct _MR_DRV_RAID_MAP_ALL {
MR_DRV_RAID_MAP raidMap; MR_DRV_RAID_MAP raidMap;
MR_LD_SPAN_MAP ldSpanMap[MAX_LOGICAL_DRIVES_DYN - 1]; MR_LD_SPAN_MAP ldSpanMap[MAX_LOGICAL_DRIVES_DYN - 1];
} MR_DRV_RAID_MAP_ALL; } MR_DRV_RAID_MAP_ALL;
@ -1084,14 +1075,12 @@ typedef struct _LD_STREAM_DETECT {
STREAM_DETECT streamTrack[MAX_STREAMS_TRACKED]; STREAM_DETECT streamTrack[MAX_STREAMS_TRACKED];
} LD_STREAM_DETECT, *PTR_LD_STREAM_DETECT; } LD_STREAM_DETECT, *PTR_LD_STREAM_DETECT;
typedef struct _MR_LD_TARGET_SYNC { typedef struct _MR_LD_TARGET_SYNC {
u_int8_t targetId; u_int8_t targetId;
u_int8_t reserved; u_int8_t reserved;
u_int16_t seqNum; u_int16_t seqNum;
} MR_LD_TARGET_SYNC; } MR_LD_TARGET_SYNC;
/* /*
* RAID Map descriptor Types. * RAID Map descriptor Types.
* Each element should uniquely idetify one data structure in the RAID map * Each element should uniquely idetify one data structure in the RAID map
@ -1166,7 +1155,6 @@ typedef struct _MR_FW_RAID_MAP_DYNAMIC {
} MR_FW_RAID_MAP_DYNAMIC; } MR_FW_RAID_MAP_DYNAMIC;
#define IEEE_SGE_FLAGS_ADDR_MASK (0x03) #define IEEE_SGE_FLAGS_ADDR_MASK (0x03)
#define IEEE_SGE_FLAGS_SYSTEM_ADDR (0x00) #define IEEE_SGE_FLAGS_SYSTEM_ADDR (0x00)
#define IEEE_SGE_FLAGS_IOCDDR_ADDR (0x01) #define IEEE_SGE_FLAGS_IOCDDR_ADDR (0x01)
@ -1183,7 +1171,6 @@ typedef struct _MR_FW_RAID_MAP_DYNAMIC {
#define IEEE_SGE_FLAGS_FORMAT_NVME (0x02) #define IEEE_SGE_FLAGS_FORMAT_NVME (0x02)
#define IEEE_SGE_FLAGS_FORMAT_AHCI (0x03) #define IEEE_SGE_FLAGS_FORMAT_AHCI (0x03)
#define MPI26_IEEE_SGE_FLAGS_NSF_MASK (0x1C) #define MPI26_IEEE_SGE_FLAGS_NSF_MASK (0x1C)
#define MPI26_IEEE_SGE_FLAGS_NSF_MPI_IEEE (0x00) #define MPI26_IEEE_SGE_FLAGS_NSF_MPI_IEEE (0x00)
#define MPI26_IEEE_SGE_FLAGS_NSF_PQI (0x04) #define MPI26_IEEE_SGE_FLAGS_NSF_PQI (0x04)
@ -1213,7 +1200,6 @@ struct mrsas_tmp_dcmd {
#define MR_MAX_RAID_MAP_SIZE_MASK 0x1FF #define MR_MAX_RAID_MAP_SIZE_MASK 0x1FF
#define MR_MIN_MAP_SIZE 0x10000 #define MR_MIN_MAP_SIZE 0x10000
/******************************************************************* /*******************************************************************
* Register set, included legacy controllers 1068 and 1078, * Register set, included legacy controllers 1068 and 1078,
* structure extended for 1078 registers * structure extended for 1078 registers
@ -1472,7 +1458,6 @@ enum MFI_STAT {
#define MFI_MBOX_SIZE 12 #define MFI_MBOX_SIZE 12
enum MR_EVT_CLASS { enum MR_EVT_CLASS {
MR_EVT_CLASS_DEBUG = -2, MR_EVT_CLASS_DEBUG = -2,
MR_EVT_CLASS_PROGRESS = -1, MR_EVT_CLASS_PROGRESS = -1,
MR_EVT_CLASS_INFO = 0, MR_EVT_CLASS_INFO = 0,
@ -1484,7 +1469,6 @@ enum MR_EVT_CLASS {
}; };
enum MR_EVT_LOCALE { enum MR_EVT_LOCALE {
MR_EVT_LOCALE_LD = 0x0001, MR_EVT_LOCALE_LD = 0x0001,
MR_EVT_LOCALE_PD = 0x0002, MR_EVT_LOCALE_PD = 0x0002,
MR_EVT_LOCALE_ENCL = 0x0004, MR_EVT_LOCALE_ENCL = 0x0004,
@ -1498,7 +1482,6 @@ enum MR_EVT_LOCALE {
}; };
enum MR_EVT_ARGS { enum MR_EVT_ARGS {
MR_EVT_ARGS_NONE, MR_EVT_ARGS_NONE,
MR_EVT_ARGS_CDB_SENSE, MR_EVT_ARGS_CDB_SENSE,
MR_EVT_ARGS_LD, MR_EVT_ARGS_LD,
@ -1617,7 +1600,6 @@ typedef enum _REGION_TYPE {
REGION_TYPE_EXCLUSIVE = 3, REGION_TYPE_EXCLUSIVE = 3,
} REGION_TYPE; } REGION_TYPE;
/* /*
* SCSI-CAM Related Defines * SCSI-CAM Related Defines
*/ */
@ -1736,7 +1718,6 @@ struct mrsas_mfi_cmd {
TAILQ_ENTRY(mrsas_mfi_cmd) next; TAILQ_ENTRY(mrsas_mfi_cmd) next;
}; };
/* /*
* define constants for device list query options * define constants for device list query options
*/ */
@ -1833,7 +1814,6 @@ typedef union _MR_LD_REF {
u_int32_t ref; u_int32_t ref;
} MR_LD_REF; } MR_LD_REF;
/* /*
* defines the logical drive list structure * defines the logical drive list structure
*/ */
@ -1929,7 +1909,6 @@ struct mrsas_ctrl_prop {
#pragma pack() #pragma pack()
/* /*
* SAS controller information * SAS controller information
*/ */
@ -2213,7 +2192,6 @@ struct mrsas_ctrl_info {
u_int32_t headlessMode:1; u_int32_t headlessMode:1;
u_int32_t dedicatedHotSparesLimited:1; u_int32_t dedicatedHotSparesLimited:1;
u_int32_t supportUnevenSpans:1; u_int32_t supportUnevenSpans:1;
u_int32_t reserved:11; u_int32_t reserved:11;
} adapterOperations2; } adapterOperations2;
@ -2225,7 +2203,6 @@ struct mrsas_ctrl_info {
u_int8_t reserved4; /* 0x7CB */ u_int8_t reserved4; /* 0x7CB */
u_int16_t maxConfigurablePds; /* 0x7CC */ u_int16_t maxConfigurablePds; /* 0x7CC */
u_int8_t reserved5[2]; /* 0x7CD reserved */ u_int8_t reserved5[2]; /* 0x7CD reserved */
struct { struct {
@ -2580,7 +2557,6 @@ struct mrsas_smp_frame {
#pragma pack() #pragma pack()
#pragma pack(1) #pragma pack(1)
struct mrsas_stp_frame { struct mrsas_stp_frame {
u_int8_t cmd; /* 00h */ u_int8_t cmd; /* 00h */
@ -2625,7 +2601,6 @@ union mrsas_frame {
#pragma pack(1) #pragma pack(1)
union mrsas_evt_class_locale { union mrsas_evt_class_locale {
struct { struct {
u_int16_t locale; u_int16_t locale;
u_int8_t reserved; u_int8_t reserved;
@ -2638,7 +2613,6 @@ union mrsas_evt_class_locale {
#pragma pack() #pragma pack()
#pragma pack(1) #pragma pack(1)
struct mrsas_evt_log_info { struct mrsas_evt_log_info {
u_int32_t newest_seq_num; u_int32_t newest_seq_num;
@ -2652,14 +2626,12 @@ struct mrsas_evt_log_info {
#pragma pack() #pragma pack()
struct mrsas_progress { struct mrsas_progress {
u_int16_t progress; u_int16_t progress;
u_int16_t elapsed_seconds; u_int16_t elapsed_seconds;
} __packed; } __packed;
struct mrsas_evtarg_ld { struct mrsas_evtarg_ld {
u_int16_t target_id; u_int16_t target_id;
u_int8_t ld_index; u_int8_t ld_index;
u_int8_t reserved; u_int8_t reserved;
@ -2674,7 +2646,6 @@ struct mrsas_evtarg_pd {
} __packed; } __packed;
struct mrsas_evt_detail { struct mrsas_evt_detail {
u_int32_t seq_num; u_int32_t seq_num;
u_int32_t time_stamp; u_int32_t time_stamp;
u_int32_t code; u_int32_t code;
@ -2952,7 +2923,6 @@ typedef struct _MRSAS_DRV_PCI_LINK_STATUS_CAPABILITY {
#define MRSAS_DRV_PCI_LINK_STATUS_CAPABILITY_SIZE sizeof(MRSAS_DRV_PCI_LINK_STATUS_CAPABILITY) #define MRSAS_DRV_PCI_LINK_STATUS_CAPABILITY_SIZE sizeof(MRSAS_DRV_PCI_LINK_STATUS_CAPABILITY)
typedef struct _MRSAS_DRV_PCI_CAPABILITIES { typedef struct _MRSAS_DRV_PCI_CAPABILITIES {
MRSAS_DRV_PCI_LINK_CAPABILITY linkCapability; MRSAS_DRV_PCI_LINK_CAPABILITY linkCapability;
MRSAS_DRV_PCI_LINK_STATUS_CAPABILITY linkStatusCapability; MRSAS_DRV_PCI_LINK_STATUS_CAPABILITY linkStatusCapability;
@ -3061,7 +3031,6 @@ struct MR_PD_PROGRESS {
union MR_PROGRESS reserved[3]; union MR_PROGRESS reserved[3];
} __packed; } __packed;
struct mrsas_pd_info { struct mrsas_pd_info {
MR_PD_REF ref; MR_PD_REF ref;
u_int8_t inquiryData[96]; u_int8_t inquiryData[96];

View File

@ -784,9 +784,6 @@ mrsas_get_request_desc(struct mrsas_softc *sc, u_int16_t index)
return (MRSAS_REQUEST_DESCRIPTOR_UNION *) p; return (MRSAS_REQUEST_DESCRIPTOR_UNION *) p;
} }
/* mrsas_prepare_secondRaid1_IO /* mrsas_prepare_secondRaid1_IO
* It prepares the raid 1 second IO * It prepares the raid 1 second IO
*/ */
@ -836,7 +833,6 @@ mrsas_prepare_secondRaid1_IO(struct mrsas_softc *sc,
} }
/* /*
* mrsas_build_ldio_rw: Builds an LDIO command * mrsas_build_ldio_rw: Builds an LDIO command
* input: Adapter instance soft state * input: Adapter instance soft state
@ -957,7 +953,6 @@ mrsas_stream_detect(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd,
return; return;
} }
/* /*
* mrsas_setup_io: Set up data including Fast Path I/O * mrsas_setup_io: Set up data including Fast Path I/O
* input: Adapter instance soft state * input: Adapter instance soft state
@ -1451,7 +1446,6 @@ static boolean_t mrsas_is_prp_possible(struct mrsas_mpt_cmd *cmd,
break; break;
} }
} }
} }
return build_prp; return build_prp;
@ -1623,14 +1617,12 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd *cmd, bus_dma_segment_t *s
main_chain_element = (pMpi25IeeeSgeChain64_t) main_chain_element = (pMpi25IeeeSgeChain64_t)
((u_int8_t *)sgl_ptr + sizeof(MPI25_IEEE_SGE_CHAIN64)); ((u_int8_t *)sgl_ptr + sizeof(MPI25_IEEE_SGE_CHAIN64));
main_chain_element->Address = cmd->chain_frame_phys_addr; main_chain_element->Address = cmd->chain_frame_phys_addr;
main_chain_element->NextChainOffset = 0; main_chain_element->NextChainOffset = 0;
main_chain_element->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT | main_chain_element->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT |
IEEE_SGE_FLAGS_SYSTEM_ADDR | IEEE_SGE_FLAGS_SYSTEM_ADDR |
MPI26_IEEE_SGE_FLAGS_NSF_NVME_PRP; MPI26_IEEE_SGE_FLAGS_NSF_NVME_PRP;
/* Build first PRP, SGE need not to be PAGE aligned*/ /* Build first PRP, SGE need not to be PAGE aligned*/
ptr_first_sgl = sgl_ptr; ptr_first_sgl = sgl_ptr;
sge_addr = segs[i].ds_addr; sge_addr = segs[i].ds_addr;
@ -1655,7 +1647,6 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd *cmd, bus_dma_segment_t *s
} }
for (;;) { for (;;) {
offset = (u_int32_t) (sge_addr & page_mask); offset = (u_int32_t) (sge_addr & page_mask);
/* Put PRP pointer due to page boundary*/ /* Put PRP pointer due to page boundary*/
@ -1674,7 +1665,6 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd *cmd, bus_dma_segment_t *s
ptr_sgl_phys++; ptr_sgl_phys++;
num_prp_in_chain++; num_prp_in_chain++;
sge_addr += mr_nvme_pg_size; sge_addr += mr_nvme_pg_size;
sge_len -= mr_nvme_pg_size; sge_len -= mr_nvme_pg_size;
data_len -= mr_nvme_pg_size; data_len -= mr_nvme_pg_size;
@ -1783,7 +1773,7 @@ void
mrsas_cmd_done(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd) mrsas_cmd_done(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd)
{ {
mrsas_unmap_request(sc, cmd); mrsas_unmap_request(sc, cmd);
mtx_lock(&sc->sim_lock); mtx_lock(&sc->sim_lock);
if (cmd->callout_owner) { if (cmd->callout_owner) {
callout_stop(&cmd->cm_callout); callout_stop(&cmd->cm_callout);
@ -2152,4 +2142,3 @@ int mrsas_reset_targets(struct mrsas_softc *sc)
return retCode; return retCode;
} }

View File

@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
#include <cam/cam_periph.h> #include <cam/cam_periph.h>
#include <cam/cam_xpt_periph.h> #include <cam/cam_xpt_periph.h>
/* /*
* Function prototypes * Function prototypes
*/ */
@ -105,7 +104,6 @@ MR_LdSpanInfoGet(u_int32_t ld,
MR_LD_RAID *MR_LdRaidGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map); MR_LD_RAID *MR_LdRaidGet(u_int32_t ld, MR_DRV_RAID_MAP_ALL * map);
static int MR_PopulateDrvRaidMap(struct mrsas_softc *sc); static int MR_PopulateDrvRaidMap(struct mrsas_softc *sc);
/* /*
* Spanset related function prototypes Added for PRL11 configuration (Uneven * Spanset related function prototypes Added for PRL11 configuration (Uneven
* span support) * span support)
@ -126,7 +124,6 @@ static u_int8_t
get_arm(struct mrsas_softc *sc, u_int32_t ld, u_int8_t span, get_arm(struct mrsas_softc *sc, u_int32_t ld, u_int8_t span,
u_int64_t stripe, MR_DRV_RAID_MAP_ALL * map); u_int64_t stripe, MR_DRV_RAID_MAP_ALL * map);
/* /*
* Spanset related defines Added for PRL11 configuration(Uneven span support) * Spanset related defines Added for PRL11 configuration(Uneven span support)
*/ */
@ -149,7 +146,6 @@ typedef u_int32_t REGION_LEN;
#define LB_PENDING_CMDS_DEFAULT 4 #define LB_PENDING_CMDS_DEFAULT 4
/* /*
* Related Macros * Related Macros
*/ */
@ -163,7 +159,6 @@ typedef u_int32_t REGION_LEN;
(((unsigned int)(x) & (unsigned int)0x00ff0000UL) >> 8) | \ (((unsigned int)(x) & (unsigned int)0x00ff0000UL) >> 8) | \
(((unsigned int)(x) & (unsigned int)0xff000000UL) >> 24) )) (((unsigned int)(x) & (unsigned int)0xff000000UL) >> 24) ))
/* /*
* In-line functions for mod and divide of 64-bit dividend and 32-bit * In-line functions for mod and divide of 64-bit dividend and 32-bit
* divisor. Assumes a check for a divisor of zero is not possible. * divisor. Assumes a check for a divisor of zero is not possible.
@ -183,7 +178,6 @@ int quotient; \
quotient = ((u_int64_t) (dividend)) / (u_int32_t) (divisor); \ quotient = ((u_int64_t) (dividend)) / (u_int32_t) (divisor); \
quotient;}) quotient;})
/* /*
* Various RAID map access functions. These functions access the various * Various RAID map access functions. These functions access the various
* parts of the RAID map and returns the appropriate parameters. * parts of the RAID map and returns the appropriate parameters.
@ -224,7 +218,6 @@ static u_int8_t MR_PdInterfaceTypeGet(u_int32_t pd, MR_DRV_RAID_MAP_ALL *map)
return map->raidMap.devHndlInfo[pd].interfaceType; return map->raidMap.devHndlInfo[pd].interfaceType;
} }
static u_int16_t static u_int16_t
MR_ArPdGet(u_int32_t ar, u_int32_t arm, MR_DRV_RAID_MAP_ALL * map) MR_ArPdGet(u_int32_t ar, u_int32_t arm, MR_DRV_RAID_MAP_ALL * map)
{ {
@ -768,7 +761,6 @@ get_row_from_strip(struct mrsas_softc *sc,
return -1LLU; return -1LLU;
} }
/* /*
* *
* This routine calculates the Start Strip for given row using spanset. * This routine calculates the Start Strip for given row using spanset.
@ -880,7 +872,6 @@ get_arm_from_strip(struct mrsas_softc *sc,
return -1; return -1;
} }
/* This Function will return Phys arm */ /* This Function will return Phys arm */
u_int8_t u_int8_t
get_arm(struct mrsas_softc *sc, u_int32_t ld, u_int8_t span, u_int64_t stripe, get_arm(struct mrsas_softc *sc, u_int32_t ld, u_int8_t span, u_int64_t stripe,
@ -941,7 +932,6 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_int32_t ld, u_int64_t stripR
row = io_info->start_row; row = io_info->start_row;
span = io_info->start_span; span = io_info->start_span;
if (raid->level == 6) { if (raid->level == 6) {
logArm = get_arm_from_strip(sc, ld, stripRow, map); logArm = get_arm_from_strip(sc, ld, stripRow, map);
rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span)); rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span));
@ -954,7 +944,6 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_int32_t ld, u_int64_t stripR
/* Calculate the arm */ /* Calculate the arm */
physArm = get_arm(sc, ld, span, stripRow, map); physArm = get_arm(sc, ld, span, stripRow, map);
arRef = MR_LdSpanArrayGet(ld, span, map); arRef = MR_LdSpanArrayGet(ld, span, map);
pd = MR_ArPdGet(arRef, physArm, map); pd = MR_ArPdGet(arRef, physArm, map);
@ -1351,7 +1340,6 @@ mrsas_update_load_balance_params(struct mrsas_softc *sc,
} }
} }
/* /*
* mrsas_set_pd_lba: Sets PD LBA * mrsas_set_pd_lba: Sets PD LBA
* input: io_request pointer * input: io_request pointer

View File

@ -88,7 +88,6 @@ __FBSDID("$FreeBSD$");
#define MEGAMFI_RAW_FRAME_SIZE 128 #define MEGAMFI_RAW_FRAME_SIZE 128
#pragma pack(1) #pragma pack(1)
struct mrsas_iocpacket { struct mrsas_iocpacket {
u_int16_t host_no; u_int16_t host_no;