mirror of
https://github.com/torvalds/linux.git
synced 2024-12-26 21:02:19 +00:00
[PATCH] USB Storage: US_FL_MAX_SECTORS_64 flag
This patch adds a US_FL_MAX_SECTORS_64 and removes the Genesys special-cases for this that were in scsiglue.c. It also adds the flag to other devices reported to need it. Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
2030794946
commit
883d989a7e
@ -112,13 +112,11 @@ static int slave_configure(struct scsi_device *sdev)
|
||||
if (sdev->scsi_level < SCSI_2)
|
||||
sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2;
|
||||
|
||||
/* According to the technical support people at Genesys Logic,
|
||||
* devices using their chips have problems transferring more than
|
||||
* 32 KB at a time. In practice people have found that 64 KB
|
||||
* works okay and that's what Windows does. But we'll be
|
||||
* conservative; people can always use the sysfs interface to
|
||||
* increase max_sectors. */
|
||||
if (le16_to_cpu(us->pusb_dev->descriptor.idVendor) == USB_VENDOR_ID_GENESYS &&
|
||||
/* Many devices have trouble transfering more than 32KB at a time,
|
||||
* while others have trouble with more than 64K. At this time we
|
||||
* are limiting both to 32K (64 sectores).
|
||||
*/
|
||||
if ((us->flags & US_FL_MAX_SECTORS_64) &&
|
||||
sdev->request_queue->max_sectors > 64)
|
||||
blk_queue_max_sectors(sdev->request_queue, 64);
|
||||
|
||||
|
@ -715,18 +715,22 @@ UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x0113,
|
||||
* They were originally reported by Alexander Oltu
|
||||
* <alexander@all-2.com> and Peter Marks <peter.marks@turner.com>
|
||||
* respectively.
|
||||
*
|
||||
* US_FL_GO_SLOW and US_FL_MAX_SECTORS_64 added by Phil Dibowitz
|
||||
* <phil@ipom.com> as these flags were made and hard-coded
|
||||
* special-cases were pulled from scsiglue.c.
|
||||
*/
|
||||
UNUSUAL_DEV( 0x05e3, 0x0701, 0x0000, 0xffff,
|
||||
"Genesys Logic",
|
||||
"USB to IDE Optical",
|
||||
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
||||
US_FL_GO_SLOW ),
|
||||
US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 ),
|
||||
|
||||
UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0xffff,
|
||||
"Genesys Logic",
|
||||
"USB to IDE Disk",
|
||||
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
||||
US_FL_GO_SLOW ),
|
||||
US_FL_GO_SLOW | US_FL_MAX_SECTORS_64 ),
|
||||
|
||||
/* Reported by Hanno Boeck <hanno@gmx.de>
|
||||
* Taken from the Lycoris Kernel */
|
||||
@ -1203,6 +1207,14 @@ UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x0110,
|
||||
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_RESIDUE ),
|
||||
|
||||
/* Reported by Benjamin Schiller <sbenni@gmx.de>
|
||||
* It is also sold by Easylite as DJ 20 */
|
||||
UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103,
|
||||
"Typhoon",
|
||||
"My DJ 1820",
|
||||
US_SC_DEVICE, US_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64),
|
||||
|
||||
/* Reported by Michael Stattmann <michael@stattmann.com> */
|
||||
UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000,
|
||||
"Sony Ericsson",
|
||||
|
@ -176,8 +176,4 @@ extern void fill_inquiry_response(struct us_data *us,
|
||||
#define scsi_unlock(host) spin_unlock_irq(host->host_lock)
|
||||
#define scsi_lock(host) spin_lock_irq(host->host_lock)
|
||||
|
||||
|
||||
/* Vendor ID list for devices that require special handling */
|
||||
#define USB_VENDOR_ID_GENESYS 0x05e3 /* Genesys Logic */
|
||||
|
||||
#endif
|
||||
|
@ -43,6 +43,8 @@
|
||||
/* Need delay after Command phase */ \
|
||||
US_FLAG(NO_WP_DETECT, 0x00000200) \
|
||||
/* Don't check for write-protect */ \
|
||||
US_FLAG(MAX_SECTORS_64, 0x00000400) \
|
||||
/* Sets max_sectors to 64 */
|
||||
|
||||
#define US_FLAG(name, value) US_FL_##name = value ,
|
||||
enum { US_DO_ALL_FLAGS };
|
||||
|
Loading…
Reference in New Issue
Block a user