Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: dgnc: clean up header comments

TODO file has task: remove unnecessary comments. Driver uses some
custom comment format. Driver would be better if it used kernel doc
format.

Audit header file comments. Replace struct comments with kernel doc
format comments. Remove unnecessary comments.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Tobin C. Harding and committed by
Greg Kroah-Hartman
e14047e4 bd801a07

+348 -234
+15 -21
drivers/staging/dgnc/dgnc_cls.h
··· 16 16 #ifndef __DGNC_CLS_H 17 17 #define __DGNC_CLS_H 18 18 19 - /************************************************************************ 20 - * Per channel/port Classic UART structure * 21 - ************************************************************************ 22 - * Base Structure Entries Usage Meanings to Host * 23 - * * 24 - * W = read write R = read only * 25 - * U = Unused. * 26 - ************************************************************************/ 27 - 28 - /* 29 - * txrx : WR RHR/THR - Holding reg 30 - * ier : WR IER - Interrupt Enable Reg 31 - * isr_fcr : WR ISR/FCR - Interrupt Status Reg/Fifo Control Reg 32 - * lcr : WR LCR - Line Control Reg 33 - * mcr : WR MCR - Modem Control Reg 34 - * lsr : WR LSR - Line Status Reg 35 - * msr : WR MSG - Modem Status Reg 36 - * spr : WR SPR - Scratch pad Reg 19 + /** 20 + * struct cls_uart_struct - Per channel/port Classic UART. 21 + * 22 + * key - W = read write 23 + * - R = read only 24 + * - U = unused 25 + * 26 + * @txrx: (WR) Holding Register. 27 + * @ier: (WR) Interrupt Enable Register. 28 + * @isr_fcr: (WR) Interrupt Status Register/Fifo Control Register. 29 + * @lcr: (WR) Line Control Register. 30 + * @mcr: (WR) Modem Control Register. 31 + * @lsr: (WR) Line Status Register. 32 + * @msr: (WR) Modem Status Register. 33 + * @spr: (WR) Scratch Pad Register. 37 34 */ 38 35 struct cls_uart_struct { 39 36 u8 txrx; ··· 71 74 #define UART_EXAR654_IER_RTSDTR 0x40 /* Output Interrupt Enable */ 72 75 #define UART_EXAR654_IER_CTSDSR 0x80 /* Input Interrupt Enable */ 73 76 74 - /* 75 - * Our Global Variables 76 - */ 77 77 extern struct board_ops dgnc_cls_ops; 78 78 79 79 #endif
+201 -134
drivers/staging/dgnc/dgnc_driver.h
··· 11 11 * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the 12 12 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 13 * PURPOSE. See the GNU General Public License for more details. 14 - * 15 - * Driver includes 16 14 */ 17 15 18 16 #ifndef __DGNC_DRIVER_H ··· 21 23 #include <linux/interrupt.h> 22 24 23 25 #include "digi.h" /* Digi specific ioctl header */ 24 - 25 - /* Driver defines */ 26 26 27 27 /* Driver identification and error statements */ 28 28 #define PROCSTR "dgnc" /* /proc entries */ ··· 49 53 #define PORT_NUM(dev) ((dev) & 0x7f) 50 54 #define IS_PRINT(dev) (((dev) & 0xff) >= 0x80) 51 55 52 - /* 53 - *MAX number of stop characters we will send 54 - * when our read queue is getting full 55 - */ 56 + /* MAX number of stop characters sent when our read queue is getting full */ 56 57 #define MAX_STOPS_SENT 5 57 58 58 59 /* 4 extra for alignment play space */ ··· 75 82 #endif 76 83 77 84 /* All the possible states the driver can be while being loaded. */ 78 - 79 85 enum { 80 86 DRIVER_INITIALIZED = 0, 81 87 DRIVER_READY 82 88 }; 83 89 84 90 /* All the possible states the board can be while booting up. */ 85 - 86 91 enum { 87 92 BOARD_FAILED = 0, 88 93 BOARD_FOUND, 89 94 BOARD_READY 90 95 }; 91 96 92 - /* Structures and closely related defines. */ 93 - 94 97 struct dgnc_board; 95 98 struct channel_t; 96 99 97 - /* Per board operations structure */ 98 - 100 + /** 101 + * struct board_ops - Per board operations. 102 + */ 99 103 struct board_ops { 100 104 void (*tasklet)(unsigned long data); 101 105 irqreturn_t (*intr)(int irq, void *voidbrd); ··· 118 128 119 129 #define BD_IS_PCI_EXPRESS 0x0001 /* Is a PCI Express board */ 120 130 121 - /* Per-board information */ 122 - 131 + /** 132 + * struct dgnc_board - Per board information. 133 + * @magic: Board magic number. 134 + * @boardnum: Board number (0 - 32). 135 + * 136 + * @type: Type of board. 137 + * @name: Product name. 138 + * @pdev: Pointer to the pci_dev structure. 139 + * @bd_flags: Board flags. 140 + * @vendor: PCI vendor ID. 141 + * @device: PCI device ID. 142 + * @subvendor: PCI subsystem vendor ID. 143 + * @subdevice: PCI subsystem device ID. 144 + * @rev: PCI revision ID. 145 + * @pci_bus: PCI bus value. 146 + * @pci_slot: PCI slot value. 147 + * @maxports: Maximum ports this board can handle. 148 + * @dvid: Board specific device ID. 149 + * @vpd: VPD of this board, if found. 150 + * @serial_num: Serial number of this board, if found in VPD. 151 + * @bd_lock: Used to protect board. 152 + * @bd_intr_lock: Protect poller tasklet and interrupt routine from each other. 153 + * @state: State of the card. 154 + * @state_wait: Queue to sleep on for state change. 155 + * @helper_tasklet: Poll helper tasklet. 156 + * @nasync: Number of ports on card. 157 + * @irq: Interrupt request number. 158 + * @membase: Start of base memory of the card. 159 + * @membase_end: End of base memory of the card. 160 + * @iobase: Start of IO base of the card. 161 + * @iobase_end: End of IO base of the card. 162 + * @bd_uart_offset: Space between each UART. 163 + * @channels: array of pointers to our channels. 164 + * @serial_driver: Pointer to the serial driver. 165 + * @serial_name: Serial driver name. 166 + * @print_dirver: Pointer to the print driver. 167 + * @print_name: Print driver name. 168 + * @dpatype: Board type as defined by DPA. 169 + * @dpastatus: Board status as defined by DPA. 170 + * @bd_dividend: Board/UART's specific dividend. 171 + * @bd_ops: Pointer to board operations structure. 172 + * @proc_entry_pointer: Proc/<board> entry 173 + * @dgnc_board_table: Proc/<board> entry 174 + */ 123 175 struct dgnc_board { 124 - int magic; /* Board Magic number. */ 125 - int boardnum; /* Board number: 0-32 */ 176 + int magic; 177 + int boardnum; 126 178 127 - int type; /* Type of board */ 128 - char *name; /* Product Name */ 129 - struct pci_dev *pdev; /* Pointer to the pci_dev struct */ 130 - unsigned long bd_flags; /* Board flags */ 131 - u16 vendor; /* PCI vendor ID */ 132 - u16 device; /* PCI device ID */ 133 - u16 subvendor; /* PCI subsystem vendor ID */ 134 - u16 subdevice; /* PCI subsystem device ID */ 135 - unsigned char rev; /* PCI revision ID */ 136 - uint pci_bus; /* PCI bus value */ 137 - uint pci_slot; /* PCI slot value */ 138 - uint maxports; /* MAX ports this board can handle */ 139 - unsigned char dvid; /* Board specific device id */ 140 - unsigned char vpd[128]; /* VPD of board, if found */ 141 - unsigned char serial_num[20]; /* Serial number of board, 142 - * if found in VPD 143 - */ 179 + int type; 180 + char *name; 181 + struct pci_dev *pdev; 182 + unsigned long bd_flags; 183 + u16 vendor; 184 + u16 device; 185 + u16 subvendor; 186 + u16 subdevice; 187 + unsigned char rev; 188 + uint pci_bus; 189 + uint pci_slot; 190 + uint maxports; 191 + unsigned char dvid; 192 + unsigned char vpd[128]; 193 + unsigned char serial_num[20]; 144 194 145 - spinlock_t bd_lock; /* Used to protect board */ 195 + /* used to protect the board */ 196 + spinlock_t bd_lock; 146 197 147 - spinlock_t bd_intr_lock; /* Used to protect the poller tasklet 148 - * and the interrupt routine from each 149 - * other. 150 - */ 198 + /* Protect poller tasklet and interrupt routine from each other. */ 199 + spinlock_t bd_intr_lock; 151 200 152 - uint state; /* State of card. */ 153 - wait_queue_head_t state_wait; /* Place to sleep on for state change */ 201 + uint state; 202 + wait_queue_head_t state_wait; 154 203 155 - struct tasklet_struct helper_tasklet; /* Poll helper tasklet */ 204 + struct tasklet_struct helper_tasklet; 156 205 157 - uint nasync; /* Number of ports on card */ 206 + uint nasync; 158 207 159 - uint irq; /* Interrupt request number */ 208 + uint irq; 160 209 161 - ulong membase; /* Start of base memory of the card */ 162 - ulong membase_end; /* End of base memory of the card */ 210 + ulong membase; 211 + ulong membase_end; 163 212 164 - u8 __iomem *re_map_membase; /* Remapped memory of the card */ 213 + u8 __iomem *re_map_membase; 165 214 166 - ulong iobase; /* Start of io base of the card */ 167 - ulong iobase_end; /* End of io base of the card */ 215 + ulong iobase; 216 + ulong iobase_end; 168 217 169 - uint bd_uart_offset; /* Space between each UART */ 218 + uint bd_uart_offset; 170 219 171 - struct channel_t *channels[MAXPORTS]; /* array of pointers 172 - * to our channels. 173 - */ 220 + struct channel_t *channels[MAXPORTS]; 174 221 175 222 struct tty_driver *serial_driver; 176 223 char serial_name[200]; 177 224 struct tty_driver *print_driver; 178 225 char print_name[200]; 179 226 180 - u16 dpatype; /* The board "type", 181 - * as defined by DPA 182 - */ 183 - u16 dpastatus; /* The board "status", 184 - * as defined by DPA 185 - */ 227 + u16 dpatype; 228 + u16 dpastatus; 186 229 187 - uint bd_dividend; /* Board/UARTs specific dividend */ 230 + uint bd_dividend; 188 231 189 232 struct board_ops *bd_ops; 190 233 191 - /* /proc/<board> entries */ 192 234 struct proc_dir_entry *proc_entry_pointer; 193 235 struct dgnc_proc_entry *dgnc_board_table; 194 236 ··· 243 221 244 222 struct device; 245 223 246 - /* Structure for terminal or printer unit. */ 224 + /** 225 + * struct un_t - terminal or printer unit 226 + * @magic: Unit magic number. 227 + * @un_open_count: Counter of opens to port. 228 + * @un_tty: Pointer to unit tty structure. 229 + * @un_flags: Unit flags. 230 + * @un_flags_wait: Place to sleep to wait on unit. 231 + * @un_dev: Minor device number. 232 + */ 247 233 struct un_t { 248 - int magic; /* Unit Magic Number. */ 234 + int magic; 249 235 struct channel_t *un_ch; 250 236 ulong un_time; 251 237 uint un_type; 252 - uint un_open_count; /* Counter of opens to port */ 253 - struct tty_struct *un_tty; /* Pointer to unit tty structure */ 254 - uint un_flags; /* Unit flags */ 255 - wait_queue_head_t un_flags_wait; /* Place to sleep to wait on unit */ 256 - uint un_dev; /* Minor device number */ 238 + uint un_open_count; 239 + struct tty_struct *un_tty; 240 + uint un_flags; 241 + wait_queue_head_t un_flags_wait; 242 + uint un_dev; 257 243 struct device *un_sysfs; 258 244 }; 259 245 ··· 293 263 #define EQUEUESIZE RQUEUESIZE 294 264 #define WQUEUESIZE (WQUEUEMASK + 1) 295 265 296 - /* Channel information structure. */ 266 + /** 267 + * struct channel_t - Channel information. 268 + * @magic: Channel magic number. 269 + * @dgnc_board: Pointer to board structure. 270 + * @ch_bd: Transparent print structure. 271 + * @ch_tun: Terminal unit information. 272 + * @ch_pun: Printer unit information. 273 + * @ch_lock: Provide for serialization. 274 + * @ch_flags_wait: Channel flags wait queue. 275 + * @ch_portnum: Port number, 0 offset. 276 + * @ch_open_count: Open count. 277 + * @ch_flags: Channel flags. 278 + * @ch_close_delay: How long we should drop RTS/DTR for. 279 + * @ch_cpstime: Time for CPS calculations. 280 + * @ch_c_iflag: Channel iflags. 281 + * @ch_c_cflag: Channel cflags. 282 + * @ch_c_oflag: Channel oflags. 283 + * @ch_c_lflag: Channel lflags. 284 + * @ch_stopc: Stop character. 285 + * @ch_startc: Start character. 286 + * @ch_old_baud: Cache of the current baud rate. 287 + * @ch_custom_speed: Custom baud rate, if set. 288 + * @ch_wopen: Waiting for open process count. 289 + * @ch_mostat: FEP output modem status. 290 + * @ch_mistat: FEP input modem status. 291 + * @chc_neo_uart: Pointer to the mapped neo UART struct 292 + * @ch_cls_uart: Pointer to the mapped cls UART struct 293 + * @ch_cached_lsr: Cached value of the LSR register. 294 + * @ch_rqueue: Read queue buffer, malloc'ed. 295 + * @ch_r_head: Head location of the read queue. 296 + * @ch_r_tail: Tail location of the read queue. 297 + * @ch_equeue: Error queue buffer, malloc'ed. 298 + * @ch_e_head: Head location of the error queue. 299 + * @ch_e_tail: Tail location of the error queue. 300 + * @ch_wqueue: Write queue buffer, malloc'ed. 301 + * @ch_w_head: Head location of the write queue. 302 + * @ch_w_tail: Tail location of the write queue. 303 + * @ch_rxcount: Total of data received so far. 304 + * @ch_txcount: Total of data transmitted so far. 305 + * @ch_r_tlevel: Receive trigger level. 306 + * @ch_t_tlevel: Transmit trigger level. 307 + * @ch_r_watermark: Receive water mark. 308 + * @ch_stop_sending_break: Time we should STOP sending a break. 309 + * @ch_stops_sent: How many times I have send a stop character to try 310 + * to stop the other guy sending. 311 + * @ch_err_parity: Count of parity 312 + * @ch_err_frame: Count of framing errors on channel. 313 + * @ch_err_break: Count of breaks on channel. 314 + * @ch_err_overrun: Count of overruns on channel. 315 + * @ch_xon_sends: Count of xons transmitted. 316 + * @ch_xoff_sends: Count of xoffs transmitted. 317 + * @proc_entry_pointer: Proc/<board>/<channel> entry. 318 + * @dgnc_channel_table: Proc/<board>/<channel> entry. 319 + */ 297 320 struct channel_t { 298 - int magic; /* Channel Magic Number */ 299 - struct dgnc_board *ch_bd; /* Board structure pointer */ 300 - struct digi_t ch_digi; /* Transparent Print structure */ 301 - struct un_t ch_tun; /* Terminal unit info */ 302 - struct un_t ch_pun; /* Printer unit info */ 321 + int magic; 322 + struct dgnc_board *ch_bd; 323 + struct digi_t ch_digi; 324 + struct un_t ch_tun; 325 + struct un_t ch_pun; 303 326 304 - spinlock_t ch_lock; /* provide for serialization */ 327 + spinlock_t ch_lock; /* provide for serialization */ 305 328 wait_queue_head_t ch_flags_wait; 306 329 307 - uint ch_portnum; /* Port number, 0 offset. */ 308 - uint ch_open_count; /* open count */ 309 - uint ch_flags; /* Channel flags */ 330 + uint ch_portnum; 331 + uint ch_open_count; 332 + uint ch_flags; 310 333 311 - ulong ch_close_delay; /* How long we should 312 - * drop RTS/DTR for 313 - */ 334 + ulong ch_close_delay; 314 335 315 - ulong ch_cpstime; /* Time for CPS calculations */ 336 + ulong ch_cpstime; 316 337 317 - tcflag_t ch_c_iflag; /* channel iflags */ 318 - tcflag_t ch_c_cflag; /* channel cflags */ 319 - tcflag_t ch_c_oflag; /* channel oflags */ 320 - tcflag_t ch_c_lflag; /* channel lflags */ 321 - unsigned char ch_stopc; /* Stop character */ 322 - unsigned char ch_startc; /* Start character */ 338 + tcflag_t ch_c_iflag; 339 + tcflag_t ch_c_cflag; 340 + tcflag_t ch_c_oflag; 341 + tcflag_t ch_c_lflag; 342 + unsigned char ch_stopc; 343 + unsigned char ch_startc; 323 344 324 - uint ch_old_baud; /* Cache of the current baud */ 325 - uint ch_custom_speed;/* Custom baud, if set */ 345 + uint ch_old_baud; 346 + uint ch_custom_speed; 326 347 327 - uint ch_wopen; /* Waiting for open process cnt */ 348 + uint ch_wopen; 328 349 329 - unsigned char ch_mostat; /* FEP output modem status */ 330 - unsigned char ch_mistat; /* FEP input modem status */ 350 + unsigned char ch_mostat; 351 + unsigned char ch_mistat; 331 352 332 - struct neo_uart_struct __iomem *ch_neo_uart; /* Pointer to the 333 - * "mapped" UART struct 334 - */ 335 - struct cls_uart_struct __iomem *ch_cls_uart; /* Pointer to the 336 - * "mapped" UART struct 337 - */ 353 + struct neo_uart_struct __iomem *ch_neo_uart; 354 + struct cls_uart_struct __iomem *ch_cls_uart; 338 355 339 - unsigned char ch_cached_lsr; /* Cached value of the LSR register */ 356 + unsigned char ch_cached_lsr; 340 357 341 - unsigned char *ch_rqueue; /* Our read queue buffer - malloc'ed */ 342 - ushort ch_r_head; /* Head location of the read queue */ 343 - ushort ch_r_tail; /* Tail location of the read queue */ 358 + unsigned char *ch_rqueue; 359 + ushort ch_r_head; 360 + ushort ch_r_tail; 344 361 345 - unsigned char *ch_equeue; /* Our error queue buffer - malloc'ed */ 346 - ushort ch_e_head; /* Head location of the error queue */ 347 - ushort ch_e_tail; /* Tail location of the error queue */ 362 + unsigned char *ch_equeue; 363 + ushort ch_e_head; 364 + ushort ch_e_tail; 348 365 349 - unsigned char *ch_wqueue; /* Our write queue buffer - malloc'ed */ 350 - ushort ch_w_head; /* Head location of the write queue */ 351 - ushort ch_w_tail; /* Tail location of the write queue */ 366 + unsigned char *ch_wqueue; 367 + ushort ch_w_head; 368 + ushort ch_w_tail; 352 369 353 - ulong ch_rxcount; /* total of data received so far */ 354 - ulong ch_txcount; /* total of data transmitted so far */ 370 + ulong ch_rxcount; 371 + ulong ch_txcount; 355 372 356 - unsigned char ch_r_tlevel; /* Receive Trigger level */ 357 - unsigned char ch_t_tlevel; /* Transmit Trigger level */ 373 + unsigned char ch_r_tlevel; 374 + unsigned char ch_t_tlevel; 358 375 359 - unsigned char ch_r_watermark; /* Receive Watermark */ 376 + unsigned char ch_r_watermark; 360 377 361 - ulong ch_stop_sending_break; /* Time we should STOP 362 - * sending a break 363 - */ 378 + ulong ch_stop_sending_break; 379 + uint ch_stops_sent; 364 380 365 - uint ch_stops_sent; /* How many times I have sent a stop 366 - * character to try to stop the other 367 - * guy sending. 368 - */ 369 - ulong ch_err_parity; /* Count of parity errors on channel */ 370 - ulong ch_err_frame; /* Count of framing errors on channel */ 371 - ulong ch_err_break; /* Count of breaks on channel */ 372 - ulong ch_err_overrun; /* Count of overruns on channel */ 381 + ulong ch_err_parity; 382 + ulong ch_err_frame; 383 + ulong ch_err_break; 384 + ulong ch_err_overrun; 373 385 374 - ulong ch_xon_sends; /* Count of xons transmitted */ 375 - ulong ch_xoff_sends; /* Count of xoffs transmitted */ 386 + ulong ch_xon_sends; 387 + ulong ch_xoff_sends; 376 388 377 - /* /proc/<board>/<channel> entries */ 378 389 struct proc_dir_entry *proc_entry_pointer; 379 390 struct dgnc_proc_entry *dgnc_channel_table; 380 391 381 392 }; 382 - 383 - /* Our Global Variables. */ 384 393 385 394 extern uint dgnc_major; /* Our driver/mgmt major */ 386 395 extern int dgnc_poll_tick; /* Poll interval - 20 ms */ 387 396 extern spinlock_t dgnc_global_lock; /* Driver global spinlock */ 388 397 extern spinlock_t dgnc_poll_lock; /* Poll scheduling lock */ 389 398 extern uint dgnc_num_boards; /* Total number of boards */ 390 - extern struct dgnc_board *dgnc_board[MAXBOARDS];/* Array of board 391 - * structs 392 - */ 399 + extern struct dgnc_board *dgnc_board[MAXBOARDS];/* Array of boards */ 393 400 394 401 #endif
+47 -30
drivers/staging/dgnc/dgnc_neo.h
··· 18 18 19 19 #include "dgnc_driver.h" 20 20 21 - /* 22 - * Per channel/port NEO UART structure 23 - * Base Structure Entries Usage Meanings to Host 21 + /** 22 + * struct neo_uart_struct - Per channel/port NEO UART structure 24 23 * 25 - * W = read write R = read only 26 - * U = Unused. 24 + * key - W = read write 25 + * - R = read only 26 + * - U = unused 27 + * 28 + * @txrx: (RW) Holding Register. 29 + * @ier: (RW) Interrupt Enable Register. 30 + * @isr_fcr: (RW) Interrupt Status Reg/Fifo Control Register. 31 + * @lcr: (RW) Line Control Register. 32 + * @mcr: (RW) Modem Control Register. 33 + * @lsr: (RW) Line Status Register. 34 + * @msr: (RW) Modem Status Register. 35 + * @spr: (RW) Scratch Pad Register. 36 + * @fctr: (RW) Feature Control Register. 37 + * @efr: (RW) Enhanced Function Register. 38 + * @tfifo: (RW) Transmit FIFO Register. 39 + * @rfifo: (RW) Receive FIFO Register. 40 + * @xoffchar1: (RW) XOff Character 1 Register. 41 + * @xoffchar2: (RW) XOff Character 2 Register. 42 + * @xonchar1: (RW) Xon Character 1 Register. 43 + * @xonchar2: (RW) XOn Character 2 Register. 44 + * @reserved1: (U) Reserved by Exar. 45 + * @txrxburst: (RW) 64 bytes of RX/TX FIFO Data. 46 + * @reserved2: (U) Reserved by Exar. 47 + * @rxburst_with_errors: (R) bytes of RX FIFO Data + LSR. 27 48 */ 28 - 29 49 struct neo_uart_struct { 30 - u8 txrx; /* WR RHR/THR - Holding Reg */ 31 - u8 ier; /* WR IER - Interrupt Enable Reg */ 32 - u8 isr_fcr; /* WR ISR/FCR - Interrupt Status Reg/Fifo 33 - * Control Reg 34 - */ 35 - u8 lcr; /* WR LCR - Line Control Reg */ 36 - u8 mcr; /* WR MCR - Modem Control Reg */ 37 - u8 lsr; /* WR LSR - Line Status Reg */ 38 - u8 msr; /* WR MSR - Modem Status Reg */ 39 - u8 spr; /* WR SPR - Scratch Pad Reg */ 40 - u8 fctr; /* WR FCTR - Feature Control Reg */ 41 - u8 efr; /* WR EFR - Enhanced Function Reg */ 42 - u8 tfifo; /* WR TXCNT/TXTRG - Transmit FIFO Reg */ 43 - u8 rfifo; /* WR RXCNT/RXTRG - Receive FIFO Reg */ 44 - u8 xoffchar1; /* WR XOFF 1 - XOff Character 1 Reg */ 45 - u8 xoffchar2; /* WR XOFF 2 - XOff Character 2 Reg */ 46 - u8 xonchar1; /* WR XON 1 - Xon Character 1 Reg */ 47 - u8 xonchar2; /* WR XON 2 - XOn Character 2 Reg */ 50 + u8 txrx; 51 + u8 ier; 52 + u8 isr_fcr; 48 53 49 - u8 reserved1[0x2ff - 0x200]; /* U Reserved by Exar */ 50 - u8 txrxburst[64]; /* RW 64 bytes of RX/TX FIFO Data */ 51 - u8 reserved2[0x37f - 0x340]; /* U Reserved by Exar */ 52 - u8 rxburst_with_errors[64]; /* R 64 bytes of RX FIFO Data + LSR */ 54 + u8 lcr; 55 + u8 mcr; 56 + u8 lsr; 57 + u8 msr; 58 + u8 spr; 59 + u8 fctr; 60 + u8 efr; 61 + u8 tfifo; 62 + u8 rfifo; 63 + u8 xoffchar1; 64 + u8 xoffchar2; 65 + u8 xonchar1; 66 + u8 xonchar2; 67 + 68 + u8 reserved1[0x2ff - 0x200]; 69 + u8 txrxburst[64]; 70 + u8 reserved2[0x37f - 0x340]; 71 + u8 rxburst_with_errors[64]; 53 72 }; 54 73 55 74 /* Where to read the extended interrupt register (32bits instead of 8bits) */ ··· 169 150 #define UART_17158_IER_XOFF 0x20 /* Xoff Interrupt Enable */ 170 151 #define UART_17158_IER_RTSDTR 0x40 /* Output Interrupt Enable */ 171 152 #define UART_17158_IER_CTSDSR 0x80 /* Input Interrupt Enable */ 172 - 173 - /* Our Global Variables */ 174 153 175 154 extern struct board_ops dgnc_neo_ops; 176 155
+4 -3
drivers/staging/dgnc/dgnc_pci.h
··· 16 16 #ifndef __DGNC_PCI_H 17 17 #define __DGNC_PCI_H 18 18 19 - #define PCIMAX 32 /* maximum number of PCI boards */ 19 + /* Maximum number of PCI boards */ 20 + #define PCIMAX 32 20 21 21 22 #define DIGI_VID 0x114F 22 23 ··· 60 59 #define PCI_DEVICE_NEO_EXPRESS_8RJ45_PCI_NAME "Neo 8 PCI Express RJ45" 61 60 #define PCI_DEVICE_NEO_EXPRESS_4_IBM_PCI_NAME "Neo 4 PCI Express IBM" 62 61 63 - /* Size of Memory and I/O for PCI (4 K) */ 62 + /* Size of memory and I/O for PCI (4 K) */ 64 63 #define PCI_RAM_SIZE 0x1000 65 64 66 - /* Size of Memory (2MB) */ 65 + /* Size of memory (2MB) */ 67 66 #define PCI_MEM_SIZE 0x1000 68 67 69 68 #endif
+81 -46
drivers/staging/dgnc/digi.h
··· 45 45 #define DIGI_SETAW (('e' << 8) | 96) /* Drain & set params */ 46 46 #define DIGI_SETAF (('e' << 8) | 97) /* Drain, flush & set params */ 47 47 #define DIGI_GET_NI_INFO (('d' << 8) | 250) /* Non-intelligent state info */ 48 - #define DIGI_LOOPBACK (('d' << 8) | 252) /* 49 - * Enable/disable UART 48 + #define DIGI_LOOPBACK (('d' << 8) | 252) /* Enable/disable UART 50 49 * internal loopback 51 50 */ 52 51 #define DIGI_FAST 0x0002 /* Fast baud rates */ ··· 63 64 /* 64 65 * Structure used with ioctl commands for DIGI parameters. 65 66 */ 67 + /** 68 + * struct digi_t - Ioctl commands for DIGI parameters. 69 + * @digi_flags: Flags. 70 + * @digi_maxcps: Maximum printer CPS. 71 + * @digi_maxchar: Maximum characters in the print queue. 72 + * @digi_bufsize: Buffer size. 73 + * @digi_onlen: Length of ON string. 74 + * @digi_offlen: Length of OFF string. 75 + * @digi_onstr: Printer ON string. 76 + * @digi_offstr: Printer OFF string. 77 + * @digi_term: Terminal string. 78 + */ 66 79 struct digi_t { 67 - unsigned short digi_flags; /* Flags (see above) */ 68 - unsigned short digi_maxcps; /* Max printer CPS */ 69 - unsigned short digi_maxchar; /* Max chars in print queue */ 70 - unsigned short digi_bufsize; /* Buffer size */ 71 - unsigned char digi_onlen; /* Length of ON string */ 72 - unsigned char digi_offlen; /* Length of OFF string */ 73 - char digi_onstr[DIGI_PLEN]; /* Printer on string */ 74 - char digi_offstr[DIGI_PLEN]; /* Printer off string */ 75 - char digi_term[DIGI_TSIZ]; /* terminal string */ 80 + unsigned short digi_flags; 81 + unsigned short digi_maxcps; 82 + unsigned short digi_maxchar; 83 + unsigned short digi_bufsize; 84 + unsigned char digi_onlen; 85 + unsigned char digi_offlen; 86 + char digi_onstr[DIGI_PLEN]; 87 + char digi_offstr[DIGI_PLEN]; 88 + char digi_term[DIGI_TSIZ]; 76 89 }; 77 90 78 - /* Structure to get driver status information */ 79 - 91 + /** 92 + * struct digi_dinfo - Driver status information. 93 + * @dinfo_nboards: Number of boards configured. 94 + * @dinfo_reserved: Not used, for future expansion. 95 + * @dinfio_version: Driver version. 96 + */ 80 97 struct digi_dinfo { 81 - unsigned int dinfo_nboards; /* # boards configured */ 82 - char dinfo_reserved[12]; /* for future expansion */ 83 - char dinfo_version[16]; /* driver version */ 98 + unsigned int dinfo_nboards; 99 + char dinfo_reserved[12]; 100 + char dinfo_version[16]; 84 101 }; 85 102 86 103 #define DIGI_GETDD (('d' << 8) | 248) /* get driver info */ 87 104 88 - /* 89 - * Structure used with ioctl commands for per-board information 105 + /** 106 + * struct digi_info - Ioctl commands for per board information. 90 107 * 91 - * physsize and memsize differ when board has "windowed" memory 108 + * Physsize and memsize differ when board has "windowed" memory. 109 + * 110 + * @info_bdnum: Board number (0 based). 111 + * @info_ioport: IO port address. 112 + * @indo_physaddr: Memory address. 113 + * @info_physize: Size of host memory window. 114 + * @info_memsize: Amount of dual-port memory on board. 115 + * @info_bdtype: Board type. 116 + * @info_nports: Number of ports. 117 + * @info_bdstate: Board state. 118 + * @info_reserved: Not used, for future expansion. 92 119 */ 93 120 struct digi_info { 94 - unsigned int info_bdnum; /* Board number (0 based) */ 95 - unsigned int info_ioport; /* io port address */ 96 - unsigned int info_physaddr; /* memory address */ 97 - unsigned int info_physsize; /* Size of host mem window */ 98 - unsigned int info_memsize; /* Amount of dual-port mem */ 99 - /* on board */ 100 - unsigned short info_bdtype; /* Board type */ 101 - unsigned short info_nports; /* number of ports */ 102 - char info_bdstate; /* board state */ 103 - char info_reserved[7]; /* for future expansion */ 121 + unsigned int info_bdnum; 122 + unsigned int info_ioport; 123 + unsigned int info_physaddr; 124 + unsigned int info_physsize; 125 + unsigned int info_memsize; 126 + unsigned short info_bdtype; 127 + unsigned short info_nports; 128 + char info_bdstate; 129 + char info_reserved[7]; 104 130 }; 105 131 106 132 #define DIGI_GETBD (('d' << 8) | 249) /* get board info */ 107 133 108 - struct digi_getbuffer /* Struct for holding buffer use counts */ 109 - { 134 + /** 135 + * struct digi_getbuffer - Holds buffer use counts. 136 + */ 137 + struct digi_getbuffer { 110 138 unsigned long tx_in; 111 139 unsigned long tx_out; 112 140 unsigned long rxbuf; ··· 141 115 unsigned long txdone; 142 116 }; 143 117 118 + /** 119 + * struct digi_getcounter 120 + * @norun: Number of UART overrun errors. 121 + * @noflow: Number of buffer overflow errors. 122 + * @nframe: Number of framing errors. 123 + * @nparity: Number of parity errors. 124 + * @nbreak: Number of breaks received. 125 + * @rbytes: Number of received bytes. 126 + * @tbytes: Number of transmitted bytes. 127 + */ 144 128 struct digi_getcounter { 145 - unsigned long norun; /* number of UART overrun errors */ 146 - unsigned long noflow; /* number of buffer overflow errors */ 147 - unsigned long nframe; /* number of framing errors */ 148 - unsigned long nparity; /* number of parity errors */ 149 - unsigned long nbreak; /* number of breaks received */ 150 - unsigned long rbytes; /* number of received bytes */ 151 - unsigned long tbytes; /* number of bytes transmitted fully */ 129 + unsigned long norun; 130 + unsigned long noflow; 131 + unsigned long nframe; 132 + unsigned long nparity; 133 + unsigned long nbreak; 134 + unsigned long rbytes; 135 + unsigned long tbytes; 152 136 }; 153 137 154 138 /* Board State Definitions */ ··· 173 137 #define DIGI_REALPORT_GETCOUNTERS (('e' << 8) | 110) 174 138 #define DIGI_REALPORT_GETEVENTS (('e' << 8) | 111) 175 139 176 - #define EV_OPU 0x0001 /* !<Output paused by client */ 177 - #define EV_OPS 0x0002 /* !<Output paused by regular sw flowctrl */ 178 - #define EV_IPU 0x0010 /* !<Input paused unconditionally by user */ 179 - #define EV_IPS 0x0020 /* !<Input paused by high/low water marks */ 180 - #define EV_TXB 0x0040 /* !<Transmit break pending */ 140 + #define EV_OPU 0x0001 /* Output paused by client */ 141 + #define EV_OPS 0x0002 /* Output paused by regular sw flowctrl */ 142 + #define EV_IPU 0x0010 /* Input paused unconditionally by user */ 143 + #define EV_IPS 0x0020 /* Input paused by high/low water marks */ 144 + #define EV_TXB 0x0040 /* Transmit break pending */ 181 145 182 - /* 183 - * This structure holds data needed for the intelligent <--> nonintelligent 184 - * DPA translation 146 + /** 147 + * struct ni_info - intelligent <--> non-intelligent DPA translation. 185 148 */ 186 149 struct ni_info { 187 150 int board;