Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 127287
b: refs/heads/master
c: a81a81a
h: refs/heads/master
i:
  127285: d2e816e
  127283: 0d428a6
  127279: 709b5a9
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jan 7, 2009
1 parent f7d3644 commit 1181e31
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 156 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: c838ea4626d6e982489ff519f9ecf5e1649ca90b
refs/heads/master: a81a81a25d3ecdab777abca87c5ddf484056103d
23 changes: 23 additions & 0 deletions trunk/drivers/usb/storage/scsiglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
#include "transport.h"
#include "protocol.h"

/* Vendor IDs for companies that seem to include the READ CAPACITY bug
* in all their devices
*/
#define VENDOR_ID_NOKIA 0x0421
#define VENDOR_ID_NIKON 0x04b0
#define VENDOR_ID_MOTOROLA 0x22b8

/***********************************************************************
* Host functions
***********************************************************************/
Expand Down Expand Up @@ -142,6 +149,22 @@ static int slave_configure(struct scsi_device *sdev)
* settings can't be overridden via the scsi devinfo mechanism. */
if (sdev->type == TYPE_DISK) {

/* Some vendors seem to put the READ CAPACITY bug into
* all their devices -- primarily makers of cell phones
* and digital cameras. Since these devices always use
* flash media and can be expected to have an even number
* of sectors, we will always enable the CAPACITY_HEURISTICS
* flag unless told otherwise. */
switch (le16_to_cpu(us->pusb_dev->descriptor.idVendor)) {
case VENDOR_ID_NOKIA:
case VENDOR_ID_NIKON:
case VENDOR_ID_MOTOROLA:
if (!(us->fflags & (US_FL_FIX_CAPACITY |
US_FL_CAPACITY_OK)))
us->fflags |= US_FL_CAPACITY_HEURISTICS;
break;
}

/* Disk-type devices use MODE SENSE(6) if the protocol
* (SubClass) is Transparent SCSI, otherwise they use
* MODE SENSE(10). */
Expand Down
155 changes: 0 additions & 155 deletions trunk/drivers/usb/storage/unusual_devs.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,42 +174,6 @@ UNUSUAL_DEV( 0x0421, 0x0019, 0x0592, 0x0592,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_MAX_SECTORS_64 ),

/* Reported by Filip Joelsson <filip@blueturtle.nu> */
UNUSUAL_DEV( 0x0421, 0x005d, 0x0001, 0x0600,
"Nokia",
"Nokia 3110c",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),

/* Reported by Ozan Sener <themgzzy@gmail.com> */
UNUSUAL_DEV( 0x0421, 0x0060, 0x0551, 0x0551,
"Nokia",
"3500c",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),

/* Reported by CSECSY Laszlo <boobaa@frugalware.org> */
UNUSUAL_DEV( 0x0421, 0x0063, 0x0001, 0x0601,
"Nokia",
"Nokia 3109c",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),

/* Patch for Nokia 5310 capacity */
UNUSUAL_DEV( 0x0421, 0x006a, 0x0000, 0x0701,
"Nokia",
"5310",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),

/* Submitted by Ricky Wong Yung Fei <evilbladewarrior@gmail.com> */
/* Nokia 7610 Supernova - Too many sectors reported in usb storage mode */
UNUSUAL_DEV( 0x0421, 0x00f5, 0x0000, 0x0470,
"Nokia",
"7610 Supernova",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),

/* Reported by Mario Rettig <mariorettig@web.de> */
UNUSUAL_DEV( 0x0421, 0x042e, 0x0100, 0x0100,
"Nokia",
Expand Down Expand Up @@ -275,27 +239,6 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x0370,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_MAX_SECTORS_64 ),

/* Reported by Cedric Godin <cedric@belbone.be> */
UNUSUAL_DEV( 0x0421, 0x04b9, 0x0500, 0x0551,
"Nokia",
"5300",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),

/* Reported by Paulo Fessel <pfessel@gmail.com> */
UNUSUAL_DEV( 0x0421, 0x04bd, 0x0000, 0x9999,
"Nokia",
"5200",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),

/* Reported by Richard Nauber <RichardNauber@web.de> */
UNUSUAL_DEV( 0x0421, 0x04fa, 0x0550, 0x0660,
"Nokia",
"6300",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY ),

/* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */
UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210,
"SMSC",
Expand Down Expand Up @@ -425,83 +368,6 @@ UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010,
US_SC_DEVICE, US_PR_DEVICE,NULL,
US_FL_NOT_LOCKABLE ),

