Lines Matching refs:tdev

70 static inline int offload_activated(struct t3cdev *tdev)
72 const struct adapter *adapter = tdev2adap(tdev);
86 struct t3cdev *tdev;
92 list_for_each_entry(tdev, &ofld_dev_list, ofld_dev_list) {
93 if (offload_activated(tdev))
94 client->add(tdev);
111 struct t3cdev *tdev;
117 list_for_each_entry(tdev, &ofld_dev_list, ofld_dev_list) {
118 if (offload_activated(tdev))
119 client->remove(tdev);
129 * @tdev: the offload device
133 void cxgb3_add_clients(struct t3cdev *tdev)
140 client->add(tdev);
148 * @tdev: the offload device
152 void cxgb3_remove_clients(struct t3cdev *tdev)
159 client->remove(tdev);
164 void cxgb3_event_notify(struct t3cdev *tdev, u32 event, u32 port)
171 client->event_handler(tdev, event, port);
373 static int cxgb_offload_ctl(struct t3cdev *tdev, unsigned int req, void *data)
375 struct adapter *adapter = tdev2adap(tdev);
501 void *cxgb3_free_atid(struct t3cdev *tdev, int atid)
503 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps;
521 void cxgb3_free_stid(struct t3cdev *tdev, int stid)
523 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps;
535 void cxgb3_insert_tid(struct t3cdev *tdev, struct cxgb3_client *client,
538 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps;
565 struct t3cdev *tdev = td->dev;
586 cxgb3_ofld_send(tdev, skb);
604 void cxgb3_queue_tid_release(struct t3cdev *tdev, unsigned int tid)
606 struct t3c_data *td = T3C_DATA(tdev);
627 void cxgb3_remove_tid(struct t3cdev *tdev, void *ctx, unsigned int tid)
629 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps;
632 if (tdev->type == T3A)
640 cxgb3_ofld_send(tdev, skb);
643 cxgb3_queue_tid_release(tdev, tid);
650 int cxgb3_alloc_atid(struct t3cdev *tdev, struct cxgb3_client *client,
654 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps;
674 int cxgb3_alloc_stid(struct t3cdev *tdev, struct cxgb3_client *client,
678 struct tid_info *t = &(T3C_DATA(tdev))->tid_maps;
1081 struct t3cdev *tdev = dev2t3cdev(dev);
1083 BUG_ON(!tdev);
1084 t3_l2t_update(tdev, neigh);
1088 static void set_l2t_ix(struct t3cdev *tdev, u32 tid, struct l2t_entry *e)
1107 tdev->send(tdev, skb);
1116 struct t3cdev *tdev;
1126 tdev = dev2t3cdev(dev);
1127 BUG_ON(!tdev);
1130 e = t3_l2t_get(tdev, new, dev, daddr);
1137 ti = &(T3C_DATA(tdev))->tid_maps;
1145 l2t_hold(L2DATA(tdev), e);
1147 set_l2t_ix(tdev, tid, e);
1151 l2t_release(tdev, e);
1219 struct t3cdev *dev = &adapter->tdev;
1290 struct t3cdev *tdev = &adapter->tdev;
1291 struct t3c_data *t = T3C_DATA(tdev);
1299 T3C_DATA(tdev) = NULL;
1301 d = L2DATA(tdev);
1303 RCU_INIT_POINTER(tdev->l2opt, NULL);
1309 static inline void register_tdev(struct t3cdev *tdev)
1314 snprintf(tdev->name, sizeof(tdev->name), "ofld_dev%d", unit++);
1315 list_add_tail(&tdev->ofld_dev_list, &ofld_dev_list);
1319 static inline void unregister_tdev(struct t3cdev *tdev)
1322 list_del(&tdev->ofld_dev_list);
1347 struct t3cdev *tdev = &adapter->tdev;
1349 INIT_LIST_HEAD(&tdev->ofld_dev_list);
1351 cxgb3_set_dummy_ops(tdev);
1352 tdev->send = t3_offload_tx;
1353 tdev->ctl = cxgb_offload_ctl;
1354 tdev->type = adap2type(adapter);
1356 register_tdev(tdev);
1361 struct t3cdev *tdev = &adapter->tdev;
1363 tdev->recv = NULL;
1364 tdev->neigh_update = NULL;
1366 unregister_tdev(tdev);