]> git.hungrycats.org Git - linux/commitdiff
[PATCH] USB storage: fix for jumpshot and datafab devices
authorMatthew Dharm <mdharm-usb@one-eyed-alien.net>
Tue, 9 Dec 2003 01:35:37 +0000 (17:35 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 9 Dec 2003 01:35:37 +0000 (17:35 -0800)
This patch fixes some obvious errors in the jumpshot and datafab drivers.

This should close out Bugzilla bug #1408

> Date: Mon, 1 Dec 2003 12:14:53 -0500 (EST)
> From: Alan Stern <stern@rowland.harvard.edu>
> Subject: Patch from Eduard Hasenleithner
> To: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
> cc: USB Storage List <usb-storage@one-eyed-alien.net>
>
> Matt:
>
> Did you see this patch?  It was posted to the usb-development mailing list
> about a week ago, before I started making all my changes.  It is clearly
> correct and necessary.
>
> Alan Stern

drivers/usb/storage/datafab.c
drivers/usb/storage/jumpshot.c

index 02b13b3867c11396b6f045966ad6dc9258883860..5036f7a32fa27f9843f3cf9a7ac0bee75b02206c 100644 (file)
@@ -387,7 +387,7 @@ static int datafab_id_device(struct us_data *us,
 
        // we'll go ahead and extract the media capacity while we're here...
        //
-       rc = datafab_bulk_read(us, reply, sizeof(reply));
+       rc = datafab_bulk_read(us, reply, 512);
        if (rc == USB_STOR_XFER_GOOD) {
                // capacity is at word offset 57-58
                //
index 3b75a8a43edaa2e8ce46c9b1460899198a17937e..8149f27640bee2f8753e7382b205e1c89eef87c5 100644 (file)
@@ -317,7 +317,7 @@ static int jumpshot_id_device(struct us_data *us,
        }
 
        // read the reply
-       rc = jumpshot_bulk_read(us, reply, sizeof(reply));
+       rc = jumpshot_bulk_read(us, reply, 512);
        if (rc != USB_STOR_XFER_GOOD) {
                rc = USB_STOR_TRANSPORT_ERROR;
                goto leave;