Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Mar 2005 18:01:52 -0800
From:      John-Mark Gurney <gurney_j@resnet.uoregon.edu>
To:        freebsd-current@FreeBSD.org
Subject:   ata patch testing...
Message-ID:  <20050314020152.GB89312@funkthat.com>

next in thread | raw e-mail | index | archive | help

--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--



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