Remove some more dead code from pre-24xx.

This commit is contained in:
Alexander Motin
2020-11-26 01:59:44 +00:00
parent a7623790fb
commit 8cb0d414a8
6 changed files with 3 additions and 121 deletions
-27
View File
@@ -1793,16 +1793,6 @@ isp_handle_platform_target_notify_ack(ispsoftc_t *isp, isp_notify_t *mp, uint32_
}
}
/*
* Handle logout cases here
*/
if (mp->nt_ncode == NT_GLOBAL_LOGOUT) {
isp_del_all_wwn_entries(isp, mp->nt_channel);
}
if (mp->nt_ncode == NT_LOGOUT)
isp_del_wwn_entries(isp, mp);
/*
* General purpose acknowledgement
*/
@@ -2889,15 +2879,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cmd, ...)
va_list ap;
switch (cmd) {
case ISPASYNC_BUS_RESET:
{
va_start(ap, cmd);
bus = va_arg(ap, int);
va_end(ap);
isp_prt(isp, ISP_LOGINFO, "SCSI bus reset on bus %d detected", bus);
xpt_async(AC_BUS_RESET, ISP_FC_PC(isp, bus)->path, NULL);
break;
}
case ISPASYNC_LOOP_RESET:
{
uint16_t lipp;
@@ -3141,7 +3122,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cmd, ...)
*/
isp_handle_platform_target_tmf(isp, notify);
break;
case NT_BUS_RESET:
case NT_LIP_RESET:
case NT_LINK_UP:
case NT_LINK_DOWN:
@@ -3150,13 +3130,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cmd, ...)
* No action need be taken here.
*/
break;
case NT_GLOBAL_LOGOUT:
case NT_LOGOUT:
/*
* This is device arrival/departure notification
*/
isp_handle_platform_target_notify_ack(isp, notify, 0);
break;
case NT_SRR:
isp_handle_platform_srr(isp, notify);
break;
-76
View File
@@ -1655,82 +1655,6 @@ isp_del_wwn_entry(ispsoftc_t *isp, int chan, uint64_t wwpn, uint16_t nphdl, uint
isp_async(isp, ISPASYNC_DEV_GONE, chan, lp);
}
void
isp_del_all_wwn_entries(ispsoftc_t *isp, int chan)
{
fcparam *fcp;
int i;
/*
* Handle iterations over all channels via recursion
*/
if (chan == ISP_NOCHAN) {
for (chan = 0; chan < isp->isp_nchan; chan++) {
isp_del_all_wwn_entries(isp, chan);
}
return;
}
if (chan > isp->isp_nchan) {
return;
}
fcp = FCPARAM(isp, chan);
if (fcp == NULL) {
return;
}
for (i = 0; i < MAX_FC_TARG; i++) {
fcportdb_t *lp = &fcp->portdb[i];
if (lp->state != FC_PORTDB_STATE_NIL)
isp_del_wwn_entry(isp, chan, lp->port_wwn, lp->handle, lp->portid);
}
}
void
isp_del_wwn_entries(ispsoftc_t *isp, isp_notify_t *mp)
{
fcportdb_t *lp;
/*
* Handle iterations over all channels via recursion
*/
if (mp->nt_channel == ISP_NOCHAN) {
for (mp->nt_channel = 0; mp->nt_channel < isp->isp_nchan; mp->nt_channel++) {
isp_del_wwn_entries(isp, mp);
}
mp->nt_channel = ISP_NOCHAN;
return;
}
/*
* We have an entry which is only partially identified.
*
* It's only known by WWN, N-Port handle, or Port ID.
* We need to find the actual entry so we can delete it.
*/
if (mp->nt_nphdl != NIL_HANDLE) {
if (isp_find_pdb_by_handle(isp, mp->nt_channel, mp->nt_nphdl, &lp)) {
isp_del_wwn_entry(isp, mp->nt_channel, lp->port_wwn, lp->handle, lp->portid);
return;
}
}
if (VALID_INI(mp->nt_wwn)) {
if (isp_find_pdb_by_wwpn(isp, mp->nt_channel, mp->nt_wwn, &lp)) {
isp_del_wwn_entry(isp, mp->nt_channel, lp->port_wwn, lp->handle, lp->portid);
return;
}
}
if (VALID_PORT(mp->nt_sid)) {
if (isp_find_pdb_by_portid(isp, mp->nt_channel, mp->nt_sid, &lp)) {
isp_del_wwn_entry(isp, mp->nt_channel, lp->port_wwn, lp->handle, lp->portid);
return;
}
}
isp_prt(isp, ISP_LOGWARN, "Chan %d unable to find entry to delete WWPN 0x%016jx PortID 0x%06x handle 0x%x",
mp->nt_channel, mp->nt_wwn, mp->nt_sid, mp->nt_nphdl);
}
void
isp_get_atio7(ispsoftc_t *isp, at7_entry_t *src, at7_entry_t *dst)
{
-2
View File
@@ -162,8 +162,6 @@ int isp_find_pdb_by_portid(ispsoftc_t *, int, uint32_t, fcportdb_t **);
void isp_find_chan_by_did(ispsoftc_t *, uint32_t, uint16_t *);
void isp_add_wwn_entry(ispsoftc_t *, int, uint64_t, uint64_t, uint16_t, uint32_t, uint16_t);
void isp_del_wwn_entry(ispsoftc_t *, int, uint64_t, uint16_t, uint32_t);
void isp_del_all_wwn_entries(ispsoftc_t *, int);
void isp_del_wwn_entries(ispsoftc_t *, isp_notify_t *);
void isp_get_atio7(ispsoftc_t *isp, at7_entry_t *, at7_entry_t *);
void isp_put_ctio7(ispsoftc_t *, ct7_entry_t *, ct7_entry_t *);
+3 -11
View File
@@ -374,17 +374,6 @@ isp_target_async(ispsoftc_t *isp, int bus, int event)
notify.nt_ncode = NT_LIP_RESET;
isp_async(isp, ISPASYNC_TARGET_NOTIFY, &notify);
break;
case ASYNC_BUS_RESET:
case ASYNC_TIMEOUT_RESET: /* XXX: where does this come from ? */
isp_prt(isp, ISP_LOGTDEBUG0, "%s: BUS RESET", __func__);
notify.nt_ncode = NT_BUS_RESET;
isp_async(isp, ISPASYNC_TARGET_NOTIFY, &notify);
break;
case ASYNC_DEVICE_RESET:
isp_prt(isp, ISP_LOGTDEBUG0, "%s: DEVICE RESET", __func__);
notify.nt_ncode = NT_TARGET_RESET;
isp_async(isp, ISPASYNC_TARGET_NOTIFY, &notify);
break;
default:
isp_prt(isp, ISP_LOGERR, "%s: unknown event 0x%x", __func__, event);
break;
@@ -820,6 +809,9 @@ isp_handle_notify_24xx(ispsoftc_t *isp, in_fcentry_24xx_t *inot)
isp_add_wwn_entry(isp, chan, wwpn, wwnn,
nphdl, portid, prli_options);
break;
case TPRLO:
msg = "TPRLO";
break;
case PDISC:
msg = "PDISC";
break;
-4
View File
@@ -46,13 +46,9 @@ typedef enum {
NT_CLEAR_TASK_SET,
NT_LUN_RESET,
NT_TARGET_RESET,
NT_BUS_RESET,
NT_LIP_RESET,
NT_LINK_UP,
NT_LINK_DOWN,
NT_LOGOUT,
NT_GLOBAL_LOGOUT,
NT_CHANGED,
NT_HBA_RESET,
NT_QUERY_TASK_SET,
NT_QUERY_ASYNC_EVENT,
-1
View File
@@ -738,7 +738,6 @@ int isp_control(ispsoftc_t *, ispctl_t, ...);
*/
typedef enum {
ISPASYNC_BUS_RESET, /* All Bus Was Reset */
ISPASYNC_LOOP_DOWN, /* FC Loop Down */
ISPASYNC_LOOP_UP, /* FC Loop Up */
ISPASYNC_LIP, /* FC LIP Received */