Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103109
b: refs/heads/master
c: 8f85cd7
h: refs/heads/master
i:
  103107: 107657d
v: v3
  • Loading branch information
Divy Le Ray authored and Jeff Garzik committed Jun 25, 2008
1 parent a3e9233 commit 2605a30
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 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: 78a655181409d9d0f2b730ccb897c18794826495
refs/heads/master: 8f85cd7fefa3d01c4e05aac1cb198733336cf44b
21 changes: 20 additions & 1 deletion trunk/drivers/net/cxgb3/cxgb3_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,25 @@ static inline void unregister_tdev(struct t3cdev *tdev)
mutex_unlock(&cxgb3_db_lock);
}

static inline int adap2type(struct adapter *adapter)
{
int type = 0;

switch (adapter->params.rev) {
case T3_REV_A:
type = T3A;
break;
case T3_REV_B:
case T3_REV_B2:
type = T3B;
break;
case T3_REV_C:
type = T3C;
break;
}
return type;
}

void __devinit cxgb3_adapter_ofld(struct adapter *adapter)
{
struct t3cdev *tdev = &adapter->tdev;
Expand All @@ -1257,7 +1276,7 @@ void __devinit cxgb3_adapter_ofld(struct adapter *adapter)
cxgb3_set_dummy_ops(tdev);
tdev->send = t3_offload_tx;
tdev->ctl = cxgb_offload_ctl;
tdev->type = adapter->params.rev == 0 ? T3A : T3B;
tdev->type = adap2type(adapter);

register_tdev(tdev);
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/net/cxgb3/t3cdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ struct cxgb3_client;

enum t3ctype {
T3A = 0,
T3B
T3B,
T3C,
};

struct t3cdev {
Expand Down

0 comments on commit 2605a30

Please sign in to comment.