Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb remove obsolete support for ISD-ATA umass(4) ada...
details: https://anonhg.NetBSD.org/src/rev/0985819b0cd7
branches: trunk
changeset: 1009117:0985819b0cd7
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Mon Apr 13 09:26:43 2020 +0000
description:
remove obsolete support for ISD-ATA umass(4) adapters
diffstat:
sys/dev/usb/FILES | 2 -
sys/dev/usb/files.usb | 6 +-
sys/dev/usb/umass.c | 22 +-
sys/dev/usb/umass_isdata.c | 637 ---------------------------------------------
sys/dev/usb/umass_isdata.h | 34 --
sys/dev/usb/umass_quirks.c | 30 +-
6 files changed, 6 insertions(+), 725 deletions(-)
diffs (truncated from 835 to 300 lines):
diff -r 377dc3bb6ec4 -r 0985819b0cd7 sys/dev/usb/FILES
--- a/sys/dev/usb/FILES Mon Apr 13 09:18:10 2020 +0000
+++ b/sys/dev/usb/FILES Mon Apr 13 09:26:43 2020 +0000
@@ -45,8 +45,6 @@
ukbdvar.h API for ukbd.c
ulpt.c USB printer class driver
umass.c USB mass storage wire protocol driver
-umass_isdata.c In-System Design ATA over bulk-only driver
-umass_isdata.h and definitions for it
umass_quirks.c Table of strange umass devices
umass_quirks.h and definitions for it
umass_scsipi.c umass command protocol driver
diff -r 377dc3bb6ec4 -r 0985819b0cd7 sys/dev/usb/files.usb
--- a/sys/dev/usb/files.usb Mon Apr 13 09:18:10 2020 +0000
+++ b/sys/dev/usb/files.usb Mon Apr 13 09:26:43 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.usb,v 1.173 2020/04/12 01:10:54 simonb Exp $
+# $NetBSD: files.usb,v 1.174 2020/04/13 09:26:43 jdolecek Exp $
#
# Config file and device description for machine-independent USB code.
# Included by ports that need it. Ports that use it must provide
@@ -54,7 +54,6 @@
defflag opt_usb.h UIPAD_DEBUG: USB_DEBUG
defflag opt_usb.h UIPAQ_DEBUG: USB_DEBUG
defflag opt_usb.h UIRDA_DEBUG: USB_DEBUG
-defflag opt_usb.h UISDATA_DEBUG: USB_DEBUG
defflag opt_usb.h UKBD_DEBUG: USB_DEBUG
defflag opt_usb.h UKYOPON_DEBUG: USB_DEBUG
defflag opt_usb.h ULPT_DEBUG: USB_DEBUG
@@ -199,10 +198,9 @@
# Mass storage
-device umass: scsi, atapi, ata_hl
+device umass: scsi, atapi
attach umass at usbifif
file dev/usb/umass.c umass
-file dev/usb/umass_isdata.c umass & wd & atabus
file dev/usb/umass_quirks.c umass
file dev/usb/umass_scsipi.c umass & (scsibus | atapibus)
diff -r 377dc3bb6ec4 -r 0985819b0cd7 sys/dev/usb/umass.c
--- a/sys/dev/usb/umass.c Mon Apr 13 09:18:10 2020 +0000
+++ b/sys/dev/usb/umass.c Mon Apr 13 09:26:43 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: umass.c,v 1.183 2020/03/14 03:01:36 christos Exp $ */
+/* $NetBSD: umass.c,v 1.184 2020/04/13 09:26:43 jdolecek Exp $ */
/*
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.183 2020/03/14 03:01:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.184 2020/04/13 09:26:43 jdolecek Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -132,7 +132,6 @@
#include "atapibus.h"
#include "scsibus.h"
-#include "wd.h"
#include <sys/param.h>
#include <sys/buf.h>
@@ -153,7 +152,6 @@
#include <dev/usb/umassvar.h>
#include <dev/usb/umass_quirks.h>
#include <dev/usb/umass_scsipi.h>
-#include <dev/usb/umass_isdata.h>
#include <dev/scsipi/scsipi_all.h>
#include <dev/scsipi/scsipiconf.h>
@@ -814,14 +812,6 @@
#endif
break;
- case UMASS_CPROTO_ISD_ATA:
-#if NWD > 0 && NATABUS > 0
- error = umass_isdata_attach(sc);
-#else
- aprint_error_dev(self, "isdata not configured\n");
-#endif
- break;
-
default:
aprint_error_dev(self, "command protocol=%#x not supported\n",
sc->sc_cmd);
@@ -918,14 +908,6 @@
#endif
break;
- case UMASS_CPROTO_ISD_ATA:
-#if NWD > 0
- umass_isdata_detach(sc);
-#else
- aprint_error_dev(self, "isdata not configured\n");
-#endif
- break;
-
default:
/* nothing to do */
break;
diff -r 377dc3bb6ec4 -r 0985819b0cd7 sys/dev/usb/umass_isdata.c
--- a/sys/dev/usb/umass_isdata.c Mon Apr 13 09:18:10 2020 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,637 +0,0 @@
-/* $NetBSD: umass_isdata.c,v 1.44 2020/03/14 02:35:33 christos Exp $ */
-
-/*
- * TODO:
- * get ATA registers on any kind of error
- * implement more commands (what is needed)
- */
-
-/*
- * Copyright (c) 2001 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Lennart Augustsson (lennart%augustsson.net@localhost) at
- * Carlstedt Research & Technology.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umass_isdata.c,v 1.44 2020/03/14 02:35:33 christos Exp $");
-
-#ifdef _KERNEL_OPT
-#include "opt_usb.h"
-#endif
-
-#include <sys/param.h>
-#include <sys/buf.h>
-#include <sys/conf.h>
-#include <sys/device.h>
-#include <sys/disklabel.h>
-#include <sys/kernel.h>
-#include <sys/kmem.h>
-#include <sys/proc.h>
-#include <sys/systm.h>
-
-#include <dev/usb/usb.h>
-#include <dev/usb/usbdi.h>
-#include <dev/usb/usbdi_util.h>
-
-#include <dev/usb/umassvar.h>
-#include <dev/usb/umass_isdata.h>
-
-int umass_wd_attach(struct umass_softc *);
-
-#include <dev/ata/atareg.h>
-#include <dev/ata/atavar.h>
-
-/*
- * XXX This driver likely doesn't work after ATA NCQ changes.
- * XXX Need to confirm if the ata_channel kludge works
- */
-
-/* XXX move this */
-struct isd200_config {
- uByte EventNotification;
- uByte ExternalClock;
- uByte ATAInitTimeout;
- uByte ATAMisc1;
-#define ATATiming 0x0f
-#define ATAPIReset 0x10
-#define MasterSlaveSelection 0x20
-#define ATAPICommandBlockSize 0xc0
- uByte ATAMajorCommand;
- uByte ATAMinorCommand;
- uByte ATAMisc2;
-#define LastLUNIdentifier 0x07
-#define DescriptOverride 0x08
-#define ATA3StateSuspend 0x10
-#define SkipDeviceBoot 0x20
-#define ConfigDescriptor2 0x40
-#define InitStatus 0x80
- uByte ATAMisc3;
-#define SRSTEnable 0x01
-};
-
-struct uisdata_softc {
- struct umassbus_softc base;
-
- struct ata_drive_datas sc_drv_data;
- struct ata_channel sc_channel;
- struct isd200_config sc_isd_config;
- u_long sc_skip;
-};
-
-#define CH2SELF(chnl_softc) ((void *)chnl_softc->atabus)
-
-#undef DPRINTF
-#undef DPRINTFN
-#ifdef UISDATA_DEBUG
-#define DPRINTF(x) if (uisdatadebug) printf x
-#define DPRINTFN(n,x) if (uisdatadebug>(n)) printf x
-int uisdatadebug = 0;
-#else
-#define DPRINTF(x)
-#define DPRINTFN(n,x)
-#endif
-
-int uisdata_bio(struct ata_drive_datas *, struct ata_xfer *);
-int uisdata_bio1(struct ata_drive_datas *, struct ata_xfer *);
-void uisdata_reset_drive(struct ata_drive_datas *, int, uint32_t *);
-void uisdata_reset_channel(struct ata_channel *, int);
-int uisdata_exec_command(struct ata_drive_datas *, struct ata_xfer *);
-int uisdata_get_params(struct ata_drive_datas *, uint8_t, struct ataparams *);
-int uisdata_addref(struct ata_drive_datas *);
-void uisdata_delref(struct ata_drive_datas *);
-void uisdata_kill_pending(struct ata_drive_datas *);
-
-void uisdata_bio_cb(struct umass_softc *, void *, int, int);
-void uisdata_exec_cb(struct umass_softc *, void *, int, int);
-int uwdprint(void *, const char *);
-
-const struct ata_bustype uisdata_bustype = {
- SCSIPI_BUSTYPE_ATA,
- uisdata_bio,
- uisdata_reset_drive,
- uisdata_reset_channel,
- uisdata_exec_command,
- uisdata_get_params,
- uisdata_addref,
- uisdata_delref,
- uisdata_kill_pending,
- NULL,
-};
-
-struct ata_cmd {
- uint8_t ac_signature0;
- uint8_t ac_signature1;
-
- uint8_t ac_action_select;
-#define AC_ReadRegisterAccess 0x01
-#define AC_NoDeviceSelectionBit 0x02
-#define AC_NoBSYPollBit 0x04
-#define AC_IgnorePhaseErrorBit 0x08
-#define AC_IgnoreDeviceErrorBit 0x10
-
- uint8_t ac_register_select;
-#define AC_SelectAlternateStatus 0x01 /* R */
-#define AC_SelectDeviceControl 0x01 /* W */
-#define AC_SelectError 0x02 /* R */
-#define AC_SelectFeatures 0x02 /* W */
-#define AC_SelectSectorCount 0x04 /* RW */
-#define AC_SelectSectorNumber 0x08 /* RW */
-#define AC_SelectCylinderLow 0x10 /* RW */
-#define AC_SelectCylinderHigh 0x20 /* RW */
-#define AC_SelectDeviceHead 0x40 /* RW */
-#define AC_SelectStatus 0x80 /* R */
-#define AC_SelectCommand 0x80 /* W */
-
- uint8_t ac_transfer_blocksize;
-
- uint8_t ac_alternate_status;
-#define ac_device_control ac_alternate_status
- uint8_t ac_error;
-#define ac_features ac_error
-
- uint8_t ac_sector_count;
- uint8_t ac_sector_number;
- uint8_t ac_cylinder_low;
- uint8_t ac_cylinder_high;
- uint8_t ac_device_head;
-
- uint8_t ac_status;
-#define ac_command ac_status
-
- uint8_t ac_reserved[3];
-};
-
-#define ATA_DELAY 10000 /* 10s for a drive I/O */
-
-int
-umass_isdata_attach(struct umass_softc *sc)
Home |
Main Index |
Thread Index |
Old Index