From 6a5546e76c4b2367e03cb52884b97c94d6260a8c Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Mon, 21 Apr 2008 18:19:12 -0700 Subject: RDMA/nes: Remove unneeded function declarations Remove redundant static declarations of functions that are defined before they are used in the source. Signed-off-by: Roland Dreier --- drivers/infiniband/hw/nes/nes.c | 6 ------ drivers/infiniband/hw/nes/nes_nic.c | 9 --------- 2 files changed, 15 deletions(-) diff --git a/drivers/infiniband/hw/nes/nes.c b/drivers/infiniband/hw/nes/nes.c index b00b0e3a91d..b046262ed63 100644 --- a/drivers/infiniband/hw/nes/nes.c +++ b/drivers/infiniband/hw/nes/nes.c @@ -96,12 +96,6 @@ static LIST_HEAD(nes_dev_list); atomic_t qps_destroyed; -static void nes_print_macaddr(struct net_device *netdev); -static irqreturn_t nes_interrupt(int, void *); -static int __devinit nes_probe(struct pci_dev *, const struct pci_device_id *); -static void __devexit nes_remove(struct pci_dev *); -static int __init nes_init_module(void); -static void __exit nes_exit_module(void); static unsigned int ee_flsh_adapter; static unsigned int sysfs_nonidx_addr; static unsigned int sysfs_idx_addr; diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c index 34166641f20..01cd0effc49 100644 --- a/drivers/infiniband/hw/nes/nes_nic.c +++ b/drivers/infiniband/hw/nes/nes_nic.c @@ -92,15 +92,6 @@ static const u32 default_msg = NETIF_MSG_DRV | NETIF_MSG_PROBE | NETIF_MSG_LINK | NETIF_MSG_IFUP | NETIF_MSG_IFDOWN; static int debug = -1; - -static int nes_netdev_open(struct net_device *); -static int nes_netdev_stop(struct net_device *); -static int nes_netdev_start_xmit(struct sk_buff *, struct net_device *); -static struct net_device_stats *nes_netdev_get_stats(struct net_device *); -static void nes_netdev_tx_timeout(struct net_device *); -static int nes_netdev_set_mac_address(struct net_device *, void *); -static int nes_netdev_change_mtu(struct net_device *, int); - /** * nes_netdev_poll */ -- cgit v1.2.3 From 9862874d2138135dad9e78f61dbe415a4364945b Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Mon, 21 Apr 2008 18:19:13 -0700 Subject: IB/ipath: Fix module parameter description for disable_sma Describe disable_sma parameter with its name rather than the internal ib_ipath_disable_sma variable name, so that the description shows up properly in modinfo. Signed-off-by: Paul Bolle Acked-by: Ralph Campbell Signed-off-by: Roland Dreier --- drivers/infiniband/hw/ipath/ipath_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index c38f9aa8be8..2de8446bd37 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -109,7 +109,7 @@ MODULE_PARM_DESC(max_srq_wrs, "Maximum number of SRQ WRs support"); static unsigned int ib_ipath_disable_sma; module_param_named(disable_sma, ib_ipath_disable_sma, uint, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(ib_ipath_disable_sma, "Disable the SMA"); +MODULE_PARM_DESC(disable_sma, "Disable the SMA"); const int ib_ipath_state_ops[IB_QPS_ERR + 1] = { [IB_QPS_RESET] = 0, -- cgit v1.2.3 From 88a8317bcd2258e84a41c155590837036d6b80a8 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Mon, 21 Apr 2008 18:19:14 -0700 Subject: IB/ipath: Remove reference to dev->class_dev Commit 124b4dcb ("IB/ipath: add calls to new 7220 code and enable in build") inadvertently added core to set dev->class_dev.dev back into ib_ipath. This is completely redundant since commit 1912ffbb ("IB: Set class_dev->dev in core for nice device symlink"), which removed class_dev setting from low-level drivers, and also will break the build when class_dev is removed completely from struct ib_device. Signed-off-by: Roland Dreier --- drivers/infiniband/hw/ipath/ipath_verbs.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index 2de8446bd37..e63927cce5b 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -2067,7 +2067,6 @@ int ipath_register_ib_device(struct ipath_devdata *dd) dev->phys_port_cnt = 1; dev->num_comp_vectors = 1; dev->dma_device = &dd->pcidev->dev; - dev->class_dev.dev = dev->dma_device; dev->query_device = ipath_query_device; dev->modify_device = ipath_modify_device; dev->query_port = ipath_query_port; -- cgit v1.2.3 From 37a6ab5227d856c175d8f3586050997bb10628d8 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Mon, 21 Apr 2008 18:19:14 -0700 Subject: IB/ipath: Build IBA7220 code unconditionally The new IBA7220 code added a call to ipath_init_iba7220_funcs() that is compiled unconditionally, but only built the IBA7220 code if PCI_MSI is enabled. Fix this by building the IBA7220 file unconditonally. This fixes build breakage when PCI_MSI=n, HT_IRQ=y and INFINIBAND_IPATH=y reported by Ingo Molnar : drivers/built-in.o: In function `ipath_init_one': ipath_driver.c:(.devinit.text+0x1e5bc): undefined reference to `ipath_init_iba7220_funcs' Signed-off-by: Roland Dreier --- drivers/infiniband/hw/ipath/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/ipath/Makefile b/drivers/infiniband/hw/ipath/Makefile index 75a6c91944c..bf945006198 100644 --- a/drivers/infiniband/hw/ipath/Makefile +++ b/drivers/infiniband/hw/ipath/Makefile @@ -29,11 +29,13 @@ ib_ipath-y := \ ipath_user_pages.o \ ipath_user_sdma.o \ ipath_verbs_mcast.o \ - ipath_verbs.o + ipath_verbs.o \ + ipath_iba7220.o \ + ipath_sd7220.o \ + ipath_sd7220_img.o ib_ipath-$(CONFIG_HT_IRQ) += ipath_iba6110.o ib_ipath-$(CONFIG_PCI_MSI) += ipath_iba6120.o -ib_ipath-$(CONFIG_PCI_MSI) += ipath_iba7220.o ipath_sd7220.o ipath_sd7220_img.o ib_ipath-$(CONFIG_X86_64) += ipath_wc_x86_64.o ib_ipath-$(CONFIG_PPC64) += ipath_wc_ppc64.o -- cgit v1.2.3 From 480f58e6143135680fc1e61ea2dedc72cf3d1f95 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Mon, 21 Apr 2008 18:19:14 -0700 Subject: IB/ipath: Remove dependency on PCI_MSI || HT_IRQ Before IBA7220 support was added, the ipath driver didn't support any hardware unless PCI_MSI and/or HT_IRQ was enabled. However, the IBA7220 can generate INTx interrupts, so it makes sense to allow the driver to be build even if PCI_MSI=n and HT_IRQ=n. Signed-off-by: Roland Dreier --- drivers/infiniband/hw/ipath/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/ipath/Kconfig b/drivers/infiniband/hw/ipath/Kconfig index 044da5828a7..3c7968f25ec 100644 --- a/drivers/infiniband/hw/ipath/Kconfig +++ b/drivers/infiniband/hw/ipath/Kconfig @@ -1,6 +1,6 @@ config INFINIBAND_IPATH tristate "QLogic InfiniPath Driver" - depends on (PCI_MSI || HT_IRQ) && 64BIT && NET + depends on 64BIT && NET ---help--- This is a driver for QLogic InfiniPath host channel adapters, including InfiniBand verbs support. This driver allows these -- cgit v1.2.3 From 44957572cc198f6fcee9569813722b9ae1bd1679 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Mon, 21 Apr 2008 18:19:15 -0700 Subject: IB/ipath: Remove tests of PCI_MSI in ipath_iba7220.c The PCI MSI interface is stubbed out properly so that all the functions just return failure if PCI_MSI=n, so there's no reason to have "#ifdef CONFIG_PCI_MSI" blocks in ipath_iba7220.c. Signed-off-by: Roland Dreier --- drivers/infiniband/hw/ipath/ipath_iba7220.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/hw/ipath/ipath_iba7220.c b/drivers/infiniband/hw/ipath/ipath_iba7220.c index 1b2de2cfb69..633a605e69d 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba7220.c +++ b/drivers/infiniband/hw/ipath/ipath_iba7220.c @@ -1221,7 +1221,7 @@ static int ipath_msi_enabled(struct pci_dev *pdev) static void ipath_7220_nomsi(struct ipath_devdata *dd) { dd->ipath_msi_lo = 0; -#ifdef CONFIG_PCI_MSI + if (ipath_msi_enabled(dd->pcidev)) { /* * free, but don't zero; later kernels require @@ -1232,7 +1232,6 @@ static void ipath_7220_nomsi(struct ipath_devdata *dd) free_irq(dd->ipath_irq, dd); pci_disable_msi(dd->pcidev); } -#endif } /* @@ -1344,7 +1343,7 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd, u32 boardrev; dd->ipath_msi_lo = 0; /* used as a flag during reset processing */ -#ifdef CONFIG_PCI_MSI + pos = pci_find_capability(pdev, PCI_CAP_ID_MSI); if (!strcmp(int_type, "force_msi") || !strcmp(int_type, "auto")) ret = pci_enable_msi(pdev); @@ -1377,10 +1376,6 @@ static int ipath_setup_7220_config(struct ipath_devdata *dd, } else ipath_dev_err(dd, "Can't find MSI capability, " "can't save MSI settings for reset\n"); -#else - ipath_dbg("PCI_MSI not configured, using IntX interrupts\n"); - ipath_enable_intx(pdev); -#endif dd->ipath_irq = pdev->irq; @@ -1583,7 +1578,7 @@ static void ipath_init_7220_variables(struct ipath_devdata *dd) static int ipath_reinit_msi(struct ipath_devdata *dd) { int ret = 0; -#ifdef CONFIG_PCI_MSI + int pos; u16 control; if (!dd->ipath_msi_lo) /* Using intX, or init problem */ @@ -1617,8 +1612,8 @@ static int ipath_reinit_msi(struct ipath_devdata *dd) ((control & PCI_MSI_FLAGS_64BIT) ? 12 : 8), dd->ipath_msi_data); ret = 1; + bail: -#endif if (!ret) { ipath_dbg("Using IntX, MSI disabled or not configured\n"); ipath_enable_intx(dd->pcidev); -- cgit v1.2.3 From bc751fe6fff3ff894784acfed1bed8639b632c09 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Mon, 21 Apr 2008 18:19:15 -0700 Subject: IB/ipath: Correct capitalization "IntX" -> "INTx" Match what the PCI specification uses. Signed-off-by: Roland Dreier --- drivers/infiniband/hw/ipath/ipath_driver.c | 2 +- drivers/infiniband/hw/ipath/ipath_iba7220.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index e0a64f070b9..acf30c06a0c 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c @@ -538,7 +538,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, case PCI_DEVICE_ID_INFINIPATH_7220: #ifndef CONFIG_PCI_MSI ipath_dbg("CONFIG_PCI_MSI is not enabled, " - "using IntX for unit %u\n", dd->ipath_unit); + "using INTx for unit %u\n", dd->ipath_unit); #endif ipath_init_iba7220_funcs(dd); break; diff --git a/drivers/infiniband/hw/ipath/ipath_iba7220.c b/drivers/infiniband/hw/ipath/ipath_iba7220.c index 633a605e69d..e3ec0d1bdf5 100644 --- a/drivers/infiniband/hw/ipath/ipath_iba7220.c +++ b/drivers/infiniband/hw/ipath/ipath_iba7220.c @@ -1215,7 +1215,7 @@ static int ipath_msi_enabled(struct pci_dev *pdev) /* * disable msi interrupt if enabled, and clear the flag. - * flag is used primarily for the fallback to IntX, but + * flag is used primarily for the fallback to INTx, but * is also used in reinit after reset as a flag. */ static void ipath_7220_nomsi(struct ipath_devdata *dd) @@ -1615,7 +1615,7 @@ static int ipath_reinit_msi(struct ipath_devdata *dd) bail: if (!ret) { - ipath_dbg("Using IntX, MSI disabled or not configured\n"); + ipath_dbg("Using INTx, MSI disabled or not configured\n"); ipath_enable_intx(dd->pcidev); ret = 1; } @@ -2144,12 +2144,12 @@ static void ipath_7220_read_counters(struct ipath_devdata *dd, counters[i] = ipath_snap_cntr(dd, i); } -/* if we are using MSI, try to fallback to IntX */ +/* if we are using MSI, try to fallback to INTx */ static int ipath_7220_intr_fallback(struct ipath_devdata *dd) { if (dd->ipath_msi_lo) { dev_info(&dd->pcidev->dev, "MSI interrupt not detected," - " trying IntX interrupts\n"); + " trying INTx interrupts\n"); ipath_7220_nomsi(dd); ipath_enable_intx(dd->pcidev); /* @@ -2162,7 +2162,7 @@ static int ipath_7220_intr_fallback(struct ipath_devdata *dd) if (request_irq(dd->ipath_irq, ipath_intr, IRQF_SHARED, IPATH_DRV_NAME, dd)) ipath_dev_err(dd, - "Could not re-request_irq for IntX\n"); + "Could not re-request_irq for INTx\n"); return 1; } return 0; -- cgit v1.2.3