aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2009-12-03 02:58:21 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-03 16:18:01 -0500
commit8e95a2026f3b43f7c3d676adaccd2de9532e8dcc (patch)
tree3733318168cd512480b6db58c5c16d1c8847f0b7 /drivers/net/tulip
parent3454f835837609d60b29a266e3bd9d701073b060 (diff)
drivers/net: Move && and || to end of previous line
Only files where David Miller is the primary git-signer. wireless, wimax, ixgbe, etc are not modified. Compile tested x86 allyesconfig only Not all files compiled (not x86 compatible) Added a few > 80 column lines, which I ignored. Existing checkpatch complaints ignored. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip')
-rw-r--r--drivers/net/tulip/21142.c8
-rw-r--r--drivers/net/tulip/de2104x.c6
-rw-r--r--drivers/net/tulip/eeprom.c8
-rw-r--r--drivers/net/tulip/interrupt.c16
-rw-r--r--drivers/net/tulip/media.c4
-rw-r--r--drivers/net/tulip/pnic2.c6
-rw-r--r--drivers/net/tulip/tulip_core.c22
-rw-r--r--drivers/net/tulip/winbond-840.c8
8 files changed, 40 insertions, 38 deletions
diff --git a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c
index db7d5e11855d..9f6742fad6ca 100644
--- a/drivers/net/tulip/21142.c
+++ b/drivers/net/tulip/21142.c
@@ -209,10 +209,10 @@ void t21142_lnk_change(struct net_device *dev, int csr5)
209 printk(KERN_DEBUG "%s: Setting CSR6 %8.8x/%x CSR12 %8.8x.\n", 209 printk(KERN_DEBUG "%s: Setting CSR6 %8.8x/%x CSR12 %8.8x.\n",
210 dev->name, tp->csr6, ioread32(ioaddr + CSR6), 210 dev->name, tp->csr6, ioread32(ioaddr + CSR6),
211 ioread32(ioaddr + CSR12)); 211 ioread32(ioaddr + CSR12));
212 } else if ((tp->nwayset && (csr5 & 0x08000000) 212 } else if ((tp->nwayset && (csr5 & 0x08000000) &&
213 && (dev->if_port == 3 || dev->if_port == 5) 213 (dev->if_port == 3 || dev->if_port == 5) &&
214 && (csr12 & 2) == 2) || 214 (csr12 & 2) == 2) ||
215 (tp->nway && (csr5 & (TPLnkFail)))) { 215 (tp->nway && (csr5 & (TPLnkFail)))) {
216 /* Link blew? Maybe restart NWay. */ 216 /* Link blew? Maybe restart NWay. */
217 del_timer_sync(&tp->timer); 217 del_timer_sync(&tp->timer);
218 t21142_start_nway(dev); 218 t21142_start_nway(dev);
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 74e5ba42d38d..d4255d44cb75 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -62,9 +62,9 @@ module_param (debug, int, 0);
62MODULE_PARM_DESC (debug, "de2104x bitmapped message enable number"); 62MODULE_PARM_DESC (debug, "de2104x bitmapped message enable number");
63 63
64/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */ 64/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */
65#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \ 65#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) || \
66 || defined(CONFIG_SPARC) || defined(__ia64__) \ 66 defined(CONFIG_SPARC) || defined(__ia64__) || \
67 || defined(__sh__) || defined(__mips__) 67 defined(__sh__) || defined(__mips__)
68static int rx_copybreak = 1518; 68static int rx_copybreak = 1518;
69#else 69#else
70static int rx_copybreak = 100; 70static int rx_copybreak = 100;
diff --git a/drivers/net/tulip/eeprom.c b/drivers/net/tulip/eeprom.c
index 391acd32a6a5..889f57aae89b 100644
--- a/drivers/net/tulip/eeprom.c
+++ b/drivers/net/tulip/eeprom.c
@@ -174,10 +174,10 @@ void __devinit tulip_parse_eeprom(struct net_device *dev)
174 } 174 }
175 /* Do a fix-up based on the vendor half of the station address prefix. */ 175 /* Do a fix-up based on the vendor half of the station address prefix. */
176 for (i = 0; eeprom_fixups[i].name; i++) { 176 for (i = 0; eeprom_fixups[i].name; i++) {
177 if (dev->dev_addr[0] == eeprom_fixups[i].addr0 177 if (dev->dev_addr[0] == eeprom_fixups[i].addr0 &&
178 && dev->dev_addr[1] == eeprom_fixups[i].addr1 178 dev->dev_addr[1] == eeprom_fixups[i].addr1 &&
179 && dev->dev_addr[2] == eeprom_fixups[i].addr2) { 179 dev->dev_addr[2] == eeprom_fixups[i].addr2) {
180 if (dev->dev_addr[2] == 0xE8 && ee_data[0x1a] == 0x55) 180 if (dev->dev_addr[2] == 0xE8 && ee_data[0x1a] == 0x55)
181 i++; /* An Accton EN1207, not an outlaw Maxtech. */ 181 i++; /* An Accton EN1207, not an outlaw Maxtech. */
182 memcpy(ee_data + 26, eeprom_fixups[i].newtable, 182 memcpy(ee_data + 26, eeprom_fixups[i].newtable,
183 sizeof(eeprom_fixups[i].newtable)); 183 sizeof(eeprom_fixups[i].newtable));
diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c
index c8d220cf2cce..2e8e8ee893c7 100644
--- a/drivers/net/tulip/interrupt.c
+++ b/drivers/net/tulip/interrupt.c
@@ -170,8 +170,8 @@ int tulip_poll(struct napi_struct *napi, int budget)
170 RxDescCollisionSeen | 170 RxDescCollisionSeen |
171 RxDescRunt | 171 RxDescRunt |
172 RxDescDescErr | 172 RxDescDescErr |
173 RxWholePkt)) != RxWholePkt 173 RxWholePkt)) != RxWholePkt ||
174 || pkt_len > 1518) { 174 pkt_len > 1518) {
175 if ((status & (RxLengthOver2047 | 175 if ((status & (RxLengthOver2047 |
176 RxWholePkt)) != RxWholePkt) { 176 RxWholePkt)) != RxWholePkt) {
177 /* Ingore earlier buffers. */ 177 /* Ingore earlier buffers. */
@@ -201,8 +201,8 @@ int tulip_poll(struct napi_struct *napi, int budget)
201 201
202 /* Check if the packet is long enough to accept without copying 202 /* Check if the packet is long enough to accept without copying
203 to a minimally-sized skbuff. */ 203 to a minimally-sized skbuff. */
204 if (pkt_len < tulip_rx_copybreak 204 if (pkt_len < tulip_rx_copybreak &&
205 && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { 205 (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
206 skb_reserve(skb, 2); /* 16 byte align the IP header */ 206 skb_reserve(skb, 2); /* 16 byte align the IP header */
207 pci_dma_sync_single_for_cpu(tp->pdev, 207 pci_dma_sync_single_for_cpu(tp->pdev,
208 tp->rx_buffers[entry].mapping, 208 tp->rx_buffers[entry].mapping,
@@ -395,8 +395,8 @@ static int tulip_rx(struct net_device *dev)
395 RxDescCollisionSeen | 395 RxDescCollisionSeen |
396 RxDescRunt | 396 RxDescRunt |
397 RxDescDescErr | 397 RxDescDescErr |
398 RxWholePkt)) != RxWholePkt 398 RxWholePkt)) != RxWholePkt ||
399 || pkt_len > 1518) { 399 pkt_len > 1518) {
400 if ((status & (RxLengthOver2047 | 400 if ((status & (RxLengthOver2047 |
401 RxWholePkt)) != RxWholePkt) { 401 RxWholePkt)) != RxWholePkt) {
402 /* Ingore earlier buffers. */ 402 /* Ingore earlier buffers. */
@@ -425,8 +425,8 @@ static int tulip_rx(struct net_device *dev)
425 425
426 /* Check if the packet is long enough to accept without copying 426 /* Check if the packet is long enough to accept without copying
427 to a minimally-sized skbuff. */ 427 to a minimally-sized skbuff. */
428 if (pkt_len < tulip_rx_copybreak 428 if (pkt_len < tulip_rx_copybreak &&
429 && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { 429 (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
430 skb_reserve(skb, 2); /* 16 byte align the IP header */ 430 skb_reserve(skb, 2); /* 16 byte align the IP header */
431 pci_dma_sync_single_for_cpu(tp->pdev, 431 pci_dma_sync_single_for_cpu(tp->pdev,
432 tp->rx_buffers[entry].mapping, 432 tp->rx_buffers[entry].mapping,
diff --git a/drivers/net/tulip/media.c b/drivers/net/tulip/media.c
index daddfa51853e..d8fda83705bf 100644
--- a/drivers/net/tulip/media.c
+++ b/drivers/net/tulip/media.c
@@ -468,8 +468,8 @@ void __devinit tulip_find_mii (struct net_device *dev, int board_idx)
468 int phy = phyn & 0x1f; 468 int phy = phyn & 0x1f;
469 int mii_status = tulip_mdio_read (dev, phy, MII_BMSR); 469 int mii_status = tulip_mdio_read (dev, phy, MII_BMSR);
470 if ((mii_status & 0x8301) == 0x8001 || 470 if ((mii_status & 0x8301) == 0x8001 ||
471 ((mii_status & BMSR_100BASE4) == 0 471 ((mii_status & BMSR_100BASE4) == 0 &&
472 && (mii_status & 0x7800) != 0)) { 472 (mii_status & 0x7800) != 0)) {
473 /* preserve Becker logic, gain indentation level */ 473 /* preserve Becker logic, gain indentation level */
474 } else { 474 } else {
475 continue; 475 continue;
diff --git a/drivers/net/tulip/pnic2.c b/drivers/net/tulip/pnic2.c
index f49579128fb5..d8418694bf46 100644
--- a/drivers/net/tulip/pnic2.c
+++ b/drivers/net/tulip/pnic2.c
@@ -316,9 +316,9 @@ void pnic2_lnk_change(struct net_device *dev, int csr5)
316 } 316 }
317 } 317 }
318 318
319 if ((tp->nwayset && (csr5 & 0x08000000) 319 if ((tp->nwayset && (csr5 & 0x08000000) &&
320 && (dev->if_port == 3 || dev->if_port == 5) 320 (dev->if_port == 3 || dev->if_port == 5) &&
321 && (csr12 & 2) == 2) || (tp->nway && (csr5 & (TPLnkFail)))) { 321 (csr12 & 2) == 2) || (tp->nway && (csr5 & (TPLnkFail)))) {
322 322
323 /* Link blew? Maybe restart NWay. */ 323 /* Link blew? Maybe restart NWay. */
324 324
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index 0df983bc03a6..0fa3140d65bf 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -64,9 +64,9 @@ const char * const medianame[32] = {
64}; 64};
65 65
66/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */ 66/* Set the copy breakpoint for the copy-only-tiny-buffer Rx structure. */
67#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) \ 67#if defined(__alpha__) || defined(__arm__) || defined(__hppa__) || \
68 || defined(CONFIG_SPARC) || defined(__ia64__) \ 68 defined(CONFIG_SPARC) || defined(__ia64__) || \
69 || defined(__sh__) || defined(__mips__) 69 defined(__sh__) || defined(__mips__)
70static int rx_copybreak = 1518; 70static int rx_copybreak = 1518;
71#else 71#else
72static int rx_copybreak = 100; 72static int rx_copybreak = 100;
@@ -449,8 +449,8 @@ media_picked:
449 iowrite32(0x0201B078, ioaddr + 0xB8); 449 iowrite32(0x0201B078, ioaddr + 0xB8);
450 next_tick = 1*HZ; 450 next_tick = 1*HZ;
451 } 451 }
452 } else if ((tp->chip_id == MX98713 || tp->chip_id == COMPEX9881) 452 } else if ((tp->chip_id == MX98713 || tp->chip_id == COMPEX9881) &&
453 && ! tp->medialock) { 453 ! tp->medialock) {
454 dev->if_port = 0; 454 dev->if_port = 0;
455 tp->csr6 = 0x01880000 | (tp->full_duplex ? 0x0200 : 0); 455 tp->csr6 = 0x01880000 | (tp->full_duplex ? 0x0200 : 0);
456 iowrite32(0x0f370000 | ioread16(ioaddr + 0x80), ioaddr + 0x80); 456 iowrite32(0x0f370000 | ioread16(ioaddr + 0x80), ioaddr + 0x80);
@@ -535,9 +535,9 @@ static void tulip_tx_timeout(struct net_device *dev)
535 if (tulip_debug > 1) 535 if (tulip_debug > 1)
536 printk(KERN_WARNING "%s: Transmit timeout using MII device.\n", 536 printk(KERN_WARNING "%s: Transmit timeout using MII device.\n",
537 dev->name); 537 dev->name);
538 } else if (tp->chip_id == DC21140 || tp->chip_id == DC21142 538 } else if (tp->chip_id == DC21140 || tp->chip_id == DC21142 ||
539 || tp->chip_id == MX98713 || tp->chip_id == COMPEX9881 539 tp->chip_id == MX98713 || tp->chip_id == COMPEX9881 ||
540 || tp->chip_id == DM910X) { 540 tp->chip_id == DM910X) {
541 printk(KERN_WARNING "%s: 21140 transmit timed out, status %8.8x, " 541 printk(KERN_WARNING "%s: 21140 transmit timed out, status %8.8x, "
542 "SIA %8.8x %8.8x %8.8x %8.8x, resetting...\n", 542 "SIA %8.8x %8.8x %8.8x %8.8x, resetting...\n",
543 dev->name, ioread32(ioaddr + CSR5), ioread32(ioaddr + CSR12), 543 dev->name, ioread32(ioaddr + CSR5), ioread32(ioaddr + CSR12),
@@ -1538,8 +1538,10 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
1538 } 1538 }
1539 } 1539 }
1540 /* Lite-On boards have the address byte-swapped. */ 1540 /* Lite-On boards have the address byte-swapped. */
1541 if ((dev->dev_addr[0] == 0xA0 || dev->dev_addr[0] == 0xC0 || dev->dev_addr[0] == 0x02) 1541 if ((dev->dev_addr[0] == 0xA0 ||
1542 && dev->dev_addr[1] == 0x00) 1542 dev->dev_addr[0] == 0xC0 ||
1543 dev->dev_addr[0] == 0x02) &&
1544 dev->dev_addr[1] == 0x00)
1543 for (i = 0; i < 6; i+=2) { 1545 for (i = 0; i < 6; i+=2) {
1544 char tmp = dev->dev_addr[i]; 1546 char tmp = dev->dev_addr[i];
1545 dev->dev_addr[i] = dev->dev_addr[i+1]; 1547 dev->dev_addr[i] = dev->dev_addr[i+1];
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index 1a52729c9466..869a7a0005f9 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -1230,8 +1230,8 @@ static int netdev_rx(struct net_device *dev)
1230#endif 1230#endif
1231 /* Check if the packet is long enough to accept without copying 1231 /* Check if the packet is long enough to accept without copying
1232 to a minimally-sized skbuff. */ 1232 to a minimally-sized skbuff. */
1233 if (pkt_len < rx_copybreak 1233 if (pkt_len < rx_copybreak &&
1234 && (skb = dev_alloc_skb(pkt_len + 2)) != NULL) { 1234 (skb = dev_alloc_skb(pkt_len + 2)) != NULL) {
1235 skb_reserve(skb, 2); /* 16 byte align the IP header */ 1235 skb_reserve(skb, 2); /* 16 byte align the IP header */
1236 pci_dma_sync_single_for_cpu(np->pci_dev,np->rx_addr[entry], 1236 pci_dma_sync_single_for_cpu(np->pci_dev,np->rx_addr[entry],
1237 np->rx_skbuff[entry]->len, 1237 np->rx_skbuff[entry]->len,
@@ -1357,8 +1357,8 @@ static u32 __set_rx_mode(struct net_device *dev)
1357 memset(mc_filter, 0xff, sizeof(mc_filter)); 1357 memset(mc_filter, 0xff, sizeof(mc_filter));
1358 rx_mode = RxAcceptBroadcast | AcceptMulticast | RxAcceptAllPhys 1358 rx_mode = RxAcceptBroadcast | AcceptMulticast | RxAcceptAllPhys
1359 | AcceptMyPhys; 1359 | AcceptMyPhys;
1360 } else if ((dev->mc_count > multicast_filter_limit) 1360 } else if ((dev->mc_count > multicast_filter_limit) ||
1361 || (dev->flags & IFF_ALLMULTI)) { 1361 (dev->flags & IFF_ALLMULTI)) {
1362 /* Too many to match, or accept all multicasts. */ 1362 /* Too many to match, or accept all multicasts. */
1363 memset(mc_filter, 0xff, sizeof(mc_filter)); 1363 memset(mc_filter, 0xff, sizeof(mc_filter));
1364 rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; 1364 rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys;