Date: Sun, 8 Nov 2009 14:37:22 GMT From: Alexander Motin <mav@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 170361 for review Message-ID: <200911081437.nA8EbMvb004932@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=170361 Change 170361 by mav@mav_mavbook on 2009/11/08 14:36:52 IFC Affected files ... .. //depot/projects/scottl-camlock/src/sys/conf/NOTES#40 integrate .. //depot/projects/scottl-camlock/src/sys/conf/options#35 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.h#23 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-disk.c#19 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#24 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/ata-raid.c#15 integrate .. //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cd.c#17 integrate Differences ... ==== //depot/projects/scottl-camlock/src/sys/conf/NOTES#40 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1560 2009/10/29 09:51:13 ru Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1561 2009/11/08 14:33:19 mav Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -1715,8 +1715,11 @@ # # ATA_STATIC_ID: controller numbering is static ie depends on location # else the device numbers are dynamically allocated. +# ATA_REQUEST_TIMEOUT: the number of seconds to wait for an ATA request +# before timing out. options ATA_STATIC_ID +#options ATA_REQUEST_TIMEOUT=10 # # Standard floppy disk controllers and floppy tapes, supports ==== //depot/projects/scottl-camlock/src/sys/conf/options#35 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/options,v 1.693 2009/10/21 12:47:09 stas Exp $ +# $FreeBSD: src/sys/conf/options,v 1.694 2009/11/08 14:33:19 mav Exp $ # # On the handling of kernel options # @@ -350,6 +350,7 @@ # Options used in the 'ata' ATA/ATAPI driver ATA_STATIC_ID opt_ata.h ATA_NOPCI opt_ata.h +ATA_REQUEST_TIMEOUT opt_ata.h ATA_CAM opt_ata.h # Net stuff. ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-all.h#23 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.148 2009/10/31 13:24:14 mav Exp $ + * $FreeBSD: src/sys/dev/ata/ata-all.h,v 1.149 2009/11/08 14:33:19 mav Exp $ */ #if 0 @@ -345,6 +345,10 @@ #define ATA_OP_FINISHED 1 #define ATA_MAX_28BIT_LBA 268435455UL +#ifndef ATA_REQUEST_TIMEOUT +#define ATA_REQUEST_TIMEOUT 10 +#endif + /* structure used for composite atomic operations */ #define MAX_COMPOSITES 32 /* u_int32_t bits */ struct ata_composite { ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-disk.c#19 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.218 2009/10/26 11:20:14 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.219 2009/11/08 14:33:19 mav Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -230,7 +230,7 @@ } request->dev = dev; request->flags = ATA_R_CONTROL; - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 1; request->callback = ad_power_callback; request->u.ata.command = ATA_STANDBY_IMMEDIATE; @@ -262,10 +262,10 @@ if (atadev->spindown_state) { device_printf(dev, "request while spun down, starting.\n"); atadev->spindown_state = 0; - request->timeout = 31; + request->timeout = MAX(ATA_REQUEST_TIMEOUT, 31); } else { - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; } request->retries = 2; request->data = bp->bio_data; @@ -468,7 +468,7 @@ request->u.ata.count = 0; request->u.ata.feature = 0; request->flags = ATA_R_CONTROL | ATA_R_QUIET; - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 0; ata_queue_request(request); if (request->status & ATA_S_ERROR) @@ -487,7 +487,7 @@ request->u.ata.count = 1; request->u.ata.feature = 0; request->flags = ATA_R_CONTROL; - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 0; ata_queue_request(request); if (request->status & ATA_S_ERROR) ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-queue.c#24 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.88 2009/10/31 13:24:14 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-queue.c,v 1.89 2009/11/08 14:33:19 mav Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -141,9 +141,9 @@ if (atadev->spindown_state) { device_printf(dev, "request while spun down, starting.\n"); atadev->spindown_state = 0; - request->timeout = 31; + request->timeout = MAX(ATA_REQUEST_TIMEOUT, 31); } else { - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; } request->retries = 0; ata_queue_request(request); @@ -397,7 +397,7 @@ request->bytecount = sizeof(struct atapi_sense); request->donecount = 0; request->transfersize = sizeof(struct atapi_sense); - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; request->flags &= (ATA_R_ATAPI | ATA_R_QUIET | ATA_R_DEBUG); request->flags |= (ATA_R_READ | ATA_R_AT_HEAD | ATA_R_REQUEUE); ATA_DEBUG_RQ(request, "autoissue request sense"); ==== //depot/projects/scottl-camlock/src/sys/dev/ata/ata-raid.c#15 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.136 2009/10/26 11:20:14 mav Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.137 2009/11/08 14:33:19 mav Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -273,7 +273,7 @@ request->u.ata.lba = 0; request->u.ata.count = 0; request->u.ata.feature = 0; - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 0; request->flags |= ATA_R_ORDERED | ATA_R_DIRECT; ata_queue_request(request); @@ -4371,7 +4371,7 @@ return NULL; } request->dev = dev; - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 2; request->callback = ata_raid_done; request->driver = rdp; @@ -4445,7 +4445,7 @@ /* setup request */ request->dev = dev; - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; request->retries = 0; request->data = data; request->bytecount = bcount; ==== //depot/projects/scottl-camlock/src/sys/dev/ata/atapi-cd.c#17 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.209 2009/10/27 17:12:59 jh Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.210 2009/11/08 14:33:19 mav Exp $"); #include "opt_ata.h" #include <sys/param.h> @@ -700,7 +700,7 @@ request->dev = dev; bcopy(ccb, request->u.atapi.ccb, 16); request->flags = ATA_R_ATAPI; - request->timeout = 10; + request->timeout = ATA_REQUEST_TIMEOUT; ata_queue_request(request); if (!request->error && (request->u.atapi.sense.key == 2 ||
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911081437.nA8EbMvb004932>