Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2007 12:43:47 -0600
From:      Eric Anderson <anderson@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        scsi@freebsd.org
Subject:   Re: Quirk for this?
Message-ID:  <45DF35E3.8010005@freebsd.org>
In-Reply-To: <20070223.100839.112608684.imp@bsdimp.com>
References:  <20070221.160542.-169061472.imp@bsdimp.com>	<45DE6C64.8020400@samsco.org> <20070223.100839.112608684.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 02/23/07 11:08, Warner Losh wrote:
>> M. Warner Losh wrote:
>>> I have a umass device that lies about the size of the device:
>>>
>>> umass0: <SanDisk Corporation ImageMate CompactFlash USB, class 0/0, rev 1.10/0.09, addr 2> on uhub1
>>> da0 at umass-sim0 bus 0 target 0 lun 0
>>> da0: <SanDisk ImageMate II 1.30> Removable Direct Access SCSI-2 device 
>>> da0: 1.000MB/s transfers
>>> da0: 61MB (125441 512 byte sectors: 64H 32S/T 61C)
>>>
>>> However, when I plug it in with other umass devices, this is what I
>>> see:
>>>
>>> umass0: <SanDisk ImageMate 14 in 1 Reader/Writer, class 0/0, rev 2.00/93.39, addr 2> on uhub2
>>> da0 at umass-sim0 bus 0 target 0 lun 0
>>> da0: <Generic STORAGE DEVICE 9339> Removable Direct Access SCSI-0 device 
>>> da0: 40.000MB/s transfers
>>> da0: 61MB (125440 512 byte sectors: 64H 32S/T 61C)
>>>
>>> The 125440 number is what is reported by ata as well.
>>>
>>> Is there some way I can quirk this to not get a huge cascade of errors
>>> when the last sector is read by the tasting code?  I didn't see any
>>> way when I was reading the code, but the quirks are scatter in a few
>>> different files and I might have missed something.
>>>
>>> Warner
>> I don't understand, it changes its inquiry and size data depending on
>> how many other devices are plugged into the bus with it?  That's highly
>> bizarre.  No, there is no size coercion quirk.  We could add one, but we
>> need to decide on what an appropriate coercion is, and how to trigger
>> it.  Size coerecion is highly, highly hard to get right.
> 
> OK.  Maybe I was unclear in my first post.
> 
> One of the SanDisk devices that I have, the first one listed, reports
> the size wrong.  It is one too big.  This is the USB/CF adapter
> whatsit.  No matter which CF card I plug into it, it is reported one
> too large.  This is a bug in the USB/CF adapter.  This is shown first
> in the list above.
> 
> The other USB/CF adapter, as well as my PC Card/CF adapter, reports
> the correct size for the card (which is shown second).
> 
> The question is: Given that I know that the first USB/CF adapter
> always reports one too big, is there a way this can be fixed?


Just curious, but is it possible one is reporting the sectors on cf + 
starting sector, where it makes the starting sector 1 instead of 0? 
I've seen some warnings about this with regards to compact flash (when 
searching for other issues relating to a Soekris box).

Could one just do a read on the last sector of a umass device and look 
for an error, and if so, reduce the size (maybe only if the size is 
reported as an odd number)?


Eric






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45DF35E3.8010005>