[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree
zrouter-src-freebsd at zrouter.org
zrouter-src-freebsd at zrouter.org
Fri Mar 2 15:40:10 UTC 2012
details: http://zrouter.org/hg/FreeBSD/head//rev/9afd499ca83f
changeset: 403:9afd499ca83f
user: ray at terran.dlink.ua
date: Fri Mar 02 17:17:51 2012 +0200
description:
Update to FreeBSD-HEAD @232391
diffstat:
head/sys/cam/ata/ata_da.c | 6 +++---
head/sys/cam/ata/ata_xpt.c | 15 ++++++++++++++-
head/sys/cam/ctl/ctl_frontend_cam_sim.c | 6 +++---
head/sys/cam/ctl/ctl_private.h | 4 ++--
head/sys/cam/scsi/scsi_da.c | 8 ++++----
head/sys/cam/scsi/scsi_xpt.c | 10 +++++++++-
6 files changed, 35 insertions(+), 14 deletions(-)
diffs (193 lines):
diff -r 7f327dee520d -r 9afd499ca83f head/sys/cam/ata/ata_da.c
--- a/head/sys/cam/ata/ata_da.c Fri Mar 02 17:17:35 2012 +0200
+++ b/head/sys/cam/ata/ata_da.c Fri Mar 02 17:17:51 2012 +0200
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/ata/ata_da.c 229288 2012-01-02 17:02:45Z mav $");
+__FBSDID("$FreeBSD: head/sys/cam/ata/ata_da.c 230921 2012-02-02 19:02:15Z mav $");
#include "opt_ada.h"
#include "opt_ata.h"
@@ -1098,7 +1098,7 @@
*/
callout_init_mtx(&softc->sendordered_c, periph->sim->mtx, 0);
callout_reset(&softc->sendordered_c,
- (ADA_DEFAULT_TIMEOUT * hz) / ADA_ORDEREDTAG_INTERVAL,
+ (ada_default_timeout * hz) / ADA_ORDEREDTAG_INTERVAL,
adasendorderedtag, softc);
if (ADA_RA >= 0 &&
@@ -1653,7 +1653,7 @@
}
/* Queue us up again */
callout_reset(&softc->sendordered_c,
- (ADA_DEFAULT_TIMEOUT * hz) / ADA_ORDEREDTAG_INTERVAL,
+ (ada_default_timeout * hz) / ADA_ORDEREDTAG_INTERVAL,
adasendorderedtag, softc);
}
diff -r 7f327dee520d -r 9afd499ca83f head/sys/cam/ata/ata_xpt.c
--- a/head/sys/cam/ata/ata_xpt.c Fri Mar 02 17:17:35 2012 +0200
+++ b/head/sys/cam/ata/ata_xpt.c Fri Mar 02 17:17:51 2012 +0200
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/ata/ata_xpt.c 223475 2011-06-23 15:10:44Z mav $");
+__FBSDID("$FreeBSD: head/sys/cam/ata/ata_xpt.c 230912 2012-02-02 14:17:58Z mav $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -186,6 +186,12 @@
static void ata_action(union ccb *start_ccb);
static void ata_announce_periph(struct cam_periph *periph);
+static int ata_dma = 1;
+static int atapi_dma = 1;
+
+TUNABLE_INT("hw.ata.ata_dma", &ata_dma);
+TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma);
+
static struct xpt_xport ata_xport = {
.alloc_device = ata_alloc_device,
.action = ata_action,
@@ -356,6 +362,13 @@
if (cts.xport_specific.sata.valid & CTS_SATA_VALID_MODE)
mode = cts.xport_specific.sata.mode;
}
+ if (periph->path->device->protocol == PROTO_ATA) {
+ if (ata_dma == 0 && (mode == 0 || mode > ATA_PIO_MAX))
+ mode = ATA_PIO_MAX;
+ } else {
+ if (atapi_dma == 0 && (mode == 0 || mode > ATA_PIO_MAX))
+ mode = ATA_PIO_MAX;
+ }
negotiate:
/* Honor device capabilities. */
wantmode = mode = ata_max_mode(ident_buf, mode);
diff -r 7f327dee520d -r 9afd499ca83f head/sys/cam/ctl/ctl_frontend_cam_sim.c
--- a/head/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Mar 02 17:17:35 2012 +0200
+++ b/head/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Mar 02 17:17:51 2012 +0200
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_frontend_cam_sim.c 229997 2012-01-12 00:34:33Z ken $");
+__FBSDID("$FreeBSD: head/sys/cam/ctl/ctl_frontend_cam_sim.c 231092 2012-02-06 18:11:00Z emaste $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -221,6 +221,7 @@
mtx_lock(&softc->lock);
if (xpt_bus_register(softc->sim, NULL, 0) != CAM_SUCCESS) {
+ mtx_unlock(&softc->lock);
printf("%s: error registering SIM\n", __func__);
retval = ENOMEM;
goto bailout;
@@ -230,6 +231,7 @@
cam_sim_path(softc->sim),
CAM_TARGET_WILDCARD,
CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
+ mtx_unlock(&softc->lock);
printf("%s: error creating path\n", __func__);
xpt_bus_deregister(cam_sim_path(softc->sim));
retval = 1;
@@ -253,8 +255,6 @@
else if (softc->devq)
cam_simq_free(softc->devq);
- mtx_unlock(&softc->lock);
-
return (retval);
}
diff -r 7f327dee520d -r 9afd499ca83f head/sys/cam/ctl/ctl_private.h
--- a/head/sys/cam/ctl/ctl_private.h Fri Mar 02 17:17:35 2012 +0200
+++ b/head/sys/cam/ctl/ctl_private.h Fri Mar 02 17:17:51 2012 +0200
@@ -28,7 +28,7 @@
* POSSIBILITY OF SUCH DAMAGES.
*
* $Id: //depot/users/kenm/FreeBSD-test2/sys/cam/ctl/ctl_private.h#7 $
- * $FreeBSD: head/sys/cam/ctl/ctl_private.h 229997 2012-01-12 00:34:33Z ken $
+ * $FreeBSD: head/sys/cam/ctl/ctl_private.h 232074 2012-02-23 21:34:14Z dim $
*/
/*
* CAM Target Layer driver private data structures/definitions.
@@ -297,7 +297,7 @@
#define CTL_PAGE_DEFAULT 0x02
#define CTL_PAGE_SAVED 0x03
-static struct ctl_page_index page_index_template[] = {
+static const struct ctl_page_index page_index_template[] = {
{SMS_FORMAT_DEVICE_PAGE, 0, sizeof(struct scsi_format_page), NULL,
CTL_PAGE_FLAG_DISK_ONLY, NULL, NULL},
{SMS_RIGID_DISK_PAGE, 0, sizeof(struct scsi_rigid_disk_page), NULL,
diff -r 7f327dee520d -r 9afd499ca83f head/sys/cam/scsi/scsi_da.c
--- a/head/sys/cam/scsi/scsi_da.c Fri Mar 02 17:17:35 2012 +0200
+++ b/head/sys/cam/scsi/scsi_da.c Fri Mar 02 17:17:51 2012 +0200
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 230590 2012-01-26 18:09:28Z ken $");
+__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_da.c 230921 2012-02-02 19:02:15Z mav $");
#include <sys/param.h>
@@ -1149,7 +1149,7 @@
/*data_ptr*/(u_int8_t *) virtual,
/*dxfer_len*/length,
/*sense_len*/SSD_FULL_SIZE,
- DA_DEFAULT_TIMEOUT * 1000);
+ da_default_timeout * 1000);
xpt_polled_action((union ccb *)&csio);
cam_periph_unlock(periph);
@@ -1597,7 +1597,7 @@
*/
callout_init_mtx(&softc->sendordered_c, periph->sim->mtx, 0);
callout_reset(&softc->sendordered_c,
- (DA_DEFAULT_TIMEOUT * hz) / DA_ORDEREDTAG_INTERVAL,
+ (da_default_timeout * hz) / DA_ORDEREDTAG_INTERVAL,
dasendorderedtag, softc);
mtx_unlock(periph->sim->mtx);
@@ -2768,7 +2768,7 @@
}
/* Queue us up again */
callout_reset(&softc->sendordered_c,
- (DA_DEFAULT_TIMEOUT * hz) / DA_ORDEREDTAG_INTERVAL,
+ (da_default_timeout * hz) / DA_ORDEREDTAG_INTERVAL,
dasendorderedtag, softc);
}
diff -r 7f327dee520d -r 9afd499ca83f head/sys/cam/scsi/scsi_xpt.c
--- a/head/sys/cam/scsi/scsi_xpt.c Fri Mar 02 17:17:35 2012 +0200
+++ b/head/sys/cam/scsi/scsi_xpt.c Fri Mar 02 17:17:51 2012 +0200
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_xpt.c 230590 2012-01-26 18:09:28Z ken $");
+__FBSDID("$FreeBSD: head/sys/cam/scsi/scsi_xpt.c 231745 2012-02-15 07:30:23Z gibbs $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -295,6 +295,14 @@
},
{
/*
+ * Experiences command timeouts under load with a
+ * tag count higher than 55.
+ */
+ { T_DIRECT, SIP_MEDIA_FIXED, seagate, "ST3146855LW", "*"},
+ /*quirks*/0, /*mintags*/2, /*maxtags*/55
+ },
+ {
+ /*
* Slow when tagged queueing is enabled. Write performance
* steadily drops off with more and more concurrent
* transactions. Best sequential write performance with
More information about the Zrouter-src-freebsd
mailing list