diff --git a/UPDATING b/UPDATING index 5d97659fbbd2..4430d6d78e86 100644 --- a/UPDATING +++ b/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 diff --git a/contrib/dma/conf.c b/contrib/dma/conf.c index 3e3c7d3d8bd2..b8a6a2e2cbd7 100644 --- a/contrib/dma/conf.c +++ b/contrib/dma/conf.c @@ -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, "|"); diff --git a/contrib/dma/dma.c b/contrib/dma/dma.c index 0d1dba2af32d..684ab059111d 100644 --- a/contrib/dma/dma.c +++ b/contrib/dma/dma.c @@ -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); diff --git a/contrib/dma/mail.c b/contrib/dma/mail.c index a6d11fcae685..842072c55242 100644 --- a/contrib/dma/mail.c +++ b/contrib/dma/mail.c @@ -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); diff --git a/libexec/dma/dmagent/Makefile b/libexec/dma/dmagent/Makefile index 6ce13c03c4a0..6f7e8b0648ed 100644 --- a/libexec/dma/dmagent/Makefile +++ b/libexec/dma/dmagent/Makefile @@ -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 diff --git a/sbin/geom/class/raid/graid.8 b/sbin/geom/class/raid/graid.8 index 496e44e4ed48..e11648659495 100644 --- a/sbin/geom/class/raid/graid.8 +++ b/sbin/geom/class/raid/graid.8 @@ -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. diff --git a/share/man/man4/ada.4 b/share/man/man4/ada.4 index 3a186ae602b7..58219e31c0a1 100644 --- a/share/man/man4/ada.4 +++ b/share/man/man4/ada.4 @@ -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 diff --git a/share/man/man4/da.4 b/share/man/man4/da.4 index b5aaa298a767..464994a5c0c3 100644 --- a/share/man/man4/da.4 +++ b/share/man/man4/da.4 @@ -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 diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 53fd073a44ba..2f20da8620be 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -213,7 +213,6 @@ NLSGRP?= ${SHAREGRP} NLSMODE?= ${NOBINMODE} INCLUDEDIR?= /usr/include -CONFIGDIR?= /etc # # install(1) parameters. diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 5c7f7c035f43..ec943f94f17a 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -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 diff --git a/sys/arm/conf/A20 b/sys/arm/conf/A20 index 3bac45518585..21ecd85d3804 100644 --- a/sys/arm/conf/A20 +++ b/sys/arm/conf/A20 @@ -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 diff --git a/sys/arm/conf/ALPINE b/sys/arm/conf/ALPINE index 075cc1ff16a2..bf1c42dde070 100644 --- a/sys/arm/conf/ALPINE +++ b/sys/arm/conf/ALPINE @@ -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) diff --git a/sys/arm/conf/CRB b/sys/arm/conf/CRB index 69b0ebd1696e..af500ca40b30 100644 --- a/sys/arm/conf/CRB +++ b/sys/arm/conf/CRB @@ -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 diff --git a/sys/arm/conf/CUBIEBOARD b/sys/arm/conf/CUBIEBOARD index 2de16f7aeb72..8102306d101c 100644 --- a/sys/arm/conf/CUBIEBOARD +++ b/sys/arm/conf/CUBIEBOARD @@ -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 diff --git a/sys/arm/conf/EFIKA_MX b/sys/arm/conf/EFIKA_MX index 2c4d973598e1..7f978b2b798a 100644 --- a/sys/arm/conf/EFIKA_MX +++ b/sys/arm/conf/EFIKA_MX @@ -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 diff --git a/sys/arm/conf/EP80219 b/sys/arm/conf/EP80219 index 301849c302b8..a744283bfd43 100644 --- a/sys/arm/conf/EP80219 +++ b/sys/arm/conf/EP80219 @@ -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 diff --git a/sys/arm/conf/IMX53 b/sys/arm/conf/IMX53 index d07d6ad0edf4..7fe97a290a02 100644 --- a/sys/arm/conf/IMX53 +++ b/sys/arm/conf/IMX53 @@ -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 diff --git a/sys/arm/conf/IQ31244 b/sys/arm/conf/IQ31244 index ae8eae8bf9e2..0bb224dd50cf 100644 --- a/sys/arm/conf/IQ31244 +++ b/sys/arm/conf/IQ31244 @@ -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 diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 049a2fdeec14..1ecc7fd7b0b8 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -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 diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 4ce48a386fe4..fb5d0414a267 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -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' diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h index 1d983c95b903..d92981ca8ac6 100644 --- a/sys/cam/cam_xpt.h +++ b/sys/cam/cam_xpt.h @@ -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, diff --git a/sys/cam/ctl/ctl_backend_block.c b/sys/cam/ctl/ctl_backend_block.c index 2930fbd66285..254f52bbc3b0 100644 --- a/sys/cam/ctl/ctl_backend_block.c +++ b/sys/cam/ctl/ctl_backend_block.c @@ -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; diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 1dc5f8050841..7490b552263b 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -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) { /* diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 3ebbb713c001..2dc2a474bc75 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -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 { diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 05ffe5560a62..c6478f9bb78a 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -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 # diff --git a/sys/geom/geom_dev.c b/sys/geom/geom_dev.c index 789de4d3c457..6aecd7892fa0 100644 --- a/sys/geom/geom_dev.c +++ b/sys/geom/geom_dev.c @@ -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); diff --git a/sys/geom/raid/g_raid.c b/sys/geom/raid/g_raid.c index 41566746dcfa..839a2d46345c 100644 --- a/sys/geom/raid/g_raid.c +++ b/sys/geom/raid/g_raid.c @@ -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) { diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index dc11f73c4302..ca57521241e2 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -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 diff --git a/sys/i386/conf/XBOX b/sys/i386/conf/XBOX index 5a8ded077045..b3817a83d27d 100644 --- a/sys/i386/conf/XBOX +++ b/sys/i386/conf/XBOX @@ -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) diff --git a/sys/mips/conf/OCTEON1 b/sys/mips/conf/OCTEON1 index d6679fdba50e..7c24f1a02aca 100644 --- a/sys/mips/conf/OCTEON1 +++ b/sys/mips/conf/OCTEON1 @@ -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 diff --git a/sys/mips/conf/TP-MR3020.hints b/sys/mips/conf/TP-MR3020.hints index e346a22ef3e0..9e8946f2a0d7 100644 --- a/sys/mips/conf/TP-MR3020.hints +++ b/sys/mips/conf/TP-MR3020.hints @@ -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 diff --git a/sys/mips/conf/std.SWARM b/sys/mips/conf/std.SWARM index c73790559f83..3e95206765c1 100644 --- a/sys/mips/conf/std.SWARM +++ b/sys/mips/conf/std.SWARM @@ -57,4 +57,3 @@ device da device pass device ata -options ATA_STATIC_ID # Static device numbering diff --git a/sys/pc98/conf/GENERIC b/sys/pc98/conf/GENERIC index e7876ba8cdd8..5adcf3294760 100644 --- a/sys/pc98/conf/GENERIC +++ b/sys/pc98/conf/GENERIC @@ -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 diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile index 8bd11534a3b4..1dcd3b571a05 100644 --- a/usr.sbin/ppp/Makefile +++ b/usr.sbin/ppp/Makefile @@ -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"