Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192466
b: refs/heads/master
c: 2110f9b
h: refs/heads/master
v: v3
  • Loading branch information
Or Gerlitz authored and Roland Dreier committed May 12, 2010
1 parent 5fef8a7 commit 90f651e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d414371795d54fa916938f948105d08928abfbb9
refs/heads/master: 2110f9bf37511df06220bb7e977f417baecf2950
20 changes: 0 additions & 20 deletions trunk/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,6 @@ static u32 ipoib_get_rx_csum(struct net_device *dev)
!test_bit(IPOIB_FLAG_ADMIN_CM, &priv->flags);
}

static int ipoib_set_tso(struct net_device *dev, u32 data)
{
struct ipoib_dev_priv *priv = netdev_priv(dev);

if (data) {
if (!test_bit(IPOIB_FLAG_ADMIN_CM, &priv->flags) &&
(dev->features & NETIF_F_SG) &&
(priv->hca_caps & IB_DEVICE_UD_TSO)) {
dev->features |= NETIF_F_TSO;
} else {
ipoib_warn(priv, "can't set TSO on\n");
return -EOPNOTSUPP;
}
} else
dev->features &= ~NETIF_F_TSO;

return 0;
}

static int ipoib_get_coalesce(struct net_device *dev,
struct ethtool_coalesce *coal)
{
Expand Down Expand Up @@ -150,7 +131,6 @@ static void ipoib_get_ethtool_stats(struct net_device *dev,
static const struct ethtool_ops ipoib_ethtool_ops = {
.get_drvinfo = ipoib_get_drvinfo,
.get_rx_csum = ipoib_get_rx_csum,
.set_tso = ipoib_set_tso,
.get_coalesce = ipoib_get_coalesce,
.set_coalesce = ipoib_set_coalesce,
.get_flags = ethtool_op_get_flags,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/infiniband/ulp/iser/iscsi_iser.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ struct iser_device {
struct ib_cq *tx_cq;
struct ib_mr *mr;
struct tasklet_struct cq_tasklet;
struct ib_event_handler event_handler;
struct list_head ig_list; /* entry in ig devices list */
int refcount;
};
Expand Down
16 changes: 15 additions & 1 deletion trunk/drivers/infiniband/ulp/iser/iser_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ static void iser_qp_event_callback(struct ib_event *cause, void *context)
iser_err("got qp event %d\n",cause->event);
}

static void iser_event_handler(struct ib_event_handler *handler,
struct ib_event *event)
{
iser_err("async event %d on device %s port %d\n", event->event,
event->device->name, event->element.port_num);
}

/**
* iser_create_device_ib_res - creates Protection Domain (PD), Completion
* Queue (CQ), DMA Memory Region (DMA MR) with the device associated with
Expand Down Expand Up @@ -96,8 +103,15 @@ static int iser_create_device_ib_res(struct iser_device *device)
if (IS_ERR(device->mr))
goto dma_mr_err;

INIT_IB_EVENT_HANDLER(&device->event_handler, device->ib_device,
iser_event_handler);
if (ib_register_event_handler(&device->event_handler))
goto handler_err;

return 0;

handler_err:
ib_dereg_mr(device->mr);
dma_mr_err:
tasklet_kill(&device->cq_tasklet);
cq_arm_err:
Expand All @@ -120,7 +134,7 @@ static void iser_free_device_ib_res(struct iser_device *device)
BUG_ON(device->mr == NULL);

tasklet_kill(&device->cq_tasklet);

(void)ib_unregister_event_handler(&device->event_handler);
(void)ib_dereg_mr(device->mr);
(void)ib_destroy_cq(device->tx_cq);
(void)ib_destroy_cq(device->rx_cq);
Expand Down

0 comments on commit 90f651e

Please sign in to comment.