PERFORCE change 171495 for review
Alexander Motin
mav at FreeBSD.org
Mon Dec 7 15:34:00 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=171495
Change 171495 by mav at mav_mavtest on 2009/12/07 15:33:52
Clean kernel messages. Mostly PMP.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#23 edit
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#65 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_pmp.c#23 (text+ko) ====
@@ -177,7 +177,6 @@
if (xpt_create_path(&dpath, periph,
xpt_path_path_id(periph->path),
i, 0) == CAM_REQ_CMP) {
-printf("PMP freeze: %d\n", i);
softc->frozen |= (1 << i);
xpt_acquire_device(dpath->device);
cam_freeze_devq(dpath);
@@ -200,7 +199,6 @@
if (xpt_create_path(&dpath, periph,
xpt_path_path_id(periph->path),
i, 0) == CAM_REQ_CMP) {
-printf("PMP release: %d\n", i);
softc->frozen &= ~(1 << i);
cam_release_devq(dpath, 0, 0, 0, FALSE);
xpt_release_device(dpath->device);
@@ -463,8 +461,6 @@
pmp_default_timeout * 1000);
ata_pm_write_cmd(ataio, 2, softc->pm_step,
(softc->found & (1 << softc->pm_step)) ? 0 : 1);
-printf("PM RESET %d%s\n", softc->pm_step,
- (softc->found & (1 << softc->pm_step)) ? " skipping" : "");
break;
case PMP_STATE_CONNECT:
cam_fill_ataio(ataio,
@@ -588,7 +584,9 @@
if (softc->pm_pid == 0x57231095 || softc->pm_pid == 0x57331095 ||
softc->pm_pid == 0x57341095 || softc->pm_pid == 0x57441095)
softc->pm_ports--;
- printf("PM ports: %d\n", softc->pm_ports);
+ printf("%s%d: %d fan-out ports\n",
+ periph->periph_name, periph->unit_number,
+ softc->pm_ports);
softc->state = PMP_STATE_PRECONFIG;
xpt_release_ccb(done_ccb);
xpt_schedule(periph, priority);
@@ -610,7 +608,6 @@
/*reduction*/0,
/*timeout*/5,
/*getcount_only*/0);
- printf("PM reset done\n");
softc->state = PMP_STATE_CONNECT;
}
xpt_release_ccb(done_ccb);
@@ -627,7 +624,6 @@
/*reduction*/0,
/*timeout*/10,
/*getcount_only*/0);
- printf("PM connect done\n");
softc->state = PMP_STATE_CHECK;
}
xpt_release_ccb(done_ccb);
@@ -639,7 +635,11 @@
(done_ccb->ataio.res.lba_low << 8) +
done_ccb->ataio.res.sector_count;
if ((res & 0xf0f) == 0x103 && (res & 0x0f0) != 0) {
- printf("PM status: %d - %08x\n", softc->pm_step, res);
+ if (bootverbose) {
+ printf("%s%d: port %d status: %08x\n",
+ periph->periph_name, periph->unit_number,
+ softc->pm_step, res);
+ }
/* Report device speed. */
if (xpt_create_path(&dpath, periph,
xpt_path_path_id(periph->path),
@@ -665,7 +665,11 @@
/*getcount_only*/0);
softc->pm_try++;
} else {
- printf("PM status: %d - %08x\n", softc->pm_step, res);
+ if (bootverbose) {
+ printf("%s%d: port %d status: %08x\n",
+ periph->periph_name, periph->unit_number,
+ softc->pm_step, res);
+ }
softc->found &= ~(1 << softc->pm_step);
if (xpt_create_path(&dpath, periph,
done_ccb->ccb_h.path_id,
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_xpt.c#65 (text+ko) ====
@@ -729,7 +729,8 @@
{
int sign = (done_ccb->ataio.res.lba_high << 8) +
done_ccb->ataio.res.lba_mid;
- xpt_print(path, "SIGNATURE: %04x\n", sign);
+ if (bootverbose)
+ xpt_print(path, "SIGNATURE: %04x\n", sign);
if (sign == 0x0000 &&
done_ccb->ccb_h.target_id != 15) {
path->device->protocol = PROTO_ATA;
@@ -921,7 +922,6 @@
(done_ccb->ataio.res.lba_low << 8) +
done_ccb->ataio.res.sector_count;
((uint32_t *)ident_buf)[0] = softc->pm_pid;
- printf("PM Product ID: %08x\n", softc->pm_pid);
snprintf(ident_buf->model, sizeof(ident_buf->model),
"Port Multiplier %08x", softc->pm_pid);
PROBE_SET_ACTION(softc, PROBE_PM_PRV);
@@ -934,7 +934,6 @@
(done_ccb->ataio.res.lba_low << 8) +
done_ccb->ataio.res.sector_count;
((uint32_t *)ident_buf)[1] = softc->pm_prv;
- printf("PM Revision: %08x\n", softc->pm_prv);
snprintf(ident_buf->revision, sizeof(ident_buf->revision),
"%04x", softc->pm_prv);
path->device->flags |= CAM_DEV_IDENTIFY_DATA_VALID;
More information about the p4-projects
mailing list