From fff784a8dadcebddbcf072acf6375a2877ff07b1 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Wed, 3 Feb 2010 21:26:54 +0000 Subject: [PATCH] Report to CAM unit number of underlying ataX bus device, instead of this atapicamX. It is more apropriate and useful together with "ata" name. --- sys/dev/ata/atapi-cam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ata/atapi-cam.c b/sys/dev/ata/atapi-cam.c index 3f8e650708c3..2ed54e71b51c 100644 --- a/sys/dev/ata/atapi-cam.c +++ b/sys/dev/ata/atapi-cam.c @@ -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;