Date: Fri, 22 Jun 2001 14:10:20 -0700 (PDT) From: Matthew Jacob <mjacob@feral.com> To: j mckitrick <jcm@freebsd-uk.eu.org> Cc: <scsi@freebsd.org> Subject: Re: how to invalidate scsi connection to driver module Message-ID: <20010622140800.F20923-100000@wonky.feral.com> In-Reply-To: <20010622220719.A64495@dogma.freebsd-uk.eu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 22 Jun 2001, j mckitrick wrote: > > So the function you call is xpt_bus_deregister() ? I did this: if (xpt_create_path(&tmppath, NULL, cam_sim_path(isp->isp_sim), (target_id_t)tgt, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { break; } if (lp->valid && (lp->roles & (SVC3_INI_ROLE >> SVC3_ROLE_SHIFT))) { ISPLOCK_2_CAMLOCK(isp); xpt_async(AC_FOUND_DEVICE, tmppath, NULL); } else { ISPLOCK_2_CAMLOCK(isp); xpt_async(AC_LOST_DEVICE, tmppath, NULL); } CAMLOCK_2_ISPLOCK(isp); xpt_free_path(tmppath); This does a LOST or FOUND device async for that PATH (bus), that Target, and all LUNS. Note that xpt_bus_deregister has: status = xpt_compile_path(&bus_path, NULL, pathid, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); ... xpt_async(AC_LOST_DEVICE, &bus_path, NULL); which then does lost devices on all targets and luns on that bus. -matt > > > > On Fri, Jun 22, 2001 at 01:52:57PM -0700, Matthew Jacob wrote: > | > | To follow up on this- Since I've been fooling around with the > | CAM_NEW_TRAN_CODE and Fibre Channel, I have the SIM call xpt_async > | with AC_LOST_DEVICE when a device goes away, so I had: > | > | isp0: Retaining Loop ID 0x20 for Target 32 (Port 0xb2) > | isp0: Retaining Loop ID 0x21 for Target 33 (Port 0xb1) > | isp0: Retaining Loop ID 0x22 for Target 34 (Port 0xae) > | isp0: Retaining Loop ID 0x23 for Target 35 (Port 0xad) > | isp0: Retaining Loop ID 0x24 for Target 36 (Port 0xac) > | isp0: Retaining Loop ID 0x25 for Target 37 (Port 0xab) > | isp0: Retaining Loop ID 0x2d for Target 45 (Port 0x9e) > | isp0: Retaining Loop ID 0x3d for Target 61 (Port 0x75) > | isp0: Retaining Loop ID 0x6d for Target 109 (Port 0x29) > | isp0: Retaining Loop ID 0x7d for Target 125 (Port 0x1) > | isp0: Target 38 (Loop 0x26) Port ID 0xaa (role Target) Departed > | Port WWN 0x2100002037082546 > | Node WWN 0x2000002037082546 > | (pass7:isp0:0:38:0): lost device > | (pass7:isp0:0:38:0): removing device entry > | (da7:isp0:0:38:0): lost device > | (da7:isp0:0:38:0): removing device entry > | > | That seems to work well... note it removes all periphs that referred to that > | device. > | > | -matt > | > | > > > Jonathon > -- > Microsoft complaining about the source license used by > Linux is like the event horizon calling the kettle black. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010622140800.F20923-100000>