Add sctargattach that initializes the bufq data structure.
This commit is contained in:
parent
fca35cd32f
commit
6ea8a98e86
@ -37,7 +37,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: sctarg.c,v 1.23 1997/12/02 21:07:02 phk Exp $
|
||||
* $Id: sctarg.c,v 1.24 1998/01/24 02:54:51 eivind Exp $
|
||||
*/
|
||||
|
||||
#include "opt_bounce.h"
|
||||
@ -83,18 +83,18 @@ static void sctarg_strategy(struct buf *bp, struct scsi_link *sc_link);
|
||||
|
||||
static struct scsi_device sctarg_switch =
|
||||
{
|
||||
NULL,
|
||||
sctargstart, /* we have a queue, and this is how we service it */
|
||||
NULL,
|
||||
NULL,
|
||||
"sctarg",
|
||||
0,
|
||||
NULL,
|
||||
sctargstart, /* we have a queue, and this is how we service it */
|
||||
NULL,
|
||||
NULL,
|
||||
"sctarg",
|
||||
0,
|
||||
{0, 0},
|
||||
SDEV_ONCE_ONLY,
|
||||
0,
|
||||
sctargattach,
|
||||
"Processor Target",
|
||||
sctargopen,
|
||||
sizeof(struct scsi_data),
|
||||
sizeof(struct scsi_data),
|
||||
T_TARGET,
|
||||
0,
|
||||
0,
|
||||
@ -104,6 +104,18 @@ static struct scsi_device sctarg_switch =
|
||||
sctarg_strategy,
|
||||
};
|
||||
|
||||
static errval
|
||||
sctargattach(struct scsi_link *sc_link)
|
||||
{
|
||||
struct scsi_data *sctarg;
|
||||
|
||||
sctarg = sc_link->sd;
|
||||
bufq_init(&sctarg->buf_queue);
|
||||
sctarg->flags = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static errval
|
||||
sctarg_open(dev_t dev, int flags, int fmt, struct proc *p,
|
||||
struct scsi_link *sc_link)
|
||||
|
Loading…
Reference in New Issue
Block a user