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

Justin Hibbits jhibbits at FreeBSD.org
Sun Mar 20 14:21:08 UTC 2016


Author: jhibbits
Date: Sun Mar 20 14:21:07 2016
New Revision: 297065
URL: https://svnweb.freebsd.org/changeset/base/297065

Log:
  Convert a long to rman_res_t, fixing a sign extension bug.
  
  ahci.c had one signed long, which was passed into rman, rather than u_long.
  After the switch of rman_res_t from size u_long to size uintmax_t, the sign
  extension caused ranges to get messed up, and ahcich* to not attach.
  
  There may be more signed longs used in this way, which will be fixed as they're
  reported.
  
  Reported by:	pho

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

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c	Sun Mar 20 14:11:37 2016	(r297064)
+++ head/sys/dev/ahci/ahci.c	Sun Mar 20 14:21:07 2016	(r297065)
@@ -527,7 +527,7 @@ ahci_alloc_resource(device_t dev, device
 {
 	struct ahci_controller *ctlr = device_get_softc(dev);
 	struct resource *res;
-	long st;
+	rman_res_t st;
 	int offset, size, unit;
 
 	unit = (intptr_t)device_get_ivars(child);


More information about the svn-src-head mailing list