@@ -118,8 +118,8 @@ MODULE_PARM_DESC(dumb_switch, "Assume switch is not connected to MDIO bus");
118
118
#define CPMAC_TX_ACK (channel ) (0x0640 + (channel) * 4)
119
119
#define CPMAC_RX_ACK (channel ) (0x0660 + (channel) * 4)
120
120
#define CPMAC_REG_END 0x0680
121
- /*
122
- * Rx/Tx statistics
121
+
122
+ / * Rx/Tx statistics
123
123
* TODO: use some of them to fill stats in cpmac_stats()
124
124
*/
125
125
#define CPMAC_STATS_RX_GOOD 0x0200
@@ -331,8 +331,7 @@ static void cpmac_set_multicast_list(struct net_device *dev)
331
331
cpmac_write (priv -> regs , CPMAC_MAC_HASH_LO , 0xffffffff );
332
332
cpmac_write (priv -> regs , CPMAC_MAC_HASH_HI , 0xffffffff );
333
333
} else {
334
- /*
335
- * cpmac uses some strange mac address hashing
334
+ /* cpmac uses some strange mac address hashing
336
335
* (not crc32)
337
336
*/
338
337
netdev_for_each_mc_addr (ha , dev ) {
@@ -432,10 +431,10 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
432
431
433
432
if ((desc -> dataflags & CPMAC_EOQ ) != 0 ) {
434
433
/* The last update to eoq->hw_next didn't happen
435
- * soon enough, and the receiver stopped here.
436
- * Remember this descriptor so we can restart
437
- * the receiver after freeing some space.
438
- */
434
+ * soon enough, and the receiver stopped here.
435
+ * Remember this descriptor so we can restart
436
+ * the receiver after freeing some space.
437
+ */
439
438
if (unlikely (restart )) {
440
439
if (netif_msg_rx_err (priv ))
441
440
printk (KERN_ERR "%s: poll found a"
@@ -457,25 +456,27 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
457
456
458
457
if (desc != priv -> rx_head ) {
459
458
/* We freed some buffers, but not the whole ring,
460
- * add what we did free to the rx list */
459
+ * add what we did free to the rx list
460
+ */
461
461
desc -> prev -> hw_next = (u32 )0 ;
462
462
priv -> rx_head -> prev -> hw_next = priv -> rx_head -> mapping ;
463
463
}
464
464
465
465
/* Optimization: If we did not actually process an EOQ (perhaps because
466
466
* of quota limits), check to see if the tail of the queue has EOQ set.
467
- * We should immediately restart in that case so that the receiver can
468
- * restart and run in parallel with more packet processing.
469
- * This lets us handle slightly larger bursts before running
470
- * out of ring space (assuming dev->weight < ring_size) */
467
+ * We should immediately restart in that case so that the receiver can
468
+ * restart and run in parallel with more packet processing.
469
+ * This lets us handle slightly larger bursts before running
470
+ * out of ring space (assuming dev->weight < ring_size)
471
+ */
471
472
472
473
if (!restart &&
473
474
(priv -> rx_head -> prev -> dataflags & (CPMAC_OWN |CPMAC_EOQ ))
474
475
== CPMAC_EOQ &&
475
476
(priv -> rx_head -> dataflags & CPMAC_OWN ) != 0 ) {
476
477
/* reset EOQ so the poll loop (above) doesn't try to
477
- * restart this when it eventually gets to this descriptor.
478
- */
478
+ * restart this when it eventually gets to this descriptor.
479
+ */
479
480
priv -> rx_head -> prev -> dataflags &= ~CPMAC_EOQ ;
480
481
restart = priv -> rx_head ;
481
482
}
@@ -506,7 +507,8 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
506
507
priv -> dev -> name , received );
507
508
if (processed == 0 ) {
508
509
/* we ran out of packets to read,
509
- * revert to interrupt-driven mode */
510
+ * revert to interrupt-driven mode
511
+ */
510
512
napi_complete (napi );
511
513
cpmac_write (priv -> regs , CPMAC_RX_INT_ENABLE , 1 );
512
514
return 0 ;
@@ -516,8 +518,8 @@ static int cpmac_poll(struct napi_struct *napi, int budget)
516
518
517
519
fatal_error :
518
520
/* Something went horribly wrong.
519
- * Reset hardware to try to recover rather than wedging. */
520
-
521
+ * Reset hardware to try to recover rather than wedging.
522
+ */
521
523
if (netif_msg_drv (priv )) {
522
524
printk (KERN_ERR "%s: cpmac_poll is confused. "
523
525
"Resetting hardware\n" , priv -> dev -> name );
@@ -751,7 +753,7 @@ static void cpmac_check_status(struct net_device *dev)
751
753
if (rx_code || tx_code ) {
752
754
if (netif_msg_drv (priv ) && net_ratelimit ()) {
753
755
/* Can't find any documentation on what these
754
- *error codes actually are. So just log them and hope..
756
+ * error codes actually are. So just log them and hope..
755
757
*/
756
758
if (rx_code )
757
759
printk (KERN_WARNING "%s: host error %d on rx "
0 commit comments