Re: System hanging, error messages with USB drive on FreeBSD 8.1

2011-08-28 Thread Mike Tancsa
On 8/28/2011 11:20 AM, Brett Glass wrote:
> At 11:43 PM 8/27/2011, Polytropon wrote:
>  
>> I'm not sure if this will help you, but I also had similar
>> problems with a Kingston USB stick (normal storage stick,
>> no removable microSD card). It didn't work on any of my
>> FreeBSD systems. So I finally returned it to the shop and
>> got a Sony USB stick instead - no problems, works fine.
>>
>> So this is my assumption: Some hardware vendors maybe
>> improperly implement the USB protocol in their devices,
> 
> A Web search reveals that there are dozens which apparently 
> have problems with FreeBSD, while Windows has problems with
> none of them. This leads me to believe that the problem is 
> in FreeBSD, not the hardware.

The vendors most probably write their own drivers for windows. They do
not for FreeBSD and its best effort for FreeBSD.  I have yet to come
across a USB umass device that needs a quirks setting to make it work.
But I am sure there are many out there as there are dozens of different
vendors/OEMs out there of all sorts of quality.  Having to deal with the
edge cases using a single command is perfectly acceptable to me. If
setting a quirks value for FreeBSD is not workable for you, perhaps
Windows is a better choice for your use.

---Mike


-- 
---
Mike Tancsa, tel +1 519 651 3400
Sentex Communications, m...@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada   http://www.tancsa.com/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: System hanging, error messages with USB drive on FreeBSD 8.1

2011-08-28 Thread Brett Glass
At 11:43 PM 8/27/2011, Polytropon wrote:
 
>I'm not sure if this will help you, but I also had similar
>problems with a Kingston USB stick (normal storage stick,
>no removable microSD card). It didn't work on any of my
>FreeBSD systems. So I finally returned it to the shop and
>got a Sony USB stick instead - no problems, works fine.
>
>So this is my assumption: Some hardware vendors maybe
>improperly implement the USB protocol in their devices,

A Web search reveals that there are dozens which apparently 
have problems with FreeBSD, while Windows has problems with
none of them. This leads me to believe that the problem is 
in FreeBSD, not the hardware.

USB mass storage devices are, for some reason, handled by
FreeBSD's SCSI/CAM subsystem, which seems to want to treat a
USB storage device (a memory stick or a memory card in an
adapter) as a full-out SCSI device when it is not. The
SCSI commands which fail usually have to do with flushing
the cache and/or other functions which just don't apply to
a USB stick. It looks as if the devices which do not have
trouble are just IGNORING the SCSI commands, not executing 
them. In short, FreeBSD really should not be trying to 
issue them in the first place.

In short, this shouldn't be something that's handled by
"quirks." Instead, the system simply should recognize that
a USB memory stick is not a SCSI drive.

--Brett Glass

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: System hanging, error messages with USB drive on FreeBSD 8.1

2011-08-27 Thread Polytropon
On Sat, 27 Aug 2011 17:01:24 -0600, Brett Glass wrote:
> I'm working with a FreeBSD 8.1-RELEASE/amd64 machine that's 
> attempting to write data to an ordinary Kingston 8 GB microSD card. 
> The card has been inserted into its USB adapter and plugged into a 
> USB port on the machine. The system is locking up repeatedly with 
> messages that say
> 
> (da1:umass-sim1:1:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
> (da1:umass-sim1:1:0:0): SCSI sense: Error code 0x52
> 
> A Web search reveals that problems like this have cropped up for 
> many, many FreeBSD users as far back as 4.x. But I can't seem to 
> find any solution (which amazes me; if there's a bug, one would 
> think it would have gotten some attention). Do I have to abandon 
> the use of FreeBSD with USB thumb drives (or maybe with USB 
> altogether)? Hope not, but I may have to if I can't get this fixed.

I'm not sure if this will help you, but I also had similar
problems with a Kingston USB stick (normal storage stick,
no removable microSD card). It didn't work on any of my
FreeBSD systems. So I finally returned it to the shop and
got a Sony USB stick instead - no problems, works fine.

So this is my assumption: Some hardware vendors maybe
improperly implement the USB protocol in their devices,
so any OS requiring standard conformation of the attached
devices (which are malfunctioning according to the USB
protocol specifications) signals an error.

I also have a "multi card reader" (CF, SD, microSD and
who knows what else, it's a "hama USB 2.0 Card Reader
35 in 1") which attaches per USB. It also does not work
properly (also causes, at least when I tried it the last
time on a 7-STABLE system). The built-in card reader of
my home PC works fine instead.

Recently, I had to access the USB stick of a friend. The
stick didn't work at first try, and the friend told me to
try multiple times; he stated that he would have to do that
on his Linux system too. So I tried a second time - and
magically, the stick worked as intended.

Maybe this approach can help here too?

But when you say that attaching the USB adaptor causes the
system to _hang_, this means that the OS detected a severe
hardware malfunction. The OS doesn't stop for no reason; it
does so in order to prevent further damages. This behaviour
is intended.

What's _not_ intended is hardware manufacturers poorly caring
for the implementation of the "software part" in their storage
devices. Sadly that's not a typical sign of "el cheapo" stuff
anymore - even expensive devices sometimes suffer from that
poor quality, i. e. their _customers_ are suffering. :-(

So if you have problems with such hardware, returning it is
an option, and then try some different brand or model. It
helps if you print out a dmesg report - looks exceptionally
good when done on green-bar paper :-) - and use a red marker
to highlight the USB related error messages. Then just say:
"This USB adaptor is broken." No average salesman will disagree,
and you should immediately get your money back. I've tried
that, it works fine. :-)




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


System hanging, error messages with USB drive on FreeBSD 8.1

2011-08-27 Thread Brett Glass
I'm working with a FreeBSD 8.1-RELEASE/amd64 machine that's 
attempting to write data to an ordinary Kingston 8 GB microSD card. 
The card has been inserted into its USB adapter and plugged into a 
USB port on the machine. The system is locking up repeatedly with 
messages that say


(da1:umass-sim1:1:0:0): SYNCHRONIZE CACHE(10). CDB: 35 0 0 0 0 0 0 0 0 0
(da1:umass-sim1:1:0:0): SCSI sense: Error code 0x52

A Web search reveals that problems like this have cropped up for 
many, many FreeBSD users as far back as 4.x. But I can't seem to 
find any solution (which amazes me; if there's a bug, one would 
think it would have gotten some attention). Do I have to abandon 
the use of FreeBSD with USB thumb drives (or maybe with USB 
altogether)? Hope not, but I may have to if I can't get this fixed.


--Brett Glass

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"