svn commit: r276012 - head/sys/dev/ahci

Steven Hartland smh at FreeBSD.org
Sun Dec 21 16:07:47 UTC 2014


Author: smh
Date: Sun Dec 21 16:07:46 2014
New Revision: 276012
URL: https://svnweb.freebsd.org/changeset/base/276012

Log:
  Add a constant AHCI_MAX_IRQS removing magic number
  
  Sponsored by:	Multiplay

Modified:
  head/sys/dev/ahci/ahci.h

Modified: head/sys/dev/ahci/ahci.h
==============================================================================
--- head/sys/dev/ahci/ahci.h	Sun Dec 21 15:40:15 2014	(r276011)
+++ head/sys/dev/ahci/ahci.h	Sun Dec 21 16:07:46 2014	(r276012)
@@ -143,6 +143,7 @@
 
 #define AHCI_MAX_PORTS			32
 #define AHCI_MAX_SLOTS			32
+#define AHCI_MAX_IRQS			16
 
 /* SATA AHCI v1.0 register defines */
 #define AHCI_CAP                    0x00
@@ -494,7 +495,7 @@ struct ahci_controller {
 #define	AHCI_IRQ_MODE_ALL	0
 #define	AHCI_IRQ_MODE_AFTER	1
 #define	AHCI_IRQ_MODE_ONE	2
-	} irqs[16];
+	} irqs[AHCI_MAX_IRQS];
 	uint32_t		caps;		/* Controller capabilities */
 	uint32_t		caps2;		/* Controller capabilities */
 	uint32_t		capsem;		/* Controller capabilities */


More information about the svn-src-all mailing list