diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2008-04-17 00:09:29 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-17 00:09:29 -0400 |
commit | 2ba3f56eb402672ff83601b5990b219d39577636 (patch) | |
tree | e2cf827ad8f4eae85d1b9f688d2617cf580dae2b /drivers/infiniband | |
parent | afd9970f957454782795b23c89fd6d7dde973cc0 (diff) |
IB/ipath: Fix some white space and code style issues
This patch makes some white space changes and minor non-functional
changes to more closely match the code in OFED-1.3.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_driver.c | 29 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_init_chip.c | 7 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_intr.c | 16 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_kernel.h | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_registers.h | 4 | ||||
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_stats.c | 13 |
6 files changed, 38 insertions, 35 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index 216da97eddd4..58fcb355f59f 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -627,7 +627,8 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, | |||
627 | goto bail; | 627 | goto bail; |
628 | 628 | ||
629 | bail_irqsetup: | 629 | bail_irqsetup: |
630 | if (pdev->irq) free_irq(pdev->irq, dd); | 630 | if (pdev->irq) |
631 | free_irq(pdev->irq, dd); | ||
631 | 632 | ||
632 | bail_iounmap: | 633 | bail_iounmap: |
633 | iounmap((volatile void __iomem *) dd->ipath_kregbase); | 634 | iounmap((volatile void __iomem *) dd->ipath_kregbase); |
@@ -1704,7 +1705,10 @@ bail: | |||
1704 | void ipath_cancel_sends(struct ipath_devdata *dd, int restore_sendctrl) | 1705 | void ipath_cancel_sends(struct ipath_devdata *dd, int restore_sendctrl) |
1705 | { | 1706 | { |
1706 | ipath_dbg("Cancelling all in-progress send buffers\n"); | 1707 | ipath_dbg("Cancelling all in-progress send buffers\n"); |
1707 | dd->ipath_lastcancel = jiffies+HZ/2; /* skip armlaunch errs a bit */ | 1708 | |
1709 | /* skip armlaunch errs for a while */ | ||
1710 | dd->ipath_lastcancel = jiffies + HZ / 2; | ||
1711 | |||
1708 | /* | 1712 | /* |
1709 | * the abort bit is auto-clearing. We read scratch to be sure | 1713 | * the abort bit is auto-clearing. We read scratch to be sure |
1710 | * that cancels and the abort have taken effect in the chip. | 1714 | * that cancels and the abort have taken effect in the chip. |
@@ -2070,9 +2074,8 @@ void ipath_set_led_override(struct ipath_devdata *dd, unsigned int val) | |||
2070 | dd->ipath_led_override_timer.data = (unsigned long) dd; | 2074 | dd->ipath_led_override_timer.data = (unsigned long) dd; |
2071 | dd->ipath_led_override_timer.expires = jiffies + 1; | 2075 | dd->ipath_led_override_timer.expires = jiffies + 1; |
2072 | add_timer(&dd->ipath_led_override_timer); | 2076 | add_timer(&dd->ipath_led_override_timer); |
2073 | } else { | 2077 | } else |
2074 | atomic_dec(&dd->ipath_led_override_timer_active); | 2078 | atomic_dec(&dd->ipath_led_override_timer_active); |
2075 | } | ||
2076 | } | 2079 | } |
2077 | 2080 | ||
2078 | /** | 2081 | /** |
@@ -2220,12 +2223,12 @@ void ipath_free_pddata(struct ipath_devdata *dd, struct ipath_portdata *pd) | |||
2220 | "ipath_port0_skbinfo @ %p\n", pd->port_port, | 2223 | "ipath_port0_skbinfo @ %p\n", pd->port_port, |
2221 | skbinfo); | 2224 | skbinfo); |
2222 | for (e = 0; e < dd->ipath_rcvegrcnt; e++) | 2225 | for (e = 0; e < dd->ipath_rcvegrcnt; e++) |
2223 | if (skbinfo[e].skb) { | 2226 | if (skbinfo[e].skb) { |
2224 | pci_unmap_single(dd->pcidev, skbinfo[e].phys, | 2227 | pci_unmap_single(dd->pcidev, skbinfo[e].phys, |
2225 | dd->ipath_ibmaxlen, | 2228 | dd->ipath_ibmaxlen, |
2226 | PCI_DMA_FROMDEVICE); | 2229 | PCI_DMA_FROMDEVICE); |
2227 | dev_kfree_skb(skbinfo[e].skb); | 2230 | dev_kfree_skb(skbinfo[e].skb); |
2228 | } | 2231 | } |
2229 | vfree(skbinfo); | 2232 | vfree(skbinfo); |
2230 | } | 2233 | } |
2231 | kfree(pd->port_tid_pg_list); | 2234 | kfree(pd->port_tid_pg_list); |
@@ -2468,10 +2471,10 @@ void ipath_hol_event(unsigned long opaque) | |||
2468 | int ipath_set_rx_pol_inv(struct ipath_devdata *dd, u8 new_pol_inv) | 2471 | int ipath_set_rx_pol_inv(struct ipath_devdata *dd, u8 new_pol_inv) |
2469 | { | 2472 | { |
2470 | u64 val; | 2473 | u64 val; |
2471 | if ( new_pol_inv > INFINIPATH_XGXS_RX_POL_MASK ) { | 2474 | |
2475 | if (new_pol_inv > INFINIPATH_XGXS_RX_POL_MASK) | ||
2472 | return -1; | 2476 | return -1; |
2473 | } | 2477 | if (dd->ipath_rx_pol_inv != new_pol_inv) { |
2474 | if ( dd->ipath_rx_pol_inv != new_pol_inv ) { | ||
2475 | dd->ipath_rx_pol_inv = new_pol_inv; | 2478 | dd->ipath_rx_pol_inv = new_pol_inv; |
2476 | val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_xgxsconfig); | 2479 | val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_xgxsconfig); |
2477 | val &= ~(INFINIPATH_XGXS_RX_POL_MASK << | 2480 | val &= ~(INFINIPATH_XGXS_RX_POL_MASK << |
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c index 786a5e017fdd..94f938f5d5c3 100644 --- a/drivers/infiniband/hw/ipath/ipath_init_chip.c +++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c | |||
@@ -645,7 +645,6 @@ done: | |||
645 | return ret; | 645 | return ret; |
646 | } | 646 | } |
647 | 647 | ||
648 | |||
649 | /** | 648 | /** |
650 | * ipath_init_chip - do the actual initialization sequence on the chip | 649 | * ipath_init_chip - do the actual initialization sequence on the chip |
651 | * @dd: the infinipath device | 650 | * @dd: the infinipath device |
@@ -754,7 +753,7 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) | |||
754 | 753 | ||
755 | dd->ipath_f_early_init(dd); | 754 | dd->ipath_f_early_init(dd); |
756 | /* | 755 | /* |
757 | * cancel any possible active sends from early driver load. | 756 | * Cancel any possible active sends from early driver load. |
758 | * Follows early_init because some chips have to initialize | 757 | * Follows early_init because some chips have to initialize |
759 | * PIO buffers in early_init to avoid false parity errors. | 758 | * PIO buffers in early_init to avoid false parity errors. |
760 | */ | 759 | */ |
@@ -884,7 +883,7 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) | |||
884 | &dd->pcidev->dev, pd->port_rcvhdrq_size, | 883 | &dd->pcidev->dev, pd->port_rcvhdrq_size, |
885 | &dd->ipath_dummy_hdrq_phys, | 884 | &dd->ipath_dummy_hdrq_phys, |
886 | gfp_flags); | 885 | gfp_flags); |
887 | if (!dd->ipath_dummy_hdrq ) { | 886 | if (!dd->ipath_dummy_hdrq) { |
888 | dev_info(&dd->pcidev->dev, | 887 | dev_info(&dd->pcidev->dev, |
889 | "Couldn't allocate 0x%lx bytes for dummy hdrq\n", | 888 | "Couldn't allocate 0x%lx bytes for dummy hdrq\n", |
890 | pd->port_rcvhdrq_size); | 889 | pd->port_rcvhdrq_size); |
@@ -899,7 +898,7 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) | |||
899 | */ | 898 | */ |
900 | ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, 0ULL); | 899 | ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, 0ULL); |
901 | 900 | ||
902 | if(!dd->ipath_stats_timer_active) { | 901 | if (!dd->ipath_stats_timer_active) { |
903 | /* | 902 | /* |
904 | * first init, or after an admin disable/enable | 903 | * first init, or after an admin disable/enable |
905 | * set up stats retrieval timer, even if we had errors | 904 | * set up stats retrieval timer, even if we had errors |
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c index d1e13a46093d..41329e72392d 100644 --- a/drivers/infiniband/hw/ipath/ipath_intr.c +++ b/drivers/infiniband/hw/ipath/ipath_intr.c | |||
@@ -590,18 +590,19 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) | |||
590 | * ones on this particular interrupt, which also isn't great | 590 | * ones on this particular interrupt, which also isn't great |
591 | */ | 591 | */ |
592 | dd->ipath_maskederrs |= dd->ipath_lasterror | errs; | 592 | dd->ipath_maskederrs |= dd->ipath_lasterror | errs; |
593 | |||
593 | dd->ipath_errormask &= ~dd->ipath_maskederrs; | 594 | dd->ipath_errormask &= ~dd->ipath_maskederrs; |
594 | ipath_write_kreg(dd, dd->ipath_kregs->kr_errormask, | 595 | ipath_write_kreg(dd, dd->ipath_kregs->kr_errormask, |
595 | dd->ipath_errormask); | 596 | dd->ipath_errormask); |
596 | s_iserr = ipath_decode_err(msg, sizeof msg, | 597 | s_iserr = ipath_decode_err(msg, sizeof msg, |
597 | dd->ipath_maskederrs); | 598 | dd->ipath_maskederrs); |
598 | 599 | ||
599 | if (dd->ipath_maskederrs & | 600 | if (dd->ipath_maskederrs & |
600 | ~(INFINIPATH_E_RRCVEGRFULL | | 601 | ~(INFINIPATH_E_RRCVEGRFULL | |
601 | INFINIPATH_E_RRCVHDRFULL | INFINIPATH_E_PKTERRS)) | 602 | INFINIPATH_E_RRCVHDRFULL | INFINIPATH_E_PKTERRS)) |
602 | ipath_dev_err(dd, "Temporarily disabling " | 603 | ipath_dev_err(dd, "Temporarily disabling " |
603 | "error(s) %llx reporting; too frequent (%s)\n", | 604 | "error(s) %llx reporting; too frequent (%s)\n", |
604 | (unsigned long long)dd->ipath_maskederrs, | 605 | (unsigned long long) dd->ipath_maskederrs, |
605 | msg); | 606 | msg); |
606 | else { | 607 | else { |
607 | /* | 608 | /* |
@@ -786,7 +787,6 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) | |||
786 | return chkerrpkts; | 787 | return chkerrpkts; |
787 | } | 788 | } |
788 | 789 | ||
789 | |||
790 | /* | 790 | /* |
791 | * try to cleanup as much as possible for anything that might have gone | 791 | * try to cleanup as much as possible for anything that might have gone |
792 | * wrong while in freeze mode, such as pio buffers being written by user | 792 | * wrong while in freeze mode, such as pio buffers being written by user |
@@ -974,6 +974,7 @@ static void handle_urcv(struct ipath_devdata *dd, u32 istat) | |||
974 | dd->ipath_i_rcvurg_mask); | 974 | dd->ipath_i_rcvurg_mask); |
975 | for (i = 1; i < dd->ipath_cfgports; i++) { | 975 | for (i = 1; i < dd->ipath_cfgports; i++) { |
976 | struct ipath_portdata *pd = dd->ipath_pd[i]; | 976 | struct ipath_portdata *pd = dd->ipath_pd[i]; |
977 | |||
977 | if (portr & (1 << i) && pd && pd->port_cnt) { | 978 | if (portr & (1 << i) && pd && pd->port_cnt) { |
978 | if (test_and_clear_bit(IPATH_PORT_WAITING_RCV, | 979 | if (test_and_clear_bit(IPATH_PORT_WAITING_RCV, |
979 | &pd->port_flag)) { | 980 | &pd->port_flag)) { |
@@ -1095,8 +1096,7 @@ irqreturn_t ipath_intr(int irq, void *data) | |||
1095 | 1096 | ||
1096 | gpiostatus = ipath_read_kreg32( | 1097 | gpiostatus = ipath_read_kreg32( |
1097 | dd, dd->ipath_kregs->kr_gpio_status); | 1098 | dd, dd->ipath_kregs->kr_gpio_status); |
1098 | /* First the error-counter case. | 1099 | /* First the error-counter case. */ |
1099 | */ | ||
1100 | if ((gpiostatus & IPATH_GPIO_ERRINTR_MASK) && | 1100 | if ((gpiostatus & IPATH_GPIO_ERRINTR_MASK) && |
1101 | (dd->ipath_flags & IPATH_GPIO_ERRINTRS)) { | 1101 | (dd->ipath_flags & IPATH_GPIO_ERRINTRS)) { |
1102 | /* want to clear the bits we see asserted. */ | 1102 | /* want to clear the bits we see asserted. */ |
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 398de7f7e2e4..9867c3f80ec2 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -811,7 +811,7 @@ void ipath_hol_event(unsigned long); | |||
811 | */ | 811 | */ |
812 | /* chip can report link latency (IB 1.2) */ | 812 | /* chip can report link latency (IB 1.2) */ |
813 | #define IPATH_HAS_LINK_LATENCY 0x1 | 813 | #define IPATH_HAS_LINK_LATENCY 0x1 |
814 | /* The chip is up and initted */ | 814 | /* The chip is up and initted */ |
815 | #define IPATH_INITTED 0x2 | 815 | #define IPATH_INITTED 0x2 |
816 | /* set if any user code has set kr_rcvhdrsize */ | 816 | /* set if any user code has set kr_rcvhdrsize */ |
817 | #define IPATH_RCVHDRSZ_SET 0x4 | 817 | #define IPATH_RCVHDRSZ_SET 0x4 |
@@ -1147,7 +1147,7 @@ extern struct mutex ipath_mutex; | |||
1147 | 1147 | ||
1148 | # define __IPATH_DBG_WHICH(which,fmt,...) \ | 1148 | # define __IPATH_DBG_WHICH(which,fmt,...) \ |
1149 | do { \ | 1149 | do { \ |
1150 | if(unlikely(ipath_debug&(which))) \ | 1150 | if (unlikely(ipath_debug & (which))) \ |
1151 | printk(KERN_DEBUG IPATH_DRV_NAME ": %s: " fmt, \ | 1151 | printk(KERN_DEBUG IPATH_DRV_NAME ": %s: " fmt, \ |
1152 | __func__,##__VA_ARGS__); \ | 1152 | __func__,##__VA_ARGS__); \ |
1153 | } while(0) | 1153 | } while(0) |
diff --git a/drivers/infiniband/hw/ipath/ipath_registers.h b/drivers/infiniband/hw/ipath/ipath_registers.h index 61e562148496..f49f1847d071 100644 --- a/drivers/infiniband/hw/ipath/ipath_registers.h +++ b/drivers/infiniband/hw/ipath/ipath_registers.h | |||
@@ -186,8 +186,8 @@ | |||
186 | #define INFINIPATH_IBCC_LINKINITCMD_SLEEP 3 | 186 | #define INFINIPATH_IBCC_LINKINITCMD_SLEEP 3 |
187 | #define INFINIPATH_IBCC_LINKINITCMD_SHIFT 16 | 187 | #define INFINIPATH_IBCC_LINKINITCMD_SHIFT 16 |
188 | #define INFINIPATH_IBCC_LINKCMD_MASK 0x3ULL | 188 | #define INFINIPATH_IBCC_LINKCMD_MASK 0x3ULL |
189 | #define INFINIPATH_IBCC_LINKCMD_DOWN 1 /* move to 0x11 */ | 189 | #define INFINIPATH_IBCC_LINKCMD_DOWN 1 /* move to 0x11 */ |
190 | #define INFINIPATH_IBCC_LINKCMD_ARMED 2 /* move to 0x21 */ | 190 | #define INFINIPATH_IBCC_LINKCMD_ARMED 2 /* move to 0x21 */ |
191 | #define INFINIPATH_IBCC_LINKCMD_ACTIVE 3 /* move to 0x31 */ | 191 | #define INFINIPATH_IBCC_LINKCMD_ACTIVE 3 /* move to 0x31 */ |
192 | #define INFINIPATH_IBCC_LINKCMD_SHIFT 18 | 192 | #define INFINIPATH_IBCC_LINKCMD_SHIFT 18 |
193 | #define INFINIPATH_IBCC_MAXPKTLEN_MASK 0x7FFULL | 193 | #define INFINIPATH_IBCC_MAXPKTLEN_MASK 0x7FFULL |
diff --git a/drivers/infiniband/hw/ipath/ipath_stats.c b/drivers/infiniband/hw/ipath/ipath_stats.c index d2725cd11bdc..57eb1d549785 100644 --- a/drivers/infiniband/hw/ipath/ipath_stats.c +++ b/drivers/infiniband/hw/ipath/ipath_stats.c | |||
@@ -293,8 +293,8 @@ void ipath_get_faststats(unsigned long opaque) | |||
293 | iserr = ipath_decode_err(ebuf, sizeof ebuf, | 293 | iserr = ipath_decode_err(ebuf, sizeof ebuf, |
294 | dd->ipath_maskederrs); | 294 | dd->ipath_maskederrs); |
295 | if (dd->ipath_maskederrs & | 295 | if (dd->ipath_maskederrs & |
296 | ~(INFINIPATH_E_RRCVEGRFULL | INFINIPATH_E_RRCVHDRFULL | | 296 | ~(INFINIPATH_E_RRCVEGRFULL | INFINIPATH_E_RRCVHDRFULL | |
297 | INFINIPATH_E_PKTERRS )) | 297 | INFINIPATH_E_PKTERRS)) |
298 | ipath_dev_err(dd, "Re-enabling masked errors " | 298 | ipath_dev_err(dd, "Re-enabling masked errors " |
299 | "(%s)\n", ebuf); | 299 | "(%s)\n", ebuf); |
300 | else { | 300 | else { |
@@ -306,17 +306,18 @@ void ipath_get_faststats(unsigned long opaque) | |||
306 | * level. | 306 | * level. |
307 | */ | 307 | */ |
308 | if (iserr) | 308 | if (iserr) |
309 | ipath_dbg("Re-enabling queue full errors (%s)\n", | 309 | ipath_dbg( |
310 | ebuf); | 310 | "Re-enabling queue full errors (%s)\n", |
311 | ebuf); | ||
311 | else | 312 | else |
312 | ipath_cdbg(ERRPKT, "Re-enabling packet" | 313 | ipath_cdbg(ERRPKT, "Re-enabling packet" |
313 | " problem interrupt (%s)\n", ebuf); | 314 | " problem interrupt (%s)\n", ebuf); |
314 | } | 315 | } |
315 | 316 | ||
316 | /* re-enable masked errors */ | 317 | /* re-enable masked errors */ |
317 | dd->ipath_errormask |= dd->ipath_maskederrs; | 318 | dd->ipath_errormask |= dd->ipath_maskederrs; |
318 | ipath_write_kreg(dd, dd->ipath_kregs->kr_errormask, | 319 | ipath_write_kreg(dd, dd->ipath_kregs->kr_errormask, |
319 | dd->ipath_errormask); | 320 | dd->ipath_errormask); |
320 | dd->ipath_maskederrs = 0; | 321 | dd->ipath_maskederrs = 0; |
321 | } | 322 | } |
322 | 323 | ||