aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/lasi_82596.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-13 13:24:59 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-13 13:24:59 -0400
commit6aa20a2235535605db6d6d2bd850298b2fe7f31e (patch)
treedf0b855043407b831d57f2f2c271f8aab48444f4 /drivers/net/lasi_82596.c
parent7a291083225af6e22ffaa46b3d91cfc1a1ccaab4 (diff)
drivers/net: Trim trailing whitespace
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/lasi_82596.c')
-rw-r--r--drivers/net/lasi_82596.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/net/lasi_82596.c b/drivers/net/lasi_82596.c
index 1ab09447baa5..da1eedef0b55 100644
--- a/drivers/net/lasi_82596.c
+++ b/drivers/net/lasi_82596.c
@@ -5,14 +5,14 @@
5 but there were too many hoops which HP wants jumped through to 5 but there were too many hoops which HP wants jumped through to
6 keep this code in there in a sane manner. 6 keep this code in there in a sane manner.
7 7
8 3 primary sources of the mess -- 8 3 primary sources of the mess --
9 1) hppa needs *lots* of cacheline flushing to keep this kind of 9 1) hppa needs *lots* of cacheline flushing to keep this kind of
10 MMIO running. 10 MMIO running.
11 11
12 2) The 82596 needs to see all of its pointers as their physical 12 2) The 82596 needs to see all of its pointers as their physical
13 address. Thus virt_to_bus/bus_to_virt are *everywhere*. 13 address. Thus virt_to_bus/bus_to_virt are *everywhere*.
14 14
15 3) The implementation HP is using seems to be significantly pickier 15 3) The implementation HP is using seems to be significantly pickier
16 about when and how the command and RX units are started. some 16 about when and how the command and RX units are started. some
17 command ordering was changed. 17 command ordering was changed.
18 18
@@ -21,7 +21,7 @@
21 full rewrite can be my guest. 21 full rewrite can be my guest.
22 22
23 Split 02/13/2000 Sam Creasey (sammy@oh.verio.com) 23 Split 02/13/2000 Sam Creasey (sammy@oh.verio.com)
24 24
25 02/01/2000 Initial modifications for parisc by Helge Deller (deller@gmx.de) 25 02/01/2000 Initial modifications for parisc by Helge Deller (deller@gmx.de)
26 03/02/2000 changes for better/correct(?) cache-flushing (deller) 26 03/02/2000 changes for better/correct(?) cache-flushing (deller)
27*/ 27*/
@@ -172,7 +172,7 @@
172#define PORT_ALTSCP 0x02 /* alternate SCB address */ 172#define PORT_ALTSCP 0x02 /* alternate SCB address */
173#define PORT_ALTDUMP 0x03 /* Alternate DUMP address */ 173#define PORT_ALTDUMP 0x03 /* Alternate DUMP address */
174 174
175static int i596_debug = (DEB_SERIOUS|DEB_PROBE); 175static int i596_debug = (DEB_SERIOUS|DEB_PROBE);
176 176
177MODULE_AUTHOR("Richard Hirst"); 177MODULE_AUTHOR("Richard Hirst");
178MODULE_DESCRIPTION("i82596 driver"); 178MODULE_DESCRIPTION("i82596 driver");
@@ -265,9 +265,9 @@ struct tx_cmd {
265 dma_addr_t dma_addr; 265 dma_addr_t dma_addr;
266#ifdef __LP64__ 266#ifdef __LP64__
267 u32 cache_pad[6]; /* Total 64 bytes... */ 267 u32 cache_pad[6]; /* Total 64 bytes... */
268#else 268#else
269 u32 cache_pad[1]; /* Total 32 bytes... */ 269 u32 cache_pad[1]; /* Total 32 bytes... */
270#endif 270#endif
271}; 271};
272 272
273struct tdr_cmd { 273struct tdr_cmd {
@@ -301,9 +301,9 @@ struct i596_rfd {
301 unsigned short size; 301 unsigned short size;
302 struct i596_rfd *v_next; /* Address from CPUs viewpoint */ 302 struct i596_rfd *v_next; /* Address from CPUs viewpoint */
303 struct i596_rfd *v_prev; 303 struct i596_rfd *v_prev;
304#ifndef __LP64__ 304#ifndef __LP64__
305 u32 cache_pad[2]; /* Total 32 bytes... */ 305 u32 cache_pad[2]; /* Total 32 bytes... */
306#endif 306#endif
307}; 307};
308 308
309struct i596_rbd { 309struct i596_rbd {
@@ -322,7 +322,7 @@ struct i596_rbd {
322 /* Total 32 bytes... */ 322 /* Total 32 bytes... */
323#ifdef __LP64__ 323#ifdef __LP64__
324 u32 cache_pad[4]; 324 u32 cache_pad[4];
325#endif 325#endif
326}; 326};
327 327
328/* These values as chosen so struct i596_private fits in one page... */ 328/* These values as chosen so struct i596_private fits in one page... */
@@ -605,7 +605,7 @@ static inline void remove_rx_bufs(struct net_device *dev)
605 if (rbd->skb == NULL) 605 if (rbd->skb == NULL)
606 break; 606 break;
607 dma_unmap_single(lp->dev, 607 dma_unmap_single(lp->dev,
608 (dma_addr_t)WSWAPchar(rbd->b_data), 608 (dma_addr_t)WSWAPchar(rbd->b_data),
609 PKT_BUF_SZ, DMA_FROM_DEVICE); 609 PKT_BUF_SZ, DMA_FROM_DEVICE);
610 dev_kfree_skb(rbd->skb); 610 dev_kfree_skb(rbd->skb);
611 } 611 }
@@ -643,7 +643,7 @@ static int init_i596_mem(struct net_device *dev)
643 printk("RESET 82596 port: %lx (with IRQ %d disabled)\n", 643 printk("RESET 82596 port: %lx (with IRQ %d disabled)\n",
644 (dev->base_addr + PA_I82596_RESET), 644 (dev->base_addr + PA_I82596_RESET),
645 dev->irq)); 645 dev->irq));
646 646
647 gsc_writel(0, (dev->base_addr + PA_I82596_RESET)); /* Hard Reset */ 647 gsc_writel(0, (dev->base_addr + PA_I82596_RESET)); /* Hard Reset */
648 udelay(100); /* Wait 100us - seems to help */ 648 udelay(100); /* Wait 100us - seems to help */
649 649
@@ -666,7 +666,7 @@ static int init_i596_mem(struct net_device *dev)
666 CHECK_WBACK(&(lp->scp), sizeof(struct i596_scp)); 666 CHECK_WBACK(&(lp->scp), sizeof(struct i596_scp));
667 CHECK_WBACK(&(lp->iscp), sizeof(struct i596_iscp)); 667 CHECK_WBACK(&(lp->iscp), sizeof(struct i596_iscp));
668 668
669 MPU_PORT(dev, PORT_ALTSCP, virt_to_dma(lp,&lp->scp)); 669 MPU_PORT(dev, PORT_ALTSCP, virt_to_dma(lp,&lp->scp));
670 670
671 CA(dev); 671 CA(dev);
672 672
@@ -755,7 +755,7 @@ static inline int i596_rx(struct net_device *dev)
755 } 755 }
756 DEB(DEB_RXFRAME, printk(" rfd %p, rfd.rbd %08x, rfd.stat %04x\n", 756 DEB(DEB_RXFRAME, printk(" rfd %p, rfd.rbd %08x, rfd.stat %04x\n",
757 rfd, rfd->rbd, rfd->stat)); 757 rfd, rfd->rbd, rfd->stat));
758 758
759 if (rbd != NULL && ((rfd->stat) & STAT_OK)) { 759 if (rbd != NULL && ((rfd->stat) & STAT_OK)) {
760 /* a good frame */ 760 /* a good frame */
761 int pkt_len = rbd->count & 0x3fff; 761 int pkt_len = rbd->count & 0x3fff;
@@ -996,7 +996,7 @@ static int i596_test(struct net_device *dev)
996 996
997 tint = (volatile int *)(&(lp->scp)); 997 tint = (volatile int *)(&(lp->scp));
998 data = virt_to_dma(lp,tint); 998 data = virt_to_dma(lp,tint);
999 999
1000 tint[1] = -1; 1000 tint[1] = -1;
1001 CHECK_WBACK(tint,PAGE_SIZE); 1001 CHECK_WBACK(tint,PAGE_SIZE);
1002 1002
@@ -1087,7 +1087,7 @@ static int i596_start_xmit(struct sk_buff *skb, struct net_device *dev)
1087 return 0; 1087 return 0;
1088 length = ETH_ZLEN; 1088 length = ETH_ZLEN;
1089 } 1089 }
1090 1090
1091 netif_stop_queue(dev); 1091 netif_stop_queue(dev);
1092 1092
1093 tx_cmd = lp->tx_cmds + lp->next_tx_cmd; 1093 tx_cmd = lp->tx_cmds + lp->next_tx_cmd;
@@ -1194,7 +1194,7 @@ static int __devinit i82596_probe(struct net_device *dev,
1194 printk(KERN_INFO "%s: MAC of HP700 LAN read from EEPROM\n", __FILE__); 1194 printk(KERN_INFO "%s: MAC of HP700 LAN read from EEPROM\n", __FILE__);
1195 } 1195 }
1196 1196
1197 dev->mem_start = (unsigned long) dma_alloc_noncoherent(gen_dev, 1197 dev->mem_start = (unsigned long) dma_alloc_noncoherent(gen_dev,
1198 sizeof(struct i596_private), &dma_addr, GFP_KERNEL); 1198 sizeof(struct i596_private), &dma_addr, GFP_KERNEL);
1199 if (!dev->mem_start) { 1199 if (!dev->mem_start) {
1200 printk(KERN_ERR "%s: Couldn't get shared memory\n", __FILE__); 1200 printk(KERN_ERR "%s: Couldn't get shared memory\n", __FILE__);
@@ -1233,7 +1233,7 @@ static int __devinit i82596_probe(struct net_device *dev,
1233 i = register_netdev(dev); 1233 i = register_netdev(dev);
1234 if (i) { 1234 if (i) {
1235 lp = dev->priv; 1235 lp = dev->priv;
1236 dma_free_noncoherent(lp->dev, sizeof(struct i596_private), 1236 dma_free_noncoherent(lp->dev, sizeof(struct i596_private),
1237 (void *)dev->mem_start, lp->dma_addr); 1237 (void *)dev->mem_start, lp->dma_addr);
1238 return i; 1238 return i;
1239 }; 1239 };
@@ -1400,7 +1400,7 @@ static irqreturn_t i596_interrupt(int irq, void *dev_id, struct pt_regs *regs)
1400 CHECK_WBACK(&lp->scb, sizeof(struct i596_scb)); 1400 CHECK_WBACK(&lp->scb, sizeof(struct i596_scb));
1401 1401
1402 /* DANGER: I suspect that some kind of interrupt 1402 /* DANGER: I suspect that some kind of interrupt
1403 acknowledgement aside from acking the 82596 might be needed 1403 acknowledgement aside from acking the 82596 might be needed
1404 here... but it's running acceptably without */ 1404 here... but it's running acceptably without */
1405 1405
1406 CA(dev); 1406 CA(dev);
@@ -1498,7 +1498,7 @@ static void set_multicast_list(struct net_device *dev)
1498 printk("%s: Only %d multicast addresses supported", 1498 printk("%s: Only %d multicast addresses supported",
1499 dev->name, cnt); 1499 dev->name, cnt);
1500 } 1500 }
1501 1501
1502 if (dev->mc_count > 0) { 1502 if (dev->mc_count > 0) {
1503 struct dev_mc_list *dmi; 1503 struct dev_mc_list *dmi;
1504 unsigned char *cp; 1504 unsigned char *cp;
@@ -1539,7 +1539,7 @@ lan_init_chip(struct parisc_device *dev)
1539 1539
1540 if (num_drivers == 0) 1540 if (num_drivers == 0)
1541 printk(KERN_INFO LASI_82596_DRIVER_VERSION "\n"); 1541 printk(KERN_INFO LASI_82596_DRIVER_VERSION "\n");
1542 1542
1543 if (!dev->irq) { 1543 if (!dev->irq) {
1544 printk(KERN_ERR "%s: IRQ not found for i82596 at 0x%lx\n", 1544 printk(KERN_ERR "%s: IRQ not found for i82596 at 0x%lx\n",
1545 __FILE__, dev->hpa.start); 1545 __FILE__, dev->hpa.start);
@@ -1602,15 +1602,15 @@ static void __exit lasi_82596_exit(void)
1602 for (i=0; i<MAX_DRIVERS; i++) { 1602 for (i=0; i<MAX_DRIVERS; i++) {
1603 struct i596_private *lp; 1603 struct i596_private *lp;
1604 struct net_device *netdevice; 1604 struct net_device *netdevice;
1605 1605
1606 netdevice = netdevs[i]; 1606 netdevice = netdevs[i];
1607 if (!netdevice) 1607 if (!netdevice)
1608 continue; 1608 continue;
1609 1609
1610 unregister_netdev(netdevice); 1610 unregister_netdev(netdevice);
1611 1611
1612 lp = netdevice->priv; 1612 lp = netdevice->priv;
1613 dma_free_noncoherent(lp->dev, sizeof(struct i596_private), 1613 dma_free_noncoherent(lp->dev, sizeof(struct i596_private),
1614 (void *)netdevice->mem_start, lp->dma_addr); 1614 (void *)netdevice->mem_start, lp->dma_addr);
1615 free_netdev(netdevice); 1615 free_netdev(netdevice);
1616 } 1616 }