23721 USB and cam system bug? - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > Peripheral Hardware

Peripheral Hardware Stuff that plugs in via USB, FireWire, eSATA, PS/2, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old December 14th, 2009, 20:53
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default USB and cam system bug?

Code:
# ll /dev/da*
ls: No match.
Now, I plug into USB port my mobile phone(File Transfer mode).
Code:
# camcontrol devlist
<SEMC Int.Memory 0000>             at scbus0 target 0 lun 0 (da0,pass0)
<SEMC Mem-Stick 0000>              at scbus1 target 0 lun 0 (da1,pass1)
Code:
# ll /dev/da*
crw-r-----  1 root  operator  -   0, 147 Dec 14 20:37:26 2009 /dev/da0
crw-r-----  1 root  operator  -   0, 149 Dec 14 20:37:27 2009 /dev/da1
For mounting, there should be /dev/da1s1 listed, but it is not.

"Something" made it ready/loaded, as I did:
Code:
# camcontrol load da1
In /etc/rc.conf:
Code:
hald_enable="YES"
dbus_enable="YES"
Now in order to get /dev/da1s1 listed
Code:
# camcontrol rescan all
Re-scan of bus 0 was successful
Re-scan of bus 1 was successful
Code:
# ll /dev/da*
crw-r-----  1 root  operator  -   0, 147 Dec 14 20:37:26 2009 /dev/da0
crw-r-----  1 root  operator  -   0, 149 Dec 14 20:37:27 2009 /dev/da1
Still nothing...
So I do this:
Code:
# mount -t msdosfs -o -m=600,-M=700 /dev/da1s1 ~/mobile
mount_msdosfs: /dev/da1s1: No such file or directory
Now watch this!
Excluding slice 1
Code:
# mount -t msdosfs -o -m=600,-M=700 /dev/da1 ~/mobile
mount_msdosfs: /dev/da1: Invalid argument
Exactly command above, made /dev/da1s1 to appear
Code:
# ll /dev/da*
crw-r-----  1 root  operator  -   0, 147 Dec 14 20:37:26 2009 /dev/da0
crw-r-----  1 root  operator  -   0, 149 Dec 14 20:37:27 2009 /dev/da1
crw-r-----  1 root  operator  -   0, 150 Dec 14 20:46:21 2009 /dev/da1s1
Now I can do:
Code:
# mount -t msdosfs -o -m=600,-M=700 /dev/da1s1 ~/mobile
And Voila!

Is this a bug?
Reply With Quote
  #2  
Old December 15th, 2009, 04:26
jb_fvwm2 jb_fvwm2 is offline
Senior Member
 
Join Date: Nov 2008
Posts: 1,387
Thanks: 60
Thanked 145 Times in 130 Posts
Default

Maybe explained by my post and others in the thread Nov 2008.
"Can't mount usb flash drive"
(desktop usage >> Multimedia subforum(s).)
Reply With Quote
  #3  
Old December 15th, 2009, 14:43
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

I disagree with you.
Those post are nothing but a trial and error attempts, with no final solution.

I will be very simple. Concentrate on this:
When I plugin USB device, I want it to immidieatly show as:
Code:
# ll /dev/da*
crw-r-----  1 root  operator  -   0, 147 Dec 14 20:37:26 2009 /dev/da0
crw-r-----  1 root  operator  -   0, 150 Dec 14 20:46:21 2009 /dev/da0s1
crw-r-----  1 root  operator  -   0, 149 Dec 14 20:37:27 2009 /dev/da1
crw-r-----  1 root  operator  -   0, 150 Dec 14 20:46:21 2009 /dev/da1s1
insetad of current:
Code:
# ll /dev/da*
crw-r-----  1 root  operator  -   0, 147 Dec 14 20:37:26 2009 /dev/da0
crw-r-----  1 root  operator  -   0, 149 Dec 14 20:37:27 2009 /dev/da1
Reply With Quote
  #4  
Old December 15th, 2009, 15:05
pbd pbd is offline
Member
 
Join Date: Nov 2008
Location: Brno, CZ
Posts: 187
Thanks: 9
Thanked 31 Times in 31 Posts
Default

(My 8.0-RELEASE does exactly the same with HTC Dream/T-mobile G1.)
Reply With Quote
  #5  
Old December 15th, 2009, 15:13
Beastie Beastie is offline
Senior Member
 
Join Date: Mar 2009
Location: /dev/earth0
Posts: 1,702
Thanks: 0
Thanked 301 Times in 245 Posts
Default

Could be a bug or a regression. Did it behave similarly on 7.x or you have only tried 8.0?

