Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
loading usb mass storage devices
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jbwillia
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 108
Location: TN, USA

PostPosted: Thu Jun 03, 2004 10:20 pm    Post subject: loading usb mass storage devices Reply with quote

First off, I have searched all the previous usb postings as well as google without any success. That said, I can successfully load my digital camera and zip 250 as mass storage devices without a problem.

The problem is this: every time I plug one of these devices in, a new host (in /dev/scsi) is being created but not removed when the device is disconnected, so after about 10 connect/disconnect sequences I have quite a few unneccessary hosts in /dev/scsi. I am using the 2.6.6 kernel if that's any help. On my old debian box the zip drive would always be assigned to /dev/scsi/host1 and the camera to /dev/scsi/host2, and these hosts were removed when I disconnected.
Back to top
View user's profile Send private message
Frodg
l33t
l33t


Joined: 11 Feb 2004
Posts: 761

PostPosted: Fri Jun 04, 2004 12:41 am    Post subject: Reply with quote

Are you using devfs or udev ?

with udev you can assign a symbolic link that will always represent your storage device.

see the posts for udev for more information.
_________________
Aerosolo ergo sum - I spray therefore I am

Gentoo - Registered Linux User # 361400
Back to top
View user's profile Send private message
jbwillia
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 108
Location: TN, USA

PostPosted: Sun Jun 06, 2004 10:58 pm    Post subject: Reply with quote

Right now I have both udev and devfs; however, I just recompiled my 2.6.6 kernel without devfs support. I have also previously emerged udev, hotplug, and baselayout. This problem was present both before and after installing udev. Before I installed udev, I was running pure devfs. I had the exact same problem then as I do now ... every time I plugged in a usb mass storage device a new /dev/scsi/host# would be created and when I unplugged it (it was never mounted by the way!!) the host would still be there. I'm hoping this is just a race condition caused by devfs, so when I go pure udev, it should be gone (or so I hope :-).

On a side note, my system is a dual proc sparc64; i don't think this should be an issue, but it is a possibility (in which case I'll talk to the sparc guys).
Back to top
View user's profile Send private message
teutzz
Guru
Guru


Joined: 22 Apr 2004
Posts: 333
Location: .ro

PostPosted: Mon Jun 07, 2004 11:53 am    Post subject: Reply with quote

just going to pure udev won't resolve your problem, you'll also have to write a udev rule to make everything working properly
_________________
Cand nu stii ce sa raspunzi sau ce sa spui un simplu BLA ajunge... lolz
Back to top
View user's profile Send private message
jbwillia
Tux's lil' helper
Tux's lil' helper


Joined: 07 May 2004
Posts: 108
Location: TN, USA

PostPosted: Wed Jun 09, 2004 10:05 pm    Post subject: Reply with quote

ah, yes ... I will be writing a udev rule to assign it to a specific device node, but my problem is one layer below that ... by the way, I am pure udev now, and it's working much better than devfs thus far. The only thing I wonder about now is that it is still assigning scsi host numbers incrementally even when they they've been disconnected ... it's almost like it doesn't know the last device had been disconnected even though the host is no longer listed in /sys ... here's a few excerpts fromn my syslog:

Code:
Jun  9 16:25:44 odin scsi.agent[31675]: disk at /devices/pci0000:80/0000:80:01.0/usb2/2-1/2-1:1.0/host4/4:0:0:0


I then disconnected the device without ever mounting and /sys/devices/pci0000:80/0000:80:01.0/usb2/2-1/2-1:1.0/ was empty as it should be, but when I plugged the mass storage device back in a second time a few minutes later I get this:

Code:
Jun  9 16:47:28 odin scsi.agent[31877]: disk at /devices/pci0000:80/0000:80:01.0/usb2/2-1/2-1:1.0/host5/5:0:0:0


So, the question is: why did it it not reassigne to host4 the second time? It has to be something in the scsi drivers right?
Back to top
View user's profile Send private message
Frodg
l33t
l33t


Joined: 11 Feb 2004
Posts: 761

PostPosted: Wed Jun 09, 2004 10:10 pm    Post subject: Reply with quote

Interesting...

I don't know the answer to that other than you may be on the threshold of dicovering the finite number of hosts possible in the linux world... :)
_________________
Aerosolo ergo sum - I spray therefore I am

Gentoo - Registered Linux User # 361400
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum