From owner-p4-projects@FreeBSD.ORG Sun May 24 17:05:28 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A06601065679; Sun, 24 May 2009 17:05:28 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 582E31065674 for ; Sun, 24 May 2009 17:05:28 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2B7E68FC16 for ; Sun, 24 May 2009 17:05:28 +0000 (UTC) (envelope-from mav@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n4OH5SDv076470 for ; Sun, 24 May 2009 17:05:28 GMT (envelope-from mav@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n4OH5Sx7076468 for perforce@freebsd.org; Sun, 24 May 2009 17:05:28 GMT (envelope-from mav@freebsd.org) Date: Sun, 24 May 2009 17:05:28 GMT Message-Id: <200905241705.n4OH5Sx7076468@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mav@freebsd.org using -f From: Alexander Motin To: Perforce Change Reviews Cc: Subject: PERFORCE change 162656 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 May 2009 17:05:29 -0000 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,