Lines Matching defs:cdev
187 l2t_send(csk->cdev->lldev, skb, csk->l2t);
268 l2t_send(csk->cdev->lldev, skb, csk->l2t);
291 cxgb3_ofld_send(csk->cdev->lldev, skb);
320 cxgb3_ofld_send(csk->cdev->lldev, skb);
455 l2t_send(csk->cdev->lldev, skb, csk->l2t);
469 cxgb3_free_atid(csk->cdev->lldev, csk->atid);
490 cxgb3_insert_tid(csk->cdev->lldev, &t3_client, csk, tid);
606 static int do_peer_close(struct t3cdev *cdev, struct sk_buff *skb, void *ctx)
623 static int do_close_con_rpl(struct t3cdev *cdev, struct sk_buff *skb,
661 static int do_abort_req(struct t3cdev *cdev, struct sk_buff *skb, void *ctx)
708 static int do_abort_rpl(struct t3cdev *cdev, struct sk_buff *skb, void *ctx)
780 csk->cdev->ports[csk->port_id]->name, csk->tid,
790 csk->cdev->ports[csk->port_id]->name, csk->tid,
815 csk->cdev->ports[csk->port_id]->name,
848 static int do_wr_ack(struct t3cdev *cdev, struct sk_buff *skb, void *ctx)
891 struct t3cdev *t3dev = (struct t3cdev *)csk->cdev->lldev;
906 struct t3cdev *t3dev = (struct t3cdev *)csk->cdev->lldev;
928 csk->cdev = NULL;
956 struct cxgbi_device *cdev = csk->cdev;
957 struct t3cdev *t3dev = (struct t3cdev *)cdev->lldev;
958 struct net_device *ndev = cdev->ports[csk->port_id];
959 struct cxgbi_hba *chba = cdev->hbas[csk->port_id];
1037 * @cdev: cxgbi adapter
1039 static int cxgb3i_ofld_init(struct cxgbi_device *cdev)
1041 struct t3cdev *t3dev = (struct t3cdev *)cdev->lldev;
1057 rc = cxgbi_device_portmap_create(cdev, cxgb3i_sport_base,
1063 cdev->csk_release_offload_resources = release_offload_resources;
1064 cdev->csk_push_tx_frames = push_tx_frames;
1065 cdev->csk_send_abort_req = send_abort_req;
1066 cdev->csk_send_close_req = send_close_req;
1067 cdev->csk_send_rx_credits = send_rx_credits;
1068 cdev->csk_alloc_cpls = alloc_cpls;
1069 cdev->csk_init_act_open = init_act_open;
1071 pr_info("cdev 0x%p, offload up, added.\n", cdev);
1091 static struct cxgbi_ppm *cdev2ppm(struct cxgbi_device *cdev)
1093 return ((struct t3cdev *)cdev->lldev)->ulp_iscsi;
1126 static void ddp_clear_map(struct cxgbi_device *cdev, struct cxgbi_ppm *ppm,
1135 "cdev 0x%p, clear idx %u, npods %u.\n",
1136 cdev, idx, npods);
1143 pr_err("cdev 0x%p, clear ddp, %u,%d/%u, skb OOM.\n",
1144 cdev, idx, i, npods);
1177 cxgb3_ofld_send(csk->cdev->lldev, skb);
1213 cxgb3_ofld_send(csk->cdev->lldev, skb);
1219 * @cdev: cxgb3i adapter
1222 static int cxgb3i_ddp_init(struct cxgbi_device *cdev)
1224 struct t3cdev *tdev = (struct t3cdev *)cdev->lldev;
1225 struct net_device *ndev = cdev->ports[0];
1255 err = cxgbi_ddp_ppm_setup(&tdev->ulp_iscsi, cdev, &tformat,
1261 if (!(cdev->flags & CXGBI_FLAG_DDP_OFF)) {
1269 cdev->flags |= CXGBI_FLAG_DDP_OFF;
1274 cdev->csk_ddp_setup_digest = ddp_setup_conn_digest;
1275 cdev->csk_ddp_setup_pgidx = ddp_setup_conn_pgidx;
1276 cdev->csk_ddp_set_map = ddp_set_map;
1277 cdev->csk_ddp_clear_map = ddp_clear_map;
1278 cdev->cdev2ppm = cdev2ppm;
1279 cdev->tx_max_size = min_t(unsigned int, ULP2_MAX_PDU_PAYLOAD,
1281 cdev->rx_max_size = min_t(unsigned int, ULP2_MAX_PDU_PAYLOAD,
1289 struct cxgbi_device *cdev = cxgbi_device_find_by_lldev(t3dev);
1291 if (!cdev || cdev->flags & CXGBI_FLAG_ADAPTER_RESET) {
1292 pr_info("0x%p close, f 0x%x.\n", cdev, cdev ? cdev->flags : 0);
1296 cxgbi_device_unregister(cdev);
1305 struct cxgbi_device *cdev = cxgbi_device_find_by_lldev(t3dev);
1309 if (cdev) {
1310 pr_info("0x%p, updating.\n", cdev);
1314 cdev = cxgbi_device_register(0, adapter->params.nports);
1315 if (!cdev) {
1320 cdev->flags = CXGBI_FLAG_DEV_T3 | CXGBI_FLAG_IPV4_SET;
1321 cdev->lldev = t3dev;
1322 cdev->pdev = adapter->pdev;
1323 cdev->ports = adapter->port;
1324 cdev->nports = adapter->params.nports;
1325 cdev->mtus = adapter->params.mtus;
1326 cdev->nmtus = NMTUS;
1327 cdev->rx_credit_thres = cxgb3i_rx_credit_thres;
1328 cdev->skb_tx_rsvd = CXGB3I_TX_HEADER_LEN;
1329 cdev->skb_rx_extra = sizeof(struct cpl_iscsi_hdr_norss);
1330 cdev->itp = &cxgb3i_iscsi_transport;
1332 err = cxgb3i_ddp_init(cdev);
1334 pr_info("0x%p ddp init failed %d\n", cdev, err);
1338 err = cxgb3i_ofld_init(cdev);
1340 pr_info("0x%p offload init failed\n", cdev);
1344 err = cxgbi_hbas_add(cdev, CXGB3I_MAX_LUN, CXGBI_MAX_CONN,
1349 for (i = 0; i < cdev->nports; i++)
1350 cdev->hbas[i]->ipv4addr =
1351 cxgb3i_get_private_ipv4addr(cdev->ports[i]);
1353 pr_info("cdev 0x%p, f 0x%x, t3dev 0x%p open, err %d.\n",
1354 cdev, cdev ? cdev->flags : 0, t3dev, err);
1358 cxgbi_device_unregister(cdev);
1363 struct cxgbi_device *cdev = cxgbi_device_find_by_lldev(t3dev);
1366 "0x%p, cdev 0x%p, event 0x%x, port 0x%x.\n",
1367 t3dev, cdev, event, port);
1368 if (!cdev)
1373 cdev->flags |= CXGBI_FLAG_ADAPTER_RESET;
1376 cdev->flags &= ~CXGBI_FLAG_ADAPTER_RESET;