summaryrefslogtreecommitdiffstats
path: root/sys/dev/iir
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2003-09-26 15:36:47 +0000
committerscottl <scottl@FreeBSD.org>2003-09-26 15:36:47 +0000
commit47c99c556b9631ae70de97a00bb969611f49d91b (patch)
treef5d8a5ae4f0701a20ba290e56b48bcb560ace719 /sys/dev/iir
parent58f93096d930359fc72dbc0001cdd4e46efad5d9 (diff)
downloadFreeBSD-src-47c99c556b9631ae70de97a00bb969611f49d91b.zip
FreeBSD-src-47c99c556b9631ae70de97a00bb969611f49d91b.tar.gz
Update email addresses, copyrights, and tweak the management interface.
Submitted by: "Leubner, Achim" <Achim_Leubner@adaptec.com>
Diffstat (limited to 'sys/dev/iir')
-rw-r--r--sys/dev/iir/iir.c14
-rw-r--r--sys/dev/iir/iir.h21
-rw-r--r--sys/dev/iir/iir_ctrl.c27
-rw-r--r--sys/dev/iir/iir_pci.c7
4 files changed, 47 insertions, 22 deletions
diff --git a/sys/dev/iir/iir.c b/sys/dev/iir/iir.c
index 2fda056..a98c0eb 100644
--- a/sys/dev/iir/iir.c
+++ b/sys/dev/iir/iir.c
@@ -1,5 +1,7 @@
/*
- * Copyright (c) 2000-03 Intel Corporation
+ * Copyright (c) 2000-03 ICP vortex GmbH
+ * Copyright (c) 2002-03 Intel Corporation
+ * Copyright (c) 2003 Adaptec Inc.
* All Rights Reserved
*
* Redistribution and use in source and binary forms, with or without
@@ -30,17 +32,16 @@
/*
* iir.c: SCSI dependant code for the Intel Integrated RAID Controller driver
*
- * Written by: Achim Leubner <achim.leubner@intel.com>
+ * Written by: Achim Leubner <achim_leubner@adaptec.com>
* Fixes/Additions: Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>
*
* credits: Niklas Hallqvist; OpenBSD driver for the ICP Controllers.
* Mike Smith; Some driver source code.
* FreeBSD.ORG; Great O/S to work on and for.
*
- * TODO:
+ * $Id: iir.c 1.4 2003/08/26 12:29:44 achim Exp $"
*/
-#ident "$Id: iir.c 1.3 2003/03/21 16:28:32 achim Exp $"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -1458,7 +1459,10 @@ iir_action( struct cam_sim *sim, union ccb *ccb )
(bus == gdt->sc_virt_bus ? 127 : gdt->sc_bus_id[bus]);
cpi->base_transfer_speed = 3300;
strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
- strncpy(cpi->hba_vid, "Intel Corp.", HBA_IDLEN);
+ if (gdt->sc_vendor == INTEL_VENDOR_ID)
+ strncpy(cpi->hba_vid, "Intel Corp.", HBA_IDLEN);
+ else
+ strncpy(cpi->hba_vid, "ICP vortex ", HBA_IDLEN);
strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
cpi->ccb_h.status = CAM_REQ_CMP;
--gdt_stat.io_count_act;
diff --git a/sys/dev/iir/iir.h b/sys/dev/iir/iir.h
index 00c44fe..0f82277 100644
--- a/sys/dev/iir/iir.h
+++ b/sys/dev/iir/iir.h
@@ -1,6 +1,8 @@
/* $FreeBSD$ */
/*
- * Copyright (c) 2000-03 Intel Corporation
+ * Copyright (c) 2000-03 ICP vortex GmbH
+ * Copyright (c) 2002-03 Intel Corporation
+ * Copyright (c) 2003 Adaptec Inc.
* All Rights Reserved
*
* Redistribution and use in source and binary forms, with or without
@@ -33,24 +35,27 @@
*
* iir.h: Definitions/Constants used by the Intel Integrated RAID driver
*
- * Written by: Achim Leubner <achim.leubner@intel.com>
+ * Written by: Achim Leubner <achim_leubner@adaptec.com>
* Fixes/Additions: Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>
*
* credits: Niklas Hallqvist; OpenBSD driver for the ICP Controllers.
* FreeBSD.ORG; Great O/S to work on and for.
+ *
+ * $Id: iir.h 1.5 2003/08/26 12:28:21 achim Exp $"
*/
-
-#ident "$Id: iir.h 1.4 2003/03/21 16:28:57 achim Exp $"
-
#ifndef _IIR_H
#define _IIR_H
#define IIR_DRIVER_VERSION 1
-#define IIR_DRIVER_SUBVERSION 3
+#define IIR_DRIVER_SUBVERSION 4
#define IIR_CDEV_MAJOR 164
+/* OEM IDs */
+#define OEM_ID_ICP 0x941c
+#define OEM_ID_INTEL 0x8000
+
#define GDT_VENDOR_ID 0x1119
#define GDT_DEVICE_ID_MIN 0x100
#define GDT_DEVICE_ID_MAX 0x2ff
@@ -149,8 +154,8 @@
/* IOCTLs */
#define GDT_IOCTL_GENERAL _IOWR('J', 0, gdt_ucmd_t) /* general IOCTL */
-#define GDT_IOCTL_DRVERS _IOWR('J', 1, int) /* get driver version */
-#define GDT_IOCTL_CTRTYPE _IOR('J', 2, gdt_ctrt_t) /* get ctr. type */
+#define GDT_IOCTL_DRVERS _IOR('J', 1, int) /* get driver version */
+#define GDT_IOCTL_CTRTYPE _IOWR('J', 2, gdt_ctrt_t) /* get ctr. type */
#define GDT_IOCTL_OSVERS _IOR('J', 3, gdt_osv_t) /* get OS version */
#define GDT_IOCTL_CTRCNT _IOR('J', 5, int) /* get ctr. count */
#define GDT_IOCTL_EVENT _IOWR('J', 8, gdt_event_t) /* get event */
diff --git a/sys/dev/iir/iir_ctrl.c b/sys/dev/iir/iir_ctrl.c
index 184bf7e..bcee81d 100644
--- a/sys/dev/iir/iir_ctrl.c
+++ b/sys/dev/iir/iir_ctrl.c
@@ -1,5 +1,7 @@
/*
- * Copyright (c) 2000-01 Intel Corporation
+ * Copyright (c) 2000-03 ICP vortex GmbH
+ * Copyright (c) 2002-03 Intel Corporation
+ * Copyright (c) 2003 Adaptec Inc.
* All Rights Reserved
*
* Redistribution and use in source and binary forms, with or without
@@ -30,13 +32,12 @@
/*
* iir_ctrl.c: Control functions and /dev entry points for /dev/iir*
*
- * Written by: Achim Leubner <achim.leubner@intel.com>
+ * Written by: Achim Leubner <achim_leubner@adaptec.com>
* Fixes/Additions: Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>
*
- * TODO:
+ * $Id: iir_ctrl.c 1.3 2003/08/26 12:31:15 achim Exp $"
*/
-#ident "$Id: iir_ctrl.c 1.2 2001/07/18 11:17:22 achim Exp $"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -274,10 +275,22 @@ iir_ioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, d_thread_t * p)
gdt = gdt_minor2softc(p->io_node);
if (gdt == NULL)
return (ENXIO);
- p->oem_id = 0x8000;
- p->type = 0xfd;
+ /* only RP controllers */
+ p->ext_type = 0x6000 | gdt->sc_device;
+ if (gdt->sc_vendor == INTEL_VENDOR_ID) {
+ p->oem_id = OEM_ID_INTEL;
+ p->type = 0xfd;
+ /* new -> subdevice into ext_type */
+ if (gdt->sc_device >= 0x600)
+ p->ext_type = 0x6000 | gdt->sc_subdevice;
+ } else {
+ p->oem_id = OEM_ID_ICP;
+ p->type = 0xfe;
+ /* new -> subdevice into ext_type */
+ if (gdt->sc_device >= 0x300)
+ p->ext_type = 0x6000 | gdt->sc_subdevice;
+ }
p->info = (gdt->sc_bus << 8) | (gdt->sc_slot << 3);
- p->ext_type = 0x6000 | gdt->sc_subdevice;
p->device_id = gdt->sc_device;
p->sub_device_id = gdt->sc_subdevice;
break;
diff --git a/sys/dev/iir/iir_pci.c b/sys/dev/iir/iir_pci.c
index cba51b8..f2e81d4 100644
--- a/sys/dev/iir/iir_pci.c
+++ b/sys/dev/iir/iir_pci.c
@@ -1,5 +1,7 @@
/*-
- * Copyright (c) 2000-01 Intel Corporation
+ * Copyright (c) 2000-03 ICP vortex GmbH
+ * Copyright (c) 2002-03 Intel Corporation
+ * Copyright (c) 2003 Adaptec Inc.
* All Rights Reserved
*
* Redistribution and use in source and binary forms, with or without
@@ -27,7 +29,7 @@
* SUCH DAMAGE.
*/
-#ident "$Id: iir_pci.c 1.1 2001/05/22 20:14:12 achim Exp $"
+#ident "$Id: iir_pci.c 1.2 2003/08/26 12:29:55 achim Exp $"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@@ -35,6 +37,7 @@ __FBSDID("$FreeBSD$");
* iir_pci.c: PCI Bus Attachment for Intel Integrated RAID Controller driver
*
* Written by: Achim Leubner <achim.leubner@intel.com>
+ * Written by: Achim Leubner <achim_leubner@adaptec.com>
* Fixes/Additions: Boji Tony Kannanthanam <boji.t.kannanthanam@intel.com>
*
* TODO:
OpenPOWER on IntegriCloud