summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2015-10-11 13:01:51 +0000
committermav <mav@FreeBSD.org>2015-10-11 13:01:51 +0000
commit64d53c4c7d2401ff7f259304054800f496e26941 (patch)
treeae68a3ddda28f0bc480012dc566360581eeafc38 /sys/cam
parent1fd9c17d055b56ee0020a5f8cd93b732498cf04b (diff)
downloadFreeBSD-src-64d53c4c7d2401ff7f259304054800f496e26941.zip
FreeBSD-src-64d53c4c7d2401ff7f259304054800f496e26941.tar.gz
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.
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 049a2fd..e9c63f2 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 4ce48a3..fb5d041 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 1d983c9..d92981c 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,
OpenPOWER on IntegriCloud