From owner-svn-src-stable-10@FreeBSD.ORG Wed May 7 16:57:34 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A102FCE; Wed, 7 May 2014 16:57:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 568F9EC; Wed, 7 May 2014 16:57:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s47GvYsC074868; Wed, 7 May 2014 16:57:34 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s47GvX7l074863; Wed, 7 May 2014 16:57:33 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201405071657.s47GvX7l074863@svn.freebsd.org> From: Jim Harris Date: Wed, 7 May 2014 16:57:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r265571 - stable/10/sys/dev/isci/scil X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2014 16:57:34 -0000 Author: jimharris Date: Wed May 7 16:57:33 2014 New Revision: 265571 URL: http://svnweb.freebsd.org/changeset/base/265571 Log: MFC r263276: Base the max number of SG elements on MAXPHYS. Modified: stable/10/sys/dev/isci/scil/sati_util.h stable/10/sys/dev/isci/scil/sci_controller_constants.h stable/10/sys/dev/isci/scil/sci_util.h stable/10/sys/dev/isci/scil/scic_sds_request.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isci/scil/sati_util.h ============================================================================== --- stable/10/sys/dev/isci/scil/sati_util.h Wed May 7 16:56:20 2014 (r265570) +++ stable/10/sys/dev/isci/scil/sati_util.h Wed May 7 16:57:33 2014 (r265571) @@ -62,6 +62,8 @@ * structure data, fill in sense data, etc. */ +#include + #include #include @@ -144,15 +146,6 @@ #define ATA_MICROCODE_OFFSET_DOWNLOAD 0x03 #define ATA_MICROCODE_DOWNLOAD_SAVE 0x07 -#ifndef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#endif - -#ifndef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) -#endif - - void sati_ata_non_data_command( void * ata_io, SATI_TRANSLATOR_SEQUENCE_T * sequence Modified: stable/10/sys/dev/isci/scil/sci_controller_constants.h ============================================================================== --- stable/10/sys/dev/isci/scil/sci_controller_constants.h Wed May 7 16:56:20 2014 (r265570) +++ stable/10/sys/dev/isci/scil/sci_controller_constants.h Wed May 7 16:57:33 2014 (r265571) @@ -54,6 +54,8 @@ #ifndef _SCI_CONTROLLER_CONSTANTS_H_ #define _SCI_CONTROLLER_CONSTANTS_H_ +#include + /** * @file * @@ -148,8 +150,13 @@ extern "C" { /** * This constant defines the maximum number of Scatter-Gather Elements * to be used by any SCI component. + * + * Note: number of elements must be an even number, since descriptors + * posted to hardware always contain pairs of elements (with second + * element set to zeroes if not needed). */ -#define SCI_MAX_SCATTER_GATHER_ELEMENTS 130 +#define __MAXPHYS_ELEMENTS ((MAXPHYS / PAGE_SIZE) + 1) +#define SCI_MAX_SCATTER_GATHER_ELEMENTS ((__MAXPHYS_ELEMENTS + 1) & ~0x1) #endif #ifndef SCI_MIN_SCATTER_GATHER_ELEMENTS Modified: stable/10/sys/dev/isci/scil/sci_util.h ============================================================================== --- stable/10/sys/dev/isci/scil/sci_util.h Wed May 7 16:56:20 2014 (r265570) +++ stable/10/sys/dev/isci/scil/sci_util.h Wed May 7 16:57:33 2014 (r265571) @@ -54,20 +54,14 @@ #ifndef _SCI_UTIL_H_ #define _SCI_UTIL_H_ +#include + #include #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif -#ifndef MIN -#define MIN(x,y) ((x) < (y) ? (x) : (y)) -#endif - -#ifndef MAX -#define MAX(x,y) ((x) > (y) ? (x) : (y)) -#endif - /** * Normal byte swap macro */ Modified: stable/10/sys/dev/isci/scil/scic_sds_request.h ============================================================================== --- stable/10/sys/dev/isci/scil/scic_sds_request.h Wed May 7 16:56:20 2014 (r265570) +++ stable/10/sys/dev/isci/scil/scic_sds_request.h Wed May 7 16:57:33 2014 (r265571) @@ -65,6 +65,8 @@ extern "C" { #endif // __cplusplus +#include + #include #include @@ -331,7 +333,6 @@ extern SCIC_SDS_IO_REQUEST_STATE_HANDLER #define scic_sds_request_get_task_context(request) \ ((request)->task_context_buffer) -#define CACHE_LINE_SIZE (64) #define scic_sds_request_align_task_context_buffer(address) \ ((SCU_TASK_CONTEXT_T *)( \ (((POINTER_UINT)(address)) + (CACHE_LINE_SIZE - 1)) \