MFhead @ r289148
This commit is contained in:
parent
0671442cbc
commit
b60afb3d49
6
UPDATING
6
UPDATING
@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
|
||||
disable the most expensive debugging functionality run
|
||||
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
|
||||
|
||||
20151011:
|
||||
Compatibility shims for legacy ATA device names have been removed.
|
||||
It includes ATA_STATIC_ID kernel option, kern.cam.ada.legacy_aliases
|
||||
and kern.geom.raid.legacy_aliases loader tunables, kern.devalias.*
|
||||
environment variables, /dev/ad* and /dev/ar* symbolic links.
|
||||
|
||||
20151006:
|
||||
Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.7.0.
|
||||
Please see the 20141231 entry below for information about prerequisites
|
||||
|
@ -121,7 +121,7 @@ parse_authfile(const char *path)
|
||||
|
||||
au = calloc(1, sizeof(*au));
|
||||
if (au == NULL)
|
||||
errlog(EX_OSERR, NULL);
|
||||
errlog(EX_OSERR, "calloc()");
|
||||
|
||||
data = strdup(line);
|
||||
au->login = strsep(&data, "|");
|
||||
|
@ -596,7 +596,7 @@ main(int argc, char **argv)
|
||||
errlog(EX_SOFTWARE, "could not parse aliases file `%s'", config.aliases);
|
||||
|
||||
if ((sender = set_from(&queue, sender)) == NULL)
|
||||
errlog(EX_SOFTWARE, NULL);
|
||||
errlog(EX_SOFTWARE, "set_from()");
|
||||
|
||||
if (newspoolf(&queue) != 0)
|
||||
errlog(EX_CANTCREAT, "can not create temp file in `%s'", config.spooldir);
|
||||
|
@ -333,7 +333,7 @@ parse_addrs(struct parse_state *ps, char *s, struct queue *queue)
|
||||
ps->pos = 0;
|
||||
addr = strdup(ps->addr);
|
||||
if (addr == NULL)
|
||||
errlog(EX_SOFTWARE, NULL);
|
||||
errlog(EX_SOFTWARE, "strdup");
|
||||
|
||||
if (add_recp(queue, addr, EXPAND_WILDCARD) != 0)
|
||||
errlogx(EX_DATAERR, "invalid recipient `%s'", addr);
|
||||
|
@ -17,7 +17,7 @@ SRCS= aliases_parse.y \
|
||||
util.c
|
||||
MAN8= dma.8
|
||||
CONFS= dma.conf
|
||||
CONFSDIR= ${CONFIGDIR}/dma
|
||||
CONFSDIR= ${CONFDIR}/dma
|
||||
YFLAGS+= -i
|
||||
CLEANFILES= aliases_parse.i
|
||||
FILES= mailer.conf
|
||||
|
@ -304,9 +304,6 @@ Write errors are always considered as disk failures.
|
||||
Time to wait for missing array components on startup.
|
||||
.It Va kern.geom.raid. Ns Ar X Ns Va .enable : No 1
|
||||
Enable taste for specific metadata or transformation module.
|
||||
.It Va kern.geom.raid.legacy_aliases : No 0
|
||||
Enable geom raid emulation of legacy /dev/ar%d devices.
|
||||
This should aid the upgrade of systems from legacy to modern releases.
|
||||
.El
|
||||
.Sh EXIT STATUS
|
||||
Exit status is 0 on success, and non-zero if the command fails.
|
||||
|
@ -146,16 +146,6 @@ instead of
|
||||
.Pa /etc/sysctl.conf .
|
||||
The global default is currently 1.
|
||||
The per-device default is to leave it as-is (follow global setting).
|
||||
.It Va kern.cam.ada.legacy_aliases
|
||||
.Pp
|
||||
This variable determines whether
|
||||
.Pa /dev/ad Ns Ar Y
|
||||
symbolic links are created,
|
||||
which tries to mimic old
|
||||
.Xr ata 4
|
||||
numbering.
|
||||
Set to 1 to enable legacy aliases symlinks, 0 to disable.
|
||||
The default is currently enabled.
|
||||
.El
|
||||
.Sh FILES
|
||||
.Bl -tag -width ".Pa /dev/ada*" -compact
|
||||
|
@ -25,7 +25,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd October 22, 2014
|
||||
.Dd October 11, 2015
|
||||
.Dt DA 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -133,8 +133,7 @@ variables and
|
||||
.Xr loader 8
|
||||
tunables:
|
||||
.Bl -tag -width 12
|
||||
.It kern.cam.da.retry_count
|
||||
.Pp
|
||||
.It Va kern.cam.da.retry_count
|
||||
This variable determines how many times the
|
||||
.Nm
|
||||
driver will retry a READ or WRITE command.
|
||||
@ -143,8 +142,7 @@ the
|
||||
.Nm
|
||||
driver dump routine.
|
||||
This value currently defaults to 4.
|
||||
.It kern.cam.da.default_timeout
|
||||
.Pp
|
||||
.It Va kern.cam.da.default_timeout
|
||||
This variable determines how long the
|
||||
.Nm
|
||||
driver will wait before timing out an outstanding command.
|
||||
@ -152,20 +150,31 @@ The units for this value are seconds, and the default is currently 60
|
||||
seconds.
|
||||
.It Va kern.cam.sort_io_queue
|
||||
.It Va kern.cam.da. Ns Ar X Ns Va .sort_io_queue
|
||||
.Pp
|
||||
These variables determine whether request queue should be sorted trying
|
||||
to optimize head seeks.
|
||||
Set to 1 to enable sorting, 0 to disable, -1 to leave it as-is.
|
||||
The default is sorting enabled for HDDs and disabled for SSDs.
|
||||
.It kern.cam.da.%d.minimum_cmd_size
|
||||
.Pp
|
||||
.It Va kern.cam.da. Ns Ar X Ns Va .delete_method
|
||||
This variable specifies method to handle BIO_DELETE requests:
|
||||
.Bl -tag
|
||||
.It ATA_TRIM
|
||||
ATA TRIM via ATA COMMAND PASS THROUGH command,
|
||||
.It UNMAP
|
||||
UNMAP command,
|
||||
.It WS16
|
||||
WRITE SAME(16) command with UNMAP flag,
|
||||
.It WS10
|
||||
WRITE SAME(10) command with UNMAP flag,
|
||||
.It ZERO
|
||||
WRITE SAME(10) command without UNMAP flag,
|
||||
.It DISABLE
|
||||
disable BIO_DELETE support.
|
||||
.El
|
||||
.It Va kern.cam.da. Ns Ar X Ns Va .minimum_cmd_size
|
||||
This variable determines what the minimum READ/WRITE CDB size is for a
|
||||
given
|
||||
.Nm
|
||||
unit.
|
||||
(The %d above denotes the unit number of the
|
||||
.Nm
|
||||
driver instance, e.g.\& 1, 2, 4, 8, etc.)
|
||||
Valid minimum command size values are 6, 10, 12 and 16 bytes.
|
||||
The default is 6 bytes.
|
||||
.Pp
|
||||
|
@ -213,7 +213,6 @@ NLSGRP?= ${SHAREGRP}
|
||||
NLSMODE?= ${NOBINMODE}
|
||||
|
||||
INCLUDEDIR?= /usr/include
|
||||
CONFIGDIR?= /etc
|
||||
|
||||
#
|
||||
# install(1) parameters.
|
||||
|
@ -109,7 +109,6 @@ device fdc
|
||||
# ATA controllers
|
||||
device ahci # AHCI-compatible SATA controllers
|
||||
device ata # Legacy ATA/SATA controllers
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
|
||||
device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA
|
||||
|
||||
|
@ -62,7 +62,6 @@ device mmcsd # mmc/sd flash cards
|
||||
# ATA controllers
|
||||
device ahci # AHCI-compatible SATA controllers
|
||||
#device ata # Legacy ATA/SATA controllers
|
||||
#options ATA_STATIC_ID # Static device numbering
|
||||
|
||||
# Console and misc
|
||||
device uart
|
||||
|
@ -48,7 +48,6 @@ device gpio
|
||||
# ATA controllers
|
||||
device ahci # AHCI-compatible SATA controllers
|
||||
device ata # Legacy ATA/SATA controllers
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
|
||||
# ATA/SCSI peripherals
|
||||
device scbus # SCSI bus (required for ATA/SCSI)
|
||||
|
@ -76,7 +76,6 @@ device uart
|
||||
device pci
|
||||
|
||||
device ata
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
|
||||
device scbus # SCSI bus (required for ATA/SCSI)
|
||||
device cd # CD
|
||||
|
@ -59,7 +59,6 @@ device mmcsd # mmc/sd flash cards
|
||||
# ATA controllers
|
||||
device ahci # AHCI-compatible SATA controllers
|
||||
#device ata # Legacy ATA/SATA controllers
|
||||
#options ATA_STATIC_ID # Static device numbering
|
||||
|
||||
# Console and misc
|
||||
device uart
|
||||
|
@ -91,7 +91,6 @@ options ALT_BREAK_TO_DEBUGGER
|
||||
device ata
|
||||
device atapci # Only for helper functions
|
||||
device imxata
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
|
||||
device gpio
|
||||
device gpioled
|
||||
|
@ -76,7 +76,6 @@ device uart
|
||||
device pci
|
||||
|
||||
device ata
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
|
||||
device scbus # SCSI bus (required for ATA/SCSI)
|
||||
device cd # CD
|
||||
|
@ -80,7 +80,6 @@ options ALT_BREAK_TO_DEBUGGER
|
||||
device ata
|
||||
device atapci # Only for helper functions
|
||||
device imxata
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
|
||||
device gpio
|
||||
device gpioled
|
||||
|
@ -75,7 +75,6 @@ device uart
|
||||
device pci
|
||||
|
||||
device ata
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
|
||||
device scbus # SCSI bus (required for ATA/SCSI)
|
||||
device cd # CD
|
||||
|
@ -582,7 +582,6 @@ static void adaresume(void *arg);
|
||||
#define ata_disk_firmware_geom_adjust(disk)
|
||||
#endif
|
||||
|
||||
static int ada_legacy_aliases = ADA_DEFAULT_LEGACY_ALIASES;
|
||||
static int ada_retry_count = ADA_DEFAULT_RETRY;
|
||||
static int ada_default_timeout = ADA_DEFAULT_TIMEOUT;
|
||||
static int ada_send_ordered = ADA_DEFAULT_SEND_ORDERED;
|
||||
@ -593,8 +592,6 @@ static int ada_write_cache = ADA_DEFAULT_WRITE_CACHE;
|
||||
|
||||
static SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0,
|
||||
"CAM Direct Access Disk driver");
|
||||
SYSCTL_INT(_kern_cam_ada, OID_AUTO, legacy_aliases, CTLFLAG_RWTUN,
|
||||
&ada_legacy_aliases, 0, "Create legacy-like device aliases");
|
||||
SYSCTL_INT(_kern_cam_ada, OID_AUTO, retry_count, CTLFLAG_RWTUN,
|
||||
&ada_retry_count, 0, "Normal I/O retry count");
|
||||
SYSCTL_INT(_kern_cam_ada, OID_AUTO, default_timeout, CTLFLAG_RWTUN,
|
||||
@ -1164,11 +1161,11 @@ adaregister(struct cam_periph *periph, void *arg)
|
||||
struct ada_softc *softc;
|
||||
struct ccb_pathinq cpi;
|
||||
struct ccb_getdev *cgd;
|
||||
char announce_buf[80], buf1[32];
|
||||
char announce_buf[80];
|
||||
struct disk_params *dp;
|
||||
caddr_t match;
|
||||
u_int maxio;
|
||||
int legacy_id, quirks;
|
||||
int quirks;
|
||||
|
||||
cgd = (struct ccb_getdev *)arg;
|
||||
if (cgd == NULL) {
|
||||
@ -1331,22 +1328,6 @@ adaregister(struct cam_periph *periph, void *arg)
|
||||
softc->disk->d_fwheads = softc->params.heads;
|
||||
ata_disk_firmware_geom_adjust(softc->disk);
|
||||
|
||||
if (ada_legacy_aliases) {
|
||||
#ifdef ATA_STATIC_ID
|
||||
legacy_id = xpt_path_legacy_ata_id(periph->path);
|
||||
#else
|
||||
legacy_id = softc->disk->d_unit;
|
||||
#endif
|
||||
if (legacy_id >= 0) {
|
||||
snprintf(announce_buf, sizeof(announce_buf),
|
||||
"kern.devalias.%s%d",
|
||||
softc->disk->d_name, softc->disk->d_unit);
|
||||
snprintf(buf1, sizeof(buf1),
|
||||
"ad%d", legacy_id);
|
||||
kern_setenv(announce_buf, buf1);
|
||||
}
|
||||
} else
|
||||
legacy_id = -1;
|
||||
/*
|
||||
* Acquire a reference to the periph before we register with GEOM.
|
||||
* We'll release this reference once GEOM calls us back (via
|
||||
@ -1364,17 +1345,11 @@ adaregister(struct cam_periph *periph, void *arg)
|
||||
|
||||
dp = &softc->params;
|
||||
snprintf(announce_buf, sizeof(announce_buf),
|
||||
"%juMB (%ju %u byte sectors: %dH %dS/T %dC)",
|
||||
(uintmax_t)(((uintmax_t)dp->secsize *
|
||||
dp->sectors) / (1024*1024)),
|
||||
(uintmax_t)dp->sectors,
|
||||
dp->secsize, dp->heads,
|
||||
dp->secs_per_track, dp->cylinders);
|
||||
"%juMB (%ju %u byte sectors)",
|
||||
((uintmax_t)dp->secsize * dp->sectors) / (1024 * 1024),
|
||||
(uintmax_t)dp->sectors, dp->secsize);
|
||||
xpt_announce_periph(periph, announce_buf);
|
||||
xpt_announce_quirks(periph, softc->quirks, ADA_Q_BIT_STRING);
|
||||
if (legacy_id >= 0)
|
||||
printf("%s%d: Previously was known as ad%d\n",
|
||||
periph->periph_name, periph->unit_number, legacy_id);
|
||||
|
||||
/*
|
||||
* Create our sysctl variables, now that we know
|
||||
|
@ -3756,45 +3756,6 @@ xpt_path_periph(struct cam_path *path)
|
||||
return (path->periph);
|
||||
}
|
||||
|
||||
int
|
||||
xpt_path_legacy_ata_id(struct cam_path *path)
|
||||
{
|
||||
struct cam_eb *bus;
|
||||
int bus_id;
|
||||
|
||||
if ((strcmp(path->bus->sim->sim_name, "ata") != 0) &&
|
||||
strcmp(path->bus->sim->sim_name, "ahcich") != 0 &&
|
||||
strcmp(path->bus->sim->sim_name, "mvsch") != 0 &&
|
||||
strcmp(path->bus->sim->sim_name, "siisch") != 0)
|
||||
return (-1);
|
||||
|
||||
if (strcmp(path->bus->sim->sim_name, "ata") == 0 &&
|
||||
path->bus->sim->unit_number < 2) {
|
||||
bus_id = path->bus->sim->unit_number;
|
||||
} else {
|
||||
bus_id = 2;
|
||||
xpt_lock_buses();
|
||||
TAILQ_FOREACH(bus, &xsoftc.xpt_busses, links) {
|
||||
if (bus == path->bus)
|
||||
break;
|
||||
if ((strcmp(bus->sim->sim_name, "ata") == 0 &&
|
||||
bus->sim->unit_number >= 2) ||
|
||||
strcmp(bus->sim->sim_name, "ahcich") == 0 ||
|
||||
strcmp(bus->sim->sim_name, "mvsch") == 0 ||
|
||||
strcmp(bus->sim->sim_name, "siisch") == 0)
|
||||
bus_id++;
|
||||
}
|
||||
xpt_unlock_buses();
|
||||
}
|
||||
if (path->target != NULL) {
|
||||
if (path->target->target_id < 2)
|
||||
return (bus_id * 2 + path->target->target_id);
|
||||
else
|
||||
return (-1);
|
||||
} else
|
||||
return (bus_id * 2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Release a CAM control block for the caller. Remit the cost of the structure
|
||||
* to the device referenced by the path. If the this device had no 'credits'
|
||||
|
@ -101,7 +101,6 @@ int xpt_path_string(struct cam_path *path, char *str,
|
||||
path_id_t xpt_path_path_id(struct cam_path *path);
|
||||
target_id_t xpt_path_target_id(struct cam_path *path);
|
||||
lun_id_t xpt_path_lun_id(struct cam_path *path);
|
||||
int xpt_path_legacy_ata_id(struct cam_path *path);
|
||||
struct cam_sim *xpt_path_sim(struct cam_path *path);
|
||||
struct cam_periph *xpt_path_periph(struct cam_path *path);
|
||||
void xpt_async(u_int32_t async_code, struct cam_path *path,
|
||||
|
@ -1840,21 +1840,6 @@ ctl_be_block_open_file(struct ctl_be_block_lun *be_lun, struct ctl_lun_req *req)
|
||||
return (error);
|
||||
}
|
||||
|
||||
/*
|
||||
* Verify that we have the ability to upgrade to exclusive
|
||||
* access on this file so we can trap errors at open instead
|
||||
* of reporting them during first access.
|
||||
*/
|
||||
if (VOP_ISLOCKED(be_lun->vn) != LK_EXCLUSIVE) {
|
||||
vn_lock(be_lun->vn, LK_UPGRADE | LK_RETRY);
|
||||
if (be_lun->vn->v_iflag & VI_DOOMED) {
|
||||
error = EBADF;
|
||||
snprintf(req->error_str, sizeof(req->error_str),
|
||||
"error locking file %s", be_lun->dev_path);
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
|
||||
file_data->cred = crhold(curthread->td_ucred);
|
||||
if (params->lun_size_bytes != 0)
|
||||
be_lun->size_bytes = params->lun_size_bytes;
|
||||
|
@ -1081,11 +1081,11 @@ cddone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP ||
|
||||
(error = cderror(done_ccb, CAM_RETRY_SELTO,
|
||||
SF_RETRY_UA | SF_NO_PRINT)) == 0) {
|
||||
|
||||
snprintf(announce_buf, sizeof(announce_buf),
|
||||
"cd present [%lu x %lu byte records]",
|
||||
cdp->disksize, (u_long)cdp->blksize);
|
||||
|
||||
"%juMB (%ju %u byte sectors)",
|
||||
((uintmax_t)cdp->disksize * cdp->blksize) /
|
||||
(1024 * 1024),
|
||||
(uintmax_t)cdp->disksize, cdp->blksize);
|
||||
} else {
|
||||
if (error == ERESTART) {
|
||||
/*
|
||||
|
@ -219,6 +219,7 @@ struct da_softc {
|
||||
uint32_t unmap_max_ranges;
|
||||
uint32_t unmap_max_lba; /* Max LBAs in UNMAP req */
|
||||
uint64_t ws_max_blks;
|
||||
da_delete_methods delete_method_pref;
|
||||
da_delete_methods delete_method;
|
||||
da_delete_func_t *delete_func;
|
||||
struct disk_params params;
|
||||
@ -1801,7 +1802,7 @@ dasysctlinit(void *context, int pending)
|
||||
* the fly.
|
||||
*/
|
||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||
OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RW,
|
||||
OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RWTUN,
|
||||
softc, 0, dadeletemethodsysctl, "A",
|
||||
"BIO_DELETE execution method");
|
||||
SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree),
|
||||
@ -1912,7 +1913,6 @@ static void
|
||||
dadeletemethodset(struct da_softc *softc, da_delete_methods delete_method)
|
||||
{
|
||||
|
||||
|
||||
softc->delete_method = delete_method;
|
||||
softc->disk->d_delmaxsize = dadeletemaxsize(softc, delete_method);
|
||||
softc->delete_func = da_delete_functions[delete_method];
|
||||
@ -1965,25 +1965,17 @@ daprobedone(struct cam_periph *periph, union ccb *ccb)
|
||||
|
||||
snprintf(buf, sizeof(buf), "Delete methods: <");
|
||||
sep = 0;
|
||||
for (i = DA_DELETE_MIN; i <= DA_DELETE_MAX; i++) {
|
||||
if (softc->delete_available & (1 << i)) {
|
||||
if (sep) {
|
||||
strlcat(buf, ",", sizeof(buf));
|
||||
} else {
|
||||
sep = 1;
|
||||
}
|
||||
strlcat(buf, da_delete_method_names[i],
|
||||
sizeof(buf));
|
||||
if (i == softc->delete_method) {
|
||||
strlcat(buf, "(*)", sizeof(buf));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sep == 0) {
|
||||
if (softc->delete_method == DA_DELETE_NONE)
|
||||
strlcat(buf, "NONE(*)", sizeof(buf));
|
||||
else
|
||||
strlcat(buf, "DISABLED(*)", sizeof(buf));
|
||||
for (i = 0; i <= DA_DELETE_MAX; i++) {
|
||||
if ((softc->delete_available & (1 << i)) == 0 &&
|
||||
i != softc->delete_method)
|
||||
continue;
|
||||
if (sep)
|
||||
strlcat(buf, ",", sizeof(buf));
|
||||
strlcat(buf, da_delete_method_names[i],
|
||||
sizeof(buf));
|
||||
if (i == softc->delete_method)
|
||||
strlcat(buf, "(*)", sizeof(buf));
|
||||
sep = 1;
|
||||
}
|
||||
strlcat(buf, ">", sizeof(buf));
|
||||
printf("%s%d: %s\n", periph->periph_name,
|
||||
@ -2013,21 +2005,28 @@ daprobedone(struct cam_periph *periph, union ccb *ccb)
|
||||
static void
|
||||
dadeletemethodchoose(struct da_softc *softc, da_delete_methods default_method)
|
||||
{
|
||||
int i, delete_method;
|
||||
int i, methods;
|
||||
|
||||
delete_method = default_method;
|
||||
/* If available, prefer the method requested by user. */
|
||||
i = softc->delete_method_pref;
|
||||
methods = softc->delete_available | (1 << DA_DELETE_DISABLE);
|
||||
if (methods & (1 << i)) {
|
||||
dadeletemethodset(softc, i);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Use the pre-defined order to choose the best
|
||||
* performing delete.
|
||||
*/
|
||||
/* Use the pre-defined order to choose the best performing delete. */
|
||||
for (i = DA_DELETE_MIN; i <= DA_DELETE_MAX; i++) {
|
||||
if (i == DA_DELETE_ZERO)
|
||||
continue;
|
||||
if (softc->delete_available & (1 << i)) {
|
||||
dadeletemethodset(softc, i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
dadeletemethodset(softc, delete_method);
|
||||
|
||||
/* Fallback to default. */
|
||||
dadeletemethodset(softc, default_method);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -2051,13 +2050,14 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS)
|
||||
return (error);
|
||||
methods = softc->delete_available | (1 << DA_DELETE_DISABLE);
|
||||
for (i = 0; i <= DA_DELETE_MAX; i++) {
|
||||
if (!(methods & (1 << i)) ||
|
||||
strcmp(buf, da_delete_method_names[i]) != 0)
|
||||
continue;
|
||||
dadeletemethodset(softc, i);
|
||||
return (0);
|
||||
if (strcmp(buf, da_delete_method_names[i]) == 0)
|
||||
break;
|
||||
}
|
||||
return (EINVAL);
|
||||
if (i > DA_DELETE_MAX)
|
||||
return (EINVAL);
|
||||
softc->delete_method_pref = i;
|
||||
dadeletemethodchoose(softc, DA_DELETE_NONE);
|
||||
return (0);
|
||||
}
|
||||
|
||||
static cam_status
|
||||
@ -3149,13 +3149,10 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
lbp = (lalba & SRC16_LBPME_A);
|
||||
dp = &softc->params;
|
||||
snprintf(announce_buf, sizeof(announce_buf),
|
||||
"%juMB (%ju %u byte sectors: %dH %dS/T "
|
||||
"%dC)", (uintmax_t)
|
||||
(((uintmax_t)dp->secsize *
|
||||
dp->sectors) / (1024*1024)),
|
||||
(uintmax_t)dp->sectors,
|
||||
dp->secsize, dp->heads,
|
||||
dp->secs_per_track, dp->cylinders);
|
||||
"%juMB (%ju %u byte sectors)",
|
||||
((uintmax_t)dp->secsize * dp->sectors) /
|
||||
(1024 * 1024),
|
||||
(uintmax_t)dp->sectors, dp->secsize);
|
||||
}
|
||||
} else {
|
||||
int error;
|
||||
@ -3291,6 +3288,7 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
|
||||
/* Ensure re-probe doesn't see old delete. */
|
||||
softc->delete_available = 0;
|
||||
dadeleteflag(softc, DA_DELETE_ZERO, 1);
|
||||
if (lbp && (softc->quirks & DA_Q_NO_UNMAP) == 0) {
|
||||
/*
|
||||
* Based on older SBC-3 spec revisions
|
||||
@ -3307,7 +3305,6 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
*/
|
||||
dadeleteflag(softc, DA_DELETE_WS16, 1);
|
||||
dadeleteflag(softc, DA_DELETE_WS10, 1);
|
||||
dadeleteflag(softc, DA_DELETE_ZERO, 1);
|
||||
dadeleteflag(softc, DA_DELETE_UNMAP, 1);
|
||||
|
||||
xpt_release_ccb(done_ccb);
|
||||
@ -3336,8 +3333,6 @@ dadone(struct cam_periph *periph, union ccb *done_ccb)
|
||||
(lbp->flags & SVPD_LBP_WS16));
|
||||
dadeleteflag(softc, DA_DELETE_WS10,
|
||||
(lbp->flags & SVPD_LBP_WS10));
|
||||
dadeleteflag(softc, DA_DELETE_ZERO,
|
||||
(lbp->flags & SVPD_LBP_WS10));
|
||||
dadeleteflag(softc, DA_DELETE_UNMAP,
|
||||
(lbp->flags & SVPD_LBP_UNMAP));
|
||||
} else {
|
||||
|
@ -1759,12 +1759,9 @@ hint.ata.1.irq="15"
|
||||
#
|
||||
# The following options are valid on the ATA driver:
|
||||
#
|
||||
# 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
|
||||
|
||||
#
|
||||
|
@ -280,9 +280,9 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
|
||||
struct g_geom *gp;
|
||||
struct g_consumer *cp;
|
||||
struct g_dev_softc *sc;
|
||||
int error, len;
|
||||
struct cdev *dev, *adev;
|
||||
char buf[SPECNAMELEN + 6], *val;
|
||||
int error;
|
||||
struct cdev *dev;
|
||||
char buf[SPECNAMELEN + 6];
|
||||
|
||||
g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name);
|
||||
g_topology_assert();
|
||||
@ -310,33 +310,9 @@ g_dev_taste(struct g_class *mp, struct g_provider *pp, int insist __unused)
|
||||
dev->si_flags |= SI_UNMAPPED;
|
||||
sc->sc_dev = dev;
|
||||
|
||||
/* Search for device alias name and create it if found. */
|
||||
adev = NULL;
|
||||
for (len = MIN(strlen(gp->name), sizeof(buf) - 15); len > 0; len--) {
|
||||
snprintf(buf, sizeof(buf), "kern.devalias.%s", gp->name);
|
||||
buf[14 + len] = 0;
|
||||
val = kern_getenv(buf);
|
||||
if (val != NULL) {
|
||||
snprintf(buf, sizeof(buf), "%s%s",
|
||||
val, gp->name + len);
|
||||
freeenv(val);
|
||||
if ((make_dev_alias_p(MAKEDEV_CHECKNAME|MAKEDEV_WAITOK,
|
||||
&adev, dev, "%s", buf)) != 0)
|
||||
printf("Warning: unable to create device "
|
||||
"alias %s\n", buf);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
dev->si_iosize_max = MAXPHYS;
|
||||
dev->si_drv2 = cp;
|
||||
init_dumpdev(dev);
|
||||
if (adev != NULL) {
|
||||
adev->si_iosize_max = MAXPHYS;
|
||||
adev->si_drv2 = cp;
|
||||
adev->si_flags |= SI_UNMAPPED;
|
||||
init_dumpdev(adev);
|
||||
}
|
||||
|
||||
g_dev_attrchanged(cp, "GEOM::physpath");
|
||||
snprintf(buf, sizeof(buf), "cdev=%s", gp->name);
|
||||
|
@ -82,10 +82,6 @@ static u_int g_raid_idle_threshold = 1000000;
|
||||
SYSCTL_UINT(_kern_geom_raid, OID_AUTO, idle_threshold, CTLFLAG_RWTUN,
|
||||
&g_raid_idle_threshold, 1000000,
|
||||
"Time in microseconds to consider a volume idle.");
|
||||
static u_int ar_legacy_aliases = 1;
|
||||
SYSCTL_INT(_kern_geom_raid, OID_AUTO, legacy_aliases, CTLFLAG_RWTUN,
|
||||
&ar_legacy_aliases, 0, "Create aliases named as the legacy ataraid style.");
|
||||
|
||||
|
||||
#define MSLEEP(rv, ident, mtx, priority, wmesg, timeout) do { \
|
||||
G_RAID_DEBUG(4, "%s: Sleeping %p.", __func__, (ident)); \
|
||||
@ -1628,7 +1624,6 @@ g_raid_launch_provider(struct g_raid_volume *vol)
|
||||
struct g_raid_softc *sc;
|
||||
struct g_provider *pp;
|
||||
char name[G_RAID_MAX_VOLUMENAME];
|
||||
char announce_buf[80], buf1[32];
|
||||
off_t off;
|
||||
int i;
|
||||
|
||||
@ -1644,21 +1639,6 @@ g_raid_launch_provider(struct g_raid_volume *vol)
|
||||
snprintf(name, sizeof(name), "raid/r%d", vol->v_global_id);
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a /dev/ar%d that the old ataraid(4) stack once
|
||||
* created as an alias for /dev/raid/r%d if requested.
|
||||
* This helps going from stable/7 ataraid devices to newer
|
||||
* FreeBSD releases. sbruno 07 MAY 2013
|
||||
*/
|
||||
|
||||
if (ar_legacy_aliases) {
|
||||
snprintf(announce_buf, sizeof(announce_buf),
|
||||
"kern.devalias.%s", name);
|
||||
snprintf(buf1, sizeof(buf1),
|
||||
"ar%d", vol->v_global_id);
|
||||
kern_setenv(announce_buf, buf1);
|
||||
}
|
||||
|
||||
pp = g_new_providerf(sc->sc_geom, "%s", name);
|
||||
pp->flags |= G_PF_DIRECT_RECEIVE;
|
||||
if (vol->v_tr->tro_class->trc_accept_unmapped) {
|
||||
|
@ -109,7 +109,6 @@ device fdc
|
||||
# ATA controllers
|
||||
device ahci # AHCI-compatible SATA controllers
|
||||
device ata # Legacy ATA/SATA controllers
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
|
||||
device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA
|
||||
|
||||
|
@ -51,7 +51,6 @@ device pci
|
||||
|
||||
# ATA and ATAPI devices
|
||||
device ata
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
|
||||
# ATA/SCSI peripherals
|
||||
device scbus # SCSI bus (required for ATA/SCSI)
|
||||
|
@ -108,7 +108,6 @@ device pci
|
||||
# ATA controllers
|
||||
device ahci # AHCI-compatible SATA controllers
|
||||
device ata # Legacy ATA/SATA controllers
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
|
||||
device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA
|
||||
|
||||
|
@ -8,7 +8,7 @@ hint.argemdio.0.at="nexus0"
|
||||
hint.argemdio.0.maddr=0x1a000000
|
||||
hint.argemdio.0.msize=0x1000
|
||||
hint.argemdio.0.order=0
|
||||
|
||||
|
||||
# There's no need to set the ar933x GMAC configuration bits.
|
||||
# This just creates a switch instance and correctly uses it.
|
||||
|
||||
@ -39,7 +39,7 @@ hint.ath.0.eepromsize=16384
|
||||
|
||||
hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00
|
||||
|
||||
# The board 16MiB flash layout in uboot env:
|
||||
# The board 4MiB flash layout in uboot env:
|
||||
#
|
||||
# 256k(u-boot),64k(u-boot-env),2752k(rootfs),896k(uImage),64k(NVRAM),64k(ART)
|
||||
|
||||
@ -58,35 +58,28 @@ hint.map.1.at="flash/spi0"
|
||||
hint.map.1.start=0x00040000
|
||||
hint.map.1.end=0x00050000
|
||||
hint.map.1.name="uboot-env"
|
||||
hint.map.1.readonly=0
|
||||
hint.map.1.readonly=1
|
||||
|
||||
# 2752KB
|
||||
# 3648KB
|
||||
hint.map.2.at="flash/spi0"
|
||||
hint.map.2.start=0x00050000
|
||||
hint.map.2.end="search:0x00100000:0x10000:.!/bin/sh"
|
||||
hint.map.2.end=0x003e0000
|
||||
hint.map.2.name="kernel"
|
||||
hint.map.2.readonly=0
|
||||
|
||||
# 896KB
|
||||
hint.map.3.at="flash/spi0"
|
||||
hint.map.3.start="search:0x00100000:0x10000:.!/bin/sh"
|
||||
hint.map.3.end=0x003e0000
|
||||
hint.map.3.name="rootfs"
|
||||
hint.map.3.readonly=0
|
||||
hint.map.2.readonly=1
|
||||
|
||||
# 64K NVRAM
|
||||
hint.map.4.at="flash/spi0"
|
||||
hint.map.4.start=0x003e0000
|
||||
hint.map.4.end=0x003f0000
|
||||
hint.map.4.name="cfg"
|
||||
hint.map.4.readonly=0
|
||||
hint.map.3.at="flash/spi0"
|
||||
hint.map.3.start=0x003e0000
|
||||
hint.map.3.end=0x003f0000
|
||||
hint.map.3.name="cfg"
|
||||
hint.map.3.readonly=0
|
||||
|
||||
# 64K ART
|
||||
hint.map.5.at="flash/spi0"
|
||||
hint.map.5.start=0x003f0000
|
||||
hint.map.5.end=0x00400000
|
||||
hint.map.5.name="art"
|
||||
hint.map.5.readonly=1
|
||||
hint.map.4.at="flash/spi0"
|
||||
hint.map.4.start=0x003f0000
|
||||
hint.map.4.end=0x00400000
|
||||
hint.map.4.name="art"
|
||||
hint.map.4.readonly=1
|
||||
|
||||
# GPIO specific configuration block
|
||||
|
||||
|
@ -57,4 +57,3 @@ device da
|
||||
device pass
|
||||
|
||||
device ata
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
|
@ -93,7 +93,6 @@ device fdc
|
||||
# ATA controllers
|
||||
device ahci # AHCI-compatible SATA controllers
|
||||
device ata # Legacy ATA/SATA controllers
|
||||
options ATA_STATIC_ID # Static device numbering
|
||||
device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
|
||||
device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA
|
||||
|
||||
|
@ -22,7 +22,7 @@ PPP_NO_RADIUS=
|
||||
PPP_NO_SUID=
|
||||
.endif
|
||||
CONFS= ppp.conf
|
||||
CONFSDIR= ${CONFIGDIR}/ppp
|
||||
CONFSDIR= ${CONFDIR}/ppp
|
||||
CONFSMODE= 600
|
||||
|
||||
.if ${MK_ATM} == "no"
|
||||
|
Loading…
Reference in New Issue
Block a user