summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2007-11-26 15:59:54 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2007-11-26 15:59:54 +0000
commit4c8ec346c37b4e89be57a88234cc8f9aaee197b7 (patch)
treeb0678cd95ee5987dd23e570e92ffa2c55e827aaa /sys/dev/ic
parent95771ee153fc60e2025cf02b022fc75928ce33ec (diff)
drive port probes from the scsi midlayer now that it will ask the adapter
if a device is there before doing any scsi commands. also implement a free path for when devices are detached. software hotplug has been tested on sili, and ahci is still working according to claudio@
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/sili.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c
index 0d309d1239b..4e544cd8ce7 100644
--- a/sys/dev/ic/sili.c
+++ b/sys/dev/ic/sili.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sili.c,v 1.37 2007/11/23 18:26:03 kettenis Exp $ */
+/* $OpenBSD: sili.c,v 1.38 2007/11/26 15:59:53 dlg Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -159,12 +159,14 @@ u_int32_t sili_port_intr(struct sili_port *, int);
/* atascsi interface */
int sili_ata_probe(void *, int);
+void sili_ata_free(void *, int);
struct ata_xfer *sili_ata_get_xfer(void *, int);
void sili_ata_put_xfer(struct ata_xfer *);
int sili_ata_cmd(struct ata_xfer *);
struct atascsi_methods sili_atascsi_methods = {
sili_ata_probe,
+ sili_ata_free,
sili_ata_get_xfer,
sili_ata_cmd
};
@@ -794,6 +796,18 @@ sili_ata_probe(void *xsc, int port)
return (port_type);
}
+void
+sili_ata_free(void *xsc, int port)
+{
+ struct sili_softc *sc = xsc;
+ struct sili_port *sp = &sc->sc_ports[port];
+
+ if (sp->sp_ccbs != NULL)
+ sili_ccb_free(sp);
+
+ /* XXX we should do more here */
+}
+
int
sili_ata_cmd(struct ata_xfer *xa)
{