From owner-svn-src-head@freebsd.org Tue Sep 1 22:06:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7785137E4FC; Tue, 1 Sep 2020 22:06:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Bh1PD2fcgz4dxL; Tue, 1 Sep 2020 22:06:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F3942032D; Tue, 1 Sep 2020 22:06:24 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 081M6OlS055650; Tue, 1 Sep 2020 22:06:24 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 081M6Nlo055645; Tue, 1 Sep 2020 22:06:23 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009012206.081M6Nlo055645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 1 Sep 2020 22:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365201 - head/sys/dev/mrsas X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/dev/mrsas X-SVN-Commit-Revision: 365201 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2020 22:06:24 -0000 Author: mjg Date: Tue Sep 1 22:06:23 2020 New Revision: 365201 URL: https://svnweb.freebsd.org/changeset/base/365201 Log: mrsas: clean up empty lines in .c and .h files Modified: head/sys/dev/mrsas/mrsas.c head/sys/dev/mrsas/mrsas.h head/sys/dev/mrsas/mrsas_cam.c head/sys/dev/mrsas/mrsas_fp.c head/sys/dev/mrsas/mrsas_ioctl.h Modified: head/sys/dev/mrsas/mrsas.c ============================================================================== --- head/sys/dev/mrsas/mrsas.c Tue Sep 1 22:06:07 2020 (r365200) +++ head/sys/dev/mrsas/mrsas.c Tue Sep 1 22:06:23 2020 (r365201) @@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include - /* * Function prototypes */ @@ -177,7 +176,6 @@ void mrsas_write_64bit_req_desc(struct mrsas_softc *sc, u_int32_t req_desc_lo, u_int32_t req_desc_hi); - SYSCTL_NODE(_hw, OID_AUTO, mrsas, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, "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)); } - /* * Interrupt Disable/Enable/Clear Functions * @@ -650,7 +647,6 @@ dcmd_timeout: return retcode; } - /* * mrsas_register_aen: Register for asynchronous event notification * @sc: Adapter soft state @@ -685,7 +681,6 @@ mrsas_register_aen(struct mrsas_softc *sc, u_int32_t s curr_aen.word = class_locale_word; if (sc->aen_cmd) { - 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; union mrsas_evt_class_locale class_locale; - /* Get the latest sequence number from FW */ memset(&eli, 0, sizeof(eli)); @@ -905,7 +899,6 @@ mrsas_attach(device_t dev) case MRSAS_AERO_10E7: device_printf(dev, "Adapter is in non-secure mode\n"); return SUCCESS; - } mrsas_get_tunables(sc); @@ -1263,7 +1256,6 @@ mrsas_free_mem(struct mrsas_softc *sc) if (sc->verbuf_tag != NULL) bus_dma_tag_destroy(sc->verbuf_tag); - /* * Free sense buffer memory */ @@ -2487,7 +2479,6 @@ mrsas_init_fw(struct mrsas_softc *sc) } megasas_setup_jbod_map(sc); - memset(sc->target_list, 0, MRSAS_MAX_TM_TARGETS * sizeof(struct mrsas_target)); 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; if (fw_state == MFI_STATE_FAULT || sc->do_timedout_reset || mrsas_atomic_read(&sc->target_reset_outstanding)) { - /* First, freeze further IOs to come to the SIM */ mrsas_xpt_freeze(sc); @@ -3526,7 +3516,6 @@ mrsas_wait_for_outstanding(struct mrsas_softc *sc, u_i int i, outstanding, retval = 0; u_int32_t fw_state, count, MSIxIndex; - for (i = 0; i < MRSAS_RESET_WAIT_TIME; i++) { if (sc->remove_in_progress) { 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_mpt_cmd *cmd_mpt; - mtx_lock(&sc->mfi_cmd_pool_lock); /* * Release the mpt command (if at all it is allocated @@ -4094,7 +4082,6 @@ mrsas_complete_mptmfi_passthru(struct mrsas_softc *sc, if ((cmd->frame->dcmd.opcode == MR_DCMD_SYSTEM_PD_MAP_GET_INFO) && (cmd->frame->dcmd.mbox.b[0] == 1)) { - mtx_lock(&sc->raidmap_lock); sc->jbod_seq_cmd = NULL; mrsas_release_mfi_cmd(cmd); @@ -5021,7 +5008,6 @@ skip_register_aen: return; } - /* * mrsas_complete_aen: Completes AEN command Modified: head/sys/dev/mrsas/mrsas.h ============================================================================== --- head/sys/dev/mrsas/mrsas.h Tue Sep 1 22:06:07 2020 (r365200) +++ head/sys/dev/mrsas/mrsas.h Tue Sep 1 22:06:23 2020 (r365201) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include /* For pci_get macros! */ #include - #define IOCTL_SEMA_DESCRIPTION "mrsas semaphore for MFI pool" /* @@ -101,7 +100,6 @@ __FBSDID("$FreeBSD$"); #define MRSAS_AERO_10E6 0x10E6 #define MRSAS_AERO_10E7 0x10E7 - /* * Firmware State Defines */ @@ -167,7 +165,6 @@ do { \ device_printf(sc->mrsas_dev, msg, ##args); \ } while (0) - /**************************************************************************** * Raid Context structure which describes MegaRAID specific IO Paramenters * 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_UNION, *PRAID_CONTEXT_UNION; - /************************************************************************* * MPI2 Defines ************************************************************************/ @@ -296,7 +292,6 @@ typedef union _RAID_CONTEXT_UNION { #define MPI2_POINTER * #endif - /*************************************** * MPI2 Structures ***************************************/ @@ -762,7 +757,6 @@ Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest #define MRSAS_MAX_LD_IDS (MRSAS_MAX_LD_CHANNELS * \ MRSAS_MAX_DEV_PER_CHANNEL) - #define VD_EXT_DEBUG 0 #define TM_DEBUG 1 @@ -904,7 +898,6 @@ typedef struct _MR_FW_RAID_MAP { MR_LD_SPAN_MAP ldSpanMap[1]; } MR_FW_RAID_MAP; - typedef struct _MR_FW_RAID_MAP_EXT { /* Not used in new map */ 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_FW_RAID_MAP_EXT; - typedef struct _MR_DRV_RAID_MAP { /* * Total size of this structure, including this field. This feild @@ -979,7 +971,6 @@ typedef struct _MR_DRV_RAID_MAP { #pragma pack(1) typedef struct _MR_DRV_RAID_MAP_ALL { - MR_DRV_RAID_MAP raidMap; MR_LD_SPAN_MAP ldSpanMap[MAX_LOGICAL_DRIVES_DYN - 1]; } MR_DRV_RAID_MAP_ALL; @@ -1084,14 +1075,12 @@ typedef struct _LD_STREAM_DETECT { STREAM_DETECT streamTrack[MAX_STREAMS_TRACKED]; } LD_STREAM_DETECT, *PTR_LD_STREAM_DETECT; - typedef struct _MR_LD_TARGET_SYNC { u_int8_t targetId; u_int8_t reserved; u_int16_t seqNum; } MR_LD_TARGET_SYNC; - /* * RAID Map descriptor Types. * 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; - #define IEEE_SGE_FLAGS_ADDR_MASK (0x03) #define IEEE_SGE_FLAGS_SYSTEM_ADDR (0x00) #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_AHCI (0x03) - #define MPI26_IEEE_SGE_FLAGS_NSF_MASK (0x1C) #define MPI26_IEEE_SGE_FLAGS_NSF_MPI_IEEE (0x00) #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_MIN_MAP_SIZE 0x10000 - /******************************************************************* * Register set, included legacy controllers 1068 and 1078, * structure extended for 1078 registers @@ -1472,7 +1458,6 @@ enum MFI_STAT { #define MFI_MBOX_SIZE 12 enum MR_EVT_CLASS { - MR_EVT_CLASS_DEBUG = -2, MR_EVT_CLASS_PROGRESS = -1, MR_EVT_CLASS_INFO = 0, @@ -1484,7 +1469,6 @@ enum MR_EVT_CLASS { }; enum MR_EVT_LOCALE { - MR_EVT_LOCALE_LD = 0x0001, MR_EVT_LOCALE_PD = 0x0002, MR_EVT_LOCALE_ENCL = 0x0004, @@ -1498,7 +1482,6 @@ enum MR_EVT_LOCALE { }; enum MR_EVT_ARGS { - MR_EVT_ARGS_NONE, MR_EVT_ARGS_CDB_SENSE, MR_EVT_ARGS_LD, @@ -1617,7 +1600,6 @@ typedef enum _REGION_TYPE { REGION_TYPE_EXCLUSIVE = 3, } REGION_TYPE; - /* * SCSI-CAM Related Defines */ @@ -1736,7 +1718,6 @@ struct mrsas_mfi_cmd { TAILQ_ENTRY(mrsas_mfi_cmd) next; }; - /* * define constants for device list query options */ @@ -1833,7 +1814,6 @@ typedef union _MR_LD_REF { u_int32_t ref; } MR_LD_REF; - /* * defines the logical drive list structure */ @@ -1929,7 +1909,6 @@ struct mrsas_ctrl_prop { #pragma pack() - /* * SAS controller information */ @@ -2213,7 +2192,6 @@ struct mrsas_ctrl_info { u_int32_t headlessMode:1; u_int32_t dedicatedHotSparesLimited:1; - u_int32_t supportUnevenSpans:1; u_int32_t reserved:11; } adapterOperations2; @@ -2225,7 +2203,6 @@ struct mrsas_ctrl_info { u_int8_t reserved4; /* 0x7CB */ u_int16_t maxConfigurablePds; /* 0x7CC */ - u_int8_t reserved5[2]; /* 0x7CD reserved */ struct { @@ -2580,7 +2557,6 @@ struct mrsas_smp_frame { #pragma pack() - #pragma pack(1) struct mrsas_stp_frame { u_int8_t cmd; /* 00h */ @@ -2625,7 +2601,6 @@ union mrsas_frame { #pragma pack(1) union mrsas_evt_class_locale { - struct { u_int16_t locale; u_int8_t reserved; @@ -2638,7 +2613,6 @@ union mrsas_evt_class_locale { #pragma pack() - #pragma pack(1) struct mrsas_evt_log_info { u_int32_t newest_seq_num; @@ -2652,14 +2626,12 @@ struct mrsas_evt_log_info { #pragma pack() struct mrsas_progress { - u_int16_t progress; u_int16_t elapsed_seconds; } __packed; struct mrsas_evtarg_ld { - u_int16_t target_id; u_int8_t ld_index; u_int8_t reserved; @@ -2674,7 +2646,6 @@ struct mrsas_evtarg_pd { } __packed; struct mrsas_evt_detail { - u_int32_t seq_num; u_int32_t time_stamp; 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) - typedef struct _MRSAS_DRV_PCI_CAPABILITIES { MRSAS_DRV_PCI_LINK_CAPABILITY linkCapability; MRSAS_DRV_PCI_LINK_STATUS_CAPABILITY linkStatusCapability; @@ -3060,7 +3030,6 @@ struct MR_PD_PROGRESS { union MR_PROGRESS reserved[3]; } __packed; - struct mrsas_pd_info { MR_PD_REF ref; Modified: head/sys/dev/mrsas/mrsas_cam.c ============================================================================== --- head/sys/dev/mrsas/mrsas_cam.c Tue Sep 1 22:06:07 2020 (r365200) +++ head/sys/dev/mrsas/mrsas_cam.c Tue Sep 1 22:06:23 2020 (r365201) @@ -784,9 +784,6 @@ mrsas_get_request_desc(struct mrsas_softc *sc, u_int16 return (MRSAS_REQUEST_DESCRIPTOR_UNION *) p; } - - - /* mrsas_prepare_secondRaid1_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 * input: Adapter instance soft state @@ -957,7 +953,6 @@ mrsas_stream_detect(struct mrsas_softc *sc, struct mrs return; } - /* * mrsas_setup_io: Set up data including Fast Path I/O * input: Adapter instance soft state @@ -1451,7 +1446,6 @@ static boolean_t mrsas_is_prp_possible(struct mrsas_mp break; } } - } return build_prp; @@ -1623,14 +1617,12 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd main_chain_element = (pMpi25IeeeSgeChain64_t) ((u_int8_t *)sgl_ptr + sizeof(MPI25_IEEE_SGE_CHAIN64)); - main_chain_element->Address = cmd->chain_frame_phys_addr; main_chain_element->NextChainOffset = 0; main_chain_element->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT | IEEE_SGE_FLAGS_SYSTEM_ADDR | MPI26_IEEE_SGE_FLAGS_NSF_NVME_PRP; - /* Build first PRP, SGE need not to be PAGE aligned*/ ptr_first_sgl = sgl_ptr; sge_addr = segs[i].ds_addr; @@ -1655,7 +1647,6 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd } for (;;) { - offset = (u_int32_t) (sge_addr & page_mask); /* Put PRP pointer due to page boundary*/ @@ -1674,7 +1665,6 @@ static void mrsas_build_prp_nvme(struct mrsas_mpt_cmd ptr_sgl_phys++; num_prp_in_chain++; - sge_addr += mr_nvme_pg_size; sge_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_unmap_request(sc, cmd); - + mtx_lock(&sc->sim_lock); if (cmd->callout_owner) { callout_stop(&cmd->cm_callout); @@ -2152,4 +2142,3 @@ return_status: return retCode; } - Modified: head/sys/dev/mrsas/mrsas_fp.c ============================================================================== --- head/sys/dev/mrsas/mrsas_fp.c Tue Sep 1 22:06:07 2020 (r365200) +++ head/sys/dev/mrsas/mrsas_fp.c Tue Sep 1 22:06:23 2020 (r365201) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include - /* * 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); static int MR_PopulateDrvRaidMap(struct mrsas_softc *sc); - /* * Spanset related function prototypes Added for PRL11 configuration (Uneven * span support) @@ -126,7 +124,6 @@ static u_int8_t get_arm(struct mrsas_softc *sc, u_int32_t ld, u_int8_t span, u_int64_t stripe, MR_DRV_RAID_MAP_ALL * map); - /* * 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 - /* * Related Macros */ @@ -163,7 +159,6 @@ typedef u_int32_t REGION_LEN; (((unsigned int)(x) & (unsigned int)0x00ff0000UL) >> 8) | \ (((unsigned int)(x) & (unsigned int)0xff000000UL) >> 24) )) - /* * 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. @@ -183,7 +178,6 @@ int quotient; \ quotient = ((u_int64_t) (dividend)) / (u_int32_t) (divisor); \ quotient;}) - /* * Various RAID map access functions. These functions access the various * 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 return map->raidMap.devHndlInfo[pd].interfaceType; } - static u_int16_t 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; } - /* * * 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; } - /* This Function will return Phys arm */ u_int8_t 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_in row = io_info->start_row; span = io_info->start_span; - if (raid->level == 6) { logArm = get_arm_from_strip(sc, ld, stripRow, map); rowMod = mega_mod64(row, SPAN_ROW_SIZE(map, ld, span)); @@ -954,7 +944,6 @@ mr_spanset_get_phy_params(struct mrsas_softc *sc, u_in /* Calculate the arm */ physArm = get_arm(sc, ld, span, stripRow, map); - arRef = MR_LdSpanArrayGet(ld, span, map); pd = MR_ArPdGet(arRef, physArm, map); @@ -1350,7 +1339,6 @@ mrsas_update_load_balance_params(struct mrsas_softc *s lbInfo[ldCount].loadBalanceFlag = 1; } } - /* * mrsas_set_pd_lba: Sets PD LBA Modified: head/sys/dev/mrsas/mrsas_ioctl.h ============================================================================== --- head/sys/dev/mrsas/mrsas_ioctl.h Tue Sep 1 22:06:07 2020 (r365200) +++ head/sys/dev/mrsas/mrsas_ioctl.h Tue Sep 1 22:06:23 2020 (r365201) @@ -88,7 +88,6 @@ __FBSDID("$FreeBSD$"); #define MEGAMFI_RAW_FRAME_SIZE 128 - #pragma pack(1) struct mrsas_iocpacket { u_int16_t host_no;