View previous topic :: View next topic |
Author |
Message |
jbwillia Tux's lil' helper
Joined: 07 May 2004 Posts: 108 Location: TN, USA
|
Posted: Thu Jun 03, 2004 10:20 pm Post subject: loading usb mass storage devices |
|
|
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 |
|
|
Frodg l33t
Joined: 11 Feb 2004 Posts: 761
|
Posted: Fri Jun 04, 2004 12:41 am Post subject: |
|
|
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 |
|
|
jbwillia Tux's lil' helper
Joined: 07 May 2004 Posts: 108 Location: TN, USA
|
Posted: Sun Jun 06, 2004 10:58 pm Post subject: |
|
|
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 |
|
|
teutzz Guru
Joined: 22 Apr 2004 Posts: 333 Location: .ro
|
Posted: Mon Jun 07, 2004 11:53 am Post subject: |
|
|
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 |
|
|
jbwillia Tux's lil' helper
Joined: 07 May 2004 Posts: 108 Location: TN, USA
|
Posted: Wed Jun 09, 2004 10:05 pm Post subject: |
|
|
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 |
|
|
Frodg l33t
Joined: 11 Feb 2004 Posts: 761
|
Posted: Wed Jun 09, 2004 10:10 pm Post subject: |
|
|
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 |
|
|
|