]> xenbits.xensource.com Git - people/julieng/freebsd.git/commitdiff
MFhead @ r289148
authorngie <ngie@FreeBSD.org>
Sun, 11 Oct 2015 19:30:09 +0000 (19:30 +0000)
committerngie <ngie@FreeBSD.org>
Sun, 11 Oct 2015 19:30:09 +0000 (19:30 +0000)
34 files changed:
UPDATING
contrib/dma/conf.c
contrib/dma/dma.c
contrib/dma/mail.c
libexec/dma/dmagent/Makefile
sbin/geom/class/raid/graid.8
share/man/man4/ada.4
share/man/man4/da.4
share/mk/bsd.own.mk
sys/amd64/conf/GENERIC
sys/arm/conf/A20
sys/arm/conf/ALPINE
sys/arm/conf/CRB
sys/arm/conf/CUBIEBOARD
sys/arm/conf/EFIKA_MX
sys/arm/conf/EP80219
sys/arm/conf/IMX53
sys/arm/conf/IQ31244
sys/cam/ata/ata_da.c
sys/cam/cam_xpt.c
sys/cam/cam_xpt.h
sys/cam/ctl/ctl_backend_block.c
sys/cam/scsi/scsi_cd.c
sys/cam/scsi/scsi_da.c
sys/conf/NOTES
sys/geom/geom_dev.c
sys/geom/raid/g_raid.c
sys/i386/conf/GENERIC
sys/i386/conf/XBOX
sys/mips/conf/OCTEON1
sys/mips/conf/TP-MR3020.hints
sys/mips/conf/std.SWARM
sys/pc98/conf/GENERIC
usr.sbin/ppp/Makefile

index 5d97659fbbd22ebe38b227fa1694e1438c3b5c03..4430d6d78e86f9c51a7676ebafbf7b7a460b64da 100644 (file)
--- 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
index 3e3c7d3d8bd2af783d196ee850451bcb2f5f09df..b8a6a2e2cbd75cd1b9f867f580ba7e28a7da510f 100644 (file)
@@ -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, "|");
index 0d1dba2af32de9be8f0be1f1ea953b595b38e109..684ab059111d21ac24ee8092989f7605f9b5ffc7 100644 (file)
@@ -596,7 +596,7 @@ skipopts:
                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);
index a6d11fcae685a9dd1440fd4782de4a5628826cee..842072c55242938bfc6171757141c7ff027df126 100644 (file)
@@ -333,7 +333,7 @@ newaddr:
        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);
index 6ce13c03c4a063faa5f10987e2a67017760bb347..6f7e8b0648edc8569375be08aad114213576aeb5 100644 (file)
@@ -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
index 496e44e4ed484ceba225b62d96f187533cac6a7d..e11648659495331828f65943afe14c0e25339f4b 100644 (file)
@@ -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.
index 3a186ae602b7c9702b9a978e975efb6270a4cd4c..58219e31c0a1e4681696850d1ab8cb65bc8468a6 100644 (file)
@@ -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
index b5aaa298a767b2d13e2dae853db2a189fc863a66..464994a5c0c36cb43d647865566535645a5c9354 100644 (file)
@@ -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
index 53fd073a44ba86ab5cf81c2635b7c5c6c9003338..2f20da8620bee80d48039b99490f11186b2e9526 100644 (file)
@@ -213,7 +213,6 @@ NLSGRP?=    ${SHAREGRP}
 NLSMODE?=      ${NOBINMODE}
 
 INCLUDEDIR?=   /usr/include
-CONFIGDIR?=    /etc
 
 #
 # install(1) parameters.
index 5c7f7c035f4353a3fc1d70d0468b402d1dc6a3a0..ec943f94f17a95c48abc6471e8ef7681ab849ed8 100644 (file)
@@ -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
 
index 3bac4551858501f14f85ed7accab557d54c0c4b7..21ecd85d380497bf8dfdeeaaa49202a92bb5a844 100644 (file)
@@ -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
index 075cc1ff16a2ad053b6ae204b16108e8133447a6..bf1c42dde07037282f0d1781531c9fe939a37383 100644 (file)
@@ -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)
index 69b0ebd1696e618b63c2ec346270b614a65a2fbf..af500ca40b30e9358c96feab8d8c0de0b2ad33c9 100644 (file)
@@ -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
index 2de16f7aeb7244d512805b4ecf3dd4278042c552..8102306d101ceb88fd1c19343ae24109072a88b8 100644 (file)
@@ -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
index 2c4d973598e13260a613d0cf54378e0e266723ce..7f978b2b798aa06ead189f5a1430263efaccca84 100644 (file)
@@ -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
index 301849c302b8d45b81b10eb724135855d96b9548..a744283bfd439ad8d822310ee7b658691103a1fe 100644 (file)
@@ -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
index d07d6ad0edf4deef8ea84648240495ab4c69e231..7fe97a290a02e2b0bf731b17d9f0d6edf328df5e 100644 (file)
@@ -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
index ae8eae8bf9e22bc49602c4c5c13669304de36040..0bb224dd50cf3822fd97fc1b61c7b123bb4214ef 100644 (file)
@@ -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
index 049a2fdeec145e31db5f0ca038029d958d0f1902..1ecc7fd7b0b80634605a9ba2561159d30772a0ea 100644 (file)
@@ -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
index 4ce48a386fe466713b589a2a0a997b3f112c23da..fb5d0414a26729bc1dc9feda9728752eb1506cda 100644 (file)
@@ -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'
index 1d983c95b903d130cebd2db11677e3ba38a5bc7c..d92981ca8ac6d95f161934ebd10617f5f07efd0f 100644 (file)
@@ -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,
index 2930fbd662851de83c0eaf8f108de43497f55383..254f52bbc3b080da6f86cdd0b19faf4a42ab2afa 100644 (file)
@@ -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;
index 1dc5f8050841acecd25785741d09d24abb60450e..7490b552263b3935a988922c0016d5c0a6ffc400 100644 (file)
@@ -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) {
                                /*
index 3ebbb713c00167eda6aed45ac2261cadc82e1127..2dc2a474bc756368500d6807e924c11f0b6b46ae 100644 (file)
@@ -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 {
index 05ffe5560a6209a106459fa4cecf6a33c49b71bf..c6478f9bb78a89d7c4d16722e44da449378777ee 100644 (file)
@@ -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
 
 #
index 789de4d3c457660257ccc377e67af5bad9c79e3b..6aecd7892fa00e526c5ae73a56b73821d6223b74 100644 (file)
@@ -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);
index 41566746dcfac5b2c968da7de710fd7ae9a345e7..839a2d46345cd6125e49b3a993f1e3a07706b476 100644 (file)
@@ -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) {
index dc11f73c4302988074ecf0ebc2005c64fac62e55..ca57521241e2cd5bfa465c5846a6fd941e396dbf 100644 (file)
@@ -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
 
index 5a8ded0770457a42cb29016ee33f8dad224a8fb9..b3817a83d27d219f6207ad7bba27efdd7ae89d3c 100644 (file)
@@ -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)
index d6679fdba50ee1a43973fcd90c8a2b056a6ec3d6..7c24f1a02aca7f85ab645f0701e6b98358b38af8 100644 (file)
@@ -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
 
index e346a22ef3e05e1a24cf4be94393e73f03f925eb..9e8946f2a0d7357b3d7ef2a95526531b6ee8f25d 100644 (file)
@@ -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
+hint.map.2.readonly=1
 
-# 896KB
+# 64K NVRAM
 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.start=0x003e0000
+hint.map.3.end=0x003f0000
+hint.map.3.name="cfg"
 hint.map.3.readonly=0
 
-# 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
-
 # 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
 
index c73790559f83d7c7f4f7b5cf378642c335c8364c..3e95206765c1cf4770cde236ff0c7d77a1b54fce 100644 (file)
@@ -57,4 +57,3 @@ device da
 device pass
 
 device         ata
-options        ATA_STATIC_ID   # Static device numbering
index e7876ba8cdd8f7ba2510156f8a7409aaefb4e17f..5adcf3294760975eb506f1886b825425a7bd302a 100644 (file)
@@ -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
 
index 8bd11534a3b4c3dfa191bc93e48242cce37a4973..1dcd3b571a05fd171457bacff4095e35943daa32 100644 (file)
@@ -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"