Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88471
b: refs/heads/master
c: 37608ee
h: refs/heads/master
i:
  88469: e56e4cb
  88467: 870ae85
  88463: 3e09411
v: v3
  • Loading branch information
Roland Dreier committed Apr 17, 2008
1 parent 0878617 commit 92c8485
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 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: 26c4fc26d0af9b16a6a234318d15ee0b3896a63d
refs/heads/master: 37608eea86a358ac6a18df0af55d4f77d08a1f30
14 changes: 8 additions & 6 deletions trunk/drivers/infiniband/hw/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -675,18 +675,20 @@ static void mlx4_ib_remove(struct mlx4_dev *dev, void *ibdev_ptr)
}

static void mlx4_ib_event(struct mlx4_dev *dev, void *ibdev_ptr,
enum mlx4_dev_event event, int subtype,
int port)
enum mlx4_dev_event event, int port)
{
struct ib_event ibev;

switch (event) {
case MLX4_EVENT_TYPE_PORT_CHANGE:
ibev.event = subtype == MLX4_PORT_CHANGE_SUBTYPE_ACTIVE ?
IB_EVENT_PORT_ACTIVE : IB_EVENT_PORT_ERR;
case MLX4_DEV_EVENT_PORT_UP:
ibev.event = IB_EVENT_PORT_ACTIVE;
break;

case MLX4_EVENT_TYPE_LOCAL_CATAS_ERROR:
case MLX4_DEV_EVENT_PORT_DOWN:
ibev.event = IB_EVENT_PORT_ERR;
break;

case MLX4_DEV_EVENT_CATASTROPHIC_ERROR:
ibev.event = IB_EVENT_DEVICE_FATAL;
break;

Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/mlx4/catas.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static void poll_catas(unsigned long dev_ptr)
if (readl(priv->catas_err.map)) {
dump_err_buf(dev);

mlx4_dispatch_event(dev, MLX4_EVENT_TYPE_LOCAL_CATAS_ERROR, 0, 0);
mlx4_dispatch_event(dev, MLX4_DEV_EVENT_CATASTROPHIC_ERROR, 0);

if (internal_err_reset) {
spin_lock(&catas_lock);
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/net/mlx4/eq.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ static int mlx4_eq_int(struct mlx4_dev *dev, struct mlx4_eq *eq)
break;

case MLX4_EVENT_TYPE_PORT_CHANGE:
mlx4_dispatch_event(dev, eqe->type, eqe->subtype,
mlx4_dispatch_event(dev,
eqe->subtype == MLX4_PORT_CHANGE_SUBTYPE_ACTIVE ?
MLX4_DEV_EVENT_PORT_UP :
MLX4_DEV_EVENT_PORT_DOWN,
be32_to_cpu(eqe->event.port_change.port) >> 28);
break;

Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/net/mlx4/intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
* SOFTWARE.
*/

#include <linux/mlx4/driver.h>

#include "mlx4.h"

struct mlx4_device_context {
Expand Down Expand Up @@ -113,8 +111,7 @@ void mlx4_unregister_interface(struct mlx4_interface *intf)
}
EXPORT_SYMBOL_GPL(mlx4_unregister_interface);

void mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_event type,
int subtype, int port)
void mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_dev_event type, int port)
{
struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_device_context *dev_ctx;
Expand All @@ -124,8 +121,7 @@ void mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_event type,

list_for_each_entry(dev_ctx, &priv->ctx_list, list)
if (dev_ctx->intf->event)
dev_ctx->intf->event(dev, dev_ctx->context, type,
subtype, port);
dev_ctx->intf->event(dev, dev_ctx->context, type, port);

spin_unlock_irqrestore(&priv->ctx_lock, flags);
}
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/mlx4/mlx4.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include <linux/timer.h>

#include <linux/mlx4/device.h>
#include <linux/mlx4/driver.h>
#include <linux/mlx4/doorbell.h>

#define DRV_NAME "mlx4_core"
Expand Down Expand Up @@ -313,8 +314,7 @@ void mlx4_catas_cleanup(void);
int mlx4_restart_one(struct pci_dev *pdev);
int mlx4_register_device(struct mlx4_dev *dev);
void mlx4_unregister_device(struct mlx4_dev *dev);
void mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_event type,
int subtype, int port);
void mlx4_dispatch_event(struct mlx4_dev *dev, enum mlx4_dev_event type, int port);

struct mlx4_dev_cap;
struct mlx4_init_hca_param;
Expand Down
3 changes: 1 addition & 2 deletions trunk/include/linux/mlx4/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ struct mlx4_interface {
void * (*add) (struct mlx4_dev *dev);
void (*remove)(struct mlx4_dev *dev, void *context);
void (*event) (struct mlx4_dev *dev, void *context,
enum mlx4_dev_event event, int subtype,
int port);
enum mlx4_dev_event event, int port);
struct list_head list;
};

Expand Down

0 comments on commit 92c8485

Please sign in to comment.