Phil Dibowitz wrote: > It sounds like we have a consensus then. I'll try to get a patch to: > > - Add a MAX_SECTORS_64 flag > - Incorporate Benjamin's device > - Remove the Genesys logic (this will be the second genesys special-case that > I've replaced with a flag ;) ) > > Shouldn't take me very long - though I'm oncall this week, so who knows.
OK - attached is a patch. Benjamin, can you please give this a shot? Alan and Matthew, have a look over and and let me know if you see any problems. If everyone approves, I'll re-send with a Signed-off line to Greg. -- Phil Dibowitz [EMAIL PROTECTED] Freeware and Technical Pages Insanity Palace of Metallica http://www.phildev.net/ http://www.ipom.com/ "Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind." - Dr. Seuss
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. --- diff -puN drivers/usb/storage/scsiglue.c~usb_max64sectors drivers/usb/storage/scsiglue.c --- linux-2.6.17-rc3-git2/drivers/usb/storage/scsiglue.c~usb_max64sectors 2006-05-25 22:38:25.000000000 -0700 +++ linux-2.6.17-rc3-git2-phil/drivers/usb/storage/scsiglue.c 2006-05-25 22:41:28.000000000 -0700 @@ -115,10 +115,12 @@ static int slave_configure(struct scsi_d /* 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 && + * works okay and that's what Windows does. + * + * As it turns out, other devices needs this as well, so we've + * introduced the US_FL_MAX_SECTORS_64 flag. + */ + if ((us->flags & US_FL_MAX_SECTORS_64) && sdev->request_queue->max_sectors > 64) blk_queue_max_sectors(sdev->request_queue, 64); diff -puN drivers/usb/storage/unusual_devs.h~usb_max64sectors drivers/usb/storage/unusual_devs.h --- linux-2.6.17-rc3-git2/drivers/usb/storage/unusual_devs.h~usb_max64sectors 2006-05-25 22:38:25.000000000 -0700 +++ linux-2.6.17-rc3-git2-phil/drivers/usb/storage/unusual_devs.h 2006-05-25 22:45:48.000000000 -0700 @@ -682,18 +682,22 @@ UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x * They were originally reported by Alexander Oltu * <[EMAIL PROTECTED]> and Peter Marks <[EMAIL PROTECTED]> * respectively. + * + * US_FL_GO_SLOW and US_FL_MAX_SECTORS_64 added by Phil Dibowitz + * <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> * Taken from the Lycoris Kernel */ @@ -1170,6 +1174,14 @@ UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_IGNORE_RESIDUE ), +/* Reported by Benjamin Schiller <[EMAIL PROTECTED]> + * 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 <[EMAIL PROTECTED]> */ UNUSUAL_DEV( 0x0fce, 0xd008, 0x0000, 0x0000, "Sony Ericsson", diff -puN include/linux/usb_usual.h~usb_max64sectors include/linux/usb_usual.h --- linux-2.6.17-rc3-git2/include/linux/usb_usual.h~usb_max64sectors 2006-05-25 22:38:25.000000000 -0700 +++ linux-2.6.17-rc3-git2-phil/include/linux/usb_usual.h 2006-05-25 22:48:59.000000000 -0700 @@ -44,6 +44,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 }; _
signature.asc
Description: OpenPGP digital signature