Date: Mon, 10 Sep 2012 18:49:50 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240325 - in head/sys: cam/scsi compat/netbsd conf dev/ct dev/ncv dev/nsp dev/stg Message-ID: <201209101849.q8AIno0S000792@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Sep 10 18:49:49 2012 New Revision: 240325 URL: http://svn.freebsd.org/changeset/base/240325 Log: Remove some more NetBSD compat shims and other unused bits from these drivers: - Remove scsi_low_pisa.*, they were unused. - Remove <compat/netbsd/physio_proc.h> and calls to the stubs in that header. They were empty nops. - Retire sl_xname and use device_get_nameunit() and device_printf() with the underlying device_t instead. - Remove unused {ct,ncv,nsp,stg}print() functions. - Remove empty SOFT_INTR_REQUIRED() macro and the unused sl_irq member. Deleted: head/sys/cam/scsi/scsi_low_pisa.c head/sys/cam/scsi/scsi_low_pisa.h head/sys/compat/netbsd/physio_proc.h Modified: head/sys/cam/scsi/scsi_low.c head/sys/cam/scsi/scsi_low.h head/sys/conf/files head/sys/dev/ct/bshw_machdep.c head/sys/dev/ct/ct.c head/sys/dev/ct/ct_isa.c head/sys/dev/ct/ct_machdep.h head/sys/dev/ct/ctvar.h head/sys/dev/ncv/ncr53c500.c head/sys/dev/ncv/ncr53c500_pccard.c head/sys/dev/ncv/ncr53c500hw.h head/sys/dev/ncv/ncr53c500var.h head/sys/dev/nsp/nsp.c head/sys/dev/nsp/nsp_pccard.c head/sys/dev/nsp/nspvar.h head/sys/dev/stg/tmc18c30.c head/sys/dev/stg/tmc18c30_isa.c head/sys/dev/stg/tmc18c30_pccard.c head/sys/dev/stg/tmc18c30_pci.c head/sys/dev/stg/tmc18c30_subr.c head/sys/dev/stg/tmc18c30var.h Modified: head/sys/cam/scsi/scsi_low.c ============================================================================== --- head/sys/cam/scsi/scsi_low.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/cam/scsi/scsi_low.c Mon Sep 10 18:49:49 2012 (r240325) @@ -157,7 +157,7 @@ static struct scsi_low_softc_tab sl_tab #ifdef SCSI_LOW_INFO_DETAIL #define SCSI_LOW_INFO(slp, ti, s) scsi_low_info((slp), (ti), (s)) #else /* !SCSI_LOW_INFO_DETAIL */ -#define SCSI_LOW_INFO(slp, ti, s) printf("%s: %s\n", (slp)->sl_xname, (s)) +#define SCSI_LOW_INFO(slp, ti, s) device_printf((slp)->sl_dev, "%s\n", (s)) #endif /* !SCSI_LOW_INFO_DETAIL */ #ifdef SCSI_LOW_STATICS @@ -439,8 +439,9 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DEBUG if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_ACTION, target) != 0) { - printf("%s: cam_action: func code 0x%x target: %d, lun: %d\n", - slp->sl_xname, ccb->ccb_h.func_code, target, lun); + device_printf(slp->sl_dev, + "cam_action: func code 0x%x target: %d, lun: %d\n", + ccb->ccb_h.func_code, target, lun); } #endif /* SCSI_LOW_DEBUG */ @@ -449,7 +450,7 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD || lun == CAM_LUN_WILDCARD) { - printf("%s: invalid target/lun\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target/lun\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -502,7 +503,7 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD || lun == CAM_LUN_WILDCARD) { - printf("%s: invalid target/lun\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target/lun\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -530,7 +531,7 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD) { - printf("%s: invalid target\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -603,7 +604,7 @@ scsi_low_scsi_action_cam(sim, ccb) #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD) { - printf("%s: invalid target\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -624,8 +625,8 @@ scsi_low_scsi_action_cam(sim, ccb) if (li->li_flags_valid != SCSI_LOW_LUN_FLAGS_ALL_VALID) { ccb->ccb_h.status = CAM_FUNC_NOTAVAIL; - printf("%s: invalid GET_TRANS_CURRENT_SETTINGS call\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "invalid GET_TRANS_CURRENT_SETTINGS call\n"); goto settings_out; } #endif /* SCSI_LOW_DIAGNOSTIC */ @@ -687,7 +688,7 @@ settings_out: #ifdef SCSI_LOW_DIAGNOSTIC if (target == CAM_TARGET_WILDCARD) { - printf("%s: invalid target\n", slp->sl_xname); + device_printf(slp->sl_dev, "invalid target\n"); ccb->ccb_h.status = CAM_REQ_INVALID; xpt_done(ccb); return; @@ -767,9 +768,6 @@ scsi_low_attach_cam(slp) struct cam_devq *devq; int tagged_openings; - sprintf(slp->sl_xname, "%s%d", - device_get_name(slp->sl_dev), device_get_unit(slp->sl_dev)); - devq = cam_simq_alloc(SCSI_LOW_NCCB); if (devq == NULL) return (ENOMEM); @@ -890,8 +888,8 @@ scsi_low_done_cam(slp, cb) (scsi_low_cmd_flags[cb->ccb_scp.scp_cmd[0]] & SCSI_LOW_CMD_ABORT_WARNING) != 0) { - printf("%s: WARNING: scsi_low IO abort\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "WARNING: scsi_low IO abort\n"); scsi_low_print(slp, NULL); } #endif /* SCSI_LOW_DIAGNOSTIC */ @@ -1203,7 +1201,7 @@ scsi_low_alloc_ti(slp, targ) ti = SCSI_LOW_MALLOC(slp->sl_targsize); if (ti == NULL) - panic("%s short of memory", slp->sl_xname); + panic("%s short of memory", device_get_nameunit(slp->sl_dev)); bzero(ti, slp->sl_targsize); ti->ti_id = targ; @@ -1310,7 +1308,8 @@ scsi_low_timeout_check(slp) cb->ccb_flags |= CCB_NORETRY; cb->ccb_error |= SELTIMEOUTIO; if (scsi_low_revoke_ccb(slp, cb, 1) != NULL) - panic("%s: ccb not finished", slp->sl_xname); + panic("%s: ccb not finished", + device_get_nameunit(slp->sl_dev)); } if (slp->sl_Tnexus == NULL) @@ -1393,7 +1392,7 @@ step1: bus_reset: cb->ccb_error |= TIMEOUTIO; - printf("%s: slccb (0x%lx) timeout!\n", slp->sl_xname, (u_long) cb); + device_printf(slp->sl_dev, "slccb (0x%lx) timeout!\n", (u_long) cb); scsi_low_info(slp, NULL, "scsi bus hangup. try to recover."); scsi_low_init(slp, SCSI_LOW_RESTART_HARD); scsi_low_start(slp); @@ -1434,7 +1433,8 @@ scsi_low_abort_ccb(slp, cb) else if ((cb->ccb_flags & CCB_DISCQ) != 0) { if (scsi_low_revoke_ccb(slp, cb, 0) == NULL) - panic("%s: revoked ccb done", slp->sl_xname); + panic("%s: revoked ccb done", + device_get_nameunit(slp->sl_dev)); cb->ccb_flags |= CCB_STARTQ; TAILQ_INSERT_HEAD(&slp->sl_start, cb, ccb_chain); @@ -1445,7 +1445,8 @@ scsi_low_abort_ccb(slp, cb) else { if (scsi_low_revoke_ccb(slp, cb, 1) != NULL) - panic("%s: revoked ccb retried", slp->sl_xname); + panic("%s: revoked ccb retried", + device_get_nameunit(slp->sl_dev)); } return 0; } @@ -1509,8 +1510,8 @@ scsi_low_attach(slp, openings, ntargs, n if (rv != 0) { splx(s); - printf("%s: scsi_low_attach: osdep attach failed\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "scsi_low_attach: osdep attach failed\n"); return EINVAL; } @@ -1519,8 +1520,8 @@ scsi_low_attach(slp, openings, ntargs, n if (scsi_low_init(slp, SCSI_LOW_RESTART_HARD) != 0) { splx(s); - printf("%s: scsi_low_attach: initialization failed\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "scsi_low_attach: initialization failed\n"); return EINVAL; } @@ -1735,7 +1736,7 @@ scsi_low_setup_start(slp, ti, li, cb) return SCSI_LOW_START_QTAG; default: - panic("%s: no setup phase", slp->sl_xname); + panic("%s: no setup phase", device_get_nameunit(slp->sl_dev)); } return SCSI_LOW_START_NO_QTAG; @@ -1791,7 +1792,7 @@ scsi_low_start(slp) if (slp->sl_Tnexus || slp->sl_Lnexus || slp->sl_Qnexus) { scsi_low_info(slp, NULL, "NEXUS INCOSISTENT"); - panic("%s: inconsistent", slp->sl_xname); + panic("%s: inconsistent", device_get_nameunit(slp->sl_dev)); } #endif /* SCSI_LOW_DIAGNOSTIC */ @@ -1928,7 +1929,7 @@ scsi_low_arbit_fail(slp, cb) if (slp->sl_disc == 0) { #ifdef SCSI_LOW_DIAGNOSTIC - printf("%s: try selection again\n", slp->sl_xname); + device_printf(slp->sl_dev, "try selection again\n"); #endif /* SCSI_LOW_DIAGNOSTIC */ slp->sl_retry_sel = 1; } @@ -2356,7 +2357,7 @@ scsi_low_bus_reset(slp) (*slp->sl_funcs->scsi_low_bus_reset) (slp); - printf("%s: try to reset scsi bus ", slp->sl_xname); + device_printf(slp->sl_dev, "try to reset scsi bus "); for (i = 0; i <= SCSI2_RESET_DELAY / TWIDDLEWAIT ; i++) scsi_low_twiddle_wait(); cnputc('\b'); @@ -2372,7 +2373,7 @@ scsi_low_restart(slp, flags, s) int error; if (s != NULL) - printf("%s: scsi bus restart. reason: %s\n", slp->sl_xname, s); + device_printf(slp->sl_dev, "scsi bus restart. reason: %s\n", s); if ((error = scsi_low_init(slp, flags)) != 0) return error; @@ -2411,8 +2412,8 @@ found: #ifdef SCSI_LOW_DEBUG if (SCSI_LOW_DEBUG_TEST_GO(SCSI_LOW_NEXUS_CHECK, ti->ti_id) != 0) { - printf("%s: nexus(0x%lx) abort check start\n", - slp->sl_xname, (u_long) cb); + device_printf(slp->sl_dev, "nexus(0x%lx) abort check start\n", + (u_long) cb); cb->ccb_flags |= (CCB_NORETRY | CCB_SILENT); scsi_low_revoke_ccb(slp, cb, 1); return NULL; @@ -2514,7 +2515,7 @@ scsi_low_reselected(slp, targ) return ti; world_restart: - printf("%s: reselect(%x:unknown) %s\n", slp->sl_xname, targ, s); + device_printf(slp->sl_dev, "reselect(%x:unknown) %s\n", targ, s); scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, "reselect: scsi world confused"); return NULL; @@ -2894,7 +2895,7 @@ scsi_low_errfunc_qtag(slp, msgflags) slp->sl_Lnexus->li_cfgflags &= ~SCSI_LOW_QTAG; scsi_low_calcf_lun(slp->sl_Lnexus); } - printf("%s: scsi_low: qtag msg rejected\n", slp->sl_xname); + device_printf(slp->sl_dev, "scsi_low: qtag msg rejected\n"); } return 0; } @@ -2920,7 +2921,7 @@ scsi_low_msgout(slp, ti, fl) slp->sl_ph_count ++; if (slp->sl_ph_count > SCSI_LOW_MAX_PHCHANGES) { - printf("%s: too many phase changes\n", slp->sl_xname); + device_printf(slp->sl_dev, "too many phase changes\n"); slp->sl_error |= FATALIO; scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 0); } @@ -2945,7 +2946,7 @@ scsi_low_msgout(slp, ti, fl) ti->ti_msgflags |= ti->ti_omsgflags; ti->ti_omsgflags = 0; #ifdef SCSI_LOW_DIAGNOSTIC - printf("%s: scsi_low_msgout: retry msgout\n", slp->sl_xname); + device_printf(slp->sl_dev, "scsi_low_msgout: retry msgout\n"); #endif /* SCSI_LOW_DIAGNOSTIC */ } @@ -3020,7 +3021,7 @@ scsi_low_msginfunc_rejop(slp) struct targ_info *ti = slp->sl_Tnexus; u_int8_t msg = ti->ti_msgin[0]; - printf("%s: MSGIN: msg 0x%x rejected\n", slp->sl_xname, (u_int) msg); + device_printf(slp->sl_dev, "MSGIN: msg 0x%x rejected\n", (u_int) msg); scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_REJECT, 0); return 0; } @@ -3128,7 +3129,8 @@ cmd_link_start: cb->ccb_tag = SCSI_LOW_UNKTAG; cb->ccb_otag = SCSI_LOW_UNKTAG; if (scsi_low_done(slp, cb) == SCSI_LOW_DONE_RETRY) - panic("%s: linked ccb retried", slp->sl_xname); + panic("%s: linked ccb retried", + device_get_nameunit(slp->sl_dev)); slp->sl_Qnexus = ncb; slp->sl_ph_count = 0; @@ -3220,8 +3222,8 @@ scsi_low_synch(slp) */ ti->ti_maxsynch.period = 0; ti->ti_maxsynch.offset = 0; - printf("%s: target brain damaged. async transfer\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "target brain damaged. async transfer\n"); return EINVAL; } @@ -3236,8 +3238,8 @@ scsi_low_synch(slp) * for our adapter. * The adapter changes max synch and max offset. */ - printf("%s: synch neg failed. retry synch msg neg ...\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "synch neg failed. retry synch msg neg ...\n"); return error; } @@ -3257,8 +3259,9 @@ scsi_low_synch(slp) return 0; #endif /* SCSI_LOW_NEGOTIATE_BEFORE_SENSE */ - printf("%s(%d:*): <%s> offset %d period %dns ", - slp->sl_xname, ti->ti_id, s, offset, period * 4); + device_printf(slp->sl_dev, + "(%d:*): <%s> offset %d period %dns ", + ti->ti_id, s, offset, period * 4); if (period != 0) { @@ -3285,8 +3288,8 @@ scsi_low_wide(slp) * Current width is not acceptable for our adapter. * The adapter changes max width. */ - printf("%s: wide neg failed. retry wide msg neg ...\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "wide neg failed. retry wide msg neg ...\n"); return error; } @@ -3307,8 +3310,8 @@ scsi_low_wide(slp) return 0; #endif /* SCSI_LOW_NEGOTIATE_BEFORE_SENSE */ - printf("%s(%d:*): transfer width %d bits\n", - slp->sl_xname, ti->ti_id, 1 << (3 + ti->ti_width)); + device_printf(slp->sl_dev, "(%d:*): transfer width %d bits\n", + ti->ti_id, 1 << (3 + ti->ti_width)); } return 0; } @@ -3452,8 +3455,8 @@ scsi_low_msginfunc_msg_reject(slp) if (ti->ti_emsgflags != 0) { - printf("%s: msg flags [0x%x] rejected\n", - slp->sl_xname, ti->ti_emsgflags); + device_printf(slp->sl_dev, "msg flags [0x%x] rejected\n", + ti->ti_emsgflags); msgflags = SCSI_LOW_MSG_REJECT; mdp = &scsi_low_msgout_data[0]; for ( ; mdp->md_flags != SCSI_LOW_MSG_ALL; mdp ++) @@ -3505,7 +3508,7 @@ scsi_low_msgin(slp, ti, c) slp->sl_ph_count ++; if (slp->sl_ph_count > SCSI_LOW_MAX_PHCHANGES) { - printf("%s: too many phase changes\n", slp->sl_xname); + device_printf(slp->sl_dev, "too many phase changes\n"); slp->sl_error |= FATALIO; scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 0); } @@ -3798,7 +3801,8 @@ scsi_low_revoke_ccb(slp, cb, fdone) if ((cb->ccb_flags & (CCB_STARTQ | CCB_DISCQ)) == (CCB_STARTQ | CCB_DISCQ)) { - panic("%s: ccb in both queue", slp->sl_xname); + panic("%s: ccb in both queue", + device_get_nameunit(slp->sl_dev)); } #endif /* SCSI_LOW_DIAGNOSTIC */ @@ -3825,7 +3829,8 @@ scsi_low_revoke_ccb(slp, cb, fdone) cb->ccb_error |= FATALIO; cb->ccb_flags &= ~CCB_AUTOSENSE; if (scsi_low_done(slp, cb) != SCSI_LOW_DONE_COMPLETE) - panic("%s: done ccb retried", slp->sl_xname); + panic("%s: done ccb retried", + device_get_nameunit(slp->sl_dev)); return NULL; } else @@ -3992,8 +3997,9 @@ scsi_low_calcf_target(ti) #ifdef SCSI_LOW_DEBUG if (SCSI_LOW_DEBUG_GO(SCSI_LOW_DEBUG_CALCF, ti->ti_id) != 0) { - printf("%s(%d:*): max period(%dns) offset(%d) width(%d)\n", - slp->sl_xname, ti->ti_id, + device_printf(slp->sl_dev, + "(%d:*): max period(%dns) offset(%d) width(%d)\n", + ti->ti_id, ti->ti_maxsynch.period * 4, ti->ti_maxsynch.offset, ti->ti_width); @@ -4008,8 +4014,9 @@ scsi_low_calcf_show(li) struct targ_info *ti = li->li_ti; struct scsi_low_softc *slp = ti->ti_sc; - printf("%s(%d:%d): period(%d ns) offset(%d) width(%d) flags 0x%b\n", - slp->sl_xname, ti->ti_id, li->li_lun, + device_printf(slp->sl_dev, + "(%d:%d): period(%d ns) offset(%d) width(%d) flags 0x%b\n", + ti->ti_id, li->li_lun, ti->ti_maxsynch.period * 4, ti->ti_maxsynch.offset, ti->ti_width, @@ -4031,7 +4038,7 @@ scsi_low_start_up(slp) struct slccb *cb; int target, lun; - printf("%s: scsi_low: probing all devices ....\n", slp->sl_xname); + device_printf(slp->sl_dev, "scsi_low: probing all devices ....\n"); for (target = 0; target < slp->sl_ntargs; target ++) { @@ -4039,16 +4046,17 @@ scsi_low_start_up(slp) { if ((slp->sl_show_result & SHOW_PROBE_RES) != 0) { - printf("%s: scsi_low: target %d (host card)\n", - slp->sl_xname, target); + device_printf(slp->sl_dev, + "scsi_low: target %d (host card)\n", + target); } continue; } if ((slp->sl_show_result & SHOW_PROBE_RES) != 0) { - printf("%s: scsi_low: target %d lun ", - slp->sl_xname, target); + device_printf(slp->sl_dev, "scsi_low: target %d lun ", + target); } ti = slp->sl_ti[target]; @@ -4125,8 +4133,8 @@ scsi_low_test_abort(slp, ti, li) acb = TAILQ_FIRST(&li->li_discq); if (scsi_low_abort_ccb(slp, acb) == 0) { - printf("%s: aborting ccb(0x%lx) start\n", - slp->sl_xname, (u_long) acb); + device_printf(slp->sl_dev, + "aborting ccb(0x%lx) start\n", (u_long) acb); } } } @@ -4141,7 +4149,7 @@ scsi_low_test_atten(slp, ti, msg) if (slp->sl_ph_count < SCSI_LOW_MAX_ATTEN_CHECK) scsi_low_assert_msg(slp, ti, msg, 0); else - printf("%s: atten check OK\n", slp->sl_xname); + device_printf(slp->sl_dev, "atten check OK\n"); } static void @@ -4216,9 +4224,9 @@ scsi_low_print(slp, ti) } sp = &slp->sl_scp; - printf("%s: === NEXUS T(0x%lx) L(0x%lx) Q(0x%lx) NIO(%d) ===\n", - slp->sl_xname, (u_long) ti, (u_long) li, (u_long) cb, - slp->sl_nio); + device_printf(slp->sl_dev, + "=== NEXUS T(0x%lx) L(0x%lx) Q(0x%lx) NIO(%d) ===\n", + (u_long) ti, (u_long) li, (u_long) cb, slp->sl_nio); /* target stat */ if (ti != NULL) @@ -4234,8 +4242,8 @@ scsi_low_print(slp, ti) nqio = li->li_nqio; } - printf("%s(%d:%d) ph<%s> => ph<%s> DISC(%d) QIO(%d:%d)\n", - slp->sl_xname, + device_printf(slp->sl_dev, + "(%d:%d) ph<%s> => ph<%s> DISC(%d) QIO(%d:%d)\n", ti->ti_id, lun, phase[(int) ti->ti_ophase], phase[(int) ti->ti_phase], ti->ti_disc, nqio, maxnqio); Modified: head/sys/cam/scsi/scsi_low.h ============================================================================== --- head/sys/cam/scsi/scsi_low.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/cam/scsi/scsi_low.h Mon Sep 10 18:49:49 2012 (r240325) @@ -83,12 +83,6 @@ struct scsi_low_osdep_interface { #endif }; -struct scsi_low_osdep_targ_interface { -}; - -struct scsi_low_osdep_lun_interface { -}; - /******** os depend interface functions *************/ struct slccb; struct scsi_low_softc; @@ -252,8 +246,6 @@ TAILQ_HEAD(targ_info_tab, targ_info); LIST_HEAD(lun_info_tab, lun_info); struct lun_info { - struct scsi_low_osdep_lun_interface li_sloi; - int li_lun; struct targ_info *li_ti; /* my target */ @@ -340,8 +332,6 @@ struct scsi_low_msg_log { }; struct targ_info { - struct scsi_low_osdep_targ_interface ti_slti; - TAILQ_ENTRY(targ_info) ti_chain; /* targ_info link */ struct scsi_low_softc *ti_sc; /* our softc */ @@ -500,7 +490,6 @@ struct scsi_low_softc { struct scsi_low_osdep_interface sl_si; #define sl_dev sl_si.si_dev struct scsi_low_osdep_funcs *sl_osdep_fp; - u_char sl_xname[16]; /* our chain */ LIST_ENTRY(scsi_low_softc) sl_chain; @@ -605,10 +594,6 @@ struct scsi_low_softc { /* targinfo size */ int sl_targsize; - -#if defined(i386) || defined(__i386__) - u_int sl_irq; /* XXX */ -#endif /* i386 */ }; /************************************************* Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/conf/files Mon Sep 10 18:49:49 2012 (r240325) @@ -130,7 +130,6 @@ cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/scsi/scsi_da.c optional da cam/scsi/scsi_low.c optional ct | ncv | nsp | stg -cam/scsi/scsi_low_pisa.c optional ct | ncv | nsp | stg cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa Modified: head/sys/dev/ct/bshw_machdep.c ============================================================================== --- head/sys/dev/ct/bshw_machdep.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/bshw_machdep.c Mon Sep 10 18:49:49 2012 (r240325) @@ -53,9 +53,7 @@ __FBSDID("$FreeBSD$"); #include <machine/md_var.h> #include <compat/netbsd/dvcfg.h> -#include <compat/netbsd/physio_proc.h> -#include <sys/module.h> /* XXX: Hack */ #include <cam/scsi/scsi_low.h> #include <dev/ic/wd33c93reg.h> @@ -115,8 +113,9 @@ bshw_bus_reset(ct) /* open hardware busmaster mode */ if (hw->hw_dma_init != NULL && ((*hw->hw_dma_init)(ct)) != 0) { - printf("%s: change mode using external DMA (%x)\n", - slp->sl_xname, (u_int)ct_cr_read_1(chp, 0x37)); + device_printf(slp->sl_dev, + "change mode using external DMA (%x)\n", + (u_int)ct_cr_read_1(chp, 0x37)); } /* clear hardware synch registers */ @@ -240,7 +239,7 @@ bshw_lc_smit_fstat(ct, wc, read) } } - printf("%s: SMIT fifo status timeout\n", ct->sc_sclow.sl_xname); + device_printf(ct->sc_sclow.sl_dev, "SMIT fifo status timeout\n"); return EIO; } @@ -279,14 +278,15 @@ bshw_smit_xfer_stop(ct) else if (count > bs->sc_sdatalen) { bad: - printf("%s: smit_xfer_end: cnt error\n", slp->sl_xname); + device_printf(slp->sl_dev, + "smit_xfer_end: cnt error\n"); slp->sl_error |= PDMAERR; } scsi_low_data_finish(slp); } else { - printf("%s: smit_xfer_end: phase miss\n", slp->sl_xname); + device_printf(slp->sl_dev, "smit_xfer_end: phase miss\n"); slp->sl_error |= PDMAERR; } } @@ -488,8 +488,9 @@ bshw_dma_xfer_stop(ct) } else if (count > (u_int) bs->sc_seglen) { - printf("%s: port data %x != seglen %x\n", - slp->sl_xname, count, bs->sc_seglen); + device_printf(slp->sl_dev, + "port data %x != seglen %x\n", + count, bs->sc_seglen); slp->sl_error |= PDMAERR; } @@ -497,7 +498,7 @@ bshw_dma_xfer_stop(ct) } else { - printf("%s: extra DMA interrupt\n", slp->sl_xname); + device_printf(slp->sl_dev, "extra DMA interrupt\n"); slp->sl_error |= PDMAERR; } Modified: head/sys/dev/ct/ct.c ============================================================================== --- head/sys/dev/ct/ct.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/ct.c Mon Sep 10 18:49:49 2012 (r240325) @@ -50,9 +50,6 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> -#include <compat/netbsd/dvcfg.h> -#include <compat/netbsd/physio_proc.h> - #include <cam/scsi/scsi_low.h> #include <dev/ic/wd33c93reg.h> @@ -348,17 +345,6 @@ ctprobesubr(chp, dvcfg, hsid, chipclk, c return 1; } -int -ctprint(aux, name) - void *aux; - const char *name; -{ - - if (name != NULL) - printf("%s: scsibus ", name); - return 1; -} - void ctattachsubr(ct) struct ct_softc *ct; @@ -480,7 +466,6 @@ ct_world_start(ct, fdone) scsi_low_bus_reset(slp); cthw_chip_reset(chp, NULL, ct->sc_chipclk, slp->sl_hostid); - SOFT_INTR_REQUIRED(slp); return 0; } @@ -760,8 +745,8 @@ ct_phase_error(ct, scsi_status) if (pep->pe_msg != NULL) { - printf("%s: phase error: %s", - slp->sl_xname, pep->pe_msg); + device_printf(slp->sl_dev, "phase error: %s", + pep->pe_msg); scsi_low_print(slp, slp->sl_Tnexus); } @@ -904,7 +889,7 @@ ct_unbusy(ct) DELAY(CT_DELAY_INTERVAL); } - printf("%s: unbusy timeout\n", slp->sl_xname); + device_printf(slp->sl_dev, "unbusy timeout\n"); return EBUSY; } @@ -935,7 +920,6 @@ ctintr(arg) struct scsi_low_softc *slp = &ct->sc_sclow; struct ct_bus_access_handle *chp = &ct->sc_ch; struct targ_info *ti; - struct physio_proc *pp; struct buf *bp; u_int derror, flags; int len, satgo, error; @@ -974,7 +958,7 @@ again: if (ct_debug > 0) { scsi_low_print(slp, NULL); - printf("%s: scsi_status 0x%x\n\n", slp->sl_xname, + device_printf(slp->sl_dev, "scsi_status 0x%x\n\n", (u_int) scsi_status); #ifdef KDB if (ct_debug > 1) @@ -1079,9 +1063,7 @@ common_data_phase: slp->sl_flags |= HW_PDMASTART; if ((ct->sc_xmode & CT_XMODE_PIO) != 0) { - pp = physio_proc_enter(bp); error = (*ct->ct_pio_xfer_start) (ct); - physio_proc_leave(pp); if (error == 0) { ct->sc_dma |= CT_DMA_PIOSTART; @@ -1105,7 +1087,8 @@ common_data_phase: { if (!(slp->sl_flags & HW_READ_PADDING)) { - printf("%s: read padding required\n", slp->sl_xname); + device_printf(slp->sl_dev, + "read padding required\n"); return 1; } } @@ -1113,7 +1096,8 @@ common_data_phase: { if (!(slp->sl_flags & HW_WRITE_PADDING)) { - printf("%s: write padding required\n", slp->sl_xname); + device_printf(slp->sl_dev, + "write padding required\n"); return 1; } } @@ -1134,8 +1118,8 @@ common_data_phase: slp->sl_scp.scp_cmdlen, SCSI_LOW_WRITE, &derror) != 0) { - printf("%s: scsi cmd xfer short\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "scsi cmd xfer short\n"); } return 1; @@ -1167,7 +1151,7 @@ common_data_phase: case BSR_UNSPINFO0: case BSR_UNSPINFO1: - printf("%s: illegal bus phase (0x%x)\n", slp->sl_xname, + device_printf(slp->sl_dev, "illegal bus phase (0x%x)\n", (u_int) scsi_status); scsi_low_print(slp, ti); return 1; @@ -1187,8 +1171,8 @@ common_data_phase: if (ct_xfer(ct, ti->ti_msgoutstr, len, SCSI_LOW_WRITE, &derror) != 0) { - printf("%s: scsi msgout xfer short\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "scsi msgout xfer short\n"); } SCSI_LOW_DEASSERT_ATN(slp); ct->sc_atten = 0; Modified: head/sys/dev/ct/ct_isa.c ============================================================================== --- head/sys/dev/ct/ct_isa.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/ct_isa.c Mon Sep 10 18:49:49 2012 (r240325) @@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$"); #include <isa/isavar.h> #include <compat/netbsd/dvcfg.h> -#include <compat/netbsd/physio_proc.h> #include <cam/scsi/scsi_low.h> @@ -297,7 +296,6 @@ ct_isa_attach(device_t dev) slp->sl_dev = dev; slp->sl_hostid = bs->sc_hostid; - slp->sl_irq = isa_get_irq(dev); slp->sl_cfgflags = device_get_flags(dev); s = splcam(); Modified: head/sys/dev/ct/ct_machdep.h ============================================================================== --- head/sys/dev/ct/ct_machdep.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/ct_machdep.h Mon Sep 10 18:49:49 2012 (r240325) @@ -208,9 +208,4 @@ ct_cmdp_write_1(chp, val) CT_BUS_WEIGHT(chp) } -#if defined(__i386__) && 0 -#define SOFT_INTR_REQUIRED(slp) (softintr((slp)->sl_irq)) -#else /* !__i386__ */ -#define SOFT_INTR_REQUIRED(slp) -#endif /* !__i386__ */ #endif /* !_CT_MACHDEP_H_ */ Modified: head/sys/dev/ct/ctvar.h ============================================================================== --- head/sys/dev/ct/ctvar.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ct/ctvar.h Mon Sep 10 18:49:49 2012 (r240325) @@ -132,6 +132,5 @@ struct ct_targ_info { *****************************************************************/ int ctprobesubr(struct ct_bus_access_handle *, u_int, int, u_int, int *); void ctattachsubr(struct ct_softc *); -int ctprint(void *, const char *); int ctintr(void *); #endif /* !_CTVAR_H_ */ Modified: head/sys/dev/ncv/ncr53c500.c ============================================================================== --- head/sys/dev/ncv/ncr53c500.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ncv/ncr53c500.c Mon Sep 10 18:49:49 2012 (r240325) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include <machine/bus.h> #include <compat/netbsd/dvcfg.h> -#include <compat/netbsd/physio_proc.h> #include <cam/scsi/scsi_low.h> @@ -326,7 +325,7 @@ ncvhw_power(sc, flags) if (flags == SCSI_LOW_POWDOWN) { - printf("%s power down\n", slp->sl_xname); + device_printf(slp->sl_dev, "power down\n"); ncvhw_select_register_1(iot, ioh, &sc->sc_hw); bus_space_write_1(iot, ioh, cr1_atacmd, ATACMD_POWDOWN); } @@ -335,13 +334,13 @@ ncvhw_power(sc, flags) switch (sc->sc_rstep) { case 0: - printf("%s resume step O\n", slp->sl_xname); + device_printf(slp->sl_dev, "resume step O\n"); ncvhw_select_register_1(iot, ioh, &sc->sc_hw); bus_space_write_1(iot, ioh, cr1_atacmd, ATACMD_ENGAGE); break; case 1: - printf("%s resume step I\n", slp->sl_xname); + device_printf(slp->sl_dev, "resume step I\n"); ncvhw_reset(iot, ioh, &sc->sc_hw); ncvhw_init(iot, ioh, &sc->sc_hw); break; @@ -473,7 +472,6 @@ ncv_world_start(sc, fdone) (bus_space_read_1(sc->sc_iot, sc->sc_ioh, cr0_istat) & INTR_SBR)) return ENODEV; - SOFT_INTR_REQUIRED(slp); return 0; } @@ -607,17 +605,6 @@ ncvprobesubr(iot, ioh, dvcfg, hsid) return 1; } -int -ncvprint(aux, name) - void *aux; - const char *name; -{ - - if (name != NULL) - printf("%s: scsibus ", name); - return 1; -} - void ncvattachsubr(sc) struct ncv_softc *sc; @@ -696,9 +683,9 @@ ncv_pdma_end(sc, ti) bad: if ((slp->sl_error & PDMAERR) == 0) { - printf("%s: stragne cnt hw 0x%x soft 0x%x\n", - slp->sl_xname, len, - slp->sl_scp.scp_datalen); + device_printf(slp->sl_dev, + "strange cnt hw 0x%x soft 0x%x\n", len, + slp->sl_scp.scp_datalen); } slp->sl_error |= PDMAERR; } @@ -706,7 +693,7 @@ bad: } else { - printf("%s: data phase miss\n", slp->sl_xname); + device_printf(slp->sl_dev, "data phase miss\n"); slp->sl_error |= PDMAERR; } @@ -859,7 +846,7 @@ ncv_reselected(sc) if ((bus_space_read_1(iot, ioh, cr0_sffl) & CR0_SFFLR_BMASK) != 2) { - printf("%s illegal fifo bytes\n", slp->sl_xname); + device_printf(slp->sl_dev, "illegal fifo bytes\n"); scsi_low_restart(slp, SCSI_LOW_RESTART_HARD, "chip confused"); return EJUSTRETURN; } @@ -965,7 +952,6 @@ ncvintr(arg) bus_space_tag_t iot = sc->sc_iot; bus_space_handle_t ioh = sc->sc_ioh; struct targ_info *ti; - struct physio_proc *pp; struct buf *bp; u_int derror, flags; int len; @@ -1005,7 +991,7 @@ again: if (ncv_debug) { scsi_low_print(slp, NULL); - printf("%s st %x ist %x\n\n", slp->sl_xname, + device_printf(slp->sl_dev, "st %x ist %x\n\n", status, ireason); #ifdef KDB if (ncv_debug > 1) @@ -1087,8 +1073,8 @@ again: ncv_target_nexus_establish(sc); if ((status & PHASE_MASK) != MESSAGE_IN_PHASE) { - printf("%s: unexpected phase after reselect\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "unexpected phase after reselect\n"); slp->sl_error |= FATALIO; scsi_low_assert_msg(slp, ti, SCSI_LOW_MSG_ABORT, 1); return 1; @@ -1115,14 +1101,13 @@ again: scsi_low_attention(slp); } - pp = physio_proc_enter(bp); if (slp->sl_scp.scp_datalen <= 0) { if ((ireason & INTR_BS) == 0) break; if ((slp->sl_error & PDMAERR) == 0) - printf("%s: data underrun\n", slp->sl_xname); + device_printf(slp->sl_dev, "data underrun\n"); slp->sl_error |= PDMAERR; if ((slp->sl_flags & HW_WRITE_PADDING) != 0) @@ -1134,8 +1119,8 @@ again: } else { - printf("%s: write padding required\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "write padding required\n"); } } else @@ -1148,7 +1133,6 @@ again: } ncv_pio_write(sc, slp->sl_scp.scp_data, len); } - physio_proc_leave(pp); break; case DATA_IN_PHASE: /* data in */ @@ -1158,14 +1142,13 @@ again: scsi_low_attention(slp); } - pp = physio_proc_enter(bp); if (slp->sl_scp.scp_datalen <= 0) { if ((ireason & INTR_BS) == 0) break; if ((slp->sl_error & PDMAERR) == 0) - printf("%s: data overrun\n", slp->sl_xname); + device_printf(slp->sl_dev, "data overrun\n"); slp->sl_error |= PDMAERR; if ((slp->sl_flags & HW_READ_PADDING) != 0) @@ -1176,8 +1159,8 @@ again: } else { - printf("%s: read padding required\n", - slp->sl_xname); + device_printf(slp->sl_dev, + "read padding required\n"); break; } } @@ -1191,7 +1174,6 @@ again: } ncv_pio_read(sc, slp->sl_scp.scp_data, len); } - physio_proc_leave(pp); break; case COMMAND_PHASE: /* cmd out */ Modified: head/sys/dev/ncv/ncr53c500_pccard.c ============================================================================== --- head/sys/dev/ncv/ncr53c500_pccard.c Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ncv/ncr53c500_pccard.c Mon Sep 10 18:49:49 2012 (r240325) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include <dev/pccard/pccardvar.h> #include <cam/scsi/scsi_low.h> -#include <cam/scsi/scsi_low_pisa.h> #include <dev/ncv/ncr53c500reg.h> #include <dev/ncv/ncr53c500hw.h> Modified: head/sys/dev/ncv/ncr53c500hw.h ============================================================================== --- head/sys/dev/ncv/ncr53c500hw.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ncv/ncr53c500hw.h Mon Sep 10 18:49:49 2012 (r240325) @@ -36,8 +36,6 @@ #ifndef __NCR53C500HW_H_ #define __NCR53C500HW_H_ -#include <compat/netbsd/dvcfg.h> - #define NCV_HOSTID 7 #define NCV_NTARGETS 8 #define NCV_NLUNS 8 Modified: head/sys/dev/ncv/ncr53c500var.h ============================================================================== --- head/sys/dev/ncv/ncr53c500var.h Mon Sep 10 16:51:43 2012 (r240324) +++ head/sys/dev/ncv/ncr53c500var.h Mon Sep 10 18:49:49 2012 (r240325) @@ -82,12 +82,6 @@ struct ncv_targ_info { *****************************************************************/ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209101849.q8AIno0S000792>