Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6-0]: src/sys/dev/scsipi Pull up following revision(s) (requested...
details: https://anonhg.NetBSD.org/src/rev/20d7076d63d0
branches: netbsd-6-0
changeset: 774798:20d7076d63d0
user: riz <riz%NetBSD.org@localhost>
date: Mon Apr 29 03:15:46 2013 +0000
description:
Pull up following revision(s) (requested by jakllsch in ticket #878):
sys/dev/scsipi/ses.c: revision 1.45
Add detach support. From martin@.
"Works for me."
Addresses PR 44283.
diffstat:
sys/dev/scsipi/ses.c | 31 +++++++++++++++++++++++++++----
1 files changed, 27 insertions(+), 4 deletions(-)
diffs (69 lines):
diff -r 7a272143c0ed -r 20d7076d63d0 sys/dev/scsipi/ses.c
--- a/sys/dev/scsipi/ses.c Sat Apr 20 14:02:50 2013 +0000
+++ b/sys/dev/scsipi/ses.c Mon Apr 29 03:15:46 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ses.c,v 1.43 2011/07/17 20:54:51 joerg Exp $ */
+/* $NetBSD: ses.c,v 1.43.14.1 2013/04/29 03:15:46 riz Exp $ */
/*
* Copyright (C) 2000 National Aeronautics & Space Administration
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.43 2011/07/17 20:54:51 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ses.c,v 1.43.14.1 2013/04/29 03:15:46 riz Exp $");
#include "opt_scsi.h"
@@ -168,10 +168,11 @@
static int ses_match(device_t, cfdata_t, void *);
static void ses_attach(device_t, device_t, void *);
+static int ses_detach(device_t, int);
static enctyp ses_device_type(struct scsipibus_attach_args *);
CFATTACH_DECL(ses, sizeof (struct ses_softc),
- ses_match, ses_attach, NULL, NULL);
+ ses_match, ses_attach, ses_detach, NULL);
extern struct cfdriver ses_cd;
@@ -276,7 +277,6 @@
printf("\n%s: %s\n", device_xname(&softc->sc_device), tname);
}
-
static enctyp
ses_device_type(struct scsipibus_attach_args *sa)
{
@@ -811,6 +811,29 @@
}
static int
+ses_detach(device_t self, int flags)
+{
+ struct ses_softc *ssc = device_private(self);
+ struct sscfg *cc = ssc->ses_private;
+
+ if (ssc->ses_objmap) {
+ SES_FREE(ssc->ses_objmap, (nobj * sizeof (encobj)));
+ }
+ if (cc != NULL) {
+ if (cc->ses_typidx) {
+ SES_FREE(cc->ses_typidx,
+ (nobj * sizeof (struct typidx)));
+ }
+ if (cc->ses_eltmap) {
+ SES_FREE(cc->ses_eltmap, ntype);
+ }
+ SES_FREE(cc, sizeof (struct sscfg));
+ }
+
+ return 0;
+}
+
+static int
ses_init_enc(ses_softc_t *ssc)
{
return (0);
Home |
Main Index |
Thread Index |
Old Index