summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1999-09-22 07:15:46 +0000
committersos <sos@FreeBSD.org>1999-09-22 07:15:46 +0000
commit8d29317cfbb94f6e41c4d127338d4e0feceac3c4 (patch)
treed5286e4b5c7c9aa0e236c3fee658bc98f88310d6 /sys
parent2e05680dbff2e5304d36532384c8ecaf4e1cd48c (diff)
downloadFreeBSD-src-8d29317cfbb94f6e41c4d127338d4e0feceac3c4.zip
FreeBSD-src-8d29317cfbb94f6e41c4d127338d4e0feceac3c4.tar.gz
I knew it, I introduced new bugs :)
The lun is not incremented in the ata-disk driver when ATA_STATIC_ID is not defined, thanks to Kenneth Wayne Culver <culverk@wam.umd.edu> for finding that one. PHK pointed at the & problem in atapi-cd in devstat_end_transaction_buf. Too little sleep I guess...
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ata/ata-disk.c11
-rw-r--r--sys/dev/ata/atapi-cd.c2
2 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 466d16c..082f662 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -205,26 +205,26 @@ ad_attach(void *notused)
if (bootverbose)
printf("ad%d: piomode=%d dmamode=%d udmamode=%d\n",
- adnlun, apiomode(adp->ata_parm),
+ adp->lun, apiomode(adp->ata_parm),
wdmamode(adp->ata_parm), udmamode(adp->ata_parm));
printf("ad%d: <%s/%s> ATA-%c disk at ata%d as %s\n",
- adnlun, model_buf, revision_buf,
+ adp->lun, model_buf, revision_buf,
ad_version(adp->ata_parm->versmajor), ctlr,
(adp->unit == ATA_MASTER) ? "master" : "slave ");
printf("ad%d: %luMB (%u sectors), "
"%u cyls, %u heads, %u S/T, %u B/S\n",
- adnlun, adp->total_secs / ((1024L * 1024L) / DEV_BSIZE),
+ adp->lun, adp->total_secs / ((1024L * 1024L)/DEV_BSIZE),
adp->total_secs, adp->cylinders, adp->heads,
adp->sectors, DEV_BSIZE);
printf("ad%d: %d secs/int, %d depth queue, %s\n",
- adnlun, adp->transfersize / DEV_BSIZE, adp->num_tags,
+ adp->lun, adp->transfersize / DEV_BSIZE, adp->num_tags,
ata_mode2str(adp->controller->mode[
(adp->unit == ATA_MASTER) ? 0 : 1]));
- devstat_add_entry(&adp->stats, "ad", adnlun, DEV_BSIZE,
+ devstat_add_entry(&adp->stats, "ad", adp->lun, DEV_BSIZE,
DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_IDE,
0x180);
@@ -237,6 +237,7 @@ ad_attach(void *notused)
dev1->si_drv1 = adp;
bufq_init(&adp->queue);
+ adnlun++;
}
}
}
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 4cf3f20..25e06b5 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -1127,7 +1127,7 @@ acd_done(struct atapi_request *request)
if ((bp->b_flags & B_READ) == B_WRITE)
cdp->flags |= F_WRITTEN;
}
- devstat_end_transaction_buf(&cdp->stats, bp);
+ devstat_end_transaction_buf(cdp->stats, bp);
biodone(bp);
acd_start(cdp);
}
OpenPOWER on IntegriCloud