15 static void bnx2fc_upld_timer(
unsigned long data);
16 static void bnx2fc_ofld_timer(
unsigned long data);
22 static int bnx2fc_alloc_session_resc(
struct bnx2fc_hba *hba,
24 static void bnx2fc_free_session_resc(
struct bnx2fc_hba *hba,
28 static void bnx2fc_upld_timer(
unsigned long data)
40 static void bnx2fc_ofld_timer(
unsigned long data)
75 rval = bnx2fc_init_tgt(tgt, port, rdata);
78 "port_id (%6x)\n", rport->
port_id);
83 rval = bnx2fc_alloc_session_resc(hba, tgt);
122 "retry ofld..%d\n", i++);
135 lport->
tt.rport_logoff(rdata);
143 bnx2fc_free_session_resc(hba, tgt);
147 lport->
tt.rport_logoff(rdata);
164 list_del_init(&io_req->
link);
194 list_del_init(&io_req->
link);
203 list_del_init(&io_req->
link);
228 list_del_init(&io_req->
link);
255 " active_ios = %d\n",
262 static void bnx2fc_upload_session(
struct fcoe_port *port,
300 BNX2FC_TGT_DBG(tgt,
"flush/upload - disable wait flags = 0x%lx\n",
312 bnx2fc_upld_timer, (
unsigned long)tgt);
332 " not sent to FW\n");
335 " not sent to FW\n");
339 bnx2fc_free_session_resc(hba, tgt);
433 struct fcoe_port *port = lport_priv(lport);
441 BNX2FC_HBA_DBG(lport,
"rport_event_hdlr: event = %d, port_id = 0x%x\n",
442 event, rdata->
ids.port_id);
465 " not offloading\n");
470 " not offloading\n");
492 bnx2fc_offload_session(port, tgt, rdata);
514 "offloaded flag not set\n");
521 port_id = rdata->
ids.port_id;
544 bnx2fc_upload_session(port, tgt);
559 lport->
tt.rport_login(rdata);
588 if ((tgt) && (tgt->
port == port)) {
590 if (rdata->
ids.port_id == port_id) {
597 "is in DELETED state\n",
638 if (conn_id == next) {
650 static void bnx2fc_free_conn_id(
struct bnx2fc_hba *hba,
u32 conn_id)
662 static int bnx2fc_alloc_session_resc(
struct bnx2fc_hba *hba,
678 goto mem_alloc_failure;
691 goto mem_alloc_failure;
704 goto mem_alloc_failure;
716 goto mem_alloc_failure;
724 while (num_pages--) {
727 *pbl = (
u32)((
u64)page >> 32);
742 goto mem_alloc_failure;
756 goto mem_alloc_failure;
771 goto mem_alloc_failure;
779 while (num_pages--) {
782 *pbl = (
u32)((
u64)page >> 32);
796 goto mem_alloc_failure;
812 goto mem_alloc_failure;
816 tgt->
conn_db->rq_prod = 0x8000;
832 static void bnx2fc_free_session_resc(
struct bnx2fc_hba *hba,