summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2020-11-26 01:59:44 +0000
committerAlexander Motin <mav@FreeBSD.org>2020-11-26 01:59:44 +0000
commit8cb0d414a8bc7f4114d208fefdf614cd3647086c (patch)
treee80701821c875503253e7c6f070f7cf832be832c
parenta7623790fb345e6dc986dfd31df0ace115e6f2e4 (diff)
Notes
-rw-r--r--sys/dev/isp/isp_freebsd.c27
-rw-r--r--sys/dev/isp/isp_library.c76
-rw-r--r--sys/dev/isp/isp_library.h2
-rw-r--r--sys/dev/isp/isp_target.c14
-rw-r--r--sys/dev/isp/isp_target.h4
-rw-r--r--sys/dev/isp/ispvar.h1
6 files changed, 3 insertions, 121 deletions
diff --git a/sys/dev/isp/isp_freebsd.c b/sys/dev/isp/isp_freebsd.c
index f1a8af5f4481..453be46b682c 100644
--- a/sys/dev/isp/isp_freebsd.c
+++ b/sys/dev/isp/isp_freebsd.c
@@ -1794,16 +1794,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
*/
if (mp->nt_need_ack) {
@@ -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;
diff --git a/sys/dev/isp/isp_library.c b/sys/dev/isp/isp_library.c
index ab8d0dde8837..f6320eb7bfc2 100644
--- a/sys/dev/isp/isp_library.c
+++ b/sys/dev/isp/isp_library.c
@@ -1656,82 +1656,6 @@ isp_del_wwn_entry(ispsoftc_t *isp, int chan, uint64_t wwpn, uint16_t nphdl, uint
}
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)
{
ISP_IOXGET_8(isp, &src->at_type, dst->at_type);
diff --git a/sys/dev/isp/isp_library.h b/sys/dev/isp/isp_library.h
index 4eb9402a3f43..aa75755b5ea4 100644
--- a/sys/dev/isp/isp_library.h
+++ b/sys/dev/isp/isp_library.h
@@ -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 *);
diff --git a/sys/dev/isp/isp_target.c b/sys/dev/isp/isp_target.c
index db5c570f9502..ad2ee459ca66 100644
--- a/sys/dev/isp/isp_target.c
+++ b/sys/dev/isp/isp_target.c
@@ -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;
diff --git a/sys/dev/isp/isp_target.h b/sys/dev/isp/isp_target.h
index 633204ba4b4a..2b7846f12ad9 100644
--- a/sys/dev/isp/isp_target.h
+++ b/sys/dev/isp/isp_target.h
@@ -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,
diff --git a/sys/dev/isp/ispvar.h b/sys/dev/isp/ispvar.h
index 564540b50b00..08c1bea18f5b 100644
--- a/sys/dev/isp/ispvar.h
+++ b/sys/dev/isp/ispvar.h
@@ -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 */