From 81c0e6ff49f3bda87db8333a87cd5a0ef375526a Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Mon, 13 Sep 2010 07:48:13 +0000 Subject: if a busy sas device is unplugged, the pending io on that device will never complete. when we get a detach event from the firmware, we currently deactivate the device and then request the scsi midlayer attempt to detach the device. this diff now deactivates the device and then resets the target, forcing the ioc to complete the pending operations. once the reset has completed we then request a detach of the kernel device. this lets me hotplug busy sas disks without leaking scsi_xfers or bufs or anything. --- sys/dev/ic/mpivar.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/dev/ic/mpivar.h') diff --git a/sys/dev/ic/mpivar.h b/sys/dev/ic/mpivar.h index d06f7c70151..911217d1a82 100644 --- a/sys/dev/ic/mpivar.h +++ b/sys/dev/ic/mpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mpivar.h,v 1.34 2010/09/13 06:53:43 dlg Exp $ */ +/* $OpenBSD: mpivar.h,v 1.35 2010/09/13 07:48:12 dlg Exp $ */ /* * Copyright (c) 2005 David Gwynne @@ -140,6 +140,10 @@ struct mpi_softc { struct mutex sc_evt_ack_mtx; struct scsi_iohandler sc_evt_ack_handler; + struct mpi_rcb_list sc_evt_scan_queue; + struct mutex sc_evt_scan_mtx; + struct scsi_iohandler sc_evt_scan_handler; + struct workq_task sc_evt_rescan; struct mutex sc_evt_rescan_mtx; u_int sc_evt_rescan_sem; -- cgit v1.2.3