From owner-svn-src-head@freebsd.org Tue Sep 1 21:40:14 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 413D437B09C; Tue, 1 Sep 2020 21:40:14 +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 4Bh0q210GFz4PfP; Tue, 1 Sep 2020 21:40:14 +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 058311FCF1; Tue, 1 Sep 2020 21:40:14 +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 081LeD4b032986; Tue, 1 Sep 2020 21:40:13 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 081LeDIC032984; Tue, 1 Sep 2020 21:40:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009012140.081LeDIC032984@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 21:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365113 - head/sys/dev/arcmsr X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/dev/arcmsr X-SVN-Commit-Revision: 365113 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 21:40:14 -0000 Author: mjg Date: Tue Sep 1 21:40:13 2020 New Revision: 365113 URL: https://svnweb.freebsd.org/changeset/base/365113 Log: arcmsr: clean up empty lines in .c and .h files Modified: head/sys/dev/arcmsr/arcmsr.c head/sys/dev/arcmsr/arcmsr.h Modified: head/sys/dev/arcmsr/arcmsr.c ============================================================================== --- head/sys/dev/arcmsr/arcmsr.c Tue Sep 1 21:39:56 2020 (r365112) +++ head/sys/dev/arcmsr/arcmsr.c Tue Sep 1 21:40:13 2020 (r365113) @@ -263,7 +263,7 @@ static int arcmsr_ioctl(struct cdev *dev, u_long ioctl { int unit = dev2unit(dev); struct AdapterControlBlock *acb = devclass_get_softc(arcmsr_devclass, unit); - + if (acb == NULL) { return ENXIO; } @@ -451,7 +451,7 @@ static u_int8_t arcmsr_hbe_wait_msgint_ready(struct Ad { u_int32_t Index, read_doorbell; u_int8_t Retries = 0x00; - + do { for(Index=0; Index < 100; Index++) { read_doorbell = CHIP_REG_READ32(HBE_MessageUnit, 0, iobound_doorbell); @@ -542,7 +542,7 @@ static void arcmsr_flush_hbd_cache(struct AdapterContr static void arcmsr_flush_hbe_cache(struct AdapterControlBlock *acb) { int retry_count = 30;/* enlarge wait flush adapter cache time: 10 minute */ - + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_FLUSH_CACHE); acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); @@ -934,7 +934,6 @@ static void arcmsr_done4abort_postqueue(struct Adapter } break; case ACB_ADAPTER_TYPE_C: { - while((CHIP_REG_READ32(HBC_MessageUnit, 0, host_int_status) & ARCMSR_HBCMU_OUTBOUND_POSTQUEUE_ISR) && (i++ < ARCMSR_MAX_OUTSTANDING_CMD)) { flag_srb = CHIP_REG_READ32(HBC_MessageUnit, 0, outbound_queueport_low); error = (flag_srb & ARCMSR_SRBREPLY_FLAG_ERROR_MODE1) ? TRUE : FALSE; @@ -1207,7 +1206,7 @@ static struct QBUFFER *arcmsr_get_iop_rqbuffer( struct break; case ACB_ADAPTER_TYPE_E: { struct HBE_MessageUnit *phbcmu = (struct HBE_MessageUnit *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbcmu->message_rbuffer; } break; @@ -1249,7 +1248,7 @@ static struct QBUFFER *arcmsr_get_iop_wqbuffer( struct break; case ACB_ADAPTER_TYPE_E: { struct HBE_MessageUnit *phbcmu = (struct HBE_MessageUnit *)acb->pmu; - + qbuffer = (struct QBUFFER *)&phbcmu->message_wbuffer; } break; @@ -1462,7 +1461,6 @@ static void arcmsr_poll(struct cam_sim *psim) */ static u_int32_t arcmsr_Read_iop_rqbuffer_data_D(struct AdapterControlBlock *acb, struct QBUFFER *prbuffer) { - u_int8_t *pQbuffer; u_int8_t *buf1 = NULL; u_int32_t *iop_data, *buf2 = NULL; @@ -1507,7 +1505,6 @@ static u_int32_t arcmsr_Read_iop_rqbuffer_data_D(struc */ static u_int32_t arcmsr_Read_iop_rqbuffer_data(struct AdapterControlBlock *acb, struct QBUFFER *prbuffer) { - u_int8_t *pQbuffer; u_int8_t *iop_data; u_int32_t iop_len; @@ -1689,7 +1686,6 @@ static void arcmsr_rescan_lun(struct AdapterControlBlo xpt_action(ccb); } - static void arcmsr_abort_dr_ccbs(struct AdapterControlBlock *acb, int target, int lun) { struct CommandControlBlock *srb; @@ -1965,7 +1961,7 @@ static void arcmsr_hbd_doorbell_isr(struct AdapterCont static void arcmsr_hbe_doorbell_isr(struct AdapterControlBlock *acb) { u_int32_t doorbell_status, in_doorbell; - + /* ******************************************************************* ** Maybe here we need to check wrqbuffer_lock is lock or not @@ -2136,7 +2132,7 @@ static void arcmsr_hbe_postqueue_isr(struct AdapterCon u_int16_t error; uint32_t doneq_index; uint16_t cmdSMID; - + /* ***************************************************************************** ** areca cdb command done @@ -2988,7 +2984,7 @@ static void arcmsr_handle_virtual_command(struct Adapt case INQUIRY: { unsigned char inqdata[36]; char *buffer = pccb->csio.data_ptr; - + inqdata[0] = T_PROCESSOR; /* Periph Qualifier & Periph Dev Type */ inqdata[1] = 0; /* rem media bit & Dev Type Modifier */ inqdata[2] = 0; /* ISO, ECMA, & ANSI versions */ @@ -3110,7 +3106,7 @@ static void arcmsr_action(struct cam_sim *psim, union } case XPT_ABORT: { union ccb *pabort_ccb; - + pabort_ccb = pccb->cab.abort_ccb; switch (pabort_ccb->ccb_h.func_code) { case XPT_ACCEPT_TARGET_IO: @@ -3548,7 +3544,7 @@ static void arcmsr_polling_hbe_srbdone(struct AdapterC struct CommandControlBlock *srb; u_int32_t poll_srb_done=0, poll_count=0, doneq_index; u_int16_t error, cmdSMID; - + polling_ccb_retry: poll_count++; bus_dmamap_sync(acb->srb_dmat, acb->srb_dmamap, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); @@ -3835,14 +3831,14 @@ static void arcmsr_get_hbe_config(struct AdapterContro size_t iop_firm_version = offsetof(struct HBE_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_VERS_OFFSET]); /*firm_version,17,68-83*/ size_t iop_device_map = offsetof(struct HBE_MessageUnit,msgcode_rwbuffer[ARCMSR_FW_DEVMAP_OFFSET]); int i; - + CHIP_REG_WRITE32(HBE_MessageUnit, 0, inbound_msgaddr0, ARCMSR_INBOUND_MESG0_GET_CONFIG); acb->out_doorbell ^= ARCMSR_HBEMU_DRV2IOP_MESSAGE_CMD_DONE; CHIP_REG_WRITE32(HBE_MessageUnit, 0, iobound_doorbell, acb->out_doorbell); if(!arcmsr_hbe_wait_msgint_ready(acb)) { printf("arcmsr%d: wait 'get adapter firmware miscellaneous data' timeout \n", acb->pci_unit); } - + i = 0; while(i < 8) { *acb_firm_model = bus_space_read_1(acb->btag[0], acb->bhandle[0], iop_firm_model+i); Modified: head/sys/dev/arcmsr/arcmsr.h ============================================================================== --- head/sys/dev/arcmsr/arcmsr.h Tue Sep 1 21:39:56 2020 (r365112) +++ head/sys/dev/arcmsr/arcmsr.h Tue Sep 1 21:40:13 2020 (r365113) @@ -1128,15 +1128,15 @@ struct ARCMSR_CDB { u_int8_t TargetID; /* 01h should be 0--15 */ u_int8_t LUN; /* 02h should be 0--7 */ u_int8_t Function; /* 03h should be 1 */ - + u_int8_t CdbLength; /* 04h not used now */ u_int8_t sgcount; /* 05h */ u_int8_t Flags; /* 06h */ u_int8_t msgPages; /* 07h */ - + u_int32_t Context; /* 08h Address of this request */ u_int32_t DataLength; /* 0ch not used now */ - + u_int8_t Cdb[16]; /* 10h SCSI CDB */ /* ******************************************************** @@ -1145,9 +1145,9 @@ struct ARCMSR_CDB { ******************************************************** */ u_int8_t DeviceStatus; /* 20h if error */ - + u_int8_t SenseData[15]; /* 21h output */ - + union { struct SG32ENTRY sg32entry[ARCMSR_MAX_SG_ENTRIES]; /* 30h Scatter gather address */ struct SG64ENTRY sg64entry[ARCMSR_MAX_SG_ENTRIES]; /* 30h */ @@ -1235,7 +1235,7 @@ struct CommandControlBlock { struct AdapterControlBlock { u_int32_t adapter_type; /* adapter A,B..... */ - + bus_space_tag_t btag[2]; bus_space_handle_t bhandle[2]; bus_dma_tag_t parent_dmat; @@ -1245,12 +1245,12 @@ struct AdapterControlBlock { device_t pci_dev; struct cdev *ioctl_dev; int pci_unit; - + struct resource *sys_res_arcmsr[2]; struct resource *irqres[ARCMSR_NUM_MSIX_VECTORS]; void *ih[ARCMSR_NUM_MSIX_VECTORS]; /* interrupt handle */ int irq_id[ARCMSR_NUM_MSIX_VECTORS]; - + /* Hooks into the CAM XPT */ struct cam_sim *psim; struct cam_path *ppath; @@ -1266,32 +1266,32 @@ struct AdapterControlBlock { // unsigned long srb_phyaddr; /* Offset is used in making arc cdb physical to virtual calculations */ u_int32_t outbound_int_enable; - + struct MessageUnit_UNION *pmu; /* message unit ATU inbound base address0 */ - + u_int8_t adapter_index; u_int8_t irq; u_int16_t acb_flags; - + struct CommandControlBlock *psrb_pool[ARCMSR_MAX_FREESRB_NUM]; /* serial srb pointer array */ struct CommandControlBlock *srbworkingQ[ARCMSR_MAX_FREESRB_NUM]; /* working srb pointer array */ int32_t workingsrb_doneindex; /* done srb array index */ int32_t workingsrb_startindex; /* start srb array index */ int32_t srboutstandingcount; - + u_int8_t rqbuffer[ARCMSR_MAX_QBUFFER]; /* data collection buffer for read from 80331 */ u_int32_t rqbuf_firstindex; /* first of read buffer */ u_int32_t rqbuf_lastindex; /* last of read buffer */ - + u_int8_t wqbuffer[ARCMSR_MAX_QBUFFER]; /* data collection buffer for write to 80331 */ u_int32_t wqbuf_firstindex; /* first of write buffer */ u_int32_t wqbuf_lastindex; /* last of write buffer */ - + arcmsr_lock_t isr_lock; arcmsr_lock_t srb_lock; arcmsr_lock_t postDone_lock; arcmsr_lock_t qbuffer_lock; - + u_int8_t devstate[ARCMSR_MAX_TARGETID][ARCMSR_MAX_TARGETLUN]; /* id0 ..... id15,lun0...lun7 */ u_int32_t num_resets; u_int32_t num_aborts; @@ -2500,9 +2500,6 @@ struct SENSE_DATA { ************************************************************************** */ - - - /* ************************************************************************************************************************************* ** 80331 Address Translation Unit Register Definitions @@ -3028,8 +3025,6 @@ struct SENSE_DATA { *************************************************************************************** */ - - /* *********************************************************************************** ** ATU Interrupt Line Register - ATUILR @@ -3157,8 +3152,6 @@ struct SENSE_DATA { *********************************************************************************** */ - - /* *********************************************************************************** ** Inbound ATU Limit Register 0 - IALR0 @@ -4387,8 +4380,6 @@ struct SENSE_DATA { ***************************************************************** */ - - /* ************************************************************************** ** Inbound Read Completions Data Parity Errors @@ -4447,7 +4438,6 @@ struct SENSE_DATA { *************************************************************************** */ - /* *************************************************************************** ** Inbound Configuration Write Request @@ -4552,7 +4542,6 @@ struct SENSE_DATA { ** the internal bus of the 80331. ***************************************************************************** */ - /* ******************************************************************************************************