From owner-svn-src-user@FreeBSD.ORG Tue Apr 27 19:45:16 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC961065673; Tue, 27 Apr 2010 19:45:16 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55A198FC1F; Tue, 27 Apr 2010 19:45:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3RJjG6s004377; Tue, 27 Apr 2010 19:45:16 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3RJjGof004375; Tue, 27 Apr 2010 19:45:16 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201004271945.o3RJjGof004375@svn.freebsd.org> From: Juli Mallett Date: Tue, 27 Apr 2010 19:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207289 - user/jmallett/octeon/sys/mips/cavium X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Apr 2010 19:45:16 -0000 Author: jmallett Date: Tue Apr 27 19:45:16 2010 New Revision: 207289 URL: http://svn.freebsd.org/changeset/base/207289 Log: Instead of using a local clone of the Linux ATA parameter structure, use the one in . Deleted: user/jmallett/octeon/sys/mips/cavium/driveid.h Modified: user/jmallett/octeon/sys/mips/cavium/octeon_ebt3000_cf.c Modified: user/jmallett/octeon/sys/mips/cavium/octeon_ebt3000_cf.c ============================================================================== --- user/jmallett/octeon/sys/mips/cavium/octeon_ebt3000_cf.c Tue Apr 27 19:44:06 2010 (r207288) +++ user/jmallett/octeon/sys/mips/cavium/octeon_ebt3000_cf.c Tue Apr 27 19:45:16 2010 (r207289) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -66,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include "octeon_ebt3000_cf.h" -#include "driveid.h" #include /* ATA Commands */ @@ -97,8 +97,6 @@ __FBSDID("$FreeBSD$"); #define WAIT_DELAY 1000 #define NR_TRIES 1000 #define SWAP_SHORT(x) ((x << 8) | (x >> 8)) -#define SWAP_LONG(x) (((x << 24) & 0xFF000000) | ((x << 8) & 0x00FF0000) | \ - ((x >> 8) & 0x0000FF00) | ((x << 24) & 0x000000FF) ) #define MODEL_STR_SIZE 40 @@ -122,7 +120,7 @@ struct cf_priv { struct drive_param{ union { char buf[SECTOR_SIZE]; - struct hd_driveid driveid; + struct ata_params driveid; } u; char model[MODEL_STR_SIZE]; @@ -415,10 +413,11 @@ static int cf_cmd_identify (void) cf_swap_ascii(drive_param.u.driveid.model, drive_param.model); drive_param.sector_size = 512; //= SWAP_SHORT (drive_param.u.driveid.sector_bytes); - drive_param.heads = SWAP_SHORT (drive_param.u.driveid.cur_heads); - drive_param.tracks = SWAP_SHORT (drive_param.u.driveid.cur_cyls); - drive_param.sec_track = SWAP_SHORT (drive_param.u.driveid.cur_sectors); - drive_param.nr_sectors = SWAP_LONG (drive_param.u.driveid.lba_capacity); + drive_param.heads = SWAP_SHORT (drive_param.u.driveid.current_heads); + drive_param.tracks = SWAP_SHORT (drive_param.u.driveid.current_cylinders); + drive_param.sec_track = SWAP_SHORT (drive_param.u.driveid.current_sectors); + drive_param.nr_sectors = (uint32_t)SWAP_SHORT (drive_param.u.driveid.lba_size_1) | + ((uint32_t)SWAP_SHORT (drive_param.u.driveid.lba_size_2)); return (0); }