Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2009 17:05:28 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 162656 for review
Message-ID:  <200905241705.n4OH5Sx7076468@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=162656

Change 162656 by mav@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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905241705.n4OH5Sx7076468>