Didn't we already change this globally for all devices in the -mm tree? Matt
On Tue, Nov 27, 2007 at 03:06:54PM -0500, Kyle McMartin wrote:
> This Seagate FreeAgent external USB disk I just purchased seems to need
> allow_restart enabled to spin back up; otherwise I just get a pile of
> read errors when I try to access it. Add a new unusual flag for devices
> needing scsi_device->allow_restart set, and add this Seagate drive to
> the unusual devs table.
>
> Signed-off-by: Kyle McMartin <[EMAIL PROTECTED]>
> ---
>
> Resent... sigh, that will learn me to hand-edit diff in my mail client.
> Fixed dropped "*/" in the scsiglue.c comment.
>
> Cheers,
> Kyle
> ---
> diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c
> index 1ba19ea..c171140 100644
> --- a/drivers/usb/storage/scsiglue.c
> +++ b/drivers/usb/storage/scsiglue.c
> @@ -200,6 +200,10 @@ static int slave_configure(struct scsi_device *sdev)
> if (us->flags & US_FL_NOT_LOCKABLE)
> sdev->lockable = 0;
>
> + /* Some devices need allow_restart to spin back up... */
> + if (us->flags & US_FL_ALLOW_RESTART)
> + sdev->allow_restart = 1;
> +
> /* this is to satisfy the compiler, tho I don't think the
> * return code is ever checked anywhere. */
> return 0;
> diff --git a/drivers/usb/storage/unusual_devs.h
> b/drivers/usb/storage/unusual_devs.h
> index 22ab238..a538aa6 100644
> --- a/drivers/usb/storage/unusual_devs.h
> +++ b/drivers/usb/storage/unusual_devs.h
> @@ -1574,6 +1574,12 @@ UNUSUAL_DEV( 0xed06, 0x4500, 0x0001, 0x0001,
> US_SC_DEVICE, US_PR_DEVICE, NULL,
> US_FL_CAPACITY_HEURISTICS),
>
> +/* Reported by Kyle McMartin <[EMAIL PROTECTED]> */
> +UNUSUAL_DEV( 0x0bc2, 0x3000, 0x0000, 0x9999,
> + "Seagate", "FreeAgentDesktop 320",
> + US_SC_SCSI, US_PR_BULK, NULL,
> + US_FL_ALLOW_RESTART),
> +
> /* Control/Bulk transport for all SubClass values */
> USUAL_DEV(US_SC_RBC, US_PR_CB, USB_US_TYPE_STOR),
> USUAL_DEV(US_SC_8020, US_PR_CB, USB_US_TYPE_STOR),
> diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h
> index 1b792b9..d01dc72 100644
> --- a/include/linux/usb_usual.h
> +++ b/include/linux/usb_usual.h
> @@ -48,7 +48,9 @@
> US_FLAG(IGNORE_DEVICE, 0x00000800) \
> /* Don't claim device */ \
> US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \
> - /* sometimes sizes is too big */
> + /* sometimes sizes is too big */ \
> + US_FLAG(ALLOW_RESTART, 0x00002000) \
> + /* needs allow_restart to wake up */
>
> #define US_FLAG(name, value) US_FL_##name = value ,
> enum { US_DO_ALL_FLAGS };
--
Matthew Dharm Home: [EMAIL PROTECTED]
Maintainer, Linux USB Mass Storage Driver
YOU SEE!!?? It's like being born with only one nipple!
-- Erwin
User Friendly, 10/19/1998
pgpSBt4ITTA1J.pgp
Description: PGP signature
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
