aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/scsi/scsi_da.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2019-06-25 04:50:09 +0000
committerWarner Losh <imp@FreeBSD.org>2019-06-25 04:50:09 +0000
commitf5a95d9a07941650493461c255408f5727d0638b (patch)
treeec681c8739341d8c1e8ff3b891e07a31c0fb3ace /sys/cam/scsi/scsi_da.c
parente861dab451869582008237a8c11e97348d2440ce (diff)
downloadsrc-f5a95d9a0794.tar.gz
src-f5a95d9a0794.zip
Remove NAND and NANDFS support
NANDFS has been broken for years. Remove it. The NAND drivers that remain are for ancient parts that are no longer relevant. They are polled, have terrible performance and just for ancient arm hardware. NAND parts have evolved significantly from this early work and little to none of it would be relevant should someone need to update to support raw nand. This code has been off by default for years and has violated the vnode protocol leading to panics since it was committed. Numerous posts to arch@ and other locations have found no actual users for this software. Relnotes: Yes No Objection From: arch@ Differential Revision: https://reviews.freebsd.org/D20745
Notes
Notes: svn path=/head/; revision=349352
Diffstat (limited to 'sys/cam/scsi/scsi_da.c')
-rw-r--r--sys/cam/scsi/scsi_da.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index f2f60d35b2e2..a89c40e19a7b 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -64,9 +64,6 @@ __FBSDID("$FreeBSD$");
#include <cam/cam_ccb.h>
#include <cam/cam_periph.h>
#include <cam/cam_xpt_periph.h>
-#ifdef _KERNEL
-#include <cam/cam_xpt_internal.h>
-#endif /* _KERNEL */
#include <cam/cam_sim.h>
#include <cam/cam_iosched.h>
@@ -3616,7 +3613,15 @@ out:
break;
}
- ata_params = &periph->path->device->ident_data;
+ ata_params = (struct ata_params*)
+ malloc(sizeof(*ata_params), M_SCSIDA,M_NOWAIT|M_ZERO);
+
+ if (ata_params == NULL) {
+ xpt_print(periph->path, "Couldn't malloc ata_params "
+ "data\n");
+ /* da_free_periph??? */
+ break;
+ }
scsi_ata_identify(&start_ccb->csio,
/*retries*/da_retry_count,
@@ -5187,7 +5192,7 @@ dadone_probeata(struct cam_periph *periph, union ccb *done_ccb)
struct da_softc *softc;
u_int32_t priority;
int continue_probe;
- int error;
+ int error, i;
int16_t *ptr;
CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dadone_probeata\n"));
@@ -5205,7 +5210,8 @@ dadone_probeata(struct cam_periph *periph, union ccb *done_ccb)
if ((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) {
uint16_t old_rate;
- ata_param_fixup(ata_params);
+ for (i = 0; i < sizeof(*ata_params) / 2; i++)
+ ptr[i] = le16toh(ptr[i]);
if (ata_params->support_dsm & ATA_SUPPORT_DSM_TRIM &&
(softc->quirks & DA_Q_NO_UNMAP) == 0) {
dadeleteflag(softc, DA_DELETE_ATA_TRIM, 1);
@@ -5289,6 +5295,7 @@ dadone_probeata(struct cam_periph *periph, union ccb *done_ccb)
}
}
+ free(ata_params, M_SCSIDA);
if ((softc->zone_mode == DA_ZONE_HOST_AWARE)
|| (softc->zone_mode == DA_ZONE_HOST_MANAGED)) {
/*