Also, I'm just curious. Why do you enable HAL if you want to manually mount the device? Isn't HAL usually used to auto-detect and auto-mount devices?
__________________
May the source be with you!
Reply With Quote
  #6  
Old December 15th, 2009, 15:22
pbd pbd is offline
Member
 
Join Date: Nov 2008
Location: Brno, CZ
Posts: 187
Thanks: 9
Thanked 31 Times in 31 Posts
Default

Quote:
Originally Posted by Beastie View Post
Could be a bug or a regression. Did it behave similarly on 7.x or you have only tried 8.0?
I have tried on 7.1-RELEASE-p8: it's the same.
Reply With Quote
  #7  
Old December 15th, 2009, 17:32
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

I use hal because other ports need it(ie: Xorg). Not because this exact case.

It sucks a big time, a fact, that you first have to intentionally cause an error, with attempt to mount device itself in order for device to be rescanned by OS and to properly show device's slices in /dev
Reply With Quote
  #8  
Old December 15th, 2009, 20:47
jb_fvwm2 jb_fvwm2 is offline
Senior Member
 
Join Date: Nov 2008
Posts: 1,387
Thanks: 60
Thanked 145 Times in 130 Posts
Default

I recollect one of the moderators on this or
daemonforums.org explaining it better.
Reply With Quote
  #9  
Old December 15th, 2009, 22:36
aragon aragon is offline
Giant Locked
 
Join Date: Nov 2008
Location: Cape Town, South Africa
Posts: 2,031
Thanks: 68
Thanked 253 Times in 203 Posts
Default

Has someone filed a PR?
Reply With Quote
  #10  
Old December 16th, 2009, 16:53
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

I did not.
Actually..., I've never done such a thing, so I have no experience with it.

If someone did, than post a link to it, so we could track a progress.
Reply With Quote
  #11  
Old December 16th, 2009, 21:17
aragon aragon is offline
Giant Locked
 
Join Date: Nov 2008
Location: Cape Town, South Africa
Posts: 2,031
Thanks: 68
Thanked 253 Times in 203 Posts
Default

It's best if someone who can reproduce the bug logs the PR...
Reply With Quote
  #12  
Old December 16th, 2009, 21:50
crsd crsd is offline
Member
 
Join Date: Nov 2008
Location: Russia, Krasnodar
Posts: 420
Thanks: 8
Thanked 92 Times in 82 Posts
Default

Does stopping hald solve the problem?
Reply With Quote
  #13  
Old December 17th, 2009, 00:23
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

I booted without hald.
It didn't affect issue in any way, except that mouse worked in default console, but not when I started X.

I must notice that after a reebot, with usb memory leaved plugged in, all devices were properly showed with theirs slices in /dev/da*

This type of scan is obviously not initiated when usb is plugged in afterwords.
Reply With Quote
  #14  
Old December 17th, 2009, 00:42
Beastie Beastie is offline
Senior Member
 
Join Date: Mar 2009
Location: /dev/earth0
Posts: 1,702
Thanks: 0
Thanked 301 Times in 245 Posts
Default

You aren't connecting indirectly through an external USB hub, are you?
__________________
May the source be with you!
Reply With Quote
  #15  
Old December 17th, 2009, 01:32
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

No, I simply plug it in a usb slot on my midi case
Reply With Quote
  #16  
Old December 17th, 2009, 10:54
Beastie Beastie is offline
Senior Member
 
Join Date: Mar 2009
Location: /dev/earth0
Posts: 1,702
Thanks: 0
Thanked 301 Times in 245 Posts
Default

And other devices such as mice or pendrives work fine?
__________________
May the source be with you!
Reply With Quote
  #17  
Old December 17th, 2009, 12:02
tingo tingo is offline
Member
 
Join Date: Nov 2008
Location: Oslo, Norway
Posts: 825
Thanks: 134
Thanked 82 Times in 68 Posts
Default

Quote:
Originally Posted by Seeker View Post
No, I simply plug it in a usb slot on my midi case
Frontend ports by any chance? If so, try the ports on the back of the case also. I have seen some motherboards where the front / back usb ports worked differently.
__________________
Torfinn
Reply With Quote
  #18  
Old December 17th, 2009, 12:51
Beastie Beastie is offline
Senior Member
 
Join Date: Mar 2009
Location: /dev/earth0
Posts: 1,702
Thanks: 0
Thanked 301 Times in 245 Posts
Default

That's why I'm asking the above question. These may all be connected to 1 root hub only. You may check the MoBo diagrams, but I thought plugging a pendrive or mouse in was easier.
__________________
May the source be with you!
Reply With Quote
  #19  
