Commit acdc30b5 authored by Roland Dreier's avatar Roland Dreier

Merge branches 'cxgb4', 'misc', 'mlx4', 'nes' and 'qib' into for-next

...@@ -43,6 +43,7 @@ config INFINIBAND_ADDR_TRANS ...@@ -43,6 +43,7 @@ config INFINIBAND_ADDR_TRANS
source "drivers/infiniband/hw/mthca/Kconfig" source "drivers/infiniband/hw/mthca/Kconfig"
source "drivers/infiniband/hw/ipath/Kconfig" source "drivers/infiniband/hw/ipath/Kconfig"
source "drivers/infiniband/hw/qib/Kconfig"
source "drivers/infiniband/hw/ehca/Kconfig" source "drivers/infiniband/hw/ehca/Kconfig"
source "drivers/infiniband/hw/amso1100/Kconfig" source "drivers/infiniband/hw/amso1100/Kconfig"
source "drivers/infiniband/hw/cxgb3/Kconfig" source "drivers/infiniband/hw/cxgb3/Kconfig"
......
obj-$(CONFIG_INFINIBAND) += core/ obj-$(CONFIG_INFINIBAND) += core/
obj-$(CONFIG_INFINIBAND_MTHCA) += hw/mthca/ obj-$(CONFIG_INFINIBAND_MTHCA) += hw/mthca/
obj-$(CONFIG_INFINIBAND_IPATH) += hw/ipath/ obj-$(CONFIG_INFINIBAND_IPATH) += hw/ipath/
obj-$(CONFIG_INFINIBAND_QIB) += hw/qib/
obj-$(CONFIG_INFINIBAND_EHCA) += hw/ehca/ obj-$(CONFIG_INFINIBAND_EHCA) += hw/ehca/
obj-$(CONFIG_INFINIBAND_AMSO1100) += hw/amso1100/ obj-$(CONFIG_INFINIBAND_AMSO1100) += hw/amso1100/
obj-$(CONFIG_INFINIBAND_CXGB3) += hw/cxgb3/ obj-$(CONFIG_INFINIBAND_CXGB3) += hw/cxgb3/
......
...@@ -38,7 +38,9 @@ ...@@ -38,7 +38,9 @@
#include <rdma/ib_verbs.h> #include <rdma/ib_verbs.h>
int ib_device_register_sysfs(struct ib_device *device); int ib_device_register_sysfs(struct ib_device *device,
int (*port_callback)(struct ib_device *,
u8, struct kobject *));
void ib_device_unregister_sysfs(struct ib_device *device); void ib_device_unregister_sysfs(struct ib_device *device);
int ib_sysfs_setup(void); int ib_sysfs_setup(void);
......
...@@ -267,7 +267,9 @@ static int read_port_table_lengths(struct ib_device *device) ...@@ -267,7 +267,9 @@ static int read_port_table_lengths(struct ib_device *device)
* callback for each device that is added. @device must be allocated * callback for each device that is added. @device must be allocated
* with ib_alloc_device(). * with ib_alloc_device().
*/ */
int ib_register_device(struct ib_device *device) int ib_register_device(struct ib_device *device,
int (*port_callback)(struct ib_device *,
u8, struct kobject *))
{ {
int ret; int ret;
...@@ -296,7 +298,7 @@ int ib_register_device(struct ib_device *device) ...@@ -296,7 +298,7 @@ int ib_register_device(struct ib_device *device)
goto out; goto out;
} }
ret = ib_device_register_sysfs(device); ret = ib_device_register_sysfs(device, port_callback);
if (ret) { if (ret) {
printk(KERN_WARNING "Couldn't register device %s with driver model\n", printk(KERN_WARNING "Couldn't register device %s with driver model\n",
device->name); device->name);
......
...@@ -47,8 +47,8 @@ MODULE_DESCRIPTION("kernel IB MAD API"); ...@@ -47,8 +47,8 @@ MODULE_DESCRIPTION("kernel IB MAD API");
MODULE_AUTHOR("Hal Rosenstock"); MODULE_AUTHOR("Hal Rosenstock");
MODULE_AUTHOR("Sean Hefty"); MODULE_AUTHOR("Sean Hefty");
int mad_sendq_size = IB_MAD_QP_SEND_SIZE; static int mad_sendq_size = IB_MAD_QP_SEND_SIZE;
int mad_recvq_size = IB_MAD_QP_RECV_SIZE; static int mad_recvq_size = IB_MAD_QP_RECV_SIZE;
module_param_named(send_queue_size, mad_sendq_size, int, 0444); module_param_named(send_queue_size, mad_sendq_size, int, 0444);
MODULE_PARM_DESC(send_queue_size, "Size of send queue in number of work requests"); MODULE_PARM_DESC(send_queue_size, "Size of send queue in number of work requests");
......
...@@ -475,7 +475,9 @@ alloc_group_attrs(ssize_t (*show)(struct ib_port *, ...@@ -475,7 +475,9 @@ alloc_group_attrs(ssize_t (*show)(struct ib_port *,
return NULL; return NULL;
} }
static int add_port(struct ib_device *device, int port_num) static int add_port(struct ib_device *device, int port_num,
int (*port_callback)(struct ib_device *,
u8, struct kobject *))
{ {
struct ib_port *p; struct ib_port *p;
struct ib_port_attr attr; struct ib_port_attr attr;
...@@ -522,11 +524,20 @@ static int add_port(struct ib_device *device, int port_num) ...@@ -522,11 +524,20 @@ static int add_port(struct ib_device *device, int port_num)
if (ret) if (ret)
goto err_free_pkey; goto err_free_pkey;
if (port_callback) {
ret = port_callback(device, port_num, &p->kobj);
if (ret)
goto err_remove_pkey;
}
list_add_tail(&p->kobj.entry, &device->port_list); list_add_tail(&p->kobj.entry, &device->port_list);
kobject_uevent(&p->kobj, KOBJ_ADD); kobject_uevent(&p->kobj, KOBJ_ADD);
return 0; return 0;
err_remove_pkey:
sysfs_remove_group(&p->kobj, &p->pkey_group);
err_free_pkey: err_free_pkey:
for (i = 0; i < attr.pkey_tbl_len; ++i) for (i = 0; i < attr.pkey_tbl_len; ++i)
kfree(p->pkey_group.attrs[i]); kfree(p->pkey_group.attrs[i]);
...@@ -754,7 +765,9 @@ static struct attribute_group iw_stats_group = { ...@@ -754,7 +765,9 @@ static struct attribute_group iw_stats_group = {
.attrs = iw_proto_stats_attrs, .attrs = iw_proto_stats_attrs,
}; };
int ib_device_register_sysfs(struct ib_device *device) int ib_device_register_sysfs(struct ib_device *device,
int (*port_callback)(struct ib_device *,
u8, struct kobject *))
{ {
struct device *class_dev = &device->dev; struct device *class_dev = &device->dev;
int ret; int ret;
...@@ -785,12 +798,12 @@ int ib_device_register_sysfs(struct ib_device *device) ...@@ -785,12 +798,12 @@ int ib_device_register_sysfs(struct ib_device *device)
} }
if (device->node_type == RDMA_NODE_IB_SWITCH) { if (device->node_type == RDMA_NODE_IB_SWITCH) {
ret = add_port(device, 0); ret = add_port(device, 0, port_callback);
if (ret) if (ret)
goto err_put; goto err_put;
} else { } else {
for (i = 1; i <= device->phys_port_cnt; ++i) { for (i = 1; i <= device->phys_port_cnt; ++i) {
ret = add_port(device, i); ret = add_port(device, i, port_callback);
if (ret) if (ret)
goto err_put; goto err_put;
} }
......
...@@ -865,7 +865,7 @@ int c2_register_device(struct c2_dev *dev) ...@@ -865,7 +865,7 @@ int c2_register_device(struct c2_dev *dev)
dev->ibdev.iwcm->create_listen = c2_service_create; dev->ibdev.iwcm->create_listen = c2_service_create;
dev->ibdev.iwcm->destroy_listen = c2_service_destroy; dev->ibdev.iwcm->destroy_listen = c2_service_destroy;
ret = ib_register_device(&dev->ibdev); ret = ib_register_device(&dev->ibdev, NULL);
if (ret) if (ret)
goto out_free_iwcm; goto out_free_iwcm;
......
...@@ -1428,7 +1428,7 @@ int iwch_register_device(struct iwch_dev *dev) ...@@ -1428,7 +1428,7 @@ int iwch_register_device(struct iwch_dev *dev)
dev->ibdev.iwcm->rem_ref = iwch_qp_rem_ref; dev->ibdev.iwcm->rem_ref = iwch_qp_rem_ref;
dev->ibdev.iwcm->get_qp = iwch_get_qp; dev->ibdev.iwcm->get_qp = iwch_get_qp;
ret = ib_register_device(&dev->ibdev); ret = ib_register_device(&dev->ibdev, NULL);
if (ret) if (ret)
goto bail1; goto bail1;
......
...@@ -486,7 +486,7 @@ int c4iw_register_device(struct c4iw_dev *dev) ...@@ -486,7 +486,7 @@ int c4iw_register_device(struct c4iw_dev *dev)
dev->ibdev.iwcm->rem_ref = c4iw_qp_rem_ref; dev->ibdev.iwcm->rem_ref = c4iw_qp_rem_ref;
dev->ibdev.iwcm->get_qp = c4iw_get_qp; dev->ibdev.iwcm->get_qp = c4iw_get_qp;
ret = ib_register_device(&dev->ibdev); ret = ib_register_device(&dev->ibdev, NULL);
if (ret) if (ret)
goto bail1; goto bail1;
......
...@@ -798,7 +798,7 @@ static int __devinit ehca_probe(struct of_device *dev, ...@@ -798,7 +798,7 @@ static int __devinit ehca_probe(struct of_device *dev,
goto probe5; goto probe5;
} }
ret = ib_register_device(&shca->ib_device); ret = ib_register_device(&shca->ib_device, NULL);
if (ret) { if (ret) {
ehca_err(&shca->ib_device, ehca_err(&shca->ib_device,
"ib_register_device() failed ret=%i", ret); "ib_register_device() failed ret=%i", ret);
......
config INFINIBAND_IPATH config INFINIBAND_IPATH
tristate "QLogic InfiniPath Driver" tristate "QLogic HTX HCA support"
depends on 64BIT && NET depends on 64BIT && NET && HT_IRQ
---help--- ---help---
This is a driver for QLogic InfiniPath host channel adapters, This is a driver for the obsolete QLogic Hyper-Transport
IB host channel adapter (model QHT7140),
including InfiniBand verbs support. This driver allows these including InfiniBand verbs support. This driver allows these
devices to be used with both kernel upper level protocols such devices to be used with both kernel upper level protocols such
as IP-over-InfiniBand as well as with userspace applications as IP-over-InfiniBand as well as with userspace applications
(in conjunction with InfiniBand userspace access). (in conjunction with InfiniBand userspace access).
For QLogic PCIe QLE based cards, use the QIB driver instead.
...@@ -29,13 +29,9 @@ ib_ipath-y := \ ...@@ -29,13 +29,9 @@ ib_ipath-y := \
ipath_user_pages.o \ ipath_user_pages.o \
ipath_user_sdma.o \ ipath_user_sdma.o \
ipath_verbs_mcast.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_HT_IRQ) += ipath_iba6110.o
ib_ipath-$(CONFIG_PCI_MSI) += ipath_iba6120.o
ib_ipath-$(CONFIG_X86_64) += ipath_wc_x86_64.o ib_ipath-$(CONFIG_X86_64) += ipath_wc_x86_64.o
ib_ipath-$(CONFIG_PPC64) += ipath_wc_ppc64.o ib_ipath-$(CONFIG_PPC64) += ipath_wc_ppc64.o
...@@ -132,18 +132,13 @@ static int __devinit ipath_init_one(struct pci_dev *, ...@@ -132,18 +132,13 @@ static int __devinit ipath_init_one(struct pci_dev *,
/* Only needed for registration, nothing else needs this info */ /* Only needed for registration, nothing else needs this info */
#define PCI_VENDOR_ID_PATHSCALE 0x1fc1 #define PCI_VENDOR_ID_PATHSCALE 0x1fc1
#define PCI_VENDOR_ID_QLOGIC 0x1077
#define PCI_DEVICE_ID_INFINIPATH_HT 0xd #define PCI_DEVICE_ID_INFINIPATH_HT 0xd
#define PCI_DEVICE_ID_INFINIPATH_PE800 0x10
#define PCI_DEVICE_ID_INFINIPATH_7220 0x7220
/* Number of seconds before our card status check... */ /* Number of seconds before our card status check... */
#define STATUS_TIMEOUT 60 #define STATUS_TIMEOUT 60
static const struct pci_device_id ipath_pci_tbl[] = { static const struct pci_device_id ipath_pci_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_PATHSCALE, PCI_DEVICE_ID_INFINIPATH_HT) }, { PCI_DEVICE(PCI_VENDOR_ID_PATHSCALE, PCI_DEVICE_ID_INFINIPATH_HT) },
{ PCI_DEVICE(PCI_VENDOR_ID_PATHSCALE, PCI_DEVICE_ID_INFINIPATH_PE800) },
{ PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_INFINIPATH_7220) },
{ 0, } { 0, }
}; };
...@@ -521,30 +516,9 @@ static int __devinit ipath_init_one(struct pci_dev *pdev, ...@@ -521,30 +516,9 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
/* setup the chip-specific functions, as early as possible. */ /* setup the chip-specific functions, as early as possible. */
switch (ent->device) { switch (ent->device) {
case PCI_DEVICE_ID_INFINIPATH_HT: case PCI_DEVICE_ID_INFINIPATH_HT:
#ifdef CONFIG_HT_IRQ
ipath_init_iba6110_funcs(dd); ipath_init_iba6110_funcs(dd);
break; break;
#else
ipath_dev_err(dd, "QLogic HT device 0x%x cannot work if "
"CONFIG_HT_IRQ is not enabled\n", ent->device);
return -ENODEV;
#endif
case PCI_DEVICE_ID_INFINIPATH_PE800:
#ifdef CONFIG_PCI_MSI
ipath_init_iba6120_funcs(dd);
break;
#else
ipath_dev_err(dd, "QLogic PCIE device 0x%x cannot work if "
"CONFIG_PCI_MSI is not enabled\n", ent->device);
return -ENODEV;
#endif
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);
#endif
ipath_init_iba7220_funcs(dd);
break;
default: default:
ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, " ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, "
"failing\n", ent->device); "failing\n", ent->device);
......
This diff is collapsed.
This diff is collapsed.
...@@ -1030,8 +1030,6 @@ void ipath_free_data(struct ipath_portdata *dd); ...@@ -1030,8 +1030,6 @@ void ipath_free_data(struct ipath_portdata *dd);
u32 __iomem *ipath_getpiobuf(struct ipath_devdata *, u32, u32 *); u32 __iomem *ipath_getpiobuf(struct ipath_devdata *, u32, u32 *);
void ipath_chg_pioavailkernel(struct ipath_devdata *dd, unsigned start, void ipath_chg_pioavailkernel(struct ipath_devdata *dd, unsigned start,
unsigned len, int avail); unsigned len, int avail);
void ipath_init_iba7220_funcs(struct ipath_devdata *);
void ipath_init_iba6120_funcs(struct ipath_devdata *);
void ipath_init_iba6110_funcs(struct ipath_devdata *); void ipath_init_iba6110_funcs(struct ipath_devdata *);
void ipath_get_eeprom_info(struct ipath_devdata *); void ipath_get_eeprom_info(struct ipath_devdata *);
int ipath_update_eeprom_log(struct ipath_devdata *dd); int ipath_update_eeprom_log(struct ipath_devdata *dd);
......
...@@ -2182,7 +2182,7 @@ int ipath_register_ib_device(struct ipath_devdata *dd) ...@@ -2182,7 +2182,7 @@ int ipath_register_ib_device(struct ipath_devdata *dd)
snprintf(dev->node_desc, sizeof(dev->node_desc), snprintf(dev->node_desc, sizeof(dev->node_desc),
IPATH_IDSTR " %s", init_utsname()->nodename); IPATH_IDSTR " %s", init_utsname()->nodename);
ret = ib_register_device(dev); ret = ib_register_device(dev, NULL);
if (ret) if (ret)
goto err_reg; goto err_reg;
......
...@@ -662,7 +662,7 @@ static void *mlx4_ib_add(struct mlx4_dev *dev) ...@@ -662,7 +662,7 @@ static void *mlx4_ib_add(struct mlx4_dev *dev)
spin_lock_init(&ibdev->sm_lock); spin_lock_init(&ibdev->sm_lock);
mutex_init(&ibdev->cap_mask_mutex); mutex_init(&ibdev->cap_mask_mutex);
if (ib_register_device(&ibdev->ib_dev)) if (ib_register_device(&ibdev->ib_dev, NULL))
goto err_map; goto err_map;
if (mlx4_ib_mad_init(ibdev)) if (mlx4_ib_mad_init(ibdev))
......
...@@ -1403,7 +1403,7 @@ int mthca_register_device(struct mthca_dev *dev) ...@@ -1403,7 +1403,7 @@ int mthca_register_device(struct mthca_dev *dev)
mutex_init(&dev->cap_mask_mutex); mutex_init(&dev->cap_mask_mutex);
ret = ib_register_device(&dev->ib_dev); ret = ib_register_device(&dev->ib_dev, NULL);
if (ret) if (ret)
return ret; return ret;
......
...@@ -2584,7 +2584,6 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) ...@@ -2584,7 +2584,6 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
break; break;
} }
} }
spin_unlock_irqrestore(&nesadapter->phy_lock, flags);
if (phy_data & 0x0004) { if (phy_data & 0x0004) {
if (wide_ppm_offset && if (wide_ppm_offset &&
...@@ -2639,6 +2638,8 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number) ...@@ -2639,6 +2638,8 @@ static void nes_process_mac_intr(struct nes_device *nesdev, u32 mac_number)
} }
} }
spin_unlock_irqrestore(&nesadapter->phy_lock, flags);
nesadapter->mac_sw_state[mac_number] = NES_MAC_SW_IDLE; nesadapter->mac_sw_state[mac_number] = NES_MAC_SW_IDLE;
} }
...@@ -3422,6 +3423,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -3422,6 +3423,7 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
struct nes_adapter *nesadapter = nesdev->nesadapter; struct nes_adapter *nesadapter = nesdev->nesadapter;
u32 aeq_info; u32 aeq_info;
u32 next_iwarp_state = 0; u32 next_iwarp_state = 0;
u32 aeqe_cq_id;
u16 async_event_id; u16 async_event_id;
u8 tcp_state; u8 tcp_state;
u8 iwarp_state; u8 iwarp_state;
...@@ -3449,6 +3451,14 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev, ...@@ -3449,6 +3451,14 @@ static void nes_process_iwarp_aeqe(struct nes_device *nesdev,
le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]), aeqe, le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]), aeqe,
nes_tcp_state_str[tcp_state], nes_iwarp_state_str[iwarp_state]); nes_tcp_state_str[tcp_state], nes_iwarp_state_str[iwarp_state]);
aeqe_cq_id = le32_to_cpu(aeqe->aeqe_words[NES_AEQE_COMP_QP_CQ_ID_IDX]);
if (aeq_info & NES_AEQE_QP) {
if ((!nes_is_resource_allocated(nesadapter, nesadapter->allocated_qps,
aeqe_cq_id)) ||
(atomic_read(&nesqp->close_timer_started)))
return;
}
switch (async_event_id) { switch (async_event_id) {
case NES_AEQE_AEID_LLP_FIN_RECEIVED: case NES_AEQE_AEID_LLP_FIN_RECEIVED:
if (nesqp->term_flags) if (nesqp->term_flags)
......
...@@ -1002,6 +1002,7 @@ static int nes_netdev_change_mtu(struct net_device *netdev, int new_mtu) ...@@ -1002,6 +1002,7 @@ static int nes_netdev_change_mtu(struct net_device *netdev, int new_mtu)
return ret; return ret;
} }
static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = { static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = {
"Link Change Interrupts", "Link Change Interrupts",
"Linearized SKBs", "Linearized SKBs",
...@@ -1016,11 +1017,15 @@ static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = { ...@@ -1016,11 +1017,15 @@ static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = {
"Rx Jabber Errors", "Rx Jabber Errors",
"Rx Oversized Frames", "Rx Oversized Frames",
"Rx Short Frames", "Rx Short Frames",
"Rx Length Errors",
"Rx CRC Errors",
"Rx Port Discard",
"Endnode Rx Discards", "Endnode Rx Discards",
"Endnode Rx Octets", "Endnode Rx Octets",
"Endnode Rx Frames", "Endnode Rx Frames",
"Endnode Tx Octets", "Endnode Tx Octets",
"Endnode Tx Frames", "Endnode Tx Frames",
"Tx Errors",
"mh detected", "mh detected",
"mh pauses", "mh pauses",
"Retransmission Count", "Retransmission Count",
...@@ -1049,19 +1054,13 @@ static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = { ...@@ -1049,19 +1054,13 @@ static const char nes_ethtool_stringset[][ETH_GSTRING_LEN] = {
"CM Nodes Destroyed", "CM Nodes Destroyed",
"CM Accel Drops", "CM Accel Drops",
"CM Resets Received", "CM Resets Received",
"Free 4Kpbls",
"Free 256pbls",
"Timer Inits", "Timer Inits",
"CQ Depth 1",
"CQ Depth 4",
"CQ Depth 16",
"CQ Depth 24",
"CQ Depth 32",
"CQ Depth 128",
"CQ Depth 256",
"LRO aggregated", "LRO aggregated",
"LRO flushed", "LRO flushed",
"LRO no_desc", "LRO no_desc",
}; };
#define NES_ETHTOOL_STAT_COUNT ARRAY_SIZE(nes_ethtool_stringset) #define NES_ETHTOOL_STAT_COUNT ARRAY_SIZE(nes_ethtool_stringset)
/** /**
...@@ -1121,12 +1120,14 @@ static void nes_netdev_get_strings(struct net_device *netdev, u32 stringset, ...@@ -1121,12 +1120,14 @@ static void nes_netdev_get_strings(struct net_device *netdev, u32 stringset,
/** /**
* nes_netdev_get_ethtool_stats * nes_netdev_get_ethtool_stats
*/ */
static void nes_netdev_get_ethtool_stats(struct net_device *netdev, static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *target_ethtool_stats, u64 *target_stat_values) struct ethtool_stats *target_ethtool_stats, u64 *target_stat_values)
{ {
u64 u64temp; u64 u64temp;
struct nes_vnic *nesvnic = netdev_priv(netdev); struct nes_vnic *nesvnic = netdev_priv(netdev);
struct nes_device *nesdev = nesvnic->nesdev; struct nes_device *nesdev = nesvnic->nesdev;
struct nes_adapter *nesadapter = nesdev->nesadapter;
u32 nic_count; u32 nic_count;
u32 u32temp; u32 u32temp;
u32 index = 0; u32 index = 0;
...@@ -1155,6 +1156,46 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev, ...@@ -1155,6 +1156,46 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
nesvnic->nesdev->port_tx_discards += u32temp; nesvnic->nesdev->port_tx_discards += u32temp;
nesvnic->netstats.tx_dropped += u32temp; nesvnic->netstats.tx_dropped += u32temp;
u32temp = nes_read_indexed(nesdev,
NES_IDX_MAC_RX_SHORT_FRAMES + (nesvnic->nesdev->mac_index*0x200));
nesvnic->netstats.rx_dropped += u32temp;
nesvnic->nesdev->mac_rx_errors += u32temp;
nesvnic->nesdev->mac_rx_short_frames += u32temp;
u32temp = nes_read_indexed(nesdev,
NES_IDX_MAC_RX_OVERSIZED_FRAMES + (nesvnic->nesdev->mac_index*0x200));
nesvnic->netstats.rx_dropped += u32temp;
nesvnic->nesdev->mac_rx_errors += u32temp;
nesvnic->nesdev->mac_rx_oversized_frames += u32temp;
u32temp = nes_read_indexed(nesdev,
NES_IDX_MAC_RX_JABBER_FRAMES + (nesvnic->nesdev->mac_index*0x200));
nesvnic->netstats.rx_dropped += u32temp;
nesvnic->nesdev->mac_rx_errors += u32temp;
nesvnic->nesdev->mac_rx_jabber_frames += u32temp;
u32temp = nes_read_indexed(nesdev,
NES_IDX_MAC_RX_SYMBOL_ERR_FRAMES + (nesvnic->nesdev->mac_index*0x200));
nesvnic->netstats.rx_dropped += u32temp;
nesvnic->nesdev->mac_rx_errors += u32temp;
nesvnic->nesdev->mac_rx_symbol_err_frames += u32temp;
u32temp = nes_read_indexed(nesdev,
NES_IDX_MAC_RX_LENGTH_ERR_FRAMES + (nesvnic->nesdev->mac_index*0x200));
nesvnic->netstats.rx_length_errors += u32temp;
nesvnic->nesdev->mac_rx_errors += u32temp;
u32temp = nes_read_indexed(nesdev,
NES_IDX_MAC_RX_CRC_ERR_FRAMES + (nesvnic->nesdev->mac_index*0x200));
nesvnic->nesdev->mac_rx_errors += u32temp;
nesvnic->nesdev->mac_rx_crc_errors += u32temp;
nesvnic->netstats.rx_crc_errors += u32temp;
u32temp = nes_read_indexed(nesdev,
NES_IDX_MAC_TX_ERRORS + (nesvnic->nesdev->mac_index*0x200));
nesvnic->nesdev->mac_tx_errors += u32temp;
nesvnic->netstats.tx_errors += u32temp;
for (nic_count = 0; nic_count < NES_MAX_PORT_COUNT; nic_count++) { for (nic_count = 0; nic_count < NES_MAX_PORT_COUNT; nic_count++) {
if (nesvnic->qp_nic_index[nic_count] == 0xf) if (nesvnic->qp_nic_index[nic_count] == 0xf)
break; break;
...@@ -1219,11 +1260,15 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev, ...@@ -1219,11 +1260,15 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
target_stat_values[++index] = nesvnic->nesdev->mac_rx_jabber_frames; target_stat_values[++index] = nesvnic->nesdev->mac_rx_jabber_frames;
target_stat_values[++index] = nesvnic->nesdev->mac_rx_oversized_frames; target_stat_values[++index] = nesvnic->nesdev->mac_rx_oversized_frames;
target_stat_values[++index] = nesvnic->nesdev->mac_rx_short_frames; target_stat_values[++index] = nesvnic->nesdev->mac_rx_short_frames;
target_stat_values[++index] = nesvnic->netstats.rx_length_errors;
target_stat_values[++index] = nesvnic->nesdev->mac_rx_crc_errors;
target_stat_values[++index] = nesvnic->nesdev->port_rx_discards;
target_stat_values[++index] = nesvnic->endnode_nstat_rx_discard; target_stat_values[++index] = nesvnic->endnode_nstat_rx_discard;
target_stat_values[++index] = nesvnic->endnode_nstat_rx_octets; target_stat_values[++index] = nesvnic->endnode_nstat_rx_octets;
target_stat_values[++index] = nesvnic->endnode_nstat_rx_frames; target_stat_values[++index] = nesvnic->endnode_nstat_rx_frames;
target_stat_values[++index] = nesvnic->endnode_nstat_tx_octets; target_stat_values[++index] = nesvnic->endnode_nstat_tx_octets;
target_stat_values[++index] = nesvnic->endnode_nstat_tx_frames; target_stat_values[++index] = nesvnic->endnode_nstat_tx_frames;
target_stat_values[++index] = nesvnic->nesdev->mac_tx_errors;
target_stat_values[++index] = mh_detected; target_stat_values[++index] = mh_detected;
target_stat_values[++index] = mh_pauses_sent; target_stat_values[++index] = mh_pauses_sent;
target_stat_values[++index] = nesvnic->endnode_ipv4_tcp_retransmits; target_stat_values[++index] = nesvnic->endnode_ipv4_tcp_retransmits;
...@@ -1252,21 +1297,14 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev, ...@@ -1252,21 +1297,14 @@ static void nes_netdev_get_ethtool_stats(struct net_device *netdev,
target_stat_values[++index] = atomic_read(&cm_nodes_destroyed); target_stat_values[++index] = atomic_read(&cm_nodes_destroyed);
target_stat_values[++index] = atomic_read(&cm_accel_dropped_pkts); target_stat_values[++index] = atomic_read(&cm_accel_dropped_pkts);
target_stat_values[++index] = atomic_read(&cm_resets_recvd); target_stat_values[++index] = atomic_read(&cm_resets_recvd);
target_stat_values[++index] = nesadapter->free_4kpbl;
target_stat_values[++index] = nesadapter->free_256pbl;
target_stat_values[++index] = int_mod_timer_init; target_stat_values[++index] = int_mod_timer_init;
target_stat_values[++index] = int_mod_cq_depth_1;
target_stat_values[++index] = int_mod_cq_depth_4;
target_stat_values[++index] = int_mod_cq_depth_16;
target_stat_values[++index] = int_mod_cq_depth_24;
target_stat_values[++index] = int_mod_cq_depth_32;
target_stat_values[++index] = int_mod_cq_depth_128;
target_stat_values[++index] = int_mod_cq_depth_256;
target_stat_values[++index] = nesvnic->lro_mgr.stats.aggregated; target_stat_values[++index] = nesvnic->lro_mgr.stats.aggregated;
target_stat_values[++index] = nesvnic->lro_mgr.stats.flushed; target_stat_values[++index] = nesvnic->lro_mgr.stats.flushed;
target_stat_values[++index] = nesvnic->lro_mgr.stats.no_desc; target_stat_values[++index] = nesvnic->lro_mgr.stats.no_desc;
} }
/** /**
* nes_netdev_get_drvinfo * nes_netdev_get_drvinfo
*/ */
......
...@@ -3962,7 +3962,7 @@ int nes_register_ofa_device(struct nes_ib_device *nesibdev) ...@@ -3962,7 +3962,7 @@ int nes_register_ofa_device(struct nes_ib_device *nesibdev)
struct nes_adapter *nesadapter = nesdev->nesadapter; struct nes_adapter *nesadapter = nesdev->nesadapter;
int i, ret; int i, ret;
ret = ib_register_device(&nesvnic->nesibdev->ibdev); ret = ib_register_device(&nesvnic->nesibdev->ibdev, NULL);
if (ret) { if (ret) {
return ret; return ret;
} }
......
config INFINIBAND_QIB
tristate "QLogic PCIe HCA support"
depends on 64BIT && NET
---help---
This is a low-level driver for QLogic PCIe QLE InfiniBand host
channel adapters. This driver does not support the QLogic
HyperTransport card (model QHT7140).
obj-$(CONFIG_INFINIBAND_QIB) += ib_qib.o
ib_qib-y := qib_cq.o qib_diag.o qib_dma.o qib_driver.o qib_eeprom.o \
qib_file_ops.o qib_fs.o qib_init.o qib_intr.o qib_keys.o \
qib_mad.o qib_mmap.o qib_mr.o qib_pcie.o qib_pio_copy.o \
qib_qp.o qib_qsfp.o qib_rc.o qib_ruc.o qib_sdma.o qib_srq.o \
qib_sysfs.o qib_twsi.o qib_tx.o qib_uc.o qib_ud.o \
qib_user_pages.o qib_user_sdma.o qib_verbs_mcast.o qib_iba7220.o \
qib_sd7220.o qib_sd7220_img.o qib_iba7322.o qib_verbs.o
# 6120 has no fallback if no MSI interrupts, others can do INTx
ib_qib-$(CONFIG_PCI_MSI) += qib_iba6120.o
ib_qib-$(CONFIG_X86_64) += qib_wc_x86_64.o
ib_qib-$(CONFIG_PPC64) += qib_wc_ppc64.o
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -38,11 +38,10 @@ ...@@ -38,11 +38,10 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/delay.h> #include <linux/delay.h>
#include "ipath_kernel.h" #include "qib.h"
#include "ipath_registers.h" #include "qib_7220.h"
#include "ipath_7220.h"
static unsigned char ipath_sd7220_ib_img[] = { static unsigned char qib_sd7220_ib_img[] = {
/*0000*/0x02, 0x0A, 0x29, 0x02, 0x0A, 0x87, 0xE5, 0xE6, /*0000*/0x02, 0x0A, 0x29, 0x02, 0x0A, 0x87, 0xE5, 0xE6,
0x30, 0xE6, 0x04, 0x7F, 0x01, 0x80, 0x02, 0x7F, 0x30, 0xE6, 0x04, 0x7F, 0x01, 0x80, 0x02, 0x7F,
/*0010*/0x00, 0xE5, 0xE2, 0x30, 0xE4, 0x04, 0x7E, 0x01, /*0010*/0x00, 0xE5, 0xE2, 0x30, 0xE4, 0x04, 0x7E, 0x01,
...@@ -1069,14 +1068,14 @@ static unsigned char ipath_sd7220_ib_img[] = { ...@@ -1069,14 +1068,14 @@ static unsigned char ipath_sd7220_ib_img[] = {
0x01, 0x20, 0x11, 0x00, 0x04, 0x20, 0x00, 0x81 0x01, 0x20, 0x11, 0x00, 0x04, 0x20, 0x00, 0x81
}; };
int ipath_sd7220_ib_load(struct ipath_devdata *dd) int qib_sd7220_ib_load(struct qib_devdata *dd)
{ {
return ipath_sd7220_prog_ld(dd, IB_7220_SERDES, ipath_sd7220_ib_img, return qib_sd7220_prog_ld(dd, IB_7220_SERDES, qib_sd7220_ib_img,
sizeof(ipath_sd7220_ib_img), 0); sizeof(qib_sd7220_ib_img), 0);
} }
int ipath_sd7220_ib_vfy(struct ipath_devdata *dd) int qib_sd7220_ib_vfy(struct qib_devdata *dd)
{ {
return ipath_sd7220_prog_vfy(dd, IB_7220_SERDES, ipath_sd7220_ib_img, return qib_sd7220_prog_vfy(dd, IB_7220_SERDES, qib_sd7220_ib_img,
sizeof(ipath_sd7220_ib_img), 0); sizeof(qib_sd7220_ib_img), 0);
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -1172,7 +1172,9 @@ struct ib_client { ...@@ -1172,7 +1172,9 @@ struct ib_client {
struct ib_device *ib_alloc_device(size_t size); struct ib_device *ib_alloc_device(size_t size);
void ib_dealloc_device(struct ib_device *device); void ib_dealloc_device(struct ib_device *device);
int ib_register_device (struct ib_device *device); int ib_register_device(struct ib_device *device,
int (*port_callback)(struct ib_device *,
u8, struct kobject *));
void ib_unregister_device(struct ib_device *device); void ib_unregister_device(struct ib_device *device);
int ib_register_client (struct ib_client *client); int ib_register_client (struct ib_client *client);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment