From owner-freebsd-current@FreeBSD.ORG Mon Mar 14 02:01:54 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A2A516A4CE for ; Mon, 14 Mar 2005 02:01:54 +0000 (GMT) Received: from mail25.sea5.speakeasy.net (mail25.sea5.speakeasy.net [69.17.117.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC70843D46 for ; Mon, 14 Mar 2005 02:01:53 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 3119 invoked from network); 14 Mar 2005 02:01:53 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail25.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 14 Mar 2005 02:01:53 -0000 Received: from hydrogen.funkthat.com (sxeryj@localhost.funkthat.com [127.0.0.1])j2E21qGH002433 for ; Sun, 13 Mar 2005 18:01:52 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id j2E21qTP002432 for freebsd-current@FreeBSD.org; Sun, 13 Mar 2005 18:01:52 -0800 (PST) Date: Sun, 13 Mar 2005 18:01:52 -0800 From: John-Mark Gurney To: freebsd-current@FreeBSD.org Message-ID: <20050314020152.GB89312@funkthat.com> Mail-Followup-To: freebsd-current@FreeBSD.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="IiVenqGWf+H9Y6IX" Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Subject: ata patch testing... X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2005 02:01:54 -0000 --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline I recently discovered a problem with struct ata_params when I was getting ata running on my arm board. Soren is going to integrate this change into mkIII, but I would like people to test the attached patch on various platforms and ensure that your ata drives are properly probed... send me email with success/failure and the platform you tried it on. This simply marks the various structures as __packed, and fixed the reserved count of one of the fields.. Thanks for your help. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ata.patch" --- //depot/user/jmg/arm/src/sys/sys/ata.h 2005/02/25 18:50:07 +++ //depot/user/jmg/arm/src/sys/sys/ata.h 2005/03/11 18:34:24 @@ -155,7 +155,7 @@ #define ATA_SUPPORT_FLUSHCACHE48 0x2000 /*084/087*/ u_int16_t extension; - } support, enabled; + } __packed support, enabled; /*088*/ u_int16_t udmamodes; /* UltraDMA modes */ /*089*/ u_int16_t erase_time; @@ -182,11 +182,11 @@ /*128*/ u_int16_t security_status; u_int16_t reserved129[31]; /*160*/ u_int16_t cfa_powermode1; - u_int16_t reserved161[14]; + u_int16_t reserved161[15]; /*176*/ u_int16_t media_serial[30]; u_int16_t reserved206[49]; /*255*/ u_int16_t integrity; -}; +} __packed; /* ATA transfer modes */ #define ATA_MODE_MASK 0x0f --- //depot/user/jmg/arm/src/sys/dev/ata/ata-all.c 2005/02/25 18:50:07 +++ //depot/user/jmg/arm/src/sys/dev/ata/ata-all.c 2005/03/11 19:16:57 @@ -642,6 +642,7 @@ return error; } +CTASSERT(sizeof(struct ata_params) == 512); /* * device probe functions */ --IiVenqGWf+H9Y6IX--