@@ -184,8 +184,7 @@ static inline void write_zsdata(struct z8530_channel *c, u8 val)
184184/* Register loading parameters for a dead port
185185 */
186186
187- u8 z8530_dead_port [] =
188- {
187+ u8 z8530_dead_port [] = {
189188 255
190189};
191190EXPORT_SYMBOL (z8530_dead_port );
@@ -197,8 +196,7 @@ EXPORT_SYMBOL(z8530_dead_port);
197196 * "kilostream" service, and most other similar services.
198197 */
199198
200- u8 z8530_hdlc_kilostream [] =
201- {
199+ u8 z8530_hdlc_kilostream [] = {
202200 4 , SYNC_ENAB | SDLC | X1CLK ,
203201 2 , 0 , /* No vector */
204202 1 , 0 ,
@@ -220,8 +218,7 @@ EXPORT_SYMBOL(z8530_hdlc_kilostream);
220218/* As above but for enhanced chips.
221219 */
222220
223- u8 z8530_hdlc_kilostream_85230 [] =
224- {
221+ u8 z8530_hdlc_kilostream_85230 [] = {
225222 4 , SYNC_ENAB | SDLC | X1CLK ,
226223 2 , 0 , /* No vector */
227224 1 , 0 ,
@@ -260,8 +257,7 @@ static void z8530_flush_fifo(struct z8530_channel *c)
260257 read_zsreg (c , R1 );
261258 read_zsreg (c , R1 );
262259 read_zsreg (c , R1 );
263- if (c -> dev -> type == Z85230 )
264- {
260+ if (c -> dev -> type == Z85230 ) {
265261 read_zsreg (c , R1 );
266262 read_zsreg (c , R1 );
267263 read_zsreg (c , R1 );
@@ -317,8 +313,7 @@ static void z8530_rx(struct z8530_channel *c)
317313{
318314 u8 ch , stat ;
319315
320- while (1 )
321- {
316+ while (1 ) {
322317 /* FIFO empty ? */
323318 if (!(read_zsreg (c , R0 ) & 1 ))
324319 break ;
@@ -327,29 +322,24 @@ static void z8530_rx(struct z8530_channel *c)
327322
328323 /* Overrun ?
329324 */
330- if (c -> count < c -> max )
331- {
325+ if (c -> count < c -> max ) {
332326 * c -> dptr ++ = ch ;
333327 c -> count ++ ;
334328 }
335329
336- if (stat & END_FR )
337- {
330+ if (stat & END_FR ) {
338331 /* Error ?
339332 */
340- if (stat & (Rx_OVR | CRC_ERR ))
341- {
333+ if (stat & (Rx_OVR | CRC_ERR )) {
342334 /* Rewind the buffer and return */
343335 if (c -> skb )
344336 c -> dptr = c -> skb -> data ;
345337 c -> count = 0 ;
346- if (stat & Rx_OVR )
347- {
338+ if (stat & Rx_OVR ) {
348339 pr_warn ("%s: overrun\n" , c -> dev -> name );
349340 c -> rx_overrun ++ ;
350341 }
351- if (stat & CRC_ERR )
352- {
342+ if (stat & CRC_ERR ) {
353343 c -> rx_crc_err ++ ;
354344 /* printk("crc error\n"); */
355345 }
@@ -391,8 +381,7 @@ static void z8530_tx(struct z8530_channel *c)
391381 write_zsreg (c , R8 , * c -> tx_ptr ++ );
392382 write_zsctrl (c , RES_H_IUS );
393383 /* We are about to underflow */
394- if (c -> txcount == 0 )
395- {
384+ if (c -> txcount == 0 ) {
396385 write_zsctrl (c , RES_EOM_L );
397386 write_zsreg (c , R10 , c -> regs [10 ] & ~ABUNDER );
398387 }
@@ -433,8 +422,7 @@ static void z8530_status(struct z8530_channel *chan)
433422 z8530_tx_done (chan );
434423 }
435424
436- if (altered & chan -> dcdcheck )
437- {
425+ if (altered & chan -> dcdcheck ) {
438426 if (status & chan -> dcdcheck ) {
439427 pr_info ("%s: DCD raised\n" , chan -> dev -> name );
440428 write_zsreg (chan , R3 , chan -> regs [3 ] | RxENABLE );
@@ -471,8 +459,7 @@ EXPORT_SYMBOL(z8530_sync);
471459
472460static void z8530_dma_rx (struct z8530_channel * chan )
473461{
474- if (chan -> rxdma_on )
475- {
462+ if (chan -> rxdma_on ) {
476463 /* Special condition check only */
477464 u8 status ;
478465
@@ -501,8 +488,7 @@ static void z8530_dma_rx(struct z8530_channel *chan)
501488 */
502489static void z8530_dma_tx (struct z8530_channel * chan )
503490{
504- if (!chan -> dma_tx )
505- {
491+ if (!chan -> dma_tx ) {
506492 pr_warn ("Hey who turned the DMA off?\n" );
507493 z8530_tx (chan );
508494 return ;
@@ -530,10 +516,8 @@ static void z8530_dma_status(struct z8530_channel *chan)
530516
531517 chan -> status = status ;
532518
533- if (chan -> dma_tx )
534- {
535- if (status & TxEOM )
536- {
519+ if (chan -> dma_tx ) {
520+ if (status & TxEOM ) {
537521 unsigned long flags ;
538522
539523 flags = claim_dma_lock ();
@@ -545,8 +529,7 @@ static void z8530_dma_status(struct z8530_channel *chan)
545529 }
546530 }
547531
548- if (altered & chan -> dcdcheck )
549- {
532+ if (altered & chan -> dcdcheck ) {
550533 if (status & chan -> dcdcheck ) {
551534 pr_info ("%s: DCD raised\n" , chan -> dev -> name );
552535 write_zsreg (chan , R3 , chan -> regs [3 ] | RxENABLE );
@@ -668,17 +651,15 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id)
668651 int work = 0 ;
669652 struct z8530_irqhandler * irqs ;
670653
671- if (locker )
672- {
654+ if (locker ) {
673655 pr_err ("IRQ re-enter\n" );
674656 return IRQ_NONE ;
675657 }
676658 locker = 1 ;
677659
678660 spin_lock (& dev -> lock );
679661
680- while (++ work < 5000 )
681- {
662+ while (++ work < 5000 ) {
682663 intr = read_zsreg (& dev -> chanA , R3 );
683664 if (!(intr &
684665 (CHARxIP | CHATxIP | CHAEXT | CHBRxIP | CHBTxIP | CHBEXT )))
@@ -694,8 +675,7 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id)
694675
695676 irqs = dev -> chanA .irqs ;
696677
697- if (intr & (CHARxIP | CHATxIP | CHAEXT ))
698- {
678+ if (intr & (CHARxIP | CHATxIP | CHAEXT )) {
699679 if (intr & CHARxIP )
700680 irqs -> rx (& dev -> chanA );
701681 if (intr & CHATxIP )
@@ -706,8 +686,7 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id)
706686
707687 irqs = dev -> chanB .irqs ;
708688
709- if (intr & (CHBRxIP | CHBTxIP | CHBEXT ))
710- {
689+ if (intr & (CHBRxIP | CHBTxIP | CHBEXT )) {
711690 if (intr & CHBRxIP )
712691 irqs -> rx (& dev -> chanB );
713692 if (intr & CHBTxIP )
@@ -726,8 +705,7 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id)
726705}
727706EXPORT_SYMBOL (z8530_interrupt );
728707
729- static const u8 reg_init [16 ] =
730- {
708+ static const u8 reg_init [16 ] = {
731709 0 , 0 , 0 , 0 ,
732710 0 , 0 , 0 , 0 ,
733711 0 , 0 , 0 , 0 ,
@@ -834,8 +812,7 @@ int z8530_sync_dma_open(struct net_device *dev, struct z8530_channel *c)
834812 c -> rx_buf [1 ] = c -> rx_buf [0 ] + PAGE_SIZE / 2 ;
835813
836814 c -> tx_dma_buf [0 ] = (void * )get_zeroed_page (GFP_KERNEL | GFP_DMA );
837- if (!c -> tx_dma_buf [0 ])
838- {
815+ if (!c -> tx_dma_buf [0 ]) {
839816 free_page ((unsigned long )c -> rx_buf [0 ]);
840817 c -> rx_buf [0 ] = NULL ;
841818 return - ENOBUFS ;
@@ -957,13 +934,11 @@ int z8530_sync_dma_close(struct net_device *dev, struct z8530_channel *c)
957934 c -> regs [R14 ] &= ~DTRREQ ;
958935 write_zsreg (c , R14 , c -> regs [R14 ]);
959936
960- if (c -> rx_buf [0 ])
961- {
937+ if (c -> rx_buf [0 ]) {
962938 free_page ((unsigned long )c -> rx_buf [0 ]);
963939 c -> rx_buf [0 ] = NULL ;
964940 }
965- if (c -> tx_dma_buf [0 ])
966- {
941+ if (c -> tx_dma_buf [0 ]) {
967942 free_page ((unsigned long )c -> tx_dma_buf [0 ]);
968943 c -> tx_dma_buf [0 ] = NULL ;
969944 }
@@ -1113,8 +1088,7 @@ int z8530_sync_txdma_close(struct net_device *dev, struct z8530_channel *c)
11131088 c -> regs [R14 ] &= ~DTRREQ ;
11141089 write_zsreg (c , R14 , c -> regs [R14 ]);
11151090
1116- if (c -> tx_dma_buf [0 ])
1117- {
1091+ if (c -> tx_dma_buf [0 ]) {
11181092 free_page ((unsigned long )c -> tx_dma_buf [0 ]);
11191093 c -> tx_dma_buf [0 ] = NULL ;
11201094 }
@@ -1192,8 +1166,7 @@ static inline int do_z8530_init(struct z8530_dev *dev)
11921166 * the chip is enhanced.
11931167 */
11941168
1195- if (read_zsreg (& dev -> chanA , R15 ) == 0x01 )
1196- {
1169+ if (read_zsreg (& dev -> chanA , R15 ) == 0x01 ) {
11971170 /* This C30 versus 230 detect is from Klaus Kudielka's dmascc */
11981171 /* Put a char in the fifo */
11991172 write_zsreg (& dev -> chanA , R8 , 0 );
@@ -1297,8 +1270,7 @@ int z8530_channel_load(struct z8530_channel *c, u8 *rtable)
12971270
12981271 spin_lock_irqsave (c -> lock , flags );
12991272
1300- while (* rtable != 255 )
1301- {
1273+ while (* rtable != 255 ) {
13021274 int reg = * rtable ++ ;
13031275
13041276 if (reg > 0x0F )
@@ -1349,17 +1321,14 @@ static void z8530_tx_begin(struct z8530_channel *c)
13491321 c -> tx_next_skb = NULL ;
13501322 c -> tx_ptr = c -> tx_next_ptr ;
13511323
1352- if (!c -> tx_skb )
1353- {
1324+ if (!c -> tx_skb ) {
13541325 /* Idle on */
1355- if (c -> dma_tx )
1356- {
1326+ if (c -> dma_tx ) {
13571327 flags = claim_dma_lock ();
13581328 disable_dma (c -> txdma );
13591329 /* Check if we crapped out.
13601330 */
1361- if (get_dma_residue (c -> txdma ))
1362- {
1331+ if (get_dma_residue (c -> txdma )) {
13631332 c -> netdevice -> stats .tx_dropped ++ ;
13641333 c -> netdevice -> stats .tx_fifo_errors ++ ;
13651334 }
@@ -1369,8 +1338,7 @@ static void z8530_tx_begin(struct z8530_channel *c)
13691338 } else {
13701339 c -> txcount = c -> tx_skb -> len ;
13711340
1372- if (c -> dma_tx )
1373- {
1341+ if (c -> dma_tx ) {
13741342 /* FIXME. DMA is broken for the original 8530,
13751343 * on the older parts we need to set a flag and
13761344 * wait for a further TX interrupt to fire this
@@ -1383,8 +1351,7 @@ static void z8530_tx_begin(struct z8530_channel *c)
13831351 /* These two are needed by the 8530/85C30
13841352 * and must be issued when idling.
13851353 */
1386- if (c -> dev -> type != Z85230 )
1387- {
1354+ if (c -> dev -> type != Z85230 ) {
13881355 write_zsctrl (c , RES_Tx_CRC );
13891356 write_zsctrl (c , RES_EOM_L );
13901357 }
@@ -1472,8 +1439,7 @@ static void z8530_rx_done(struct z8530_channel *c)
14721439
14731440 /* Is our receive engine in DMA mode
14741441 */
1475- if (c -> rxdma_on )
1476- {
1442+ if (c -> rxdma_on ) {
14771443 /* Save the ready state and the buffer currently
14781444 * being used as the DMA target
14791445 */
@@ -1497,8 +1463,7 @@ static void z8530_rx_done(struct z8530_channel *c)
14971463 * into it immediately.
14981464 */
14991465
1500- if (ready )
1501- {
1466+ if (ready ) {
15021467 c -> dma_num ^= 1 ;
15031468 set_dma_mode (c -> rxdma , DMA_MODE_READ | 0x10 );
15041469 set_dma_addr (c -> rxdma , virt_to_bus (c -> rx_buf [c -> dma_num ]));
@@ -1630,8 +1595,7 @@ netdev_tx_t z8530_queue_xmit(struct z8530_channel *c, struct sk_buff *skb)
16301595
16311596 if (c -> dma_tx &&
16321597 ((unsigned long )(virt_to_bus (skb -> data + skb -> len )) >=
1633- 16 * 1024 * 1024 || spans_boundary (skb )))
1634- {
1598+ 16 * 1024 * 1024 || spans_boundary (skb ))) {
16351599 /* Send the flip buffer, and flip the flippy bit.
16361600 * We don't care which is used when just so long as
16371601 * we never use the same buffer twice in a row. Since
0 commit comments