Great work. Thank you very much and please write me if you need any additional information.
Oscar.
Alan Stern escribió:
> The log you sent helped, and I think I've found the reason this is
> happening. There's a built-in SCSI blacklist entry for vendor="Generic"
> that is overriding the settings you need.
>
> Here's a different patch for you to try instead of the other one. I think
> this will prevent things from going wrong.
>
> Matt, this is as226d, an update to a patch I sent out earlier. This also
> includes the Genesys max_sector change.
>
> Alan Stern
>
>
>
> ===== drivers/usb/storage/scsiglue.c 1.74 vs edited =====
> --- 1.74/drivers/usb/storage/scsiglue.c Sat Apr 24 22:25:50 2004
> +++ edited/drivers/usb/storage/scsiglue.c Mon May 17 16:21:56 2004
> @@ -48,6 +48,7 @@
> #include "usb.h"
> #include "debug.h"
> #include "transport.h"
> +#include "protocol.h"
>
> #include <linux/slab.h>
> #include <linux/module.h>
> @@ -70,8 +71,28 @@
> * Set default bflags. These can be overridden for individual
> * models and vendors via the scsi devinfo mechanism.
> */
> - sdev->sdev_bflags = (BLIST_MS_SKIP_PAGE_08 | BLIST_MS_SKIP_PAGE_3F |
> - BLIST_USE_10_BYTE_MS);
> +
> + /* By default, USB mass storage devices use MODE SENSE(10).
> + * By default, use 192 byte transfers for MODE SENSE with page=x3f.
> + * We don't know how reliable MODE SENSE page x08 is, so for
> + * now skip it by default.
> + * Don't try to use more than 36 bytes for INQUIRY. */
> + sdev->sdev_bflags = (BLIST_USE_10_BYTE_MS |
> + BLIST_MS_192_BYTES_FOR_3F |
> + BLIST_MS_SKIP_PAGE_08 |
> + BLIST_INQUIRY_36);
> +
> + /* Maybe add an unusual_devs flag for BLIST_MS_SKIP_PAGE_3F if
> + * too many devices fail to support it. */
> +
> + /* We don't want these entries to be overridden by scsi devinfo
> + * entries, so we'll set them again in a more secure form. (This
> + * makes most of the entries above unnecessary.) Some of these
> + * may be changed in slave_configure() below. */
> + sdev->use_10_for_ms = 1;
> + sdev->use_192_bytes_for_3f = 1;
> + sdev->skip_ms_page_8 = 1;
> +
> return 0;
> }
>
> @@ -95,11 +116,30 @@
> * reduce the maximum transfer size to 64 KB = 128 sectors. */
>
> #define USB_VENDOR_ID_GENESYS 0x05e3 // Needs a standard location
> +
> if (us->pusb_dev->descriptor.idVendor == USB_VENDOR_ID_GENESYS &&
> - us->pusb_dev->speed == USB_SPEED_HIGH)
> + us->pusb_dev->speed == USB_SPEED_HIGH &&
> + sdev->request_queue->max_sectors > 128)
> blk_queue_max_sectors(sdev->request_queue, 128);
>
> - /* this is to satisify the compiler, tho I don't think the
> + /* We can't put these settings in slave_alloc() because that gets
> + * called before the device type is known. Consequently these
> + * settings can't be overridden via the scsi devinfo mechanism. */
> + if (sdev->type == TYPE_DISK) {
> +
> + /* Disk-type devices use MODE SENSE(6) if the protocol
> + * (SubClass) is Transparent SCSI */
> + if (us->subclass == US_SC_SCSI)
> + sdev->use_10_for_ms = 0;
> + } else {
> +
> + /* Non-disk-type devices don't need to blacklist page x08
> + * or to force 192 byte transfer lengths for MODE SENSE. */
> + sdev->skip_ms_page_8 = 0;
> + sdev->use_192_bytes_for_3f = 0;
> + }
> +
> + /* this is to satisfy the compiler, tho I don't think the
> * return code is ever checked anywhere. */
> return 0;
> }
>
>
-- Por una Europa libre de Patentes de Software EuropeSwPatentFree - http://EuropeSwPatentFree.hispalinux.es/
------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id%62&alloc_ida84&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users