Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 133520
b: refs/heads/master
c: 32d5493
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Mar 24, 2009
1 parent 8f1052d commit eff8dad
Show file tree
Hide file tree
Showing 9 changed files with 155 additions and 89 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0ff71883b2d60136430458413c135d545c69b0c4
refs/heads/master: 32d5493eb83a217c3b1eba4b98cd6d19864f71a8
4 changes: 3 additions & 1 deletion trunk/drivers/usb/storage/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ config USB_STORAGE_FREECOM
Freecom has a web page at <http://www.freecom.de/>.

config USB_STORAGE_ISD200
bool "ISD-200 USB/ATA Bridge support"
tristate "ISD-200 USB/ATA Bridge support"
depends on USB_STORAGE
---help---
Say Y here if you want to use USB Mass Store devices based
Expand All @@ -61,6 +61,8 @@ config USB_STORAGE_ISD200
- CyQ've CQ8060A CDRW drive
- Planex eXtreme Drive RX-25HU USB-IDE cable (not model RX-25U)

If this driver is compiled as a module, it will be named ums-isd200.

config USB_STORAGE_USBAT
bool "USBAT/USBAT02-based storage support"
depends on USB_STORAGE
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/usb/storage/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ usb-storage-obj-$(CONFIG_USB_STORAGE_DEBUG) += debug.o
usb-storage-obj-$(CONFIG_USB_STORAGE_USBAT) += shuttle_usbat.o
usb-storage-obj-$(CONFIG_USB_STORAGE_SDDR55) += sddr55.o
usb-storage-obj-$(CONFIG_USB_STORAGE_FREECOM) += freecom.o
usb-storage-obj-$(CONFIG_USB_STORAGE_ISD200) += isd200.o
usb-storage-obj-$(CONFIG_USB_STORAGE_DATAFAB) += datafab.o
usb-storage-obj-$(CONFIG_USB_STORAGE_JUMPSHOT) += jumpshot.o
usb-storage-obj-$(CONFIG_USB_STORAGE_ALAUDA) += alauda.o
Expand All @@ -30,6 +29,8 @@ else
obj-$(CONFIG_USB) += libusual.o usual-tables.o
endif

obj-$(CONFIG_USB_STORAGE_ISD200) += ums-isd200.o
obj-$(CONFIG_USB_STORAGE_SDDR09) += ums-sddr09.o

ums-isd200-objs := isd200.o
ums-sddr09-objs := sddr09.o
94 changes: 91 additions & 3 deletions trunk/drivers/usb/storage/isd200.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

#include <linux/jiffies.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/hdreg.h>
#include <linux/scatterlist.h>
Expand All @@ -57,7 +58,50 @@
#include "protocol.h"
#include "debug.h"
#include "scsiglue.h"
#include "isd200.h"


static int isd200_Initialization(struct us_data *us);


/*
* The table of devices
*/
#define UNUSUAL_DEV(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax, \
vendorName, productName, useProtocol, useTransport, \
initFunction, flags) \
{ USB_DEVICE_VER(id_vendor, id_product, bcdDeviceMin, bcdDeviceMax), \
.driver_info = (flags)|(USB_US_TYPE_STOR<<24) }

struct usb_device_id isd200_usb_ids[] = {
# include "unusual_isd200.h"
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, isd200_usb_ids);

#undef UNUSUAL_DEV
#undef USUAL_DEV

/*
* The flags table
*/
#define UNUSUAL_DEV(idVendor, idProduct, bcdDeviceMin, bcdDeviceMax, \
vendor_name, product_name, use_protocol, use_transport, \
init_function, Flags) \
{ \
.vendorName = vendor_name, \
.productName = product_name, \
.useProtocol = use_protocol, \
.useTransport = use_transport, \
.initFunction = init_function, \
}

static struct us_unusual_dev isd200_unusual_dev_list[] = {
# include "unusual_isd200.h"
{ } /* Terminating entry */
};

#undef UNUSUAL_DEV
#undef USUAL_DEV


/* Timeout defines (in Seconds) */
Expand Down Expand Up @@ -1518,7 +1562,7 @@ static int isd200_init_info(struct us_data *us)
* Initialization for the ISD200
*/

int isd200_Initialization(struct us_data *us)
static int isd200_Initialization(struct us_data *us)
{
US_DEBUGP("ISD200 Initialization...\n");

Expand Down Expand Up @@ -1549,7 +1593,7 @@ int isd200_Initialization(struct us_data *us)
*
*/

void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us)
static void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us)
{
int sendToTransport = 1, orig_bufflen;
union ata_cdb ataCdb;
Expand All @@ -1570,3 +1614,47 @@ void isd200_ata_command(struct scsi_cmnd *srb, struct us_data *us)

isd200_srb_set_bufflen(srb, orig_bufflen);
}

static int isd200_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct us_data *us;
int result;

result = usb_stor_probe1(&us, intf, id,
(id - isd200_usb_ids) + isd200_unusual_dev_list);
if (result)
return result;

us->protocol_name = "ISD200 ATA/ATAPI";
us->proto_handler = isd200_ata_command;

result = usb_stor_probe2(us);
return result;
}

static struct usb_driver isd200_driver = {
.name = "ums-isd200",
.probe = isd200_probe,
.disconnect = usb_stor_disconnect,
.suspend = usb_stor_suspend,
.resume = usb_stor_resume,
.reset_resume = usb_stor_reset_resume,
.pre_reset = usb_stor_pre_reset,
.post_reset = usb_stor_post_reset,
.id_table = isd200_usb_ids,
.soft_unbind = 1,
};

