Date: 16 Dec 1999 01:37:11 -0000 From: john@nlc.net.au To: FreeBSD-gnats-submit@freebsd.org Subject: kern/15512: ATA driver bug for CD drives that don't report speed Message-ID: <19991216013711.1270.qmail@pacer.nlc.net.au>
index | next in thread | raw e-mail
>Number: 15512
>Category: kern
>Synopsis: ATA driver bug for CD drives that don't report speed
>Confidential: no
>Severity: non-critical
>Priority: high
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Dec 15 17:40:03 PST 1999
>Closed-Date:
>Last-Modified:
>Originator: John Saunders
>Release: FreeBSD 4.0-CURRENT i386
>Organization:
NORTHLINK COMMUNICATIONS
>Environment:
ATA driver, which is now the default, and a CD or DVD drive that
returns 0 for it's speed.
>Description:
The ATA driver doesn't correctly print the device name in the
boot messages. It prints a line starting with a comma followed
by some other information. The standard boot messages all print
the device name first on each line so that it is clear to which
device the message belongs.
>How-To-Repeat:
Boot -CURRENT with a CD-ROM device that doesn't report its speed.
>Fix:
Apply the following patch...
--- atapi-cd.c.orig Tue Dec 14 21:25:26 1999
+++ atapi-cd.c Thu Dec 16 11:27:23 1999
@@ -260,9 +260,10 @@
cdp->atp->controller->lun,
(cdp->atp->unit == ATA_MASTER) ? "master" : "slave ");
+ printf("acd%d:", cdp->lun);
+ comma = 0;
if (cdp->cap.cur_read_speed) {
- printf("acd%d: ", cdp->lun);
- printf("read %dKB/s", cdp->cap.cur_read_speed * 1000 / 1024);
+ printf(" read %dKB/s", cdp->cap.cur_read_speed * 1000 / 1024);
if (cdp->cap.max_read_speed)
printf(" (%dKB/s)", cdp->cap.max_read_speed * 1000 / 1024);
if ((cdp->cap.cur_write_speed) &&
@@ -272,11 +273,13 @@
if (cdp->cap.max_write_speed)
printf(" (%dKB/s)", cdp->cap.max_write_speed * 1000 / 1024);
}
+ comma = 1;
}
- if (cdp->cap.buf_size)
- printf(", %dKB buffer", cdp->cap.buf_size);
- printf(", %s\n", ata_mode2str(cdp->atp->controller->mode[
- (cdp->atp->unit == ATA_MASTER) ? 0 : 1]));
+ if (cdp->cap.buf_size) {
+ printf("%s %dKB buffer", comma ? "," : "", cdp->cap.buf_size); comma = 1;
+ }
+ printf("%s %s\n", comma ? "," : "", ata_mode2str(cdp->atp->controller->mode[
+ (cdp->atp->unit == ATA_MASTER) ? 0 : 1])); comma = 1;
printf("acd%d: supported read types:", cdp->lun);
comma = 0;
>Release-Note:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991216013711.1270.qmail>
