From owner-svn-src-head@freebsd.org Tue Sep 1 21:39:38 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 EB4BE37ADEB; Tue, 1 Sep 2020 21:39:38 +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 4Bh0pL5rTxz4PgZ; Tue, 1 Sep 2020 21:39:38 +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 AC39520088; Tue, 1 Sep 2020 21:39:38 +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 081LdcwL032830; Tue, 1 Sep 2020 21:39:38 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 081Ldbrs032826; Tue, 1 Sep 2020 21:39:37 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009012139.081Ldbrs032826@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:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365111 - head/sys/dev/amr X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/dev/amr X-SVN-Commit-Revision: 365111 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:39:39 -0000 Author: mjg Date: Tue Sep 1 21:39:37 2020 New Revision: 365111 URL: https://svnweb.freebsd.org/changeset/base/365111 Log: amr: clean up empty lines in .c and .h files Modified: head/sys/dev/amr/amr.c head/sys/dev/amr/amr_cam.c head/sys/dev/amr/amr_disk.c head/sys/dev/amr/amr_pci.c head/sys/dev/amr/amrreg.h Modified: head/sys/dev/amr/amr.c ============================================================================== --- head/sys/dev/amr/amr.c Tue Sep 1 21:39:19 2020 (r365110) +++ head/sys/dev/amr/amr.c Tue Sep 1 21:39:37 2020 (r365111) @@ -371,7 +371,6 @@ amr_init_sysctl(struct amr_softc *sc) ""); } - /******************************************************************************* * Free resources associated with a controller instance */ @@ -777,7 +776,6 @@ amr_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, ap = NULL; switch(cmd) { - case AMR_IO_VERSION: debug(1, "AMR_IO_VERSION"); *arg.result = AMR_IO_VERSION_NUMBER; @@ -977,7 +975,6 @@ amr_query_controller(struct amr_softc *sc) */ if ((aex = amr_enquiry(sc, 2048, AMR_CMD_CONFIG, AMR_CONFIG_ENQ3, AMR_CONFIG_ENQ3_SOLICITED_FULL, &status)) != NULL) { - /* * Fetch current state of logical drives. */ @@ -1011,7 +1008,6 @@ amr_query_controller(struct amr_softc *sc) device_printf(sc->amr_dev, "delete logical drives supported by controller\n"); } } else { - /* failed, try the 8LD ENQUIRY commands */ if ((ae = (struct amr_enquiry *)amr_enquiry(sc, 2048, AMR_CMD_EXT_ENQUIRY2, 0, 0, &status)) == NULL) { if ((ae = (struct amr_enquiry *)amr_enquiry(sc, 2048, AMR_CMD_ENQUIRY, 0, 0, &status)) == NULL) { @@ -1173,7 +1169,6 @@ amr_support_ext_cdb(struct amr_softc *sc) mbox[0] = 0xA4; mbox[2] = 0x16; - /* we have to poll, as the system may be going down or otherwise damaged */ if (sc->amr_poll_command(ac)) goto out; @@ -1203,7 +1198,6 @@ amr_startio(struct amr_softc *sc) /* spin until something prevents us from doing any work */ for (;;) { - /* Don't bother to queue commands no bounce buffers are available. */ if (sc->amr_state & AMR_STATE_QUEUE_FRZN) break; @@ -1342,7 +1336,6 @@ amr_bio_command(struct amr_softc *sc, struct amr_comma /* we fill in the s/g related data when the command is mapped */ - *acp = ac; return(error); } @@ -1643,7 +1636,7 @@ amr_setup_data(void *arg, bus_dma_segment_t *segs, int amr_requeue_ready(ac); } } - + static void amr_setup_ccb(void *arg, bus_dma_segment_t *segs, int nsegs, int err) { @@ -1730,9 +1723,7 @@ amr_unmapcmd(struct amr_command *ac) /* if the command involved data at all and was mapped */ if (ac->ac_flags & AMR_CMD_MAPPED) { - if (ac->ac_data != NULL) { - flag = 0; if (ac->ac_flags & AMR_CMD_DATAIN) flag |= BUS_DMASYNC_POSTREAD; @@ -1834,7 +1825,6 @@ amr_done(struct amr_softc *sc) /* really a busy command? */ if (ac != NULL) { - /* pull the command from the busy index */ amr_freeslot(ac); @@ -2144,7 +2134,6 @@ amr_quartz_get_work(struct amr_softc *sc, struct amr_m /* work waiting for us? */ if ((outd = AMR_QGET_ODB(sc)) == AMR_QODB_READY) { - /* acknowledge interrupt */ AMR_QPUT_ODB(sc, AMR_QODB_READY); @@ -2275,7 +2264,7 @@ amr_std_init(struct amr_softc *sc) device_printf(sc->amr_dev, "initial init status %x\n", AMR_SGET_INITSTATUS(sc)); AMR_SRESET(sc); - + ostatus = 0xff; while ((status = AMR_SGET_INITSTATUS(sc)) != AMR_SINIT_DONE) { if (status != ostatus) { @@ -2331,7 +2320,6 @@ amr_describe_controller(struct amr_softc *sc) prod = amr_describe_code(amr_table_adaptertype, ae->ae_signature); } else if ((ae = (struct amr_enquiry *)amr_enquiry(sc, 2048, AMR_CMD_ENQUIRY, 0, 0, &status)) != NULL) { - /* * Try to work it out based on the PCI signatures. */ @@ -2366,7 +2354,6 @@ amr_describe_controller(struct amr_softc *sc) ae->ae_adapter.aa_bios[2] <= 'Z' && ae->ae_adapter.aa_bios[1] < ' ' && ae->ae_adapter.aa_bios[0] < ' ') { - /* this looks like we have an HP NetRaid version of the MegaRaid */ if(ae->ae_signature == AMR_SIG_438) { @@ -2428,8 +2415,6 @@ amr_dump_blocks(struct amr_softc *sc, int unit, u_int3 sc->amr_state &= ~AMR_STATE_INTEN; return (error); } - - #ifdef AMR_DEBUG /******************************************************************************** Modified: head/sys/dev/amr/amr_cam.c ============================================================================== --- head/sys/dev/amr/amr_cam.c Tue Sep 1 21:39:19 2020 (r365110) +++ head/sys/dev/amr/amr_cam.c Tue Sep 1 21:39:37 2020 (r365111) @@ -175,7 +175,6 @@ amr_cam_attach(device_t dev) * Iterate over our channels, registering them with CAM */ for (chn = 0; chn < sc->amr_maxchan; chn++) { - /* allocate a sim */ if ((sc->amr_cam_sim[chn] = cam_sim_alloc(amr_cam_action, amr_cam_poll, "amr", sc, device_get_unit(sc->amr_dev), @@ -247,7 +246,6 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb) struct amr_softc *sc = cam_sim_softc(sim); switch(ccb->ccb_h.func_code) { - /* * Perform SCSI I/O to a physical device. */ @@ -266,7 +264,7 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb) if ((csio->cdb_len > AMR_MAX_CDB_LEN) && (sc->support_ext_cdb == 0)) ccbh->status = CAM_REQ_INVALID; - + /* check that the CDB pointer is not to a physical address */ if ((ccbh->flags & CAM_CDB_POINTER) && (ccbh->flags & CAM_CDB_PHYS)) @@ -280,7 +278,7 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb) /* we can't map it */ ccbh->status = CAM_REQ_INVALID; } - + /* * If the command is to a LUN other than 0, fail it. * This is probably incorrect, but during testing the @@ -292,7 +290,6 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb) /* if we're happy with the request, queue it for attention */ if (ccbh->status == CAM_REQ_INPROG) { - /* save the channel number in the ccb */ csio->ccb_h.sim_priv.entries[0].field= cam_sim_bus(sim); @@ -396,7 +393,6 @@ amr_cam_action(struct cam_sim *sim, union ccb *ccb) debug(3, "XPT_SET_TRAN_SETTINGS"); ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; break; - /* * Reject anything else as unsupported. Modified: head/sys/dev/amr/amr_disk.c ============================================================================== --- head/sys/dev/amr/amr_disk.c Tue Sep 1 21:39:19 2020 (r365110) +++ head/sys/dev/amr/amr_disk.c Tue Sep 1 21:39:37 2020 (r365111) @@ -148,7 +148,6 @@ amrd_dump(void *arg, void *virtual, vm_offset_t physic int driveno = amrd_sc->amrd_drive - amr_sc->amr_drive; if ((error = amr_dump_blocks(amr_sc,driveno,offset / AMR_BLKSIZE ,(void *)virtual,(int) length / AMR_BLKSIZE )) != 0) return(error); - } return(0); } @@ -266,4 +265,3 @@ amrd_detach(device_t dev) #endif return(0); } - Modified: head/sys/dev/amr/amr_pci.c ============================================================================== --- head/sys/dev/amr/amr_pci.c Tue Sep 1 21:39:19 2020 (r365110) +++ head/sys/dev/amr/amr_pci.c Tue Sep 1 21:39:37 2020 (r365111) @@ -155,7 +155,6 @@ amr_find_ident(device_t dev) for (id = amr_device_ids; id->vendor != 0; id++) { if ((pci_get_vendor(dev) == id->vendor) && (pci_get_device(dev) == id->device)) { - /* do we need to test for a signature? */ if (id->flags & AMR_ID_PROBE_SIG) { sig = pci_read_config(dev, AMR_CFG_SIG, 2); @@ -167,7 +166,7 @@ amr_find_ident(device_t dev) } return (NULL); } - + static int amr_pci_probe(device_t dev) { @@ -332,7 +331,6 @@ amr_pci_attach(device_t dev) goto out; debug(2, "ccb mapped"); - /* * Do bus-independant initialisation, bring controller online. */ @@ -389,7 +387,6 @@ amr_pci_shutdown(device_t dev) /* mark ourselves as in-shutdown */ sc->amr_state |= AMR_STATE_SHUTDOWN; - /* flush controller */ device_printf(sc->amr_dev, "flushing cache..."); printf("%s\n", amr_flush(sc) ? "failed" : "done"); @@ -706,4 +703,3 @@ amr_ccb_map(struct amr_softc *sc) return (0); } - Modified: head/sys/dev/amr/amrreg.h ============================================================================== --- head/sys/dev/amr/amrreg.h Tue Sep 1 21:39:19 2020 (r365110) +++ head/sys/dev/amr/amrreg.h Tue Sep 1 21:39:37 2020 (r365111) @@ -191,7 +191,6 @@ #define AMR_BATT_CHARGE_FAIL 0x20 #define AMR_BATT_CYCLES_EXCEEDED 0x40 - /******************************************************************************** ******************************************************************************** 8LD Firmware Interface @@ -278,7 +277,6 @@ struct amr_enquiry u_int8_t res2[844]; /* X */ } __packed; - /******************************************************************************** ******************************************************************************** 40LD Firmware Interface @@ -408,7 +406,6 @@ struct amr_enquiry3 u_int8_t res1[263]; /* pad to 1024 bytes */ } __packed; - /******************************************************************************** ********************************************************************************