svn commit: r203445 - head/sys/dev/ata

Alexander Motin mav at FreeBSD.org
Wed Feb 3 21:26:54 UTC 2010


Author: mav
Date: Wed Feb  3 21:26:54 2010
New Revision: 203445
URL: http://svn.freebsd.org/changeset/base/203445

Log:
  Report to CAM unit number of underlying ataX bus device, instead of this
  atapicamX. It is more apropriate and useful together with "ata" name.

Modified:
  head/sys/dev/ata/atapi-cam.c

Modified: head/sys/dev/ata/atapi-cam.c
==============================================================================
--- head/sys/dev/ata/atapi-cam.c	Wed Feb  3 21:09:32 2010	(r203444)
+++ head/sys/dev/ata/atapi-cam.c	Wed Feb  3 21:26:54 2010	(r203445)
@@ -201,7 +201,7 @@ atapi_cam_attach(device_t dev)
     scp->parent = device_get_parent(dev);
     scp->ata_ch = device_get_softc(scp->parent);
     TAILQ_INIT(&scp->pending_hcbs);
-    unit = device_get_unit(dev);
+    unit = device_get_unit(device_get_parent(dev));
 
     if ((devq = cam_simq_alloc(16)) == NULL) {
 	error = ENOMEM;


More information about the svn-src-all mailing list