From owner-svn-src-all@freebsd.org Tue Sep 1 21:31:40 2020 Return-Path: Delivered-To: svn-src-all@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 B536B379F9A; Tue, 1 Sep 2020 21:31:40 +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 4Bh0d84nPKz4LtR; Tue, 1 Sep 2020 21:31:40 +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 6F8451FDF6; Tue, 1 Sep 2020 21:31:40 +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 081LVeKO029849; Tue, 1 Sep 2020 21:31:40 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 081LVcm2029838; Tue, 1 Sep 2020 21:31:38 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <202009012131.081LVcm2029838@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:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r365092 - head/sys/dev/tws X-SVN-Group: head X-SVN-Commit-Author: mjg X-SVN-Commit-Paths: head/sys/dev/tws X-SVN-Commit-Revision: 365092 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2020 21:31:40 -0000 Author: mjg Date: Tue Sep 1 21:31:38 2020 New Revision: 365092 URL: https://svnweb.freebsd.org/changeset/base/365092 Log: tws: clean up empty lines in .c and .h files Modified: head/sys/dev/tws/tws.c head/sys/dev/tws/tws.h head/sys/dev/tws/tws_cam.c head/sys/dev/tws/tws_hdm.c head/sys/dev/tws/tws_hdm.h head/sys/dev/tws/tws_services.c head/sys/dev/tws/tws_services.h head/sys/dev/tws/tws_user.c head/sys/dev/tws/tws_user.h Modified: head/sys/dev/tws/tws.c ============================================================================== --- head/sys/dev/tws/tws.c Tue Sep 1 21:31:26 2020 (r365091) +++ head/sys/dev/tws/tws.c Tue Sep 1 21:31:38 2020 (r365092) @@ -49,8 +49,6 @@ int tws_queue_depth = TWS_MAX_REQS; int tws_enable_msi = 0; int tws_enable_msix = 0; - - /* externs */ extern int tws_cam_attach(struct tws_softc *sc); extern void tws_cam_detach(struct tws_softc *sc); @@ -68,15 +66,12 @@ extern boolean tws_ctlr_reset(struct tws_softc *sc); extern void tws_intr(void *arg); extern int tws_use_32bit_sgls; - struct tws_request *tws_get_request(struct tws_softc *sc, u_int16_t type); int tws_init_connect(struct tws_softc *sc, u_int16_t mc); void tws_send_event(struct tws_softc *sc, u_int8_t event); uint8_t tws_get_state(struct tws_softc *sc); void tws_release_request(struct tws_request *req); - - /* Function prototypes */ static d_open_t tws_open; static d_close_t tws_close; @@ -95,7 +90,6 @@ static int tws_setup_irq(struct tws_softc *sc); int tws_setup_intr(struct tws_softc *sc, int irqs); int tws_teardown_intr(struct tws_softc *sc); - /* Character device entry points */ static struct cdevsw tws_cdevsw = { @@ -209,7 +203,6 @@ tws_attach(device_t dev) tws_send_event(sc, TWS_INIT_START); mtx_unlock(&sc->gen_lock); - #if _BYTE_ORDER == _BIG_ENDIAN TWS_TRACE(sc, "BIG endian", 0, 0); #endif @@ -233,7 +226,7 @@ tws_attach(device_t dev) bar = pci_read_config(dev, TWS_PCI_BAR1, 4); bar = bar & ~TWS_BIT2; TWS_TRACE_DEBUG(sc, "bar1 ", bar, 0); - + /* MFA base address is BAR2 register used for * push mode. Firmware will evatualy move to * pull mode during witch this needs to change @@ -455,7 +448,6 @@ tws_setup_intr(struct tws_softc *sc, int irqs) } - int tws_teardown_intr(struct tws_softc *sc) { @@ -471,7 +463,6 @@ tws_teardown_intr(struct tws_softc *sc) return(SUCCESS); } - static int tws_setup_irq(struct tws_softc *sc) { @@ -506,7 +497,6 @@ tws_setup_irq(struct tws_softc *sc) return(FAILURE); device_printf(sc->tws_dev, "Using MSI\n"); break; - } return(SUCCESS); @@ -727,7 +717,6 @@ tws_send_event(struct tws_softc *sc, u_int8_t event) mtx_assert(&sc->gen_lock, MA_OWNED); TWS_TRACE_DEBUG(sc, "received event ", 0, event); switch (event) { - case TWS_INIT_START: sc->tws_state = TWS_INIT; break; @@ -826,7 +815,6 @@ tws_resume(device_t dev) return (0); } - struct tws_request * tws_get_request(struct tws_softc *sc, u_int16_t type) { @@ -892,7 +880,6 @@ static driver_t tws_driver = { tws_methods, sizeof(struct tws_softc) }; - static devclass_t tws_devclass; Modified: head/sys/dev/tws/tws.h ============================================================================== --- head/sys/dev/tws/tws.h Tue Sep 1 21:31:26 2020 (r365091) +++ head/sys/dev/tws/tws.h Tue Sep 1 21:31:38 2020 (r365092) @@ -60,14 +60,12 @@ #include #include - #define TWS_PULL_MODE_ENABLE 1 MALLOC_DECLARE(M_TWS); /* externs */ extern int tws_queue_depth; - #define TWS_DRIVER_VERSION_STRING "10.80.00.005" #define TWS_MAX_NUM_UNITS 65 #define TWS_MAX_NUM_LUNS 32 @@ -142,7 +140,7 @@ enum tws_req_flags { TWS_DIR_NONE = 0x8, TWS_DATA_CCB = 0x10, }; - + enum tws_intrs { TWS_INTx, TWS_MSI, @@ -160,7 +158,6 @@ struct tws_ioctl_lock { u_int32_t lock; time_t timeout; }; - #define TWS_TRACE_FNAME_LEN 10 #define TWS_TRACE_FUNC_LEN 15 @@ -182,9 +179,7 @@ struct tws_circular_q { u_int8_t overflow; void * q; }; - - struct tws_stats { u_int64_t reqs_in; u_int64_t reqs_out; @@ -205,7 +200,6 @@ struct tws_init_connect_info { u_int16_t fw_on_ctlr_build; }; - /* ------------ boolean types ------------------- */ Modified: head/sys/dev/tws/tws_cam.c ============================================================================== --- head/sys/dev/tws/tws_cam.c Tue Sep 1 21:31:26 2020 (r365091) +++ head/sys/dev/tws/tws_cam.c Tue Sep 1 21:31:38 2020 (r365092) @@ -50,8 +50,6 @@ static void tws_action(struct cam_sim *sim, union ccb static void tws_poll(struct cam_sim *sim); static void tws_scsi_complete(struct tws_request *req); - - void tws_unmap_request(struct tws_softc *sc, struct tws_request *req); int32_t tws_map_request(struct tws_softc *sc, struct tws_request *req); int tws_bus_scan(struct tws_softc *sc); @@ -73,7 +71,6 @@ static void tws_scsi_err_complete(struct tws_request * static void tws_passthru_err_complete(struct tws_request *req, struct tws_command_header *hdr); - void tws_timeout(void *arg); static void tws_intr_attn_aen(struct tws_softc *sc); static void tws_intr_attn_error(struct tws_softc *sc); @@ -88,7 +85,6 @@ int tws_set_param(struct tws_softc *sc, u_int32_t tabl int tws_get_param(struct tws_softc *sc, u_int32_t table_id, u_int32_t param_id, u_int32_t param_size, void *data); - extern struct tws_request *tws_get_request(struct tws_softc *sc, u_int16_t type); extern void *tws_release_request(struct tws_request *req); @@ -126,8 +122,6 @@ extern u_int16_t tws_poll4_response(struct tws_softc * extern int tws_setup_intr(struct tws_softc *sc, int irqs); extern int tws_teardown_intr(struct tws_softc *sc); - - int tws_cam_attach(struct tws_softc *sc) { @@ -233,7 +227,6 @@ tws_action(struct cam_sim *sim, union ccb *ccb) { struct tws_softc *sc = (struct tws_softc *)cam_sim_softc(sim); - switch( ccb->ccb_h.func_code ) { case XPT_SCSI_IO: { @@ -335,7 +328,6 @@ tws_scsi_complete(struct tws_request *req) callout_stop(&req->timeout); tws_unmap_request(req->sc, req); - req->ccb_ptr->ccb_h.status = CAM_REQ_CMP; mtx_lock(&sc->sim_lock); xpt_done(req->ccb_ptr); @@ -426,7 +418,6 @@ tws_aen_complete(struct tws_request *req) sc->seq_id++; mtx_unlock(&sc->gen_lock); break; - } free(req->data, M_TWS); @@ -516,7 +507,6 @@ tws_scsi_err_complete(struct tws_request *req, struct req->cmd_pkt->cmd.pkt_a.status); if ( hdr->status_block.error == TWS_ERROR_LOGICAL_UNIT_NOT_SUPPORTED || hdr->status_block.error == TWS_ERROR_UNIT_OFFLINE ) { - if ( ccb->ccb_h.target_lun ) { TWS_TRACE_DEBUG(sc, "invalid lun error",0,0); ccb->ccb_h.status |= CAM_DEV_NOT_THERE; @@ -546,7 +536,7 @@ tws_scsi_err_complete(struct tws_request *req, struct ccb->ccb_h.status |= CAM_AUTOSNS_VALID; } ccb->csio.scsi_status = req->cmd_pkt->cmd.pkt_a.status; - + ccb->ccb_h.status &= ~CAM_SIM_QUEUED; mtx_lock(&sc->sim_lock); xpt_done(ccb); @@ -604,7 +594,6 @@ tws_drain_busy_queue(struct tws_softc *sc) } } - static void tws_drain_reserved_reqs(struct tws_softc *sc) { @@ -645,7 +634,6 @@ tws_drain_response_queue(struct tws_softc *sc) while ( tws_get_response(sc, &req_id, &mfa) ); } - static int32_t tws_execute_scsi(struct tws_softc *sc, union ccb *ccb) { @@ -744,7 +732,6 @@ tws_execute_scsi(struct tws_softc *sc, union ccb *ccb) return(error); } - int tws_send_scsi_cmd(struct tws_softc *sc, int cmd) { @@ -842,7 +829,6 @@ tws_get_param(struct tws_softc *sc, u_int32_t table_id u_int64_t mfa; int error = SUCCESS; - req = tws_get_request(sc, TWS_REQ_TYPE_GETSET_PARAM); if ( req == NULL ) { TWS_TRACE_DEBUG(sc, "null req", 0, 0); @@ -912,7 +898,6 @@ tws_map_request(struct tws_softc *sc, struct tws_reque { int32_t error = 0; - /* If the command involves data, map that too. */ if (req->data != NULL) { int my_flags = ((req->type == TWS_REQ_TYPE_SCSI_IO) ? BUS_DMA_WAITOK : BUS_DMA_NOWAIT); @@ -944,7 +929,6 @@ tws_map_request(struct tws_softc *sc, struct tws_reque return(error); } - static void tws_dmamap_data_load_cbfn(void *arg, bus_dma_segment_t *segs, int nseg, int error) @@ -955,7 +939,6 @@ tws_dmamap_data_load_cbfn(void *arg, bus_dma_segment_t void *sgl_ptr; struct tws_cmd_generic *gcmd; - if ( error ) { TWS_TRACE(sc, "SOMETHING BAD HAPPENED! error = %d\n", error, 0); } @@ -991,12 +974,10 @@ tws_dmamap_data_load_cbfn(void *arg, bus_dma_segment_t } } - req->error_code = tws_submit_command(req->sc, req); } - static void tws_fill_sg_list(struct tws_softc *sc, void *sgl_src, void *sgl_dest, u_int16_t num_sgl_entries) @@ -1037,7 +1018,6 @@ tws_fill_sg_list(struct tws_softc *sc, void *sgl_src, if ( num_sgl_entries > TWS_MAX_32BIT_SG_ELEMENTS ) TWS_TRACE(sc, "32bit sg overflow", num_sgl_entries, 0); - for (i = 0; i < num_sgl_entries; i++) { sgl_d[i].address = sgl_s[i].address; sgl_d[i].length = sgl_s[i].length; @@ -1045,7 +1025,6 @@ tws_fill_sg_list(struct tws_softc *sc, void *sgl_src, } } } - void tws_intr(void *arg) @@ -1129,7 +1108,6 @@ tws_intr_resp(struct tws_softc *sc) } - static void tws_poll(struct cam_sim *sim) { @@ -1144,7 +1122,6 @@ tws_timeout(void *arg) struct tws_request *req = (struct tws_request *)arg; struct tws_softc *sc = req->sc; - if ( req->error_code == TWS_REQ_RET_RESET ) { return; } @@ -1253,7 +1230,6 @@ tws_reinit(void *arg) int try=2; int done=0; - // device_printf(sc->tws_dev, "Waiting for Controller Ready\n"); while ( !done && try ) { if ( tws_ctlr_ready(sc) ) { @@ -1288,7 +1264,6 @@ tws_reinit(void *arg) wakeup_one(sc); } - static void tws_freeze_simq(struct tws_softc *sc, struct tws_request *req) { @@ -1301,6 +1276,5 @@ tws_freeze_simq(struct tws_softc *sc, struct tws_reque ccb->ccb_h.status |= CAM_REQUEUE_REQ; } } - TUNABLE_INT("hw.tws.cam_depth", &tws_cam_depth); Modified: head/sys/dev/tws/tws_hdm.c ============================================================================== --- head/sys/dev/tws/tws_hdm.c Tue Sep 1 21:31:26 2020 (r365091) +++ head/sys/dev/tws/tws_hdm.c Tue Sep 1 21:31:38 2020 (r365092) @@ -36,12 +36,10 @@ * $FreeBSD$ */ - #include #include #include - int tws_use_32bit_sgls=0; extern u_int64_t mfa_base; extern struct tws_request *tws_get_request(struct tws_softc *sc, @@ -96,7 +94,6 @@ tws_init_ctlr(struct tws_softc *sc) } - while( 1 ) { regh = tws_read_reg(sc, TWS_I2O0_IOPOBQPH, 4); regl = tws_read_reg(sc, TWS_I2O0_IOPOBQPL, 4); @@ -274,7 +271,6 @@ tws_send_generic_cmd(struct tws_softc *sc, u_int8_t op } - int tws_submit_command(struct tws_softc *sc, struct tws_request *req) { @@ -319,16 +315,13 @@ tws_submit_command(struct tws_softc *sc, struct tws_re * retry later */ return(TWS_REQ_RET_PEND_NOMFA); - } #ifndef TWS_PULL_MODE_ENABLE for (int i=mfa; i<(sizeof(struct tws_command_packet)+ mfa - sizeof( struct tws_command_header)); i++) { - bus_space_write_1(sc->bus_mfa_tag, sc->bus_mfa_handle,i, ((u_int8_t *)&req->cmd_pkt->cmd)[i-mfa]); - } #endif @@ -371,7 +364,6 @@ tws_get_response(struct tws_softc *sc, u_int16_t *req_ if ( out_mfa == TWS_FIFO_EMPTY32 ) { return(false); - } out_mfa = out_mfa << 32; val = tws_read_reg(sc, TWS_I2O0_HOBQPL, 4); @@ -389,9 +381,6 @@ tws_get_response(struct tws_softc *sc, u_int16_t *req_ return(true); } - - - u_int16_t tws_poll4_response(struct tws_softc *sc, u_int64_t *mfa) { @@ -401,7 +390,6 @@ tws_poll4_response(struct tws_softc *sc, u_int64_t *mf endt = TWS_LOCAL_TIME + TWS_POLL_TIMEOUT; do { if(tws_get_response(sc, &req_id, mfa)) { - if ( req_id == TWS_INVALID_REQID ) { TWS_TRACE_DEBUG(sc, "invalid req_id", 0, req_id); return(TWS_INVALID_REQID); Modified: head/sys/dev/tws/tws_hdm.h ============================================================================== --- head/sys/dev/tws/tws_hdm.h Tue Sep 1 21:31:26 2020 (r365091) +++ head/sys/dev/tws/tws_hdm.h Tue Sep 1 21:31:38 2020 (r365092) @@ -36,7 +36,6 @@ * $FreeBSD$ */ - /* bit's defination */ #define TWS_BIT0 0x00000001 @@ -84,7 +83,6 @@ #define TWS_SRC_FREEBSD_DRIVER 5 #define TWS_SRC_FREEBSD_OS 8 - enum tws_sense_severity { error = 1, warning , @@ -101,13 +99,11 @@ enum tws_sense_severity { #define TWS_ERROR_UNIT_OFFLINE 0x0128 #define TWS_ERROR_MORE_DATA 0x0231 - /* AEN codes of interest. */ #define TWS_AEN_QUEUE_EMPTY 0x00 #define TWS_AEN_SOFT_RESET 0x01 #define TWS_AEN_SYNC_TIME_WITH_HOST 0x31 - /* AEN severity */ #define TWS_SEVERITY_ERROR 0x1 #define TWS_SEVERITY_WARNING 0x2 @@ -126,11 +122,9 @@ enum tws_sense_severity { #define TWS_CURRENT_FW_BUILD 4 #define TWS_CURRENT_ARCH_ID 0x000A - #define TWS_FIFO_EMPTY 0xFFFFFFFFFFFFFFFFull #define TWS_FIFO_EMPTY32 0xFFFFFFFFull - /* Register offsets from base address. */ #define TWS_CONTROL_REGISTER_OFFSET 0x0 #define TWS_STATUS_REGISTER_OFFSET 0x4 @@ -180,7 +174,6 @@ enum tws_sense_severity { #define TWS_FW_CMD_GET_PARAM 0x12 #define TWS_FW_CMD_SET_PARAM 0x13 - #define BUILD_SGL_OFF__OPCODE(sgl_off, opcode) \ ((sgl_off << 5) & 0xE0) | (opcode & 0x1F) /* 3:5 */ @@ -190,11 +183,8 @@ enum tws_sense_severity { #define GET_OPCODE(sgl_off__opcode) \ (sgl_off__opcode & 0x1F) /* 3:5 */ - - /* end revisit */ - /* Table #'s and id's of parameters of interest in firmware's param table. */ #define TWS_PARAM_VERSION_TABLE 0x0402 #define TWS_PARAM_VERSION_FW 3 /* firmware version [16] */ @@ -212,10 +202,8 @@ enum tws_sense_severity { #define TWS_9K_PARAM_DESCRIPTOR 0x8000 - /* ----------- request ------------- */ - #pragma pack(1) struct tws_cmd_init_connect { @@ -258,7 +246,6 @@ struct tws_cmd_reset_firmware { u_int8_t param; }; - /* Structure for sending get/set param commands. */ struct tws_cmd_param { u_int8_t sgl_off__opcode;/* 3:5 */ @@ -282,9 +269,6 @@ struct tws_cmd_generic { u_int16_t count; /* block cnt, parameter cnt, message credits */ }; - - - /* Command packet header. */ struct tws_command_header { u_int8_t sense_data[TWS_SENSE_DATA_LENGTH]; @@ -354,7 +338,6 @@ struct tws_outbound_response { u_int32_t request_id:16; /* request id */ }; - /* Scatter/Gather list entry with 32 bit addresses. */ struct tws_sg_desc32 { u_int32_t address; @@ -387,8 +370,6 @@ struct tws_event_packet { u_int8_t severity_str[20]; }; - - #pragma pack() struct tws_sense { @@ -418,5 +399,3 @@ struct tws_request { struct tws_request *next; /* pointer to next request */ struct tws_request *prev; /* pointer to prev request */ }; - - Modified: head/sys/dev/tws/tws_services.c ============================================================================== --- head/sys/dev/tws/tws_services.c Tue Sep 1 21:31:26 2020 (r365091) +++ head/sys/dev/tws/tws_services.c Tue Sep 1 21:31:38 2020 (r365092) @@ -53,8 +53,6 @@ void tws_print_stats(void *arg); struct tws_sense *tws_find_sense_from_mfa(struct tws_softc *sc, u_int64_t mfa); - - static struct error_desc array[] = { { "Cannot add sysctl tree node", 0x2000, ERROR, "%s: (0x%02X: 0x%04X): %s:\n", "ERROR" }, @@ -89,7 +87,6 @@ tws_trace(const char *file, const char *fun, int linen struct tws_softc *sc, char *desc, u_int64_t val1, u_int64_t val2) { - struct tws_trace_rec *rec = (struct tws_trace_rec *)sc->trace_q.q; volatile u_int16_t head, tail; char fmt[256]; @@ -142,7 +139,6 @@ tws_log(struct tws_softc *sc, int index) /* ----------- swap functions ----------- */ - u_int16_t tws_swap16(u_int16_t val) { @@ -156,7 +152,6 @@ tws_swap32(u_int32_t val) ((val >> 8) & (0xFF00)) | (val >> 24))); } - u_int64_t tws_swap64(u_int64_t val) { @@ -164,10 +159,8 @@ tws_swap64(u_int64_t val) ((u_int32_t)(tws_swap32(((u_int32_t *)(&(val)))[0])))); } - /* ----------- reg access ----------- */ - void tws_write_reg(struct tws_softc *sc, int offset, u_int32_t value, int size) @@ -331,7 +324,6 @@ tws_q_remove_request(struct tws_softc *sc, struct tws_ if ( req == sc->q_tail[q_type] ) return(tws_q_remove_tail(sc, q_type)); - /* The given node is not at head or tail. * It's in the middle and there are more than * 2 elements on the q. @@ -384,7 +376,6 @@ tws_find_sense_from_mfa(struct tws_softc *sc, u_int64_ /* --------------------- Q service end --------------------- */ /* --------------------- misc service start --------------------- */ - void tws_print_stats(void *arg) Modified: head/sys/dev/tws/tws_services.h ============================================================================== --- head/sys/dev/tws/tws_services.h Tue Sep 1 21:31:26 2020 (r365091) +++ head/sys/dev/tws/tws_services.h Tue Sep 1 21:31:38 2020 (r365092) @@ -36,7 +36,6 @@ * $FreeBSD$ */ - /* #define TWS_DEBUG on */ void tws_trace(const char *file, const char *fun, int linenum, @@ -53,8 +52,6 @@ u_int64_t tws_swap64(u_int64_t val); void tws_init_qs(struct tws_softc *sc); - - /* ----------------- trace ----------------- */ #define TWS_TRACE_ON on /* Alawys on - use wisely to trace errors */ @@ -81,7 +78,6 @@ void tws_init_qs(struct tws_softc *sc); /* ---------------- logging ---------------- */ - /* ---------------- logging ---------------- */ enum error_index { SYSCTL_TREE_NODE_ADD, @@ -128,7 +124,6 @@ struct error_desc { #define TWS_REQ_RET_PEND_NOMFA 1 #define TWS_REQ_RET_RESET 2 #define TWS_REQ_RET_INVALID 0xdead - /* ------------------------ */ #include Modified: head/sys/dev/tws/tws_user.c ============================================================================== --- head/sys/dev/tws/tws_user.c Tue Sep 1 21:31:26 2020 (r365091) +++ head/sys/dev/tws/tws_user.c Tue Sep 1 21:31:38 2020 (r365092) @@ -41,14 +41,12 @@ #include #include - int tws_ioctl(struct cdev *dev, long unsigned int cmd, caddr_t buf, int flags, struct thread *td); void tws_passthru_complete(struct tws_request *req); extern void tws_circular_aenq_insert(struct tws_softc *sc, struct tws_circular_q *cq, struct tws_event_packet *aen); - static int tws_passthru(struct tws_softc *sc, void *buf); static int tws_ioctl_aen(struct tws_softc *sc, u_long cmd, void *buf); @@ -81,7 +79,6 @@ tws_ioctl(struct cdev *dev, u_long cmd, caddr_t buf, i TWS_TRACE_DEBUG(sc, "ioctl-aen", cmd, buf); error = tws_ioctl_aen(sc, cmd, (void *)buf); break; - } return(error); } @@ -327,7 +324,6 @@ tws_ioctl_aen(struct tws_softc *sc, u_long cmd, void * lpkt.time_remaining_msec = (u_int32_t) ((sc->ioctl_lock.timeout - ctime) * 1000); ubuf->driver_pkt.status = TWS_IOCTL_LOCK_ALREADY_HELD; - } break; case TWS_IOCTL_RELEASE_LOCK : @@ -366,7 +362,6 @@ tws_ioctl_aen(struct tws_softc *sc, u_long cmd, void * TWS_TRACE_DEBUG(sc, "not valid cmd", cmd, TWS_IOCTL_GET_COMPATIBILITY_INFO); break; - } mtx_unlock(&sc->gen_lock); return(SUCCESS); Modified: head/sys/dev/tws/tws_user.h ============================================================================== --- head/sys/dev/tws/tws_user.h Tue Sep 1 21:31:26 2020 (r365091) +++ head/sys/dev/tws/tws_user.h Tue Sep 1 21:31:38 2020 (r365092) @@ -76,7 +76,6 @@ struct tws_compatibility_packet { u_int16_t fw_on_ctlr_build;/* build # of running firmware */ }; - /* Driver understandable part of the ioctl packet built by the API. */ struct tws_driver_packet { u_int32_t control_code; @@ -97,7 +96,6 @@ struct tws_ioctl_packet { #pragma pack() - #pragma pack(1) /* * We need the structure below to ensure that the first byte of @@ -116,7 +114,6 @@ struct tws_ioctl_no_data_buf { #pragma pack() - #include #pragma pack(1) @@ -155,4 +152,3 @@ struct tws_ioctl_with_payload { _IOWR('T', 208, struct tws_ioctl_with_payload) #define TWS_IOCTL_GET_COMPATIBILITY_INFO \ _IOWR('T', 209, struct tws_ioctl_with_payload) -