MFp4;
- Cleanup kernel messages, mostly PMP. - Took references on devices, while PMP reinitializes them, to not let them go and distort freeze reference counting.
This commit is contained in:
parent
d095fa045c
commit
7bdb664e50
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=200218
@ -256,8 +256,10 @@ ata_print_ident(struct ata_params *ident_data)
|
||||
sizeof(product));
|
||||
cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision),
|
||||
sizeof(revision));
|
||||
printf("<%s %s> ATA/ATAPI-%d",
|
||||
product, revision, ata_version(ident_data->version_major));
|
||||
printf("<%s %s> %s-%d",
|
||||
product, revision,
|
||||
(ident_data->config & ATA_PROTO_ATAPI) ? "ATAPI" : "ATA",
|
||||
ata_version(ident_data->version_major));
|
||||
if (ident_data->satacapabilities && ident_data->satacapabilities != 0xffff) {
|
||||
if (ident_data->satacapabilities & ATA_SATA_GEN3)
|
||||
printf(" SATA 3.x");
|
||||
|
@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <cam/cam_ccb.h>
|
||||
#include <cam/cam_periph.h>
|
||||
#include <cam/cam_xpt_periph.h>
|
||||
#include <cam/cam_xpt_internal.h>
|
||||
#include <cam/cam_sim.h>
|
||||
|
||||
#include <cam/ata/ata_all.h>
|
||||
@ -176,8 +177,8 @@ pmpfreeze(struct cam_periph *periph, int mask)
|
||||
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);
|
||||
xpt_free_path(dpath);
|
||||
}
|
||||
@ -198,9 +199,9 @@ pmprelease(struct cam_periph *periph, int mask)
|
||||
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);
|
||||
xpt_free_path(dpath);
|
||||
}
|
||||
}
|
||||
@ -228,6 +229,7 @@ pmponinvalidate(struct cam_periph *periph)
|
||||
xpt_free_path(dpath);
|
||||
}
|
||||
}
|
||||
pmprelease(periph, -1);
|
||||
xpt_print(periph->path, "lost device\n");
|
||||
}
|
||||
|
||||
@ -459,8 +461,6 @@ pmpstart(struct cam_periph *periph, union ccb *start_ccb)
|
||||
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,
|
||||
@ -584,7 +584,9 @@ pmpdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
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);
|
||||
@ -606,7 +608,6 @@ pmpdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
/*reduction*/0,
|
||||
/*timeout*/5,
|
||||
/*getcount_only*/0);
|
||||
printf("PM reset done\n");
|
||||
softc->state = PMP_STATE_CONNECT;
|
||||
}
|
||||
xpt_release_ccb(done_ccb);
|
||||
@ -623,7 +624,6 @@ pmpdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
/*reduction*/0,
|
||||
/*timeout*/10,
|
||||
/*getcount_only*/0);
|
||||
printf("PM connect done\n");
|
||||
softc->state = PMP_STATE_CHECK;
|
||||
}
|
||||
xpt_release_ccb(done_ccb);
|
||||
@ -635,7 +635,11 @@ pmpdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
(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),
|
||||
@ -661,7 +665,11 @@ pmpdone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
/*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,
|
||||
|
@ -729,7 +729,8 @@ device_fail: if (cam_periph_error(done_ccb, 0, 0,
|
||||
{
|
||||
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 @@ device_fail: if (cam_periph_error(done_ccb, 0, 0,
|
||||
(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 @@ device_fail: if (cam_periph_error(done_ccb, 0, 0,
|
||||
(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;
|
||||
|
Loading…
Reference in New Issue
Block a user