PERFORCE change 124008 for review
Rui Paulo
rpaulo at FreeBSD.org
Tue Jul 24 13:10:12 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=124008
Change 124008 by rpaulo at rpaulo_epsilon on 2007/07/24 13:09:28
IFC
Affected files ...
.. //depot/projects/soc2007/rpaulo-macbook/amd64/isa/clock.c#4 integrate
.. //depot/projects/soc2007/rpaulo-macbook/bsm/audit.h#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/bsm/audit_internal.h#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/bsm/audit_kevents.h#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/bsm/audit_record.h#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/cam/scsi/scsi_cd.c#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/compat/ndis/subr_ntoskrnl.c#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/conf/files#20 integrate
.. //depot/projects/soc2007/rpaulo-macbook/dev/acpica/acpi_hpet.c#4 integrate
.. //depot/projects/soc2007/rpaulo-macbook/dev/nfe/if_nfe.c#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/dev/nfe/if_nfevar.h#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/dev/ral/rt2560.c#4 integrate
.. //depot/projects/soc2007/rpaulo-macbook/dev/ral/rt2661.c#4 integrate
.. //depot/projects/soc2007/rpaulo-macbook/dev/re/if_re.c#4 integrate
.. //depot/projects/soc2007/rpaulo-macbook/dev/sym/sym_hipd.c#4 integrate
.. //depot/projects/soc2007/rpaulo-macbook/dev/usb/usb_quirks.c#9 integrate
.. //depot/projects/soc2007/rpaulo-macbook/dev/usb/usbdevs#18 integrate
.. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_fat.c#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_vfsops.c#4 integrate
.. //depot/projects/soc2007/rpaulo-macbook/fs/msdosfs/msdosfs_vnops.c#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/fs/tmpfs/tmpfs_vfsops.c#6 integrate
.. //depot/projects/soc2007/rpaulo-macbook/i386/isa/clock.c#4 integrate
.. //depot/projects/soc2007/rpaulo-macbook/ia64/ia64/clock.c#2 integrate
.. //depot/projects/soc2007/rpaulo-macbook/kern/kern_kse.c#4 integrate
.. //depot/projects/soc2007/rpaulo-macbook/kern/kern_thread.c#5 integrate
.. //depot/projects/soc2007/rpaulo-macbook/kern/subr_clock.c#2 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_asconf.c#9 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_indata.c#14 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_input.c#14 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_os_bsd.h#11 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_output.c#14 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_pcb.c#14 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_pcb.h#10 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet/sctp_usrreq.c#13 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet6/sctp6_usrreq.c#13 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet6/udp6_output.c#6 delete
.. //depot/projects/soc2007/rpaulo-macbook/netinet6/udp6_usrreq.c#7 integrate
.. //depot/projects/soc2007/rpaulo-macbook/netinet6/udp6_var.h#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/pc98/cbus/clock.c#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/pci/if_rl.c#2 integrate
.. //depot/projects/soc2007/rpaulo-macbook/pci/if_rlreg.h#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/security/mac_mls/mac_mls.c#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/sparc64/sparc64/eeprom.c#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/sparc64/sparc64/rtc.c#3 integrate
.. //depot/projects/soc2007/rpaulo-macbook/sys/proc.h#5 integrate
Differences ...
==== //depot/projects/soc2007/rpaulo-macbook/amd64/isa/clock.c#4 (text+ko) ====
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.232 2007/06/15 22:58:14 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/isa/clock.c,v 1.233 2007/07/23 09:42:30 dwmalone Exp $");
/*
* Routines to handle clock hardware.
@@ -686,8 +686,7 @@
return;
wrong_time:
- printf("Invalid time in real time clock.\n");
- printf("Check and reset the date immediately!\n");
+ printf("Invalid time in clock: check and reset the date!\n");
}
/*
==== //depot/projects/soc2007/rpaulo-macbook/bsm/audit.h#3 (text) ====
@@ -2,8 +2,6 @@
* Copyright (c) 2005 Apple Computer, Inc.
* All rights reserved.
*
- * @APPLE_BSD_LICENSE_HEADER_START@
- *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -28,10 +26,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * @APPLE_BSD_LICENSE_HEADER_END@
- *
- * P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#36
- * $FreeBSD: src/sys/bsm/audit.h,v 1.8 2007/04/17 12:27:08 rwatson Exp $
+ * P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit.h#38
+ * $FreeBSD: src/sys/bsm/audit.h,v 1.9 2007/07/22 12:28:12 rwatson Exp $
*/
#ifndef _BSM_AUDIT_H
==== //depot/projects/soc2007/rpaulo-macbook/bsm/audit_internal.h#3 (text) ====
@@ -6,8 +6,6 @@
* This code was developed in part by Robert N. M. Watson, Senior Principal
* Scientist, SPARTA, Inc.
*
- * @APPLE_BSD_LICENSE_HEADER_START@
- *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -32,10 +30,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * @APPLE_BSD_LICENSE_HEADER_END@
- *
- * P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#16
- * $FreeBSD: src/sys/bsm/audit_internal.h,v 1.7 2007/04/17 12:27:08 rwatson Exp $
+ * P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_internal.h#18
+ * $FreeBSD: src/sys/bsm/audit_internal.h,v 1.8 2007/07/22 12:28:12 rwatson Exp $
*/
#ifndef _AUDIT_INTERNAL_H
==== //depot/projects/soc2007/rpaulo-macbook/bsm/audit_kevents.h#3 (text) ====
@@ -2,8 +2,6 @@
* Copyright (c) 2005 Apple Computer, Inc.
* All rights reserved.
*
- * @APPLE_BSD_LICENSE_HEADER_START@
- *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -28,10 +26,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * @APPLE_BSD_LICENSE_HEADER_END@
- *
- * P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#32
- * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.11 2007/04/17 12:27:08 rwatson Exp $
+ * P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_kevents.h#34
+ * $FreeBSD: src/sys/bsm/audit_kevents.h,v 1.12 2007/07/22 12:28:12 rwatson Exp $
*/
#ifndef _BSM_AUDIT_KEVENTS_H_
@@ -49,11 +45,12 @@
#define AUE_NULL 0
#define AUE_EXIT 1
#define AUE_FORK 2
+#define AUE_FORKALL AUE_FORK /* Solaris-specific. */
#define AUE_OPEN 3
#define AUE_CREAT 4
#define AUE_LINK 5
#define AUE_UNLINK 6
-#define AUE_DELETE AUE_UNLINK
+#define AUE_DELETE AUE_UNLINK /* Darwin-specific. */
#define AUE_EXEC 7
#define AUE_CHDIR 8
#define AUE_MKNOD 9
@@ -62,7 +59,7 @@
#define AUE_UMOUNT 12
#define AUE_JUNK 13 /* Solaris-specific. */
#define AUE_ACCESS 14
-#define AUE_CHECKUSERACCESS AUE_ACCESS
+#define AUE_CHECKUSERACCESS AUE_ACCESS /* Darwin-specific. */
#define AUE_KILL 15
#define AUE_STAT 16
#define AUE_LSTAT 17
@@ -161,7 +158,7 @@
#define AUE_SEMOP 110
#define AUE_CORE 111 /* Solaris-specific, currently. */
#define AUE_CLOSE 112
-#define AUE_SYSTEMBOOT 113
+#define AUE_SYSTEMBOOT 113 /* Solaris-specific. */
#define AUE_ASYNC_DAEMON_EXIT 114 /* Solaris-specific. */
#define AUE_NFSSVC_EXIT 115 /* Solaris-specific. */
#define AUE_WRITEL 128 /* Solaris-specific. */
@@ -184,9 +181,14 @@
#define AUE_GETKERNSTATE 147 /* Solaris-specific. */
#define AUE_SETKERNSTATE 148 /* Solaris-specific. */
#define AUE_GETPORTAUDIT 149 /* Solaris-specific. */
-#define AUE_AUDISTAT 150 /* Solaris-specific. */
+#define AUE_AUDITSTAT 150 /* Solaris-specific. */
+#define AUE_REVOKE 151
+#define AUE_MAC 152 /* Solaris-specific. */
#define AUE_ENTERPROM 153 /* Solaris-specific. */
#define AUE_EXITPROM 154 /* Solaris-specific. */
+#define AUE_IFLOAT 155 /* Solaris-specific. */
+#define AUE_PFLOAT 156 /* Solaris-specific. */
+#define AUE_UPRIV 157 /* Solaris-specific. */
#define AUE_IOCTL 158
#define AUE_SOCKET 183
#define AUE_SENDTO 184
@@ -198,28 +200,30 @@
#define AUE_RECVMSG 190
#define AUE_RECVFROM 191
#define AUE_READ 192
+#define AUE_GETDENTS 193
#define AUE_LSEEK 194
#define AUE_WRITE 195
#define AUE_WRITEV 196
#define AUE_NFS 197 /* Solaris-specific. */
#define AUE_READV 198
- /* XXXRW: XXX Solaris old stat()? */
+#define AUE_OSTAT 199 /* Solaris-specific. */
#define AUE_SETUID 200 /* XXXRW: Solaris old setuid? */
#define AUE_STIME 201 /* XXXRW: Solaris old stime? */
#define AUE_UTIME 202 /* XXXRW: Solaris old utime? */
#define AUE_NICE 203 /* XXXRW: Solaris old nice? */
- /* XXXRW: Solaris old setpgrp? */
-#define AUE_SETGID 205 /* XXXRW: Solaris old setgid? */
- /* XXXRW: Solaris readl? */
- /* XXXRW: Solaris readvl()? */
+#define AUE_OSETPGRP 204 /* Solaris-specific. */
+#define AUE_SETGID 205
+#define AUE_READL 206 /* Solaris-specific. */
+#define AUE_READVL 207 /* Solaris-specific. */
+#define AUE_FSTAT 208
#define AUE_DUP2 209
#define AUE_MMAP 210
#define AUE_AUDIT 211
-#define AUE_PRIOCNTLSYS 212
+#define AUE_PRIOCNTLSYS 212 /* Solaris-specific. */
#define AUE_MUNMAP 213
#define AUE_SETEGID 214
#define AUE_SETEUID 215
-#define AUE_PUTMSG 216
+#define AUE_PUTMSG 216 /* Solaris-specific. */
#define AUE_GETMSG 217 /* Solaris-specific. */
#define AUE_PUTPMSG 218 /* Solaris-specific. */
#define AUE_GETPMSG 219 /* Solaris-specific. */
@@ -236,26 +240,27 @@
#define AUE_AUDITON_SETCOND 230
#define AUE_AUDITON_GETCLASS 231
#define AUE_AUDITON_SETCLASS 232
-#define AUE_UTSSYS 233 /* Solaris-specific. */
+#define AUE_FUSERS 233 /* Solaris-specific; also UTSSYS? */
#define AUE_STATVFS 234
-#define AUE_XSTAT 235
-#define AUE_LXSTAT 236
+#define AUE_XSTAT 235 /* Solaris-specific. */
+#define AUE_LXSTAT 236 /* Solaris-specific. */
#define AUE_LCHOWN 237
#define AUE_MEMCNTL 238 /* Solaris-specific. */
#define AUE_SYSINFO 239 /* Solaris-specific. */
#define AUE_XMKNOD 240 /* Solaris-specific. */
#define AUE_FORK1 241
- /* XXXRW: Solaris modctl()? */
+#define AUE_MODCTL 242 /* Solaris-specific. */
#define AUE_MODLOAD 243
#define AUE_MODUNLOAD 244
#define AUE_MODCONFIG 245 /* Solaris-specific. */
#define AUE_MODADDMAJ 246 /* Solaris-specific. */
-#define AUE_SOCKACCEPT 247
-#define AUE_SOCKCONNECT 248
-#define AUE_SOCKSEND 249
-#define AUE_SOCKRECEIVE 250
+#define AUE_SOCKACCEPT 247 /* Solaris-specific. */
+#define AUE_SOCKCONNECT 248 /* Solaris-specific. */
+#define AUE_SOCKSEND 249 /* Solaris-specific. */
+#define AUE_SOCKRECEIVE 250 /* Solaris-specific. */
#define AUE_ACLSET 251
#define AUE_FACLSET 252
+#define AUE_DOORFS 253 /* Solaris-specific. */
#define AUE_DOORFS_DOOR_CALL 254 /* Solaris-specific. */
#define AUE_DOORFS_DOOR_RETURN 255 /* Solaris-specific. */
#define AUE_DOORFS_DOOR_CREATE 256 /* Solaris-specific. */
@@ -267,11 +272,42 @@
#define AUE_P_ONLINE 262 /* Solaris-specific. */
#define AUE_PROCESSOR_BIND 263 /* Solaris-specific. */
#define AUE_INST_SYNC 264 /* Solaris-specific. */
-#define AUE_SOCK_CONFIG 265 /* Solaris-specific. */
+#define AUE_SOCKCONFIG 265 /* Solaris-specific. */
#define AUE_SETAUDIT_ADDR 266
#define AUE_GETAUDIT_ADDR 267
+#define AUE_UMOUNT2 268 /* Solaris-specific. */
+#define AUE_FSAT 269 /* Solaris-specific. */
+#define AUE_OPENAT_R 270
+#define AUE_OPENAT_RC 271
+#define AUE_OPENAT_RT 272
+#define AUE_OPENAT_RTC 273
+#define AUE_OPENAT_W 274
+#define AUE_OPENAT_WC 275
+#define AUE_OPENAT_WT 276
+#define AUE_OPENAT_WTC 277
+#define AUE_OPENAT_RW 278
+#define AUE_OPENAT_RWC 279
+#define AUE_OPENAT_RWT 280
+#define AUE_OPENAT_RWTC 281
+#define AUE_RENAMEAT 282
+#define AUE_FSTATAT 283
+#define AUE_FCHOWNAT 284
+#define AUE_FUTIMESAT 285
+#define AUE_UNLINKAT 286
#define AUE_CLOCK_SETTIME 287
#define AUE_NTP_ADJTIME 288
+#define AUE_SETPPRIV 289 /* Solaris-specific. */
+#define AUE_MODDEVPLCY 290 /* Solaris-specific. */
+#define AUE_MODADDPRIV 291 /* Solaris-specific. */
+#define AUE_CRYPTOADM 292 /* Solaris-specific. */
+#define AUE_CONFIGKSSL 293 /* Solaris-specific. */
+#define AUE_BRANDSYS 294 /* Solaris-specific. */
+#define AUE_PF_POLICY_ADDRULE 295 /* Solaris-specific. */
+#define AUE_PF_POLICY_DELRULE 296 /* Solaris-specific. */
+#define AUE_PF_POLICY_CLONE 297 /* Solaris-specific. */
+#define AUE_PF_POLICY_FLIP 298 /* Solaris-specific. */
+#define AUE_PF_POLICY_FLUSH 299 /* Solaris-specific. */
+#define AUE_PF_POLICY_ALGS 300 /* Solaris-specific. */
/*
* Events added for Apple Darwin that potentially collide with future Solaris
@@ -286,30 +322,30 @@
#define AUE_DARWIN_PROFILE 305
#define AUE_DARWIN_KTRACE 306
#define AUE_DARWIN_SETLOGIN 307
-#define AUE_DARWIN_REBOOT 308 /* XXX: See AUE_REBOOT. */
+#define AUE_DARWIN_REBOOT 308
#define AUE_DARWIN_REVOKE 309
#define AUE_DARWIN_UMASK 310
#define AUE_DARWIN_MPROTECT 311
-#define AUE_DARWIN_SETPRIORITY 312 /* XXX: See AUE_SETPRIORITY. */
-#define AUE_DARWIN_SETTIMEOFDAY 313 /* XXX: See AUE_SETTIMEOFDAY. */
-#define AUE_DARWIN_FLOCK 314 /* XXX: See AUE_FLOCK. */
+#define AUE_DARWIN_SETPRIORITY 312
+#define AUE_DARWIN_SETTIMEOFDAY 313
+#define AUE_DARWIN_FLOCK 314
#define AUE_DARWIN_MKFIFO 315
#define AUE_DARWIN_POLL 316
-#define AUE_DARWIN_SOCKETPAIR 317 /* XXXRW: See AUE_SOCKETPAIR. */
+#define AUE_DARWIN_SOCKETPAIR 317
#define AUE_DARWIN_FUTIMES 318
#define AUE_DARWIN_SETSID 319
#define AUE_DARWIN_SETPRIVEXEC 320 /* Darwin-specific. */
-#define AUE_DARWIN_NFSSVC 321 /* XXX: See AUE_NFS_SVC. */
-#define AUE_DARWIN_GETFH 322 /* XXX: See AUE_NFS_GETFH. */
-#define AUE_DARWIN_QUOTACTL 323 /* XXX: See AUE_QUOTACTL. */
+#define AUE_DARWIN_NFSSVC 321
+#define AUE_DARWIN_GETFH 322
+#define AUE_DARWIN_QUOTACTL 323
#define AUE_DARWIN_ADDPROFILE 324 /* Darwin-specific. */
#define AUE_DARWIN_KDEBUGTRACE 325 /* Darwin-specific. */
#define AUE_DARWIN_KDBUGTRACE AUE_KDEBUGTRACE
#define AUE_DARWIN_FSTAT 326
#define AUE_DARWIN_FPATHCONF 327
#define AUE_DARWIN_GETDIRENTRIES 328
-#define AUE_DARWIN_TRUNCATE 329 /* XXX: See AUE_TRUNCATE. */
-#define AUE_DARWIN_FTRUNCATE 330 /* XXX: See AUE_FTRUNCATE. */
+#define AUE_DARWIN_TRUNCATE 329
+#define AUE_DARWIN_FTRUNCATE 330
#define AUE_DARWIN_SYSCTL 331
#define AUE_DARWIN_MLOCK 332
#define AUE_DARWIN_MUNLOCK 333
@@ -348,6 +384,11 @@
* These often duplicate events added to the Solaris set by Darwin, but use
* event identifiers in a higher range in order to avoid colliding with
* future Solaris additions.
+ *
+ * If an event in this section is later added to Solaris, we prefer the
+ * Solaris event identifier, and add _OPENBSM_ to the OpenBSM-specific
+ * identifier so that old trails can still be processed, but new trails use
+ * the Solaris identifier.
*/
#define AUE_GETFSSTAT 43001
#define AUE_PTRACE 43002
@@ -356,7 +397,7 @@
#define AUE_PROFILE 43005
#define AUE_KTRACE 43006
#define AUE_SETLOGIN 43007
-#define AUE_REVOKE 43008
+#define AUE_OPENBSM_REVOKE 43008 /* Solaris event now preferred. */
#define AUE_UMASK 43009
#define AUE_MPROTECT 43010
#define AUE_MKFIFO 43011
@@ -367,7 +408,7 @@
#define AUE_ADDPROFILE 43016 /* Darwin-specific. */
#define AUE_KDEBUGTRACE 43017 /* Darwin-specific. */
#define AUE_KDBUGTRACE AUE_KDEBUGTRACE
-#define AUE_FSTAT 43018
+#define AUE_OPENBSM_FSTAT 43018 /* Solaris event now preferred. */
#define AUE_FPATHCONF 43019
#define AUE_GETDIRENTRIES 43020
#define AUE_SYSCTL 43021
@@ -497,6 +538,16 @@
#define AUE_LISTEN 43140 /* FreeBSD/Darwin/Linux. */
#define AUE_MLOCKALL 43141 /* FreeBSD. */
#define AUE_MUNLOCKALL 43142 /* FreeBSD. */
+#define AUE_CLOSEFROM 43143 /* FreeBSD. */
+#define AUE_FEXECVE 43144 /* FreeBSD. */
+#define AUE_FACCESSAT 43145 /* FreeBSD. */
+#define AUE_FCHMODAT 43146 /* FreeBSD. */
+#define AUE_LINKAT 43147 /* FreeBSD. */
+#define AUE_MKDIRAT 43148 /* FreeBSD. */
+#define AUE_MKFIFOAT 43149 /* FreeBSD. */
+#define AUE_MKNODAT 43150 /* FreeBSD. */
+#define AUE_READLINKAT 43151 /* FreeBSD. */
+#define AUE_SYMLINKAT 43152 /* FreeBSD. */
/*
* Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the
==== //depot/projects/soc2007/rpaulo-macbook/bsm/audit_record.h#3 (text) ====
@@ -2,8 +2,6 @@
* Copyright (c) 2005 Apple Computer, Inc.
* All rights reserved.
*
- * @APPLE_BSD_LICENSE_HEADER_START@
- *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -28,10 +26,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * @APPLE_BSD_LICENSE_HEADER_END@
- *
- * P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#24
- * $FreeBSD: src/sys/bsm/audit_record.h,v 1.9 2007/04/17 12:27:08 rwatson Exp $
+ * P4: //depot/projects/trustedbsd/audit3/sys/bsm/audit_record.h#26
+ * $FreeBSD: src/sys/bsm/audit_record.h,v 1.10 2007/07/22 12:28:13 rwatson Exp $
*/
#ifndef _BSM_AUDIT_RECORD_H_
==== //depot/projects/soc2007/rpaulo-macbook/cam/scsi/scsi_cd.c#3 (text+ko) ====
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.101 2007/05/16 16:54:23 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.102 2007/07/21 18:07:45 kan Exp $");
#include "opt_cd.h"
@@ -1860,14 +1860,17 @@
&& (cmd != CDIOCEJECT))
&& (IOCGROUP(cmd) == 'c')) {
error = cdcheckmedia(periph);
+ if (error != 0) {
+ cam_periph_unhold(periph);
+ cam_periph_unlock(periph);
+ return (error);
+ }
}
/*
* Drop the lock here so later mallocs can use WAITOK. The periph
* is essentially locked still with the cam_periph_hold call above.
*/
cam_periph_unlock(periph);
- if (error != 0)
- return (error);
nocopyout = 0;
switch (cmd) {
==== //depot/projects/soc2007/rpaulo-macbook/compat/ndis/subr_ntoskrnl.c#3 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.89 2007/06/05 00:00:50 jeff Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ntoskrnl.c,v 1.90 2007/07/22 20:53:28 thompsa Exp $");
#include <sys/ctype.h>
#include <sys/unistd.h>
@@ -2778,6 +2778,7 @@
KeAcquireSpinLock(&kq->kq_lock, &irql);
if (kq->kq_exit) {
+ kq->kq_exit = 0;
KeReleaseSpinLock(&kq->kq_lock, irql);
break;
}
@@ -2814,7 +2815,8 @@
kq = wq_queues + i;
kq->kq_exit = 1;
KeSetEvent(&kq->kq_proc, IO_NO_INCREMENT, FALSE);
- tsleep(kq->kq_td->td_proc, PWAIT, "waitiw", 0);
+ while (kq->kq_exit)
+ tsleep(kq->kq_td->td_proc, PWAIT, "waitiw", hz/10);
}
return;
@@ -3842,6 +3844,7 @@
KeAcquireSpinLock(&kq->kq_lock, &irql);
if (kq->kq_exit) {
+ kq->kq_exit = 0;
KeReleaseSpinLock(&kq->kq_lock, irql);
break;
}
@@ -3891,7 +3894,8 @@
KeInitializeDpc(&dpc, NULL, NULL);
KeSetTargetProcessorDpc(&dpc, i);
KeInsertQueueDpc(&dpc, NULL, NULL);
- tsleep(kq->kq_td->td_proc, PWAIT, "dpcw", 0);
+ while (kq->kq_exit)
+ tsleep(kq->kq_td->td_proc, PWAIT, "dpcw", hz/10);
}
return;
==== //depot/projects/soc2007/rpaulo-macbook/conf/files#20 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1239 2007/07/19 16:15:58 gallatin Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1240 2007/07/23 07:58:58 rwatson Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -1913,7 +1913,6 @@
netinet6/route6.c optional inet6
netinet6/scope6.c optional inet6
netinet6/sctp6_usrreq.c optional inet6 sctp
-netinet6/udp6_output.c optional inet6
netinet6/udp6_usrreq.c optional inet6
netipsec/ipsec.c optional ipsec
netipsec/ipsec_input.c optional ipsec
==== //depot/projects/soc2007/rpaulo-macbook/dev/acpica/acpi_hpet.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_hpet.c,v 1.9 2007/06/15 18:02:34 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_hpet.c,v 1.10 2007/07/22 20:45:27 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -140,7 +140,7 @@
{
struct acpi_hpet_softc *sc;
int rid;
- uint32_t val;
+ uint32_t val, val2;
uintmax_t freq;
ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__);
@@ -163,6 +163,9 @@
return (ENXIO);
}
+ /* Be sure timer is enabled. */
+ bus_write_4(sc->mem_res, HPET_OFFSET_ENABLE, 1);
+
/* Read basic statistics about the timer. */
val = bus_read_4(sc->mem_res, HPET_OFFSET_PERIOD);
freq = (1000000000000000LL + val / 2) / val;
@@ -175,12 +178,23 @@
((val >> 13) & 1) ? " count_size" : "");
}
- /* Be sure it is enabled. */
- bus_write_4(sc->mem_res, HPET_OFFSET_ENABLE, 1);
-
if (testenv("debug.acpi.hpet_test"))
acpi_hpet_test(sc);
+ /*
+ * Don't attach if the timer never increments. Since the spec
+ * requires it to be at least 10 MHz, it has to change in 1 us.
+ */
+ val = bus_read_4(sc->mem_res, HPET_OFFSET_VALUE);
+ DELAY(1);
+ val2 = bus_read_4(sc->mem_res, HPET_OFFSET_VALUE);
+ if (val == val2) {
+ device_printf(dev, "HPET never increments, disabling\n");
+ bus_write_4(sc->mem_res, HPET_OFFSET_ENABLE, 0);
+ bus_free_resource(dev, SYS_RES_MEMORY, sc->mem_res);
+ return (ENXIO);
+ }
+
hpet_timecounter.tc_frequency = freq;
hpet_timecounter.tc_priv = sc;
tc_init(&hpet_timecounter);
==== //depot/projects/soc2007/rpaulo-macbook/dev/nfe/if_nfe.c#3 (text+ko) ====
@@ -21,7 +21,7 @@
/* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.18 2007/06/12 02:35:01 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.19 2007/07/24 01:11:00 yongari Exp $");
#ifdef HAVE_KERNEL_OPTION_HEADERS
#include "opt_device_polling.h"
@@ -108,7 +108,7 @@
static void nfe_init_locked(void *);
static void nfe_stop(struct ifnet *);
static int nfe_alloc_rx_ring(struct nfe_softc *, struct nfe_rx_ring *);
-static int nfe_alloc_jrx_ring(struct nfe_softc *, struct nfe_jrx_ring *);
+static void nfe_alloc_jrx_ring(struct nfe_softc *, struct nfe_jrx_ring *);
static int nfe_init_rx_ring(struct nfe_softc *, struct nfe_rx_ring *);
static int nfe_init_jrx_ring(struct nfe_softc *, struct nfe_jrx_ring *);
static void nfe_free_rx_ring(struct nfe_softc *, struct nfe_rx_ring *);
@@ -151,8 +151,10 @@
/* Tunables. */
static int msi_disable = 0;
static int msix_disable = 0;
+static int jumbo_disable = 0;
TUNABLE_INT("hw.nfe.msi_disable", &msi_disable);
TUNABLE_INT("hw.nfe.msix_disable", &msix_disable);
+TUNABLE_INT("hw.nfe.jumbo_disable", &jumbo_disable);
static device_method_t nfe_methods[] = {
/* Device interface */
@@ -513,8 +515,7 @@
if ((error = nfe_alloc_rx_ring(sc, &sc->rxq)) != 0)
goto fail;
- if ((error = nfe_alloc_jrx_ring(sc, &sc->jrxq)) != 0)
- goto fail;
+ nfe_alloc_jrx_ring(sc, &sc->jrxq);
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
@@ -1140,7 +1141,7 @@
}
-static int
+static void
nfe_alloc_jrx_ring(struct nfe_softc *sc, struct nfe_jrx_ring *ring)
{
struct nfe_dmamap_arg ctx;
@@ -1151,7 +1152,12 @@
int i, error, descsize;
if ((sc->nfe_flags & NFE_JUMBO_SUP) == 0)
- return (0);
+ return;
+ if (jumbo_disable != 0) {
+ device_printf(sc->nfe_dev, "disabling jumbo frame support\n");
+ sc->nfe_jumbo_disable = 1;
+ return;
+ }
if (sc->nfe_flags & NFE_40BIT_ADDR) {
desc = ring->jdesc64;
@@ -1301,11 +1307,17 @@
jpool_entries);
}
- return (0);
+ return;
fail:
+ /*
+ * Running without jumbo frame support is ok for most cases
+ * so don't fail on creating dma tag/map for jumbo frame.
+ */
nfe_free_jrx_ring(sc, ring);
- return (error);
+ device_printf(sc->nfe_dev, "disabling jumbo frame support due to "
+ "resource shortage\n");
+ sc->nfe_jumbo_disable = 1;
}
@@ -1671,7 +1683,10 @@
return;
}
- nfe_rxeof(sc, count);
+ if (sc->nfe_framesize > MCLBYTES - ETHER_HDR_LEN)
+ nfe_jrxeof(sc, count);
+ else
+ nfe_rxeof(sc, count);
nfe_txeof(sc);
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
taskqueue_enqueue_fast(taskqueue_fast, &sc->nfe_tx_task);
@@ -1746,7 +1761,8 @@
if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > NFE_JUMBO_MTU)
error = EINVAL;
else if (ifp->if_mtu != ifr->ifr_mtu) {
- if ((sc->nfe_flags & NFE_JUMBO_SUP) == 0 &&
+ if ((((sc->nfe_flags & NFE_JUMBO_SUP) == 0) ||
+ (sc->nfe_jumbo_disable != 0)) &&
ifr->ifr_mtu > ETHERMTU)
error = EINVAL;
else {
==== //depot/projects/soc2007/rpaulo-macbook/dev/nfe/if_nfevar.h#3 (text+ko) ====
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $FreeBSD: src/sys/dev/nfe/if_nfevar.h,v 1.4 2007/06/12 02:16:02 yongari Exp $
+ * $FreeBSD: src/sys/dev/nfe/if_nfevar.h,v 1.5 2007/07/24 01:11:00 yongari Exp $
*/
struct nfe_tx_data {
@@ -103,6 +103,7 @@
#define NFE_PWR_MGMT 0x0010
#define NFE_CORRECT_MACADDR 0x0020
#define NFE_TX_FLOW_CTRL 0x0040
+ int nfe_jumbo_disable;
uint32_t rxtxctl;
uint8_t mii_phyaddr;
uint8_t eaddr[ETHER_ADDR_LEN];
==== //depot/projects/soc2007/rpaulo-macbook/dev/ral/rt2560.c#4 (text) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/ral/rt2560.c,v 1.13 2007/06/29 02:43:13 kevlo Exp $ */
+/* $FreeBSD: src/sys/dev/ral/rt2560.c,v 1.14 2007/07/22 06:44:10 kevlo Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ral/rt2560.c,v 1.13 2007/06/29 02:43:13 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ral/rt2560.c,v 1.14 2007/07/22 06:44:10 kevlo Exp $");
/*-
* Ralink Technology RT2560 chipset driver
@@ -410,9 +410,10 @@
ring->cur = ring->next = 0;
ring->cur_encrypt = ring->next_encrypt = 0;
- error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, count * RT2560_TX_DESC_SIZE, 1,
- count * RT2560_TX_DESC_SIZE, 0, NULL, NULL, &ring->desc_dmat);
+ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 4, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ count * RT2560_TX_DESC_SIZE, 1, count * RT2560_TX_DESC_SIZE,
+ 0, NULL, NULL, &ring->desc_dmat);
if (error != 0) {
device_printf(sc->sc_dev, "could not create desc DMA tag\n");
goto fail;
@@ -441,9 +442,10 @@
goto fail;
}
- error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, RT2560_MAX_SCATTER,
- MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
+ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ MCLBYTES, RT2560_MAX_SCATTER, MCLBYTES, 0, NULL, NULL,
+ &ring->data_dmat);
if (error != 0) {
device_printf(sc->sc_dev, "could not create data DMA tag\n");
goto fail;
@@ -552,9 +554,10 @@
ring->cur = ring->next = 0;
ring->cur_decrypt = 0;
- error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, count * RT2560_RX_DESC_SIZE, 1,
- count * RT2560_RX_DESC_SIZE, 0, NULL, NULL, &ring->desc_dmat);
+ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 4, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ count * RT2560_RX_DESC_SIZE, 1, count * RT2560_RX_DESC_SIZE,
+ 0, NULL, NULL, &ring->desc_dmat);
if (error != 0) {
device_printf(sc->sc_dev, "could not create desc DMA tag\n");
goto fail;
@@ -586,9 +589,9 @@
/*
* Pre-allocate Rx buffers and populate Rx ring.
*/
- error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL,
- NULL, &ring->data_dmat);
+ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES,
+ 1, MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
if (error != 0) {
device_printf(sc->sc_dev, "could not create data DMA tag\n");
goto fail;
==== //depot/projects/soc2007/rpaulo-macbook/dev/ral/rt2661.c#4 (text) ====
@@ -1,4 +1,4 @@
-/* $FreeBSD: src/sys/dev/ral/rt2661.c,v 1.13 2007/06/29 02:43:13 kevlo Exp $ */
+/* $FreeBSD: src/sys/dev/ral/rt2661.c,v 1.14 2007/07/22 06:44:10 kevlo Exp $ */
/*-
* Copyright (c) 2006
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ral/rt2661.c,v 1.13 2007/06/29 02:43:13 kevlo Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ral/rt2661.c,v 1.14 2007/07/22 06:44:10 kevlo Exp $");
/*-
* Ralink Technology RT2561, RT2561S and RT2661 chipset driver
@@ -445,9 +445,10 @@
ring->queued = 0;
ring->cur = ring->next = ring->stat = 0;
- error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, count * RT2661_TX_DESC_SIZE, 1,
- count * RT2661_TX_DESC_SIZE, 0, NULL, NULL, &ring->desc_dmat);
+ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 4, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ count * RT2661_TX_DESC_SIZE, 1, count * RT2661_TX_DESC_SIZE,
+ 0, NULL, NULL, &ring->desc_dmat);
if (error != 0) {
device_printf(sc->sc_dev, "could not create desc DMA tag\n");
goto fail;
@@ -476,9 +477,9 @@
goto fail;
}
- error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, RT2661_MAX_SCATTER,
- MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
+ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES,
+ RT2661_MAX_SCATTER, MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
if (error != 0) {
device_printf(sc->sc_dev, "could not create data DMA tag\n");
goto fail;
@@ -585,9 +586,10 @@
ring->count = count;
ring->cur = ring->next = 0;
- error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, count * RT2661_RX_DESC_SIZE, 1,
- count * RT2661_RX_DESC_SIZE, 0, NULL, NULL, &ring->desc_dmat);
+ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 4, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL,
+ count * RT2661_RX_DESC_SIZE, 1, count * RT2661_RX_DESC_SIZE,
+ 0, NULL, NULL, &ring->desc_dmat);
if (error != 0) {
device_printf(sc->sc_dev, "could not create desc DMA tag\n");
goto fail;
@@ -619,9 +621,9 @@
/*
* Pre-allocate Rx buffers and populate Rx ring.
*/
- error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT,
- BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, 1, MCLBYTES, 0, NULL,
- NULL, &ring->data_dmat);
+ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), 1, 0,
+ BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES,
+ 1, MCLBYTES, 0, NULL, NULL, &ring->data_dmat);
if (error != 0) {
device_printf(sc->sc_dev, "could not create data DMA tag\n");
goto fail;
==== //depot/projects/soc2007/rpaulo-macbook/dev/re/if_re.c#4 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.91 2007/07/06 00:05:11 yongari Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/re/if_re.c,v 1.92 2007/07/24 01:24:02 yongari Exp $");
/*
* RealTek 8139C+/8169/8169S/8110S/8168/8111/8101E PCI NIC driver
@@ -160,6 +160,10 @@
#include <pci/if_rlreg.h>
+/* Tunables. */
+static int msi_disable = 0;
+TUNABLE_INT("hw.re.msi_disable", &msi_disable);
+
#define RE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP)
/*
@@ -1159,6 +1163,7 @@
int hwrev;
u_int16_t re_did = 0;
int error = 0, rid, i;
+ int msic, reg;
sc = device_get_softc(dev);
sc->rl_dev = dev;
@@ -1185,15 +1190,45 @@
sc->rl_btag = rman_get_bustag(sc->rl_res);
sc->rl_bhandle = rman_get_bushandle(sc->rl_res);
+ msic = 0;
+ if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
+ msic = pci_msi_count(dev);
+ if (bootverbose)
+ device_printf(dev, "MSI count : %d\n", msic);
+ }
+ if (msic == RL_MSI_MESSAGES && msi_disable == 0) {
+ if (pci_alloc_msi(dev, &msic) == 0) {
+ if (msic == RL_MSI_MESSAGES) {
+ device_printf(dev, "Using %d MSI messages\n",
+ msic);
+ sc->rl_msi = 1;
+ } else
+ pci_release_msi(dev);
+ }
+ }
+
/* Allocate interrupt */
- rid = 0;
- sc->rl_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
- RF_SHAREABLE | RF_ACTIVE);
-
- if (sc->rl_irq == NULL) {
- device_printf(dev, "couldn't map interrupt\n");
- error = ENXIO;
- goto fail;
+ if (sc->rl_msi == 0) {
+ rid = 0;
+ sc->rl_irq[0] = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid,
+ RF_SHAREABLE | RF_ACTIVE);
+ if (sc->rl_irq[0] == NULL) {
+ device_printf(dev, "couldn't allocate IRQ resources\n");
+ error = ENXIO;
+ goto fail;
+ }
+ } else {
+ for (i = 0, rid = 1; i < RL_MSI_MESSAGES; i++, rid++) {
+ sc->rl_irq[i] = bus_alloc_resource_any(dev,
+ SYS_RES_IRQ, &rid, RF_ACTIVE);
+ if (sc->rl_irq[i] == NULL) {
+ device_printf(dev,
+ "couldn't llocate IRQ resources for "
+ "message %d\n", rid);
+ error = ENXIO;
+ goto fail;
+ }
+ }
}
/* Reset the adapter. */
@@ -1320,8 +1355,19 @@
#endif
/* Hook interrupt last to avoid having to lock softc */
- error = bus_setup_intr(dev, sc->rl_irq, INTR_TYPE_NET | INTR_MPSAFE,
- re_intr, NULL, sc, &sc->rl_intrhand);
+ if (sc->rl_msi == 0)
+ error = bus_setup_intr(dev, sc->rl_irq[0],
+ INTR_TYPE_NET | INTR_MPSAFE, re_intr, NULL, sc,
+ &sc->rl_intrhand[0]);
+ else {
+ for (i = 0; i < RL_MSI_MESSAGES; i++) {
+ error = bus_setup_intr(dev, sc->rl_irq[i],
+ INTR_TYPE_NET | INTR_MPSAFE, re_intr, NULL, sc,
+ &sc->rl_intrhand[i]);
+ if (error != 0)
+ break;
+ }
+ }
if (error) {
device_printf(dev, "couldn't set up irq\n");
ether_ifdetach(ifp);
@@ -1348,7 +1394,7 @@
{
struct rl_softc *sc;
struct ifnet *ifp;
- int i;
+ int i, rid;
sc = device_get_softc(dev);
ifp = sc->rl_ifp;
@@ -1393,12 +1439,31 @@
* stopped here.
*/
- if (sc->rl_intrhand)
- bus_teardown_intr(dev, sc->rl_irq, sc->rl_intrhand);
+ for (i = 0; i < RL_MSI_MESSAGES; i++) {
+ if (sc->rl_intrhand[i] != NULL) {
+ bus_teardown_intr(dev, sc->rl_irq[i],
+ sc->rl_intrhand[i]);
+ sc->rl_intrhand[i] = NULL;
+ }
+ }
if (ifp != NULL)
if_free(ifp);
- if (sc->rl_irq)
- bus_release_resource(dev, SYS_RES_IRQ, 0, sc->rl_irq);
+ if (sc->rl_msi == 0) {
+ if (sc->rl_irq[0] != NULL) {
+ bus_release_resource(dev, SYS_RES_IRQ, 0,
+ sc->rl_irq[0]);
+ sc->rl_irq[0] = NULL;
+ }
+ } else {
+ for (i = 0, rid = 1; i < RL_MSI_MESSAGES; i++, rid++) {
+ if (sc->rl_irq[i] != NULL) {
+ bus_release_resource(dev, SYS_RES_IRQ, rid,
+ sc->rl_irq[i]);
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list