static int __init isd200_init(void)
{
return usb_register(&isd200_driver);
}

static void __exit isd200_exit(void)
{
usb_deregister(&isd200_driver);
}

module_init(isd200_init);
module_exit(isd200_exit);
31 changes: 0 additions & 31 deletions trunk/drivers/usb/storage/isd200.h

This file was deleted.

42 changes: 0 additions & 42 deletions trunk/drivers/usb/storage/unusual_devs.h
Original file line number Diff line number Diff line change
Expand Up @@ -632,14 +632,6 @@ UNUSUAL_DEV( 0x054c, 0x0025, 0x0100, 0x0100,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_SINGLE_LUN ),

#ifdef CONFIG_USB_STORAGE_ISD200
UNUSUAL_DEV( 0x054c, 0x002b, 0x0100, 0x0110,
"Sony",
"Portable USB Harddrive V2",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0 ),
#endif

/* Submitted by Olaf Hering, <olh@suse.de> SuSE Bugzilla #49049 */
UNUSUAL_DEV( 0x054c, 0x002c, 0x0501, 0x2000,
"Sony",
Expand Down Expand Up @@ -785,32 +777,6 @@ UNUSUAL_DEV( 0x05ab, 0x0060, 0x1104, 0x1110,
US_SC_SCSI, US_PR_BULK, NULL,
US_FL_NEED_OVERRIDE ),

#ifdef CONFIG_USB_STORAGE_ISD200
UNUSUAL_DEV( 0x05ab, 0x0031, 0x0100, 0x0110,
"In-System",
"USB/IDE Bridge (ATA/ATAPI)",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0 ),

UNUSUAL_DEV( 0x05ab, 0x0301, 0x0100, 0x0110,
"In-System",
"Portable USB Harddrive V2",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0 ),

UNUSUAL_DEV( 0x05ab, 0x0351, 0x0100, 0x0110,
"In-System",
"Portable USB Harddrive V2",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0 ),

UNUSUAL_DEV( 0x05ab, 0x5701, 0x0100, 0x0110,
"In-System",
"USB Storage Adapter V2",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0 ),
#endif

/* Submitted by Sven Anderson <sven-linux@anderson.de>
* There are at least four ProductIDs used for iPods, so I added 0x1202 and
* 0x1204. They just need the US_FL_FIX_CAPACITY. As the bcdDevice appears
Expand Down Expand Up @@ -1375,14 +1341,6 @@ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_SANE_SENSE ),

#ifdef CONFIG_USB_STORAGE_ISD200
UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110,
"ATI",
"USB Cable 205",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0 ),
#endif

#ifdef CONFIG_USB_STORAGE_DATAFAB
UNUSUAL_DEV( 0x0c0b, 0xa109, 0x0000, 0xffff,
"Acomdata",
Expand Down
57 changes: 57 additions & 0 deletions trunk/drivers/usb/storage/unusual_isd200.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
/* Unusual Devices File for In-System Design, Inc. ISD200 ASIC
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#if defined(CONFIG_USB_STORAGE_ISD200) || \
defined(CONFIG_USB_STORAGE_ISD200_MODULE)

UNUSUAL_DEV( 0x054c, 0x002b, 0x0100, 0x0110,
"Sony",
"Portable USB Harddrive V2",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0),

UNUSUAL_DEV( 0x05ab, 0x0031, 0x0100, 0x0110,
"In-System",
"USB/IDE Bridge (ATA/ATAPI)",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0),

UNUSUAL_DEV( 0x05ab, 0x0301, 0x0100, 0x0110,
"In-System",
"Portable USB Harddrive V2",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0),

UNUSUAL_DEV( 0x05ab, 0x0351, 0x0100, 0x0110,
"In-System",
"Portable USB Harddrive V2",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0),

UNUSUAL_DEV( 0x05ab, 0x5701, 0x0100, 0x0110,
"In-System",
"USB Storage Adapter V2",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0),

UNUSUAL_DEV( 0x0bf6, 0xa001, 0x0100, 0x0110,
"ATI",
"USB Cable 205",
US_SC_ISD200, US_PR_BULK, isd200_Initialization,
0),

#endif /* defined(CONFIG_USB_STORAGE_ISD200) || ... */
10 changes: 0 additions & 10 deletions trunk/drivers/usb/storage/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@
#ifdef CONFIG_USB_STORAGE_FREECOM
#include "freecom.h"
#endif
#ifdef CONFIG_USB_STORAGE_ISD200
#include "isd200.h"
#endif
#ifdef CONFIG_USB_STORAGE_DATAFAB
#include "datafab.h"
#endif
Expand Down Expand Up @@ -721,13 +718,6 @@ static void get_protocol(struct us_data *us)
us->proto_handler = usb_stor_ufi_command;
break;

#ifdef CONFIG_USB_STORAGE_ISD200
case US_SC_ISD200:
us->protocol_name = "ISD200 ATA/ATAPI";
us->proto_handler = isd200_ata_command;
break;
#endif

#ifdef CONFIG_USB_STORAGE_CYPRESS_ATACB
case US_SC_CYP_ATACB:
us->protocol_name = "Transparent SCSI with Cypress ATACB";
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/usb/storage/usual-tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ struct ignore_entry {
}

static struct ignore_entry ignore_ids[] = {
# include "unusual_isd200.h"
# include "unusual_sddr09.h"
{ } /* Terminating entry */
};
Expand Down

0 comments on commit eff8dad

Please sign in to comment.