svn commit: r368043 - head/sys/dev/isp

Alexander Motin mav at FreeBSD.org
Thu Nov 26 01:59:46 UTC 2020


Author: mav
Date: Thu Nov 26 01:59:44 2020
New Revision: 368043
URL: https://svnweb.freebsd.org/changeset/base/368043

Log:
  Remove some more dead code from pre-24xx.

Modified:
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/isp/isp_library.c
  head/sys/dev/isp/isp_library.h
  head/sys/dev/isp/isp_target.c
  head/sys/dev/isp/isp_target.h
  head/sys/dev/isp/ispvar.h

Modified: head/sys/dev/isp/isp_freebsd.c
==============================================================================
--- head/sys/dev/isp/isp_freebsd.c	Thu Nov 26 01:40:04 2020	(r368042)
+++ head/sys/dev/isp/isp_freebsd.c	Thu Nov 26 01:59:44 2020	(r368043)
@@ -1794,16 +1794,6 @@ isp_handle_platform_target_notify_ack(ispsoftc_t *isp,
 	}
 
 	/*
-	 * 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:
@@ -3149,13 +3129,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);

Modified: head/sys/dev/isp/isp_library.c
==============================================================================
--- head/sys/dev/isp/isp_library.c	Thu Nov 26 01:40:04 2020	(r368042)
+++ head/sys/dev/isp/isp_library.c	Thu Nov 26 01:59:44 2020	(r368043)
@@ -1656,82 +1656,6 @@ isp_del_wwn_entry(ispsoftc_t *isp, int chan, uint64_t 
 }
 
 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);

Modified: head/sys/dev/isp/isp_library.h
==============================================================================
--- head/sys/dev/isp/isp_library.h	Thu Nov 26 01:40:04 2020	(r368042)
+++ head/sys/dev/isp/isp_library.h	Thu Nov 26 01:59:44 2020	(r368043)
@@ -162,8 +162,6 @@ int isp_find_pdb_by_portid(ispsoftc_t *, int, uint32_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 *);

Modified: head/sys/dev/isp/isp_target.c
==============================================================================
--- head/sys/dev/isp/isp_target.c	Thu Nov 26 01:40:04 2020	(r368042)
+++ head/sys/dev/isp/isp_target.c	Thu Nov 26 01:59:44 2020	(r368043)
@@ -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;
@@ -819,6 +808,9 @@ isp_handle_notify_24xx(ispsoftc_t *isp, in_fcentry_24x
 			wwpn = be64dec(&ptr[IN24XX_PRLI_WWPN_OFF]);
 			isp_add_wwn_entry(isp, chan, wwpn, wwnn,
 			    nphdl, portid, prli_options);
+			break;
+		case TPRLO:
+			msg = "TPRLO";
 			break;
 		case PDISC:
 			msg = "PDISC";

Modified: head/sys/dev/isp/isp_target.h
==============================================================================
--- head/sys/dev/isp/isp_target.h	Thu Nov 26 01:40:04 2020	(r368042)
+++ head/sys/dev/isp/isp_target.h	Thu Nov 26 01:59:44 2020	(r368043)
@@ -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,

Modified: head/sys/dev/isp/ispvar.h
==============================================================================
--- head/sys/dev/isp/ispvar.h	Thu Nov 26 01:40:04 2020	(r368042)
+++ head/sys/dev/isp/ispvar.h	Thu Nov 26 01:59:44 2020	(r368043)
@@ -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 */


More information about the svn-src-head mailing list