Lines Matching defs:cdev
186 l2t_send(csk->cdev->lldev, skb, csk->l2t);
267 l2t_send(csk->cdev->lldev, skb, csk->l2t);
290 cxgb3_ofld_send(csk->cdev->lldev, skb);
319 cxgb3_ofld_send(csk->cdev->lldev, skb);
454 l2t_send(csk->cdev->lldev, skb, csk->l2t);
468 cxgb3_free_atid(csk->cdev->lldev, csk->atid);
489 cxgb3_insert_tid(csk->cdev->lldev, &t3_client, csk, tid);
605 static int do_peer_close(struct t3cdev *cdev, struct sk_buff *skb, void *ctx)
622 static int do_close_con_rpl(struct t3cdev *cdev, struct sk_buff *skb,
660 static int do_abort_req(struct t3cdev *cdev, struct sk_buff *skb, void *ctx)
707 static int do_abort_rpl(struct t3cdev *cdev, struct sk_buff *skb, void *ctx)
779 csk->cdev->ports[csk->port_id]->name, csk->tid,
789 csk->cdev->ports[csk->port_id]->name, csk->tid,
814 csk->cdev->ports[csk->port_id]->name,
847 static int do_wr_ack(struct t3cdev *cdev, struct sk_buff *skb, void *ctx)
890 struct t3cdev *t3dev = (struct t3cdev *)csk->cdev->lldev;
905 struct t3cdev *t3dev = (struct t3cdev *)csk->cdev->lldev;
927 csk->cdev = NULL;
955 struct cxgbi_device *cdev = csk->cdev;
956 struct t3cdev *t3dev = (struct t3cdev *)cdev->lldev;
957 struct net_device *ndev = cdev->ports[csk->port_id];
958 struct cxgbi_hba *chba = cdev->hbas[csk->port_id];
1036 * @cdev: cxgbi adapter
1038 static int cxgb3i_ofld_init(struct cxgbi_device *cdev)
1040 struct t3cdev *t3dev = (struct t3cdev *)cdev->lldev;
1056 rc = cxgbi_device_portmap_create(cdev, cxgb3i_sport_base,
1062 cdev->csk_release_offload_resources = release_offload_resources;
1063 cdev->csk_push_tx_frames = push_tx_frames;
1064 cdev->csk_send_abort_req = send_abort_req;
1065 cdev->csk_send_close_req = send_close_req;
1066 cdev->csk_send_rx_credits = send_rx_credits;
1067 cdev->csk_alloc_cpls = alloc_cpls;
1068 cdev->csk_init_act_open = init_act_open;
1070 pr_info("cdev 0x%p, offload up, added.\n", cdev);
1090 static struct cxgbi_ppm *cdev2ppm(struct cxgbi_device *cdev)
1092 return ((struct t3cdev *)cdev->lldev)->ulp_iscsi;
1125 static void ddp_clear_map(struct cxgbi_device *cdev, struct cxgbi_ppm *ppm,
1134 "cdev 0x%p, clear idx %u, npods %u.\n",
1135 cdev, idx, npods);
1142 pr_err("cdev 0x%p, clear ddp, %u,%d/%u, skb OOM.\n",
1143 cdev, idx, i, npods);
1176 cxgb3_ofld_send(csk->cdev->lldev, skb);
1212 cxgb3_ofld_send(csk->cdev->lldev, skb);
1218 * @cdev: cxgb3i adapter
1221 static int cxgb3i_ddp_init(struct cxgbi_device *cdev)
1223 struct t3cdev *tdev = (struct t3cdev *)cdev->lldev;
1224 struct net_device *ndev = cdev->ports[0];
1254 err = cxgbi_ddp_ppm_setup(&tdev->ulp_iscsi, cdev, &tformat,
1260 if (!(cdev->flags & CXGBI_FLAG_DDP_OFF)) {
1268 cdev->flags |= CXGBI_FLAG_DDP_OFF;
1273 cdev->csk_ddp_setup_digest = ddp_setup_conn_digest;
1274 cdev->csk_ddp_setup_pgidx = ddp_setup_conn_pgidx;
1275 cdev->csk_ddp_set_map = ddp_set_map;
1276 cdev->csk_ddp_clear_map = ddp_clear_map;
1277 cdev->cdev2ppm = cdev2ppm;
1278 cdev->tx_max_size = min_t(unsigned int, ULP2_MAX_PDU_PAYLOAD,
1280 cdev->rx_max_size = min_t(unsigned int, ULP2_MAX_PDU_PAYLOAD,
1288 struct cxgbi_device *cdev = cxgbi_device_find_by_lldev(t3dev);
1290 if (!cdev || cdev->flags & CXGBI_FLAG_ADAPTER_RESET) {
1291 pr_info("0x%p close, f 0x%x.\n", cdev, cdev ? cdev->flags : 0);
1295 cxgbi_device_unregister(cdev);
1304 struct cxgbi_device *cdev = cxgbi_device_find_by_lldev(t3dev);
1308 if (cdev) {
1309 pr_info("0x%p, updating.\n", cdev);
1313 cdev = cxgbi_device_register(0, adapter->params.nports);
1314 if (!cdev) {
1319 cdev->flags = CXGBI_FLAG_DEV_T3 | CXGBI_FLAG_IPV4_SET;
1320 cdev->lldev = t3dev;
1321 cdev->pdev = adapter->pdev;
1322 cdev->ports = adapter->port;
1323 cdev->nports = adapter->params.nports;
1324 cdev->mtus = adapter->params.mtus;
1325 cdev->nmtus = NMTUS;
1326 cdev->rx_credit_thres = cxgb3i_rx_credit_thres;
1327 cdev->skb_tx_rsvd = CXGB3I_TX_HEADER_LEN;
1328 cdev->skb_rx_extra = sizeof(struct cpl_iscsi_hdr_norss);
1329 cdev->itp = &cxgb3i_iscsi_transport;
1331 err = cxgb3i_ddp_init(cdev);
1333 pr_info("0x%p ddp init failed %d\n", cdev, err);
1337 err = cxgb3i_ofld_init(cdev);
1339 pr_info("0x%p offload init failed\n", cdev);
1343 err = cxgbi_hbas_add(cdev, CXGB3I_MAX_LUN, CXGBI_MAX_CONN,
1348 for (i = 0; i < cdev->nports; i++)
1349 cdev->hbas[i]->ipv4addr =
1350 cxgb3i_get_private_ipv4addr(cdev->ports[i]);
1352 pr_info("cdev 0x%p, f 0x%x, t3dev 0x%p open, err %d.\n",
1353 cdev, cdev ? cdev->flags : 0, t3dev, err);
1357 cxgbi_device_unregister(cdev);
1362 struct cxgbi_device *cdev = cxgbi_device_find_by_lldev(t3dev);
1365 "0x%p, cdev 0x%p, event 0x%x, port 0x%x.\n",
1366 t3dev, cdev, event, port);
1367 if (!cdev)
1372 cdev->flags |= CXGBI_FLAG_ADAPTER_RESET;
1375 cdev->flags &= ~CXGBI_FLAG_ADAPTER_RESET;