Lines Matching defs:sa_ctl
100 struct edif_sa_ctl *sa_ctl;
128 sa_ctl = qla_edif_find_sa_ctl_by_index(fcport,
131 if (sa_ctl) {
133 "%s: sa_ctl: %p, delete index %d, update index: %d, lid: 0x%x\n",
134 __func__, sa_ctl, delete_sa_index, edif_entry->update_sa_index,
137 sa_ctl->flags = EDIF_SA_CTL_FLG_DEL;
138 set_bit(EDIF_SA_CTL_REPL, &sa_ctl->state);
140 nport_handle, sa_ctl);
144 "%s: sa_ctl not found for delete_sa_index: %d\n",
204 fc_port_t *fcport, uint16_t nport_handle, struct edif_sa_ctl *sa_ctl)
213 e->u.sa_update.sa_ctl = sa_ctl;
318 qla_edif_free_sa_ctl(fc_port_t *fcport, struct edif_sa_ctl *sa_ctl,
324 list_del(&sa_ctl->next);
330 kfree(sa_ctl);
365 struct edif_sa_ctl *sa_ctl;
380 /* release the sa_ctl */
381 sa_ctl = qla_edif_find_sa_ctl_by_index(fcport,
383 if (sa_ctl &&
384 qla_edif_find_sa_ctl_by_index(fcport, sa_ctl->index, pdir)) {
386 "%s: freeing sa_ctl for index %d\n", __func__, sa_ctl->index);
387 qla_edif_free_sa_ctl(fcport, sa_ctl, sa_ctl->index);
390 "%s: sa_ctl NOT freed, sa_ctl: %p\n", __func__, sa_ctl);
1390 struct edif_sa_ctl *sa_ctl;
1395 sa_ctl = kzalloc(sizeof(*sa_ctl), GFP_KERNEL);
1396 if (!sa_ctl) {
1405 * in both sa_ctl->index and sa_frame->fast_sa_index;
1406 * If alloc fails then delete sa_ctl and return NULL
1408 INIT_LIST_HEAD(&sa_ctl->next);
1409 sap = &sa_ctl->sa_frame;
1411 sa_ctl->index = index;
1412 sa_ctl->fcport = fcport;
1413 sa_ctl->flags = 0;
1414 sa_ctl->state = 0L;
1416 "%s: Added sa_ctl %p, index %d, state 0x%lx\n",
1417 __func__, sa_ctl, sa_ctl->index, sa_ctl->state);
1420 list_add_tail(&sa_ctl->next, &fcport->edif.tx_sa_list);
1422 list_add_tail(&sa_ctl->next, &fcport->edif.rx_sa_list);
1425 return sa_ctl;
1431 struct edif_sa_ctl *sa_ctl, *tsa_ctl;
1436 list_for_each_entry_safe(sa_ctl, tsa_ctl, &fcport->edif.tx_sa_list,
1438 list_del(&sa_ctl->next);
1439 kfree(sa_ctl);
1442 list_for_each_entry_safe(sa_ctl, tsa_ctl, &fcport->edif.rx_sa_list,
1444 list_del(&sa_ctl->next);
1445 kfree(sa_ctl);
1454 struct edif_sa_ctl *sa_ctl, *tsa_ctl;
1462 list_for_each_entry_safe(sa_ctl, tsa_ctl, sa_list, next) {
1463 if (test_bit(EDIF_SA_CTL_USED, &sa_ctl->state) &&
1464 sa_ctl->index == index)
1465 return sa_ctl;
1475 struct edif_sa_ctl *sa_ctl = NULL;
1512 /* create the sa_ctl */
1513 sa_ctl = qla_edif_add_sa_ctl(fcport, sa_frame, dir);
1514 if (!sa_ctl) {
1516 "%s: Failed to add sa_ctl for spi 0x%x, dir: %d, sa_index: %d\n",
1521 set_bit(EDIF_SA_CTL_USED, &sa_ctl->state);
1529 "%s: Found sa_ctl %p, index %d, state 0x%lx, tx_cnt %d, rx_cnt %d, nport_handle: 0x%x\n",
1530 __func__, sa_ctl, sa_ctl->index, sa_ctl->state,
1613 /* allocate and queue an sa_ctl */
1679 struct edif_sa_ctl *sa_ctl;
1685 /* free up the sa_ctl that was allocated with the sa_index */
1686 sa_ctl = qla_edif_find_sa_ctl_by_index(fcport, sa_index,
1688 if (sa_ctl) {
1690 "%s: freeing sa_ctl for index %d\n",
1691 __func__, sa_ctl->index);
1692 qla_edif_free_sa_ctl(fcport, sa_ctl, sa_ctl->index);
2355 struct edif_sa_ctl *sa_ctl = e->u.sa_update.sa_ctl;
2359 "%s: starting, sa_ctl: %p\n", __func__, sa_ctl);
2361 if (!sa_ctl) {
2363 "sa_ctl allocation failed\n");
2368 fcport = sa_ctl->fcport;
2381 iocb_cmd->u.sa_update.sa_ctl = sa_ctl;
2384 "Enter: SA REPL portid=%06x, sa_ctl %p, index %x, nport_handle: 0x%x\n",
2385 fcport->d_id.b24, sa_ctl, sa_ctl->index, nport_handle);
2390 if (sa_ctl->flags & EDIF_SA_CTL_FLG_CLEANUP_DEL) {
2502 struct edif_sa_ctl *sa_ctl = srb_iocb->u.sa_update.sa_ctl;
2522 sa_update_iocb->sa_index = cpu_to_le16(sa_ctl->index);
2785 struct edif_sa_ctl *sa_ctl;
2916 /* for delete, release sa_ctl, sa_index */
2918 /* release the sa_ctl */
2919 sa_ctl = qla_edif_find_sa_ctl_by_index(sp->fcport,
2921 if (sa_ctl &&
2922 qla_edif_find_sa_ctl_by_index(sp->fcport, sa_ctl->index,
2925 "%s: freeing sa_ctl for index %d\n",
2926 __func__, sa_ctl->index);
2927 qla_edif_free_sa_ctl(sp->fcport, sa_ctl, sa_ctl->index);
2930 "%s: sa_ctl NOT freed, sa_ctl: %p\n",
2931 __func__, sa_ctl);
3416 struct edif_sa_ctl *sa_ctl;
3464 /* find the sa_ctl for the delete and schedule the delete */
3465 sa_ctl = qla_edif_find_sa_ctl_by_index(fcport, delete_sa_index, 0);
3466 if (sa_ctl) {
3468 "%s: POST SA DELETE sa_ctl: %p, index recvd %d\n",
3469 __func__, sa_ctl, sa_index);
3475 sa_ctl->flags = EDIF_SA_CTL_FLG_DEL;
3476 set_bit(EDIF_SA_CTL_REPL, &sa_ctl->state);
3478 nport_handle, sa_ctl);
3481 "%s: POST SA DELETE sa_ctl not found for delete_sa_index: %d\n",