diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-13 19:23:56 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-13 19:23:56 +0000 |
commit | 9b3ea61729df8fb14778b06dbbf377e15cf2f55e (patch) | |
tree | d2a5beeb163dd71be24b71bb2b508143ea27704e /sys | |
parent | 6e6cf05222ec1e4d570bd957df48308eaabd15d0 (diff) |
Enable detaching atapiscsi devices.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/atapiscsi/atapiscsi.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index 1bfe29f3ecd..785ca8174fd 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.72 2004/02/21 09:34:56 grange Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.73 2006/01/13 19:23:55 miod Exp $ */ /* * This code is derived from code with the copyright below. @@ -150,6 +150,7 @@ struct atapiscsi_xfer; int atapiscsi_match(struct device *, void *, void *); void atapiscsi_attach(struct device *, struct device *, void *); +int atapiscsi_detach(struct device *, int); int atapi_to_scsi_sense(struct scsi_xfer *, u_int8_t); enum atapi_state { as_none, as_data, as_completed }; @@ -189,7 +190,8 @@ static struct scsi_device atapiscsi_dev = be "attached to current" wdc driver */ struct cfattach atapiscsi_ca = { - sizeof(struct atapiscsi_softc), atapiscsi_match, atapiscsi_attach + sizeof(struct atapiscsi_softc), atapiscsi_match, atapiscsi_attach, + atapiscsi_detach }; struct cfdriver atapiscsi_cd = { @@ -311,6 +313,13 @@ atapiscsi_attach(parent, self, aux) #endif } +int +atapiscsi_detach(dev, flags) + struct device *dev; + int flags; +{ + return (config_detach_children(dev, flags)); +} int wdc_atapi_send_cmd(sc_xfer) |