Re: [usb-storage] Infinite resets with Sony Ericsson V800-Vodafone 802SE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 09, 2010 at 06:18:35PM +0200, Ondrej Zary wrote:
> Windows reports 1921024 sectors too. But the partition is only half the size. 
> Accessing sectors 0 to 960511 works fine. Accessing sector 960512 and higher 
> causes the device to fail.
> 
> The memory stick is SanDisk Memory Stick Pro Duo 512MB. So the device reports 
> doubled capacity.
> 
> How to fix this? I don't see an easy way to add something like 
> US_FL_DOUBLED_CAPACITY. Initializer functions does not seem to be able to 
> modify capacity.

You can't do it from usb-storage.  You need to do it in sd.c, which is
where the sector count is kept.  In slave_configure, usb-storage does set
some flags to tell sd.c to reduce the sector count by 1 -- look for
references to fix_capacity or guess_capacity flags.

You would have to implement a flag to reduce capacity by half in sd.c, then
set that flag in slave_configure in response to a new flag.

Alternatively, you could figure out what is accessing the 2nd half of the
media and turn it off.  Likely candidates include hal, udev, or the kernel
advanced partitioning code.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@xxxxxxxxxxxxxxxxxx 
Maintainer, Linux USB Mass Storage Driver

Oh BAY-bee.
					-- Dust Puppy to Greg
User Friendly, 12/13/1997

Attachment: pgpkcm0bQic6t.pgp
Description: PGP signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux