From owner-freebsd-hackers Thu Mar 16 21:38:11 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id VAA15416 for hackers-outgoing; Thu, 16 Mar 1995 21:38:11 -0800 Received: from ix4.ix.netcom.com (ix4.ix.netcom.com [199.182.120.7]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id VAA15410 for ; Thu, 16 Mar 1995 21:38:10 -0800 Received: from by ix4.ix.netcom.com (8.6.11/SMI-4.1/Netcom) id VAA16217; Thu, 16 Mar 1995 21:36:19 -0800 Date: Thu, 16 Mar 1995 21:36:19 -0800 Message-Id: <199503170536.VAA16217@ix4.ix.netcom.com> From: PVinci@ix.netcom.com (Paul Vinciguerra) Subject: why does WD.C work?? To: hackers@FreeBSD.org Sender: hackers-owner@FreeBSD.org Precedence: bulk in WD.C, when we READP (read the drive parameters) we bring the parameters into a buffer (tb. I think) then we bcopy it to wd, the wdparam structure. We do something like: bcopy(tb, wd, sizeof(wdparam)); What I see, is that the wdparam structure is wrong according to table 12 of ATA. eg. word 0 General Config. word 1 # logical Cyl. word 2 reserved word 3 # logical heads. but wdparam looks like: struct wdparams { /* drive info */ short wdp_config; /* general configuration */ short wdp_fixedcyl; /* number of non-removable Cylinders */ short wdp_removcyl; /* number of removable cylinders */ short wdp_heads; /* number of heads */ short wdp_unfbytespertrk; /* number of unformatted bytes/track */ Doesn't the bcopy cause a mismapping of the fields by ignoring all the reserved and vendor specific fields, or am I missing something?