Old December 17th, 2009, 15:19
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

In a back of a case are 4 usb slots.(directly on a MB)
In front of a case are 2 usb slots.(wired to MB)

usb mouse and this mem are always plugged in front case usb slots.
Now I've attached mem in a back of a case.

Nothing changed.
Reply With Quote
  #20  
Old December 18th, 2009, 16:11
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

I tried it on a laptop and all is same.
Here are some sys messages

Code:
da1 at umass-sim1 bus 1 scbus1 target 0 lun 0
da1: <SEMC Mem-Stick 0000> Removable Direct Access SCSI-0 device
da1: 1.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
And more when mounting
Code:
GEOM: da1: partition 1 does not start on a track boundary.
GEOM: da1: partition 1 does not end on a track boundary.
Reply With Quote
  #21  
Old December 18th, 2009, 17:40
Beastie Beastie is offline
Senior Member
 
Join Date: Mar 2009
Location: /dev/earth0
Posts: 1,702
Thanks: 0
Thanked 301 Times in 245 Posts
Default

Then destroy the slices, recreate them and do a newfs.
__________________
May the source be with you!
Reply With Quote
  #22  
Old December 18th, 2009, 18:04
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

But this is a mobile phone.
I simply bought it formatted "as is".
Factory did this.
Reply With Quote
  #23  
Old December 21st, 2009, 11:02
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

But this doesn't explain, why is all properly displayed/detected, if USB device is attached prior to booting.

If I attach USB device afterwards, then I have to initiate an error, in order to get a properly displayed/detected devices/slices
Reply With Quote
  #24  
Old December 21st, 2009, 13:23
aragon aragon is offline
Giant Locked
 
Join Date: Nov 2008
Location: Cape Town, South Africa
Posts: 2,031
Thanks: 68
Thanked 253 Times in 203 Posts
Default

My phone also formats its memory card with no regard to cylinder boundaries, but I don't have this problem...
Reply With Quote
  #25  
Old January 5th, 2010, 01:40
Seeker's Avatar
Seeker Seeker is offline
Member
 
Join Date: May 2009
Location: Europe/Croatia/Zagreb
Posts: 832
Thanks: 13
Thanked 11 Times in 10 Posts
Default

Quote:
Originally Posted by Seeker View Post
But this doesn't explain, why is all properly displayed/detected, if USB device is attached prior to booting.

If I attach USB device afterwards, then I have to initiate an error, in order to get a properly displayed/detected devices/slices
Code:
...
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <SEMC Int.Memory 0000> Removable Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
(probe1:umass-sim1:1:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe1:umass-sim1:1:0:0): CAM Status: SCSI Status Error
(probe1:umass-sim1:1:0:0): SCSI Status: Check Condition
(probe1:umass-sim1:1:0:0): UNIT ATTENTION asc:29,0
(probe1:umass-sim1:1:0:0): Power on, reset, or bus device reset occurred
(probe1:umass-sim1:1:0:0): Retrying Command (per Sense Data)
(probe1:umass-sim1:1:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe1:umass-sim1:1:0:0): CAM Status: SCSI Status Error
(probe1:umass-sim1:1:0:0): SCSI Status: Check Condition
(probe1:umass-sim1:1:0:0): NOT READY asc:3a,0
(probe1:umass-sim1:1:0:0): Medium not present
(probe1:umass-sim1:1:0:0): Unretryable error
da1 at umass-sim1 bus 1 scbus1 target 0 lun 0
da1: <SEMC Mem-Stick 0000> Removable Direct Access SCSI-0 device
da1: 1.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
can't re-use a leaf (minimum_cmd_size)!
ugen4.2: <Sony Ericsson> at usbus4 (disconnected)
umass0: at uhub4, port 2, addr 2 (disconnected)
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
umass1: at uhub4, port 2, addr 2 (disconnected)
(da1:umass-sim1:1:0:0): lost device
(da1:umass-sim1:1:0:0): removing device entry
What does this tell you?
Any indication to this issue?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: GELI+ZFS for whole system inc. root with boot from USB stick donnex Howtos & FAQs (Moderated) 21 October 14th, 2011 21:58
Encrypting a File System: No pass w/usb key ieska328 General 1 July 2nd, 2009 17:06
Install USB mouse, after install system centurion Installing & Upgrading 21 March 21st, 2009 02:32
gnome-system-monitor's bug. fender0107401 GNOME 1 March 9th, 2009 04:25
Cant use my web cam alie Peripheral Hardware 1 February 10th, 2009 16:19


All times are GMT +1. The time now is 12:08.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0