/* Reported by Stefan de Konink <skinkie@xs4all.nl> */
UNUSUAL_DEV( 0x04b0, 0x0401, 0x0200, 0x0200,
"NIKON",
"NIKON DSC D100",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Tobias Kunze Briseno <t-linux@fictive.com> */
UNUSUAL_DEV( 0x04b0, 0x0403, 0x0200, 0x0200,
"NIKON",
"NIKON DSC D2H",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Milinevsky Dmitry <niam.niam@gmail.com> */
UNUSUAL_DEV( 0x04b0, 0x0409, 0x0100, 0x0100,
"NIKON",
"NIKON DSC D50",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Andreas Bockhold <andreas@bockionline.de> */
UNUSUAL_DEV( 0x04b0, 0x0405, 0x0100, 0x0100,
"NIKON",
"NIKON DSC D70",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Jamie Kitson <jamie@staberinde.fsnet.co.uk> */
UNUSUAL_DEV( 0x04b0, 0x040d, 0x0100, 0x0100,
"NIKON",
"NIKON DSC D70s",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Graber and Mike Pagano <mpagano-kernel@mpagano.com> */
UNUSUAL_DEV( 0x04b0, 0x040f, 0x0100, 0x0200,
"NIKON",
"NIKON DSC D200",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Emil Larsson <emil@swip.net> */
UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0111,
"NIKON",
"NIKON DSC D80",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Ortwin Glueck <odi@odi.ch> */
UNUSUAL_DEV( 0x04b0, 0x0413, 0x0110, 0x0111,
"NIKON",
"NIKON DSC D40",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Paul Check <paul@openstreet.com> */
UNUSUAL_DEV( 0x04b0, 0x0415, 0x0100, 0x0100,
"NIKON",
"NIKON DSC D2Xs",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Shan Destromp (shansan@gmail.com) */
UNUSUAL_DEV( 0x04b0, 0x0417, 0x0100, 0x0100,
"NIKON",
"NIKON DSC D40X",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by paul ready <lxtwin@homecall.co.uk> */
UNUSUAL_DEV( 0x04b0, 0x0419, 0x0100, 0x0200,
"NIKON",
"NIKON DSC D300",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/* Reported by Doug Maxey (dwm@austin.ibm.com) */
UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110,
"IBM",
Expand Down Expand Up @@ -2184,27 +2050,6 @@ UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001,
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ),

/*
* Patch by Pete Zaitcev <zaitcev@redhat.com>
* Report by Mark Patton. Red Hat bz#208928.
* Added support for rev 0x0002 (Motorola ROKR W5)
* by Javier Smaldone <javier@smaldone.com.ar>
*/
UNUSUAL_DEV( 0x22b8, 0x4810, 0x0001, 0x0002,
"Motorola",
"RAZR V3i/ROKR W5",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/*
* Patch by Jost Diederichs <jost@qdusa.com>
*/
UNUSUAL_DEV(0x22b8, 0x6410, 0x0001, 0x9999,
"Motorola Inc.",
"Motorola Phone (RAZRV3xx)",
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_FIX_CAPACITY),

/*
* Patch by Constantin Baranov <const@tltsu.ru>
* Report by Andreas Koenecke.
Expand Down

0 comments on commit 1181e31

Please sign in to comment.