aboutsummaryrefslogtreecommitdiff
path: root/sys/cam
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2015-10-11 13:01:51 +0000
committerAlexander Motin <mav@FreeBSD.org>2015-10-11 13:01:51 +0000
commit4a3760bae6710f9ab5a6e2a1118e4e5632be0dcc (patch)
treeae68a3ddda28f0bc480012dc566360581eeafc38 /sys/cam
parent361e885315791413a9448e21de8bb3395dfa6515 (diff)
downloadsrc-4a3760bae6710f9ab5a6e2a1118e4e5632be0dcc.tar.gz
src-4a3760bae6710f9ab5a6e2a1118e4e5632be0dcc.zip
Remove compatibility shims for legacy ATA device names.
We got new ATA stack in FreeBSD 8.x, switched to it at 9.x, completely removed old stack at 10.x, so at 11.x it is time to remove compat shims.
Notes
Notes: svn path=/head/; revision=289137
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/ata/ata_da.c26
-rw-r--r--sys/cam/cam_xpt.c39
-rw-r--r--sys/cam/cam_xpt.h1
3 files changed, 2 insertions, 64 deletions
diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c
index 049a2fdeec14..e9c63f2599c4 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
@@ -1372,9 +1353,6 @@ adaregister(struct cam_periph *periph, void *arg)
dp->secs_per_track, dp->cylinders);
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,