LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au> To: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Quinn Tran <quinn.tran@cavium.com>, Himanshu Madhani <himanshu.madhani@cavium.com> Subject: linux-next: manual merge of the scsi-mkp tree with Linus' tree Date: Fri, 3 Aug 2018 16:22:21 +1000 [thread overview] Message-ID: <20180803162221.592b28ed@canb.auug.org.au> (raw) [-- Attachment #1: Type: text/plain, Size: 4465 bytes --] Hi all, Today's linux-next merge of the scsi-mkp tree got a conflict in: drivers/scsi/qla2xxx/qla_init.c between commit: 36eb8ff672fa ("scsi: qla2xxx: Fix NULL pointer dereference for fcport search") from Linus' tree and commit: 48acad099074 ("scsi: qla2xxx: Fix N2N link re-connect") from the scsi-mkp tree. I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. Martin, thanks for the heads up, but I think my resolution below is more correct than the one you were supplied with as the ql_dbg() function needs this many arguments. -- Cheers, Stephen Rothwell diff --cc drivers/scsi/qla2xxx/qla_init.c index 1b19b954bbae,f52c68b4da44..000000000000 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@@ -578,34 -693,76 +693,79 @@@ static void qla24xx_handle_gnl_done_eve } if (!found) { - /* fw has no record of this port */ - for (i = 0; i < n; i++) { - e = &vha->gnl.l[i]; - id.b.domain = e->port_id[0]; - id.b.area = e->port_id[1]; - id.b.al_pa = e->port_id[2]; - id.b.rsvd_1 = 0; - loop_id = le16_to_cpu(e->nport_handle); - - if (fcport->d_id.b24 == id.b24) { - conflict_fcport = - qla2x00_find_fcport_by_wwpn(vha, - e->port_name, 0); - if (conflict_fcport) { - qlt_schedule_sess_for_deletion - (conflict_fcport); - ql_dbg(ql_dbg_disc, vha, 0x20e6, - "%s %d %8phC post del sess\n", - __func__, __LINE__, - conflict_fcport->port_name); + switch (vha->hw->current_topology) { + case ISP_CFG_F: + case ISP_CFG_FL: + for (i = 0; i < n; i++) { + e = &vha->gnl.l[i]; + id.b.domain = e->port_id[0]; + id.b.area = e->port_id[1]; + id.b.al_pa = e->port_id[2]; + id.b.rsvd_1 = 0; + loop_id = le16_to_cpu(e->nport_handle); + + if (fcport->d_id.b24 == id.b24) { + conflict_fcport = + qla2x00_find_fcport_by_wwpn(vha, + e->port_name, 0); - ql_dbg(ql_dbg_disc + ql_dbg_verbose, - vha, 0x20e5, - "%s %d %8phC post del sess\n", - __func__, __LINE__, - conflict_fcport->port_name); - qlt_schedule_sess_for_deletion - (conflict_fcport); ++ if (conflict_fcport) { ++ ql_dbg(ql_dbg_disc + ++ ql_dbg_verbose, ++ vha, 0x20e5, ++ "%s %d %8phC post del sess\n", ++ __func__, __LINE__, ++ conflict_fcport->port_name); ++ qlt_schedule_sess_for_deletion ++ (conflict_fcport); ++ } } + /* + * FW already picked this loop id for + * another fcport + */ + if (fcport->loop_id == loop_id) + fcport->loop_id = FC_NO_LOOP_ID; } - - /* FW already picked this loop id for another fcport */ - if (fcport->loop_id == loop_id) - fcport->loop_id = FC_NO_LOOP_ID; + qla24xx_fcport_handle_login(vha, fcport); + break; + case ISP_CFG_N: + fcport->disc_state = DSC_DELETED; + if (time_after_eq(jiffies, fcport->dm_login_expire)) { + if (fcport->n2n_link_reset_cnt < 2) { + fcport->n2n_link_reset_cnt++; + /* + * remote port is not sending PLOGI. + * Reset link to kick start his state + * machine + */ + set_bit(N2N_LINK_RESET, + &vha->dpc_flags); + } else { + if (fcport->n2n_chip_reset < 1) { + ql_log(ql_log_info, vha, 0x705d, + "Chip reset to bring laser down"); + set_bit(ISP_ABORT_NEEDED, + &vha->dpc_flags); + fcport->n2n_chip_reset++; + } else { + ql_log(ql_log_info, vha, 0x705d, + "Remote port %8ph is not coming back\n", + fcport->port_name); + fcport->scan_state = 0; + } + } + qla2xxx_wake_dpc(vha); + } else { + /* + * report port suppose to do PLOGI. Give him + * more time. FW will catch it. + */ + set_bit(RELOGIN_NEEDED, &vha->dpc_flags); + } + break; + default: + break; } - qla24xx_fcport_handle_login(vha, fcport); } } /* gnl_event */ [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2018-08-03 6:22 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-08-03 6:22 Stephen Rothwell [this message] -- strict thread matches above, loose matches on Subject: below -- 2023-08-28 3:02 linux-next: manual merge of the scsi-mkp tree with Linus' tree Stephen Rothwell 2023-09-01 0:23 ` Karan Tilak Kumar (kartilak) 2023-03-20 1:16 Stephen Rothwell 2022-02-14 3:29 Stephen Rothwell 2022-02-14 8:57 ` John Garry 2021-12-08 3:32 Stephen Rothwell 2021-10-06 4:44 Stephen Rothwell 2021-08-11 5:40 Stephen Rothwell 2021-08-11 5:53 ` Sreekanth Reddy 2021-08-12 3:25 ` Martin K. Petersen 2020-09-03 5:21 Stephen Rothwell 2020-09-02 5:15 Stephen Rothwell 2020-09-02 5:12 Stephen Rothwell 2020-09-11 4:47 ` Stephen Rothwell 2020-06-10 2:17 Stephen Rothwell 2020-06-11 2:12 ` Stephen Rothwell 2019-02-11 4:31 Stephen Rothwell 2019-02-11 9:24 ` John Garry 2019-02-07 4:44 Stephen Rothwell 2019-02-07 18:30 ` James Smart 2018-12-10 6:17 Stephen Rothwell 2018-12-10 7:09 ` Stephen Rothwell 2018-10-18 4:15 Stephen Rothwell 2018-08-03 6:04 Stephen Rothwell 2018-07-11 4:04 Stephen Rothwell 2018-07-12 4:29 ` Stephen Rothwell 2018-03-22 5:54 Stephen Rothwell 2017-11-30 1:51 Stephen Rothwell 2017-11-30 1:55 ` Stephen Rothwell 2017-12-01 2:14 ` Martin K. Petersen 2017-12-01 3:42 ` Stephen Rothwell 2017-09-01 4:48 Stephen Rothwell
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20180803162221.592b28ed@canb.auug.org.au \ --to=sfr@canb.auug.org.au \ --cc=himanshu.madhani@cavium.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-next@vger.kernel.org \ --cc=martin.petersen@oracle.com \ --cc=quinn.tran@cavium.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).