Remove hackish code delaying ATIOs to unknown virtual port.
Since we support RQSTYPE_RPT_ID_ACQ, that functionality is only useful in loop mode, which probably doesn't worth having this hack in 2017. MFC after: 2 weeks
This commit is contained in:
parent
e2a658cb0c
commit
9c81a61ee1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315545
@ -1323,7 +1323,6 @@ isp_init(ispsoftc_t *isp)
|
||||
} else {
|
||||
isp_scsi_init(isp);
|
||||
}
|
||||
GET_NANOTIME(&isp->isp_init_time);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2368,7 +2367,6 @@ isp_fc_enable_vp(ispsoftc_t *isp, int chan)
|
||||
__func__, chan, vp.vp_mod_hdr.rqs_flags, vp.vp_mod_status);
|
||||
return (EIO);
|
||||
}
|
||||
GET_NANOTIME(&isp->isp_init_time);
|
||||
return (0);
|
||||
}
|
||||
|
||||
@ -5655,7 +5653,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox)
|
||||
* These are broadcast events that have to be sent across
|
||||
* all active channels.
|
||||
*/
|
||||
GET_NANOTIME(&isp->isp_init_time);
|
||||
for (chan = 0; chan < isp->isp_nchan; chan++) {
|
||||
fcp = FCPARAM(isp, chan);
|
||||
int topo = fcp->isp_topo;
|
||||
@ -5710,7 +5707,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox)
|
||||
* This is a broadcast event that has to be sent across
|
||||
* all active channels.
|
||||
*/
|
||||
GET_NANOTIME(&isp->isp_init_time);
|
||||
for (chan = 0; chan < isp->isp_nchan; chan++) {
|
||||
fcp = FCPARAM(isp, chan);
|
||||
if (fcp->role == ISP_ROLE_NONE)
|
||||
@ -5750,7 +5746,6 @@ isp_parse_async_fc(ispsoftc_t *isp, uint16_t mbox)
|
||||
* This is a broadcast event that has to be sent across
|
||||
* all active channels.
|
||||
*/
|
||||
GET_NANOTIME(&isp->isp_init_time);
|
||||
for (chan = 0; chan < isp->isp_nchan; chan++) {
|
||||
fcp = FCPARAM(isp, chan);
|
||||
if (fcp->role == ISP_ROLE_NONE)
|
||||
@ -5942,7 +5937,6 @@ isp_handle_other_response(ispsoftc_t *isp, int type, isphdr_t *hp, uint32_t *opt
|
||||
portid = (uint32_t)rid.ridacq_vp_port_hi << 16 |
|
||||
rid.ridacq_vp_port_lo;
|
||||
if (rid.ridacq_format == 0) {
|
||||
GET_NANOTIME(&isp->isp_init_time);
|
||||
for (chan = 0; chan < isp->isp_nchan; chan++) {
|
||||
fcparam *fcp = FCPARAM(isp, chan);
|
||||
if (fcp->role == ISP_ROLE_NONE)
|
||||
|
@ -1817,44 +1817,17 @@ isp_handle_platform_atio7(ispsoftc_t *isp, at7_entry_t *aep)
|
||||
sid = (aep->at_hdr.s_id[0] << 16) | (aep->at_hdr.s_id[1] << 8) | aep->at_hdr.s_id[2];
|
||||
lun = CAM_EXTLUN_BYTE_SWIZZLE(be64dec(aep->at_cmnd.fcp_cmnd_lun));
|
||||
|
||||
/*
|
||||
* Find the N-port handle, and Virtual Port Index for this command.
|
||||
*
|
||||
* If we can't, we're somewhat in trouble because we can't actually respond w/o that information.
|
||||
* We also, as a matter of course, need to know the WWN of the initiator too.
|
||||
*/
|
||||
if (ISP_CAP_MULTI_ID(isp) && isp->isp_nchan > 1) {
|
||||
/*
|
||||
* Find the right channel based upon D_ID
|
||||
*/
|
||||
/* Channel has to be derived from D_ID */
|
||||
isp_find_chan_by_did(isp, did, &chan);
|
||||
|
||||
if (chan == ISP_NOCHAN) {
|
||||
NANOTIME_T now;
|
||||
|
||||
/*
|
||||
* If we don't recognizer our own D_DID, terminate the exchange, unless we're within 2 seconds of startup
|
||||
* It's a bit tricky here as we need to stash this command *somewhere*.
|
||||
*/
|
||||
GET_NANOTIME(&now);
|
||||
if (NANOTIME_SUB(&now, &isp->isp_init_time) > 2000000000ULL) {
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: [RX_ID 0x%x] D_ID %x not found on any channel- dropping", __func__, aep->at_rxid, did);
|
||||
isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN, ECMD_TERMINATE, 0);
|
||||
return;
|
||||
}
|
||||
tptr = get_lun_statep(isp, 0, 0);
|
||||
if (tptr == NULL) {
|
||||
tptr = get_lun_statep(isp, 0, CAM_LUN_WILDCARD);
|
||||
if (tptr == NULL) {
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: [RX_ID 0x%x] D_ID %x not found on any channel and no tptr- dropping", __func__, aep->at_rxid, did);
|
||||
isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN, ECMD_TERMINATE, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: [RX_ID 0x%x] D_ID %x not found on any channel- deferring", __func__, aep->at_rxid, did);
|
||||
goto noresrc;
|
||||
isp_prt(isp, ISP_LOGWARN,
|
||||
"%s: [RX_ID 0x%x] D_ID %x not found on any channel",
|
||||
__func__, aep->at_rxid, did);
|
||||
isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN,
|
||||
ECMD_TERMINATE, 0);
|
||||
return;
|
||||
}
|
||||
isp_prt(isp, ISP_LOGTDEBUG0, "%s: [RX_ID 0x%x] D_ID 0x%06x found on Chan %d for S_ID 0x%06x", __func__, aep->at_rxid, did, chan, sid);
|
||||
} else {
|
||||
chan = 0;
|
||||
}
|
||||
|
@ -688,8 +688,11 @@ isp_got_tmf_24xx(ispsoftc_t *isp, at7_entry_t *aep)
|
||||
/* Channel has to be derived from D_ID */
|
||||
isp_find_chan_by_did(isp, did, &chan);
|
||||
if (chan == ISP_NOCHAN) {
|
||||
isp_prt(isp, ISP_LOGWARN, "%s: D_ID 0x%x not found on any channel", __func__, did);
|
||||
isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN, ECMD_TERMINATE, 0);
|
||||
isp_prt(isp, ISP_LOGWARN,
|
||||
"%s: D_ID 0x%x not found on any channel",
|
||||
__func__, did);
|
||||
isp_endcmd(isp, aep, NIL_HANDLE, ISP_NOCHAN,
|
||||
ECMD_TERMINATE, 0);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
@ -891,17 +894,23 @@ isp_handle_abts(ispsoftc_t *isp, abts_t *abts)
|
||||
nt->nt_did = did;
|
||||
nt->nt_nphdl = abts->abts_nphdl;
|
||||
nt->nt_sid = sid;
|
||||
isp_find_chan_by_did(isp, did, &chan);
|
||||
if (chan == ISP_NOCHAN) {
|
||||
nt->nt_tgt = TGT_ANY;
|
||||
} else {
|
||||
nt->nt_tgt = FCPARAM(isp, chan)->isp_wwpn;
|
||||
if (isp_find_pdb_by_handle(isp, chan, abts->abts_nphdl, &lp)) {
|
||||
nt->nt_wwn = lp->port_wwn;
|
||||
} else {
|
||||
nt->nt_wwn = INI_ANY;
|
||||
if (ISP_CAP_MULTI_ID(isp) && isp->isp_nchan > 1) {
|
||||
/* Channel has to be derived from D_ID */
|
||||
isp_find_chan_by_did(isp, did, &chan);
|
||||
if (chan == ISP_NOCHAN) {
|
||||
isp_prt(isp, ISP_LOGWARN,
|
||||
"%s: D_ID 0x%x not found on any channel",
|
||||
__func__, did);
|
||||
isp_acknak_abts(isp, abts, ENXIO);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else
|
||||
chan = 0;
|
||||
nt->nt_tgt = FCPARAM(isp, chan)->isp_wwpn;
|
||||
if (isp_find_pdb_by_handle(isp, chan, abts->abts_nphdl, &lp))
|
||||
nt->nt_wwn = lp->port_wwn;
|
||||
else
|
||||
nt->nt_wwn = INI_ANY;
|
||||
nt->nt_lun = LUN_ANY;
|
||||
nt->nt_need_ack = 1;
|
||||
nt->nt_tagval = abts->abts_rxid_task;
|
||||
|
@ -544,7 +544,6 @@ struct ispsoftc {
|
||||
uint32_t isp_rqstoutrp; /* register for REQOUTP */
|
||||
uint32_t isp_respinrp; /* register for RESINP */
|
||||
uint32_t isp_respoutrp; /* register for RESOUTP */
|
||||
NANOTIME_T isp_init_time; /* time were last initialized */
|
||||
|
||||
/*
|
||||
* Volatile state
|
||||
|
Loading…
Reference in New Issue
Block a user