rm_dev(D2I) rm_dev(D2I)
NAME
rm_dev - target driver's routine to remove a device
SYNOPSIS
#include <sys/sdi.h>
#include <sys/ddi.h>
int prefixrm_dev(struct scsi_adr *sa);
Arguments
sa SCSI address of device to be removed.
DESCRIPTION
The rm_dev routine is an entry point into the target driver.
It is responsible for preparing a device for removal from the
system. This would include such things as flushing any cache
on the device and spinning down or unmounting the device. It
is also responsible for removing the specified device from its
internal structures. Finally it must call sdi_clrconfig but
only after it has removed the devices from its internal
structures. rm_dev is a required function for a target driver
to support hot insertion/removal.
Return Values
This function should return SDI_RET_OK on success or
SDI_RET_ERR on failure. It should fail if the device does not
exist or has pending jobs.
Level
Base.
REFERENCES
sdi_clrconfig(D3I), hba_info(D4I), scsi_adr(D4I),
sdi_target_hotregister(D3I)
NOTICES
Applicability
sdi: 1, 2
Copyright 1994 Novell, Inc. Page 1