On Tue, 2012-02-21 at 13:35 -0800, Candid Shot wrote: > (I hope this list is the right place to ask SG Driver related question ..) > > Background: A FC cable-pull is simulated by disabling the FC switch (Brocade) port. > > > While /sys/class/fc_host/hostx/port_state might confirm the FC connectivity is missing, > > /proc/scsi/sg/devices will show the scsi device to be 'online'. > > My goal is to be able to return an error to the application, should a cable-pull happen. > > Is there a way to be able to tweak this behavior where the scsi driver is able to look at port events, > and possibly return errors during read/write operations? Yes, set the dev_loss_tmo to zero. That parameter was introduced to allow the cables to be disconnected and reconnected without tearing down the fibre channel connections. By default it waits 60 seconds for reconnection, if you set it to zero, teardown will happen immediately. James -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html