svn commit: r365087 - head/sys/dev/twa
Mateusz Guzik
mjg at FreeBSD.org
Tue Sep 1 21:29:25 UTC 2020
Author: mjg
Date: Tue Sep 1 21:29:23 2020
New Revision: 365087
URL: https://svnweb.freebsd.org/changeset/base/365087
Log:
twa: clean up empty lines in .c and .h files
Modified:
head/sys/dev/twa/tw_cl.h
head/sys/dev/twa/tw_cl_externs.h
head/sys/dev/twa/tw_cl_fwif.h
head/sys/dev/twa/tw_cl_init.c
head/sys/dev/twa/tw_cl_intr.c
head/sys/dev/twa/tw_cl_io.c
head/sys/dev/twa/tw_cl_ioctl.h
head/sys/dev/twa/tw_cl_misc.c
head/sys/dev/twa/tw_cl_share.h
head/sys/dev/twa/tw_osl.h
head/sys/dev/twa/tw_osl_cam.c
head/sys/dev/twa/tw_osl_externs.h
head/sys/dev/twa/tw_osl_freebsd.c
head/sys/dev/twa/tw_osl_includes.h
head/sys/dev/twa/tw_osl_inline.h
head/sys/dev/twa/tw_osl_ioctl.h
head/sys/dev/twa/tw_osl_share.h
head/sys/dev/twa/tw_osl_types.h
Modified: head/sys/dev/twa/tw_cl.h
==============================================================================
--- head/sys/dev/twa/tw_cl.h Tue Sep 1 21:29:01 2020 (r365086)
+++ head/sys/dev/twa/tw_cl.h Tue Sep 1 21:29:23 2020 (r365087)
@@ -36,18 +36,14 @@
* Modifications by: Adam Radford
*/
-
-
#ifndef TW_CL_H
#define TW_CL_H
-
/*
* Common Layer internal macros, structures and functions.
*/
-
#define TW_CLI_SECTOR_SIZE 0x200
#define TW_CLI_REQUEST_TIMEOUT_PERIOD 60 /* seconds */
#define TW_CLI_RESET_TIMEOUT_PERIOD 60 /* seconds */
@@ -76,7 +72,6 @@
#define TW_CLI_PCI_CONFIG_STATUS_OFFSET 0x6 /* status register offset */
#endif /* TW_OSL_PCI_CONFIG_ACCESSIBLE */
-
#ifdef TW_OSL_DEBUG
struct tw_cli_q_stats {
TW_UINT32 cur_len;/* current # of entries in q */
@@ -84,7 +79,6 @@ struct tw_cli_q_stats {
};
#endif /* TW_OSL_DEBUG */
-
/* Queues of CL internal request context packets. */
#define TW_CLI_FREE_Q 0 /* free q */
#define TW_CLI_BUSY_Q 1 /* q of reqs submitted to fw */
@@ -93,7 +87,6 @@ struct tw_cli_q_stats {
#define TW_CLI_RESET_Q 4 /* q of reqs reset by timeout */
#define TW_CLI_Q_COUNT 5 /* total number of queues */
-
/* CL's internal request context. */
struct tw_cli_req_context {
struct tw_cl_req_handle *req_handle;/* handle to track requests between
@@ -119,7 +112,6 @@ struct tw_cli_req_context {
struct tw_cl_link link; /* to link this request in a list */
};
-
/* CL's internal controller context. */
struct tw_cli_ctlr_context {
struct tw_cl_ctlr_handle *ctlr_handle; /* handle to track ctlr between
@@ -209,8 +201,6 @@ struct tw_cli_ctlr_context {
#endif /* TW_OSL_DEBUG */
};
-
-
/*
* Queue primitives
*/
@@ -222,7 +212,6 @@ struct tw_cli_ctlr_context {
(ctlr)->q_stats[q_type].max_len = 0; \
} while (0)
-
#define TW_CLI_Q_INSERT(ctlr, q_type) do { \
struct tw_cli_q_stats *q_stats = &((ctlr)->q_stats[q_type]); \
\
@@ -230,7 +219,6 @@ struct tw_cli_ctlr_context {
q_stats->max_len = q_stats->cur_len; \
} while (0)
-
#define TW_CLI_Q_REMOVE(ctlr, q_type) \
(ctlr)->q_stats[q_type].cur_len--
@@ -242,7 +230,6 @@ struct tw_cli_ctlr_context {
#endif /* TW_OSL_DEBUG */
-
/* Initialize a queue of requests. */
static __inline TW_VOID
tw_cli_req_q_init(struct tw_cli_ctlr_context *ctlr, TW_UINT8 q_type)
@@ -251,8 +238,6 @@ tw_cli_req_q_init(struct tw_cli_ctlr_context *ctlr, TW
TW_CLI_Q_INIT(ctlr, q_type);
}
-
-
/* Insert the given request at the head of the given queue (q_type). */
static __inline TW_VOID
tw_cli_req_q_insert_head(struct tw_cli_req_context *req, TW_UINT8 q_type)
@@ -265,8 +250,6 @@ tw_cli_req_q_insert_head(struct tw_cli_req_context *re
tw_osl_free_lock(ctlr->ctlr_handle, ctlr->gen_lock);
}
-
-
/* Insert the given request at the tail of the given queue (q_type). */
static __inline TW_VOID
tw_cli_req_q_insert_tail(struct tw_cli_req_context *req, TW_UINT8 q_type)
@@ -279,8 +262,6 @@ tw_cli_req_q_insert_tail(struct tw_cli_req_context *re
tw_osl_free_lock(ctlr->ctlr_handle, ctlr->gen_lock);
}
-
-
/* Remove and return the request at the head of the given queue (q_type). */
static __inline struct tw_cli_req_context *
tw_cli_req_q_remove_head(struct tw_cli_ctlr_context *ctlr, TW_UINT8 q_type)
@@ -300,8 +281,6 @@ tw_cli_req_q_remove_head(struct tw_cli_ctlr_context *c
return(req);
}
-
-
/* Remove the given request from the given queue (q_type). */
static __inline TW_VOID
tw_cli_req_q_remove_item(struct tw_cli_req_context *req, TW_UINT8 q_type)
@@ -314,8 +293,6 @@ tw_cli_req_q_remove_item(struct tw_cli_req_context *re
tw_osl_free_lock(ctlr->ctlr_handle, ctlr->gen_lock);
}
-
-
/* Create an event packet for an event/error posted by the controller. */
#define tw_cli_create_ctlr_event(ctlr, event_src, cmd_hdr) do { \
TW_UINT8 severity = \
@@ -343,7 +320,5 @@ tw_cli_req_q_remove_item(struct tw_cli_req_context *re
(cmd_hdr)->sense_data[14], (cmd_hdr)->sense_data[15], \
(cmd_hdr)->sense_data[16], (cmd_hdr)->sense_data[17]); \
} while (0)
-
-
#endif /* TW_CL_H */
Modified: head/sys/dev/twa/tw_cl_externs.h
==============================================================================
--- head/sys/dev/twa/tw_cl_externs.h Tue Sep 1 21:29:01 2020 (r365086)
+++ head/sys/dev/twa/tw_cl_externs.h Tue Sep 1 21:29:23 2020 (r365087)
@@ -36,23 +36,18 @@
* Modifications by: Adam Radford
*/
-
-
#ifndef TW_CL_EXTERNS_H
#define TW_CL_EXTERNS_H
-
/*
* Data structures and functions global to the Common Layer.
*/
-
extern TW_INT8 tw_cli_fw_img[];
extern TW_INT32 tw_cli_fw_img_size;
extern TW_INT8 *tw_cli_severity_string_table[];
-
/* Do controller initialization. */
extern TW_INT32 tw_cli_start_ctlr(struct tw_cli_ctlr_context *ctlr);
@@ -65,8 +60,6 @@ extern TW_INT32 tw_cli_init_connection(struct tw_cli_c
TW_UINT16 *fw_on_ctlr_branch, TW_UINT16 *fw_on_ctlr_build,
TW_UINT32 *init_connect_result);
-
-
/* Functions in tw_cl_io.c */
/* Submit a command packet to the firmware on the controller. */
@@ -102,8 +95,6 @@ extern TW_INT32 tw_cli_get_aen(struct tw_cli_ctlr_cont
extern TW_VOID tw_cli_fill_sg_list(struct tw_cli_ctlr_context *ctlr,
TW_VOID *sgl_src, TW_VOID *sgl_dest, TW_INT32 num_sgl_entries);
-
-
/* Functions in tw_cl_intr.c */
/* Process a host interrupt. */
@@ -148,8 +139,6 @@ extern TW_VOID
extern TW_VOID
tw_cli_disable_interrupts(struct tw_cli_ctlr_context *ctlr_handle);
-
-
/* Functions in tw_cl_misc.c */
/* Print if dbg_level is appropriate (by calling OS Layer). */
@@ -198,7 +187,5 @@ extern TW_VOID tw_cli_notify_ctlr_info(struct tw_cli_c
/* Make sure that the firmware status register reports a proper status. */
extern TW_INT32 tw_cli_check_ctlr_state(struct tw_cli_ctlr_context *ctlr,
TW_UINT32 status_reg);
-
-
#endif /* TW_CL_EXTERNS_H */
Modified: head/sys/dev/twa/tw_cl_fwif.h
==============================================================================
--- head/sys/dev/twa/tw_cl_fwif.h Tue Sep 1 21:29:01 2020 (r365086)
+++ head/sys/dev/twa/tw_cl_fwif.h Tue Sep 1 21:29:23 2020 (r365087)
@@ -36,18 +36,14 @@
* Modifications by: Adam Radford
*/
-
-
#ifndef TW_CL_FWIF_H
#define TW_CL_FWIF_H
-
/*
* Macros and data structures for interfacing with the firmware.
*/
-
/* Register offsets from base address. */
#define TWA_CONTROL_REGISTER_OFFSET 0x0
#define TWA_STATUS_REGISTER_OFFSET 0x4
@@ -57,7 +53,6 @@
#define TWA_COMMAND_QUEUE_OFFSET_HIGH 0x24
#define TWA_LARGE_RESPONSE_QUEUE_OFFSET 0x30
-
/* Control register bit definitions. */
#define TWA_CONTROL_ISSUE_HOST_INTERRUPT 0x00000020
#define TWA_CONTROL_DISABLE_INTERRUPTS 0x00000040
@@ -73,7 +68,6 @@
#define TWA_CONTROL_CLEAR_QUEUE_ERROR 0x00400000
#define TWA_CONTROL_CLEAR_PARITY_ERROR 0x00800000
-
/* Status register bit definitions. */
#define TWA_STATUS_ROM_BIOS_IN_SBUF 0x00000002
#define TWA_STATUS_COMMAND_QUEUE_EMPTY 0x00001000
@@ -93,7 +87,6 @@
#define TWA_STATUS_UNEXPECTED_BITS 0x00D00000
-
/* PCI related defines. */
#define TWA_IO_CONFIG_REG 0x10
@@ -103,7 +96,6 @@
#define TWA_RESET_PHASE1_NOTIFICATION_RESPONSE 0xFFFF
#define TWA_RESET_PHASE1_WAIT_TIME_MS 500
-
/* Command packet opcodes. */
#define TWA_FW_CMD_NOP 0x00
#define TWA_FW_CMD_INIT_CONNECTION 0x01
@@ -134,7 +126,6 @@
#define TWA_FW_CMD_DIAGNOSTICS 0x1F
-
/* Misc defines. */
#define TWA_SHUTDOWN_MESSAGE_CREDITS 0x001
#define TWA_64BIT_SG_ADDRESSES 0x00000001
@@ -155,7 +146,6 @@
#define TWA_CTLR_FW_COMPATIBLE 0x00000002
#define TWA_SENSE_DATA_LENGTH 18
-
#define TWA_ARCH_ID(device_id) \
(((device_id) == TW_CL_DEVICE_ID_9K) ? TWA_ARCH_ID_9K : \
TWA_ARCH_ID_9K_X)
@@ -175,7 +165,6 @@
#define TWA_SG_ELEMENT_SIZE_FACTOR(device_id) \
(((device_id) == TW_CL_DEVICE_ID_9K) ? 512 : 4)
-
/*
* Some errors of interest (in cmd_hdr->status_block.error) when a command
* is completed by the firmware with a bad status.
@@ -184,13 +173,11 @@
#define TWA_ERROR_UNIT_OFFLINE 0x0128
#define TWA_ERROR_MORE_DATA 0x0231
-
/* AEN codes of interest. */
#define TWA_AEN_QUEUE_EMPTY 0x00
#define TWA_AEN_SOFT_RESET 0x01
#define TWA_AEN_SYNC_TIME_WITH_HOST 0x31
-
/* Table #'s and id's of parameters of interest in firmware's param table. */
#define TWA_PARAM_VERSION_TABLE 0x0402
#define TWA_PARAM_VERSION_FW 3 /* firmware version [16] */
@@ -205,7 +192,6 @@
#define TWA_9K_PARAM_DESCRIPTOR 0x8000
-
#pragma pack(1)
/* 7000 structures. */
struct tw_cl_command_init_connect {
@@ -224,7 +210,6 @@ struct tw_cl_command_init_connect {
TW_UINT32 result;
};
-
/* Structure for downloading firmware onto the controller. */
struct tw_cl_command_download_firmware {
TW_UINT8 sgl_off__opcode;/* 3:5 */
@@ -237,7 +222,6 @@ struct tw_cl_command_download_firmware {
TW_UINT8 sgl[1];
};
-
/* Structure for hard resetting the controller. */
struct tw_cl_command_reset_firmware {
TW_UINT8 res1__opcode; /* 3:5 */
@@ -250,7 +234,6 @@ struct tw_cl_command_reset_firmware {
TW_UINT8 param;
};
-
/* Structure for sending get/set param commands. */
struct tw_cl_command_param {
TW_UINT8 sgl_off__opcode;/* 3:5 */
@@ -263,7 +246,6 @@ struct tw_cl_command_param {
TW_UINT8 sgl[1];
};
-
/* Generic command packet. */
struct tw_cl_command_generic {
TW_UINT8 sgl_off__opcode;/* 3:5 */
@@ -275,7 +257,6 @@ struct tw_cl_command_generic {
TW_UINT16 count; /* block cnt, parameter cnt, message credits */
};
-
/* Command packet header. */
struct tw_cl_command_header {
TW_UINT8 sense_data[TWA_SENSE_DATA_LENGTH];
@@ -293,7 +274,6 @@ struct tw_cl_command_header {
} header_desc;
};
-
/* 7000 Command packet. */
union tw_cl_command_7k {
struct tw_cl_command_init_connect init_connect;
@@ -304,7 +284,6 @@ union tw_cl_command_7k {
TW_UINT8 padding[1024 - sizeof(struct tw_cl_command_header)];
};
-
/* 9000 Command Packet. */
struct tw_cl_command_9k {
TW_UINT8 res__opcode; /* 3:5 */
@@ -319,7 +298,6 @@ struct tw_cl_command_9k {
1024-sizeof(cmd_hdr) */
};
-
/* Full command packet. */
struct tw_cl_command_packet {
struct tw_cl_command_header cmd_hdr;
@@ -329,7 +307,6 @@ struct tw_cl_command_packet {
} command;
};
-
/* Structure describing payload for get/set param commands. */
struct tw_cl_param_9k {
TW_UINT16 table_id;
@@ -341,16 +318,13 @@ struct tw_cl_param_9k {
};
#pragma pack()
-
/* Functions to read from, and write to registers */
#define TW_CLI_WRITE_CONTROL_REGISTER(ctlr_handle, value) \
tw_osl_write_reg(ctlr_handle, TWA_CONTROL_REGISTER_OFFSET, value, 4)
-
#define TW_CLI_READ_STATUS_REGISTER(ctlr_handle) \
tw_osl_read_reg(ctlr_handle, TWA_STATUS_REGISTER_OFFSET, 4)
-
#define TW_CLI_WRITE_COMMAND_QUEUE(ctlr_handle, value) do { \
if (ctlr->flags & TW_CL_64BIT_ADDRESSES) { \
/* First write the low 4 bytes, then the high 4. */ \
@@ -363,15 +337,12 @@ struct tw_cl_param_9k {
(TW_UINT32)(value), 4); \
} while (0)
-
#define TW_CLI_READ_RESPONSE_QUEUE(ctlr_handle) \
tw_osl_read_reg(ctlr_handle, TWA_RESPONSE_QUEUE_OFFSET, 4)
-
#define TW_CLI_READ_LARGE_RESPONSE_QUEUE(ctlr_handle) \
tw_osl_read_reg(ctlr_handle, TWA_LARGE_RESPONSE_QUEUE_OFFSET, 4)
-
#define TW_CLI_SOFT_RESET(ctlr) \
TW_CLI_WRITE_CONTROL_REGISTER(ctlr, \
TWA_CONTROL_ISSUE_SOFT_RESET | \
@@ -386,7 +357,6 @@ struct tw_cl_param_9k {
((x & TWA_STATUS_UNEXPECTED_BITS) && \
(x & TWA_STATUS_MICROCONTROLLER_READY))
-
/*
* Functions for making transparent, the bit fields in firmware
* interface structures.
@@ -409,7 +379,6 @@ struct tw_cl_param_9k {
#define BUILD_LUN_H4__SGL_ENTRIES(lun, sgl_entries) \
(((lun << 8) & 0xF000) | (sgl_entries & 0xFFF)) /* 4:12 */
-
#define GET_OPCODE(sgl_off__opcode) \
(sgl_off__opcode & 0x1F) /* 3:5 */
@@ -445,7 +414,5 @@ struct tw_cl_param_9k {
#define GET_LUN_H4(lun_h4__sgl_entries) \
((lun_h4__sgl_entries >> 12) & 0xF) /* 4:12 */
-
-
#endif /* TW_CL_FWIF_H */
Modified: head/sys/dev/twa/tw_cl_init.c
==============================================================================
--- head/sys/dev/twa/tw_cl_init.c Tue Sep 1 21:29:01 2020 (r365086)
+++ head/sys/dev/twa/tw_cl_init.c Tue Sep 1 21:29:23 2020 (r365087)
@@ -37,12 +37,10 @@
* Modifications by: Manjunath Ranganathaiah
*/
-
/*
* Common Layer initialization functions.
*/
-
#include "tw_osl_share.h"
#include "tw_cl_share.h"
#include "tw_cl_fwif.h"
@@ -51,7 +49,6 @@
#include "tw_cl_externs.h"
#include "tw_osl_ioctl.h"
-
/*
* Function name: tw_cl_ctlr_supported
* Description: Determines if a controller is supported.
@@ -74,8 +71,6 @@ tw_cl_ctlr_supported(TW_INT32 vendor_id, TW_INT32 devi
return(TW_CL_FALSE);
}
-
-
/*
* Function name: tw_cl_get_pci_bar_info
* Description: Returns PCI BAR info.
@@ -150,8 +145,6 @@ tw_cl_get_pci_bar_info(TW_INT32 device_id, TW_INT32 ba
return(error);
}
-
-
/*
* Function name: tw_cl_get_mem_requirements
* Description: Provides info about Common Layer requirements for a
@@ -213,7 +206,6 @@ tw_cl_get_mem_requirements(struct tw_cl_ctlr_handle *c
(sizeof(struct tw_cli_req_context) * max_simult_reqs) +
(sizeof(struct tw_cl_event_packet) * max_aens);
-
/*
* Total DMA'able memory needed is the sum total of memory needed for
* all command packets (including the 1 needed for CL internal
@@ -227,8 +219,6 @@ tw_cl_get_mem_requirements(struct tw_cl_ctlr_handle *c
return(0);
}
-
-
/*
* Function name: tw_cl_init_ctlr
* Description: Initializes driver data structures for the controller.
@@ -357,7 +347,6 @@ tw_cl_init_ctlr(struct tw_cl_ctlr_handle *ctlr_handle,
/* Initialize the AEN queue. */
ctlr->aen_queue = (struct tw_cl_event_packet *)free_non_dma_mem;
-
start_ctlr:
/*
* Disable interrupts. Interrupts will be enabled in tw_cli_start_ctlr
@@ -545,7 +534,6 @@ tw_cli_start_ctlr(struct tw_cli_ctlr_context *ctlr)
return(TW_OSL_ESUCCESS);
}
-
/*
* Function name: tw_cl_shutdown_ctlr
* Description: Closes logical connection with the controller.
@@ -593,8 +581,6 @@ ret:
return(error);
}
-
-
/*
* Function name: tw_cli_init_connection
* Description: Sends init_connection cmd to firmware
@@ -708,5 +694,3 @@ out:
tw_cli_req_q_insert_tail(req, TW_CLI_FREE_Q);
return(error);
}
-
-
Modified: head/sys/dev/twa/tw_cl_intr.c
==============================================================================
--- head/sys/dev/twa/tw_cl_intr.c Tue Sep 1 21:29:01 2020 (r365086)
+++ head/sys/dev/twa/tw_cl_intr.c Tue Sep 1 21:29:23 2020 (r365087)
@@ -37,12 +37,10 @@
* Modifications by: Manjunath Ranganathaiah
*/
-
/*
* Common Layer interrupt handling functions.
*/
-
#include "tw_osl_share.h"
#include "tw_cl_share.h"
#include "tw_cl_fwif.h"
@@ -51,8 +49,6 @@
#include "tw_cl_externs.h"
#include "tw_osl_ioctl.h"
-
-
/*
* Function name: twa_interrupt
* Description: Interrupt handler. Determines the kind of interrupt,
@@ -122,8 +118,6 @@ out:
return(rc);
}
-
-
/*
* Function name: tw_cli_process_host_intr
* Description: This function gets called if we triggered an interrupt.
@@ -139,8 +133,6 @@ tw_cli_process_host_intr(struct tw_cli_ctlr_context *c
tw_cli_dbg_printf(6, ctlr->ctlr_handle, tw_osl_cur_func(), "entered");
}
-
-
/*
* Function name: tw_cli_process_attn_intr
* Description: This function gets called if the fw posted an AEN
@@ -175,8 +167,6 @@ tw_cli_process_attn_intr(struct tw_cli_ctlr_context *c
}
}
-
-
/*
* Function name: tw_cli_process_cmd_intr
* Description: This function gets called if we hit a queue full
@@ -202,8 +192,6 @@ tw_cli_process_cmd_intr(struct tw_cli_ctlr_context *ct
*/
}
-
-
/*
* Function name: tw_cli_process_resp_intr
* Description: Looks for cmd completions from fw; queues cmds completed
@@ -260,17 +248,14 @@ tw_cli_process_resp_intr(struct tw_cli_ctlr_context *c
tw_cli_req_q_remove_item(req, TW_CLI_BUSY_Q);
req->state = TW_CLI_REQ_STATE_COMPLETE;
tw_cli_req_q_insert_tail(req, TW_CLI_COMPLETE_Q);
-
}
/* Complete this, and other requests in the complete queue. */
tw_cli_process_complete_queue(ctlr);
-
+
return(error);
}
-
-
/*
* Function name: tw_cli_submit_pending_queue
* Description: Kick starts any requests in the pending queue.
@@ -287,7 +272,7 @@ tw_cli_submit_pending_queue(struct tw_cli_ctlr_context
TW_INT32 error = TW_OSL_ESUCCESS;
tw_cli_dbg_printf(3, ctlr->ctlr_handle, tw_osl_cur_func(), "entered");
-
+
/*
* Pull requests off the pending queue, and submit them.
*/
@@ -339,8 +324,6 @@ tw_cli_submit_pending_queue(struct tw_cli_ctlr_context
return(error);
}
-
-
/*
* Function name: tw_cli_process_complete_queue
* Description: Calls the CL internal callback routine, if any, for
@@ -368,8 +351,6 @@ tw_cli_process_complete_queue(struct tw_cli_ctlr_conte
}
}
-
-
/*
* Function name: tw_cli_complete_io
* Description: CL internal callback for SCSI/fw passthru requests.
@@ -418,8 +399,6 @@ out:
tw_cli_req_q_insert_tail(req, TW_CLI_FREE_Q);
}
-
-
/*
* Function name: tw_cli_scsi_complete
* Description: Completion routine for SCSI requests.
@@ -505,8 +484,6 @@ tw_cli_scsi_complete(struct tw_cli_req_context *req)
req_pkt->status |= TW_CL_ERR_REQ_SCSI_ERROR;
}
-
-
/*
* Function name: tw_cli_param_callback
* Description: Callback for get/set_param requests.
@@ -559,8 +536,6 @@ tw_cli_param_callback(struct tw_cli_req_context *req)
}
}
-
-
/*
* Function name: tw_cli_aen_callback
* Description: Callback for requests to fetch AEN's.
@@ -632,8 +607,6 @@ tw_cli_aen_callback(struct tw_cli_req_context *req)
}
}
-
-
/*
* Function name: tw_cli_manage_aen
* Description: Handles AEN's.
@@ -694,13 +667,11 @@ tw_cli_manage_aen(struct tw_cli_ctlr_context *ctlr,
break;
-
case TWA_AEN_QUEUE_EMPTY:
tw_cli_dbg_printf(4, ctlr->ctlr_handle, tw_osl_cur_func(),
"AEN queue empty");
break;
-
default:
/* Queue the event. */
@@ -714,8 +685,6 @@ tw_cli_manage_aen(struct tw_cli_ctlr_context *ctlr,
return(aen_code);
}
-
-
/*
* Function name: tw_cli_enable_interrupts
* Description: Enables interrupts on the controller
@@ -736,8 +705,6 @@ tw_cli_enable_interrupts(struct tw_cli_ctlr_context *c
TWA_CONTROL_ENABLE_INTERRUPTS);
}
-
-
/*
* Function name: twa_setup
* Description: Disables interrupts on the controller
@@ -755,4 +722,3 @@ tw_cli_disable_interrupts(struct tw_cli_ctlr_context *
TWA_CONTROL_DISABLE_INTERRUPTS);
ctlr->interrupts_enabled = TW_CL_FALSE;
}
-
Modified: head/sys/dev/twa/tw_cl_io.c
==============================================================================
--- head/sys/dev/twa/tw_cl_io.c Tue Sep 1 21:29:01 2020 (r365086)
+++ head/sys/dev/twa/tw_cl_io.c Tue Sep 1 21:29:23 2020 (r365087)
@@ -37,12 +37,10 @@
* Modifications by: Manjunath Ranganathaiah
*/
-
/*
* Common Layer I/O functions.
*/
-
#include "tw_osl_share.h"
#include "tw_cl_share.h"
#include "tw_cl_fwif.h"
@@ -55,8 +53,6 @@
#include <cam/cam_ccb.h>
#include <cam/cam_xpt_sim.h>
-
-
/*
* Function name: tw_cl_start_io
* Description: Interface to OS Layer for accepting SCSI requests.
@@ -155,8 +151,6 @@ tw_cl_start_io(struct tw_cl_ctlr_handle *ctlr_handle,
return(error);
}
-
-
/*
* Function name: tw_cli_submit_cmd
* Description: Submits a cmd to firmware.
@@ -247,8 +241,6 @@ tw_cli_submit_cmd(struct tw_cli_req_context *req)
return(error);
}
-
-
/*
* Function name: tw_cl_fw_passthru
* Description: Interface to OS Layer for accepting firmware
@@ -353,8 +345,6 @@ tw_cl_fw_passthru(struct tw_cl_ctlr_handle *ctlr_handl
return(error);
}
-
-
/*
* Function name: tw_cl_ioctl
* Description: Handler of CL supported ioctl cmds.
@@ -421,7 +411,6 @@ tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, u_l
break;
-
case TW_CL_IOCTL_GET_LAST_EVENT:
tw_cli_dbg_printf(3, ctlr_handle, tw_osl_cur_func(),
"Get Last Event");
@@ -457,7 +446,6 @@ tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, u_l
break;
-
case TW_CL_IOCTL_GET_NEXT_EVENT:
tw_cli_dbg_printf(3, ctlr_handle, tw_osl_cur_func(),
"Get Next Event");
@@ -535,7 +523,6 @@ tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, u_l
break;
-
case TW_CL_IOCTL_GET_PREVIOUS_EVENT:
tw_cli_dbg_printf(3, ctlr_handle, tw_osl_cur_func(),
"Get Previous Event");
@@ -598,7 +585,6 @@ tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, u_l
break;
-
case TW_CL_IOCTL_GET_LOCK:
{
struct tw_cl_lock_packet lock_pkt;
@@ -634,7 +620,6 @@ tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, u_l
break;
}
-
case TW_CL_IOCTL_RELEASE_LOCK:
tw_cli_dbg_printf(3, ctlr_handle, tw_osl_cur_func(),
"Release ioctl lock");
@@ -652,7 +637,6 @@ tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, u_l
}
break;
-
case TW_CL_IOCTL_GET_COMPATIBILITY_INFO:
{
struct tw_cl_compatibility_packet comp_pkt;
@@ -699,8 +683,6 @@ tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, u_l
return(error);
}
-
-
/*
* Function name: tw_cli_get_param
* Description: Get a firmware parameter.
@@ -816,8 +798,6 @@ out:
return(1);
}
-
-
/*
* Function name: tw_cli_set_param
* Description: Set a firmware parameter.
@@ -933,8 +913,6 @@ out:
return(error);
}
-
-
/*
* Function name: tw_cli_submit_and_poll_request
* Description: Sends down a firmware cmd, and waits for the completion
@@ -1034,8 +1012,6 @@ tw_cli_submit_and_poll_request(struct tw_cli_req_conte
return(TW_OSL_ETIMEDOUT);
}
-
-
/*
* Function name: tw_cl_reset_ctlr
* Description: Soft resets and then initializes the controller;
@@ -1062,7 +1038,6 @@ tw_cl_reset_ctlr(struct tw_cl_ctlr_handle *ctlr_handle
ctlr->reset_in_progress = TW_CL_TRUE;
twa_teardown_intr(sc);
-
/*
* Error back all requests in the complete, busy, and pending queues.
* If any request is already on its way to getting submitted, it's in
@@ -1159,8 +1134,6 @@ tw_cl_is_active(struct tw_cl_ctlr_handle *ctlr_handle)
return(ctlr->active);
}
-
-
/*
* Function name: tw_cli_soft_reset
* Description: Does the actual soft reset.
@@ -1253,7 +1226,7 @@ tw_cli_soft_reset(struct tw_cli_ctlr_context *ctlr)
tw_osl_free_lock(ctlr_handle, ctlr->io_lock);
return(error);
}
-
+
tw_osl_free_lock(ctlr_handle, ctlr->io_lock);
if ((error = tw_cli_drain_aen_queue(ctlr))) {
@@ -1264,7 +1237,7 @@ tw_cli_soft_reset(struct tw_cli_ctlr_context *ctlr)
"error = %d", error);
return(error);
}
-
+
if ((error = tw_cli_find_aen(ctlr, TWA_AEN_SOFT_RESET))) {
tw_cl_create_event(ctlr_handle, TW_CL_FALSE,
TW_CL_MESSAGE_SOURCE_COMMON_LAYER_EVENT,
@@ -1277,8 +1250,6 @@ tw_cli_soft_reset(struct tw_cli_ctlr_context *ctlr)
return(TW_OSL_ESUCCESS);
}
-
-
/*
* Function name: tw_cli_send_scsi_cmd
* Description: Sends down a scsi cmd to fw.
@@ -1350,8 +1321,6 @@ tw_cli_send_scsi_cmd(struct tw_cli_req_context *req, T
return(TW_OSL_ESUCCESS);
}
-
-
/*
* Function name: tw_cli_get_aen
* Description: Sends down a Request Sense cmd to fw to fetch an AEN.
@@ -1387,8 +1356,6 @@ tw_cli_get_aen(struct tw_cli_ctlr_context *ctlr)
return(error);
}
-
-
/*
* Function name: tw_cli_fill_sg_list
* Description: Fills in the scatter/gather list.
@@ -1438,4 +1405,3 @@ tw_cli_fill_sg_list(struct tw_cli_ctlr_context *ctlr,
}
}
}
-
Modified: head/sys/dev/twa/tw_cl_ioctl.h
==============================================================================
--- head/sys/dev/twa/tw_cl_ioctl.h Tue Sep 1 21:29:01 2020 (r365086)
+++ head/sys/dev/twa/tw_cl_ioctl.h Tue Sep 1 21:29:23 2020 (r365087)
@@ -36,18 +36,14 @@
* Modifications by: Adam Radford
*/
-
-
#ifndef TW_CL_IOCTL_H
#define TW_CL_IOCTL_H
-
/*
* Macros and structures for Common Layer handled ioctls.
*/
-
#define TW_CL_AEN_NOT_RETRIEVED 0x1
#define TW_CL_AEN_RETRIEVED 0x2
@@ -57,7 +53,6 @@
#define TW_CL_ERROR_IOCTL_LOCK_NOT_HELD 0x1001 /* Not locked */
#define TW_CL_ERROR_IOCTL_LOCK_ALREADY_HELD 0x1002 /* Already locked */
-
#pragma pack(1)
/* Structure used to handle GET/RELEASE LOCK ioctls. */
@@ -67,7 +62,6 @@ struct tw_cl_lock_packet {
TW_UINT32 force_flag;
};
-
/* Structure used to handle GET COMPATIBILITY INFO ioctl. */
struct tw_cl_compatibility_packet {
TW_UINT8 driver_version[32];/* driver version */
@@ -87,7 +81,6 @@ struct tw_cl_compatibility_packet {
TW_UINT16 fw_on_ctlr_build;/* build # of running firmware */
};
-
/* Driver understandable part of the ioctl packet built by the API. */
struct tw_cl_driver_packet {
TW_UINT32 control_code;
@@ -98,7 +91,6 @@ struct tw_cl_driver_packet {
TW_UINT32 buffer_length;
};
-
/* ioctl packet built by the API. */
struct tw_cl_ioctl_packet {
struct tw_cl_driver_packet driver_pkt;
@@ -108,7 +100,5 @@ struct tw_cl_ioctl_packet {
};
#pragma pack()
-
-
#endif /* TW_CL_IOCTL_H */
Modified: head/sys/dev/twa/tw_cl_misc.c
==============================================================================
--- head/sys/dev/twa/tw_cl_misc.c Tue Sep 1 21:29:01 2020 (r365086)
+++ head/sys/dev/twa/tw_cl_misc.c Tue Sep 1 21:29:23 2020 (r365087)
@@ -37,12 +37,10 @@
* Modifications by: Manjunath Ranganathaiah
*/
-
/*
* Common Layer miscellaneous functions.
*/
-
#include "tw_osl_share.h"
#include "tw_cl_share.h"
#include "tw_cl_fwif.h"
@@ -51,8 +49,6 @@
#include "tw_cl_externs.h"
#include "tw_osl_ioctl.h"
-
-
/* AEN severity table. */
TW_INT8 *tw_cli_severity_string_table[] = {
"None",
@@ -63,8 +59,6 @@ TW_INT8 *tw_cli_severity_string_table[] = {
""
};
-
-
/*
* Function name: tw_cli_drain_complete_queue
* Description: This function gets called during a controller reset.
@@ -117,8 +111,6 @@ tw_cli_drain_complete_queue(struct tw_cli_ctlr_context
} /* End of while loop */
}
-
-
/*
* Function name: tw_cli_drain_busy_queue
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-head
mailing list