summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-fd.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>2000-01-18 21:02:59 +0000
committersos <sos@FreeBSD.org>2000-01-18 21:02:59 +0000
commit841c5b6aa808db8ac648f9af237cc856d50058c6 (patch)
treebbd15141d47f1d11ebb77e77689734b311ee93b4 /sys/dev/ata/atapi-fd.c
parent9fe69108f21206d84ce6ad53222e6403b12bd80b (diff)
downloadFreeBSD-src-841c5b6aa808db8ac648f9af237cc856d50058c6.zip
FreeBSD-src-841c5b6aa808db8ac648f9af237cc856d50058c6.tar.gz
Rearrange the probecode, so that 80pin cables can be identified
correctly on both master and slave. Smash together the ata_params & atapi_params structures as they are more or less equal anyways. Get rid of the last SYSINIT's in here.
Diffstat (limited to 'sys/dev/ata/atapi-fd.c')
-rw-r--r--sys/dev/ata/atapi-fd.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index f8e3291..c2b2d52 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -107,7 +107,8 @@ afdattach(struct atapi_softc *atp)
return -1;
}
- if (!strncmp(atp->atapi_parm->model, "IOMEGA ZIP", 11))
+ if (!strncmp(ATA_PARAM(fdp->atp->controller, fdp->atp->unit)->model,
+ "IOMEGA ZIP", 11))
fdp->transfersize = 64;
afd_describe(fdp);
@@ -155,13 +156,9 @@ afd_sense(struct afd_softc *fdp)
static void
afd_describe(struct afd_softc *fdp)
{
- int8_t model_buf[40+1];
- int8_t revision_buf[8+1];
-
- bpack(fdp->atp->atapi_parm->model, model_buf, sizeof(model_buf));
- bpack(fdp->atp->atapi_parm->revision, revision_buf, sizeof(revision_buf));
- printf("afd%d: <%s/%s> rewriteable drive at ata%d as %s\n",
- fdp->lun, model_buf, revision_buf,
+ printf("afd%d: <%.40s/%.8s> rewriteable drive at ata%d as %s\n",
+ fdp->lun, ATA_PARAM(fdp->atp->controller, fdp->atp->unit)->model,
+ ATA_PARAM(fdp->atp->controller, fdp->atp->unit)->revision,
fdp->atp->controller->lun,
(fdp->atp->unit == ATA_MASTER) ? "master" : "slave ");
printf("afd%d: %luMB (%u sectors), %u cyls, %u heads, %u S/T, %u B/S\n",
@@ -175,7 +172,7 @@ afd_describe(struct afd_softc *fdp)
if (fdp->transfersize)
printf(" transfer limit %d blks,", fdp->transfersize);
printf(" %s\n", ata_mode2str(fdp->atp->controller->mode[
- (fdp->atp->unit == ATA_MASTER) ? 0 : 1]));
+ ATA_DEV(fdp->atp->unit)]));
printf("afd%d: Medium: ", fdp->lun);
switch (fdp->header.medium_type) {
case MFD_2DD:
OpenPOWER on IntegriCloud