PERFORCE change 162656 for review
Alexander Motin
mav at FreeBSD.org
Sun May 24 17:05:29 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=162656
Change 162656 by mav at mav_mavbook on 2009/05/24 17:05:06
Teach kernel how to report ATA periphs.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#2 edit
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.h#2 edit
.. //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#88 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#2 (text+ko) ====
@@ -65,6 +65,20 @@
}
void
+ata_print_ident(struct ata_params *ident_data)
+{
+ char product[48], revision[16];
+
+ cam_strvis(product, ident_data->model, sizeof(ident_data->model),
+ sizeof(product));
+ cam_strvis(revision, ident_data->revision, sizeof(ident_data->revision),
+ sizeof(revision));
+
+ printf("<%s %s> ATA device\n",
+ product, revision);
+}
+
+void
ata_read_write(struct ccb_ataio *ataio, u_int32_t retries,
void (*cbfcnp)(struct cam_periph *, union ccb *),
u_int8_t tag_action, int readop,
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.h#2 (text+ko) ====
@@ -47,6 +47,9 @@
u_int32_t timeout);
void
+ata_print_ident(struct ata_params *ident_data);
+
+void
ata_read_write(struct ccb_ataio *ataio, u_int32_t retries,
void (*cbfcnp)(struct cam_periph *, union ccb *),
u_int8_t tag_action, int readop,
==== //depot/projects/scottl-camlock/src/sys/cam/cam_xpt.c#88 (text+ko) ====
@@ -1041,7 +1041,12 @@
path->target->target_id,
path->device->lun_id);
printf("%s%d: ", periph->periph_name, periph->unit_number);
- scsi_print_inquiry(&path->device->inq_data);
+ if (path->device->protocol == PROTO_SCSI)
+ scsi_print_inquiry(&path->device->inq_data);
+ else if (path->device->protocol == PROTO_ATA)
+ ata_print_ident(&path->device->ident_data);
+ else
+ printf("Unknown protocol device\n");
if (bootverbose && path->device->serial_num_len > 0) {
/* Don't wrap the screen - print only the first 60 chars */
printf("%s%d: Serial Number %.60s\n", periph->periph_name,
More information about the p4-projects
mailing list