]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
cxgb3 - add missing adapter type for RDMA
authorDivy Le Ray <divy@chelsio.com>
Mon, 23 Jun 2008 18:02:59 +0000 (11:02 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 25 Jun 2008 02:59:33 +0000 (22:59 -0400)
T3C added support is now reflected to the RDMA driver.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/cxgb3/cxgb3_offload.c
drivers/net/cxgb3/t3cdev.h

index ff9c013ce5357114f6aff22456cb45e3e020659b..ae6ff5df779c9aabf2338c6724e3f51f9d48de91 100644 (file)
@@ -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;
@@ -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);
 }
index a18c8a140424b54407af52947a975e09a4215350..8556628fd5afd425b66cc54a9ad11199ab813565 100644 (file)
@@ -45,7 +45,8 @@ struct cxgb3_client;
 
 enum t3ctype {
        T3A = 0,
-       T3B
+       T3B,
+       T3C,
 };
 
 struct t3cdev {