212,213b USB flash names not retained in Pmount, Univ Inst

Please post any bugs you have found
Message
Author
PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#81 Post by PaulBx1 »

Jesse, I still have your reworked probedisk/probepart installed in my Puppy 211. My system is an old Thinkpad with one USB 1.1 port (uhci-hcd). That port has a 4-port hub plugged into it. I rebooted like that without having any flash drive plugged in. Then I did the following (slowly):

1) started pmount
2) plugged in I-stick, refreshed pmount
(CD goes crazy for a minute, then pmount shows sda correctly)
3) plugged in sandisk, refreshed pmount
(CD goes crazy for a minute, then pmount shows sda and sdb correctly)
4) plugged in lexar firefly, refreshed pmount
(CD goes crazy for a minute, then pmount shows sdb and sdc, but no sda/I-stick
probedisk shows them all)
5) refreshed pmount again
(result the same)

Here is what the console window that I called pmount from looked like:

Code: Select all

sh-3.00# pmount
cat: /proc/pci: No such file or directory
EXIT="REFRESH"
EXIT="REFRESH"
EXIT="REFRESH"
EXIT="REFRESH"
EXIT=abort
/usr/sbin/pmount: line 610:  2359 Terminated              xmessage -bg "orange" -buttons "" -title "Puppy drive mounter" "Please wait, probing hardware..."
/usr/sbin/pmount: line 610:  2916 Terminated              xmessage -bg "orange" -buttons "" -title "Puppy drive mounter" "Please wait, probing hardware..."
/usr/sbin/pmount: line 610:  3748 Terminated              xmessage -bg "orange" -buttons "" -title "Puppy drive mounter" "Please wait, probing hardware..."
/usr/sbin/pmount: line 610:  4736 Terminated              xmessage -bg "orange" -buttons "" -title "Puppy drive mounter" "Please wait, probing hardware..."
/usr/sbin/pmount: line 610:  6268 Terminated              xmessage -bg "orange" -buttons "" -title "Puppy drive mounter" "Please wait, probing hardware..."
Here is dmesg of the above operations:

Code: Select all

usb 1-1.1: new full speed USB device using uhci_hcd and address 3
usb 1-1.1: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
  Vendor: I-Stick2  Model: IntelligentStick  Rev: 0.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
sda: Write Protect is off
sda: Mode Sense: 00 00 00 00
sda: assuming drive cache: write through
SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
sda: Write Protect is off
sda: Mode Sense: 00 00 00 00
sda: assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: Attached scsi removable disk sda
usb-storage: device scan complete
ndiswrapper (iw_set_freq:382): setting configuration failed (C0010015)
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 0
Buffer I/O error on device hdc, logical block 0
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 8
Buffer I/O error on device hdc, logical block 1
usb 1-1.3: new full speed USB device using uhci_hcd and address 4
usb 1-1.3: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
  Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
  Type:   Direct-Access                      ANSI SCSI revision: 02
SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
sdb: Write Protect is off
sdb: Mode Sense: 03 00 00 00
sdb: assuming drive cache: write through
SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
sdb: Write Protect is off
sdb: Mode Sense: 03 00 00 00
sdb: assuming drive cache: write through
 sdb: sdb1
sd 1:0:0:0: Attached scsi removable disk sdb
usb-storage: device scan complete
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 0
Buffer I/O error on device hdc, logical block 0
usb 1-1.4: new full speed USB device using uhci_hcd and address 5
usb 1-1.4: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
  Vendor: LEXAR     Model: JD FIREFLY        Rev: 3000
  Type:   Direct-Access                      ANSI SCSI revision: 00
SCSI device sdc: 2030592 512-byte hdwr sectors (1040 MB)
sdc: Write Protect is off
sdc: Mode Sense: 43 00 00 00
sdc: assuming drive cache: write through
SCSI device sdc: 2030592 512-byte hdwr sectors (1040 MB)
sdc: Write Protect is off
sdc: Mode Sense: 43 00 00 00
sdc: assuming drive cache: write through
 sdc: sdc1
sd 2:0:0:0: Attached scsi removable disk sdc
usb-storage: device scan complete
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 0
Buffer I/O error on device hdc, logical block 0
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 8
Buffer I/O error on device hdc, logical block 1
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 16
Buffer I/O error on device hdc, logical block 2
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 24
Buffer I/O error on device hdc, logical block 3
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 32
Buffer I/O error on device hdc, logical block 4
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 40
Buffer I/O error on device hdc, logical block 5
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 48
Buffer I/O error on device hdc, logical block 6
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 56
Buffer I/O error on device hdc, logical block 7
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 0
Buffer I/O error on device hdc, logical block 0
Here is what probedisk looks like at the end:

Code: Select all

sh-3.00# probedisk
/dev/hdc|cdrom|MATSHITADVD-ROM SR-8175
/dev/hda|disk|IC25N020ATDA04-0
/dev/sda|Direct-Access|I-Stick2 IntelligentStick 
/dev/sdb|Direct-Access|SanDisk Cruzer Micro 
/dev/sdc|Direct-Access|LEXAR JD FIREFLY 
I figure it makes sense to take care of these problems before going further. MUT shows all 3, by the way.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#82 Post by sunburnt »

Best of luck... when you throw in USB drives with multiple partitions,
& then add USB card drives with multi. cards plugged in with multi. partitions,
it quickly becomes apparent that a new USB device info scan utility is needed
as it appears that current utilities for USB devices fall short of the mark.

I'll watch with interest, as Linux badly needs an auto. mounter for USB devices.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#83 Post by plinej »

I don't know if Jesse plans on doing a rewrite of probedisk and probepart (please do if you don't mind) using disks.tcl but in the meantime I hacked away at a couple of replacement scripts using disks.tcl output, /var/log/messages, /proc/scsi/scsi, & /proc/partitions. All I have are a few usb drives, an internal cdrom, an external cdrom, and an ide hard drive to test with though. I'm not sure what the required changes need to be made to view other drives successfully (if it doesn't automatically). Here's my replacement scripts:

probedisk:

Code: Select all

#!/bin/sh

PROBEDISK=`/usr/lib/mut/disks.tcl | sed 's/|||/|/g' | sed 's/||/|/g' | sed 's/initrd//g' | sed 's/\/dev\/sr/\/dev\/scd/g'` > /dev/null
PROBEDISK2=`echo "$PROBEDISK" | grep -v '|part|' | sed 's/|usb_storage//g' | sed 's/disk|usbdisk/Direct-Access/g' | sed 's/|idecdrom//g' | sed 's/|nonidecdrom//g' | sed 's/|ide-*disk//g'` > /dev/null
echo "$PROBEDISK2" | while read SEARCH
do
DEV=`echo "$SEARCH" | cut -f 1 -d '|' | sed 's/\/dev\///g'`
if [ "`echo "$SEARCH" | grep unknown`" != "" ]; then
SCSINUM=`cat /var/log/messages | grep "$DEV" | grep Attached | tail -n 1 | cut -f 4 -d ':' | grep -o [0-9]` > /dev/null
NEW=`cat /proc/scsi/scsi | grep scsi"$SCSINUM" -A 1 | tail -n 1 | sed 's/Vendor://g' | sed 's/Model://g' | sed 's/Rev://g' | tr -s ' ' | sed 's/^ //g'` > /dev/null
echo "$SEARCH" | sed "s/unknown/$NEW/g"
else
OLD=`echo "$SEARCH" | cut -f 3 -d '|'`
if [ "`cat /proc/scsi/scsi | grep "$OLD"`" != "" ]; then
NEW=`cat /proc/scsi/scsi | grep "$OLD" | sed 's/Vendor://g' | sed 's/Model://g' | sed 's/Rev://g' | tr -s ' ' | sed 's/^ //g'` > /dev/null
fi
if [ "`cat /proc/scsi/scsi | grep "$OLD"`" = "" ]; then
NEW="$OLD"
fi
echo "$SEARCH" | sed "s/$OLD/$NEW/g"
fi
done
exit 0
probepart:

Code: Select all

#!/bin/sh

PROBEPART=`/usr/lib/mut/disks.tcl | sed 's/|||/|/g' | sed 's/||/|/g' | sed 's/initrd//g' | sed 's/\/dev\/sr/\/dev\/scd/g'` > /dev/null
PROBEPART1=`echo "$PROBEPART" | grep -v '|disk|' | sed 's/|part//g' | sed 's/|cdrom|/|iso9660|/g' | sed 's/|nonidecdrom|/|0|/g' | sed 's/|idecdrom|/|0|/g'` > /dev/null
echo "$PROBEPART1" | cut -f 1 -d '|' | sed 's/\/dev\///g' | while read DRIVES
do
SIZE=`cat /proc/partitions | grep "$DRIVES" | tr -s ' ' | cut -f 4 -d ' '`
if [ "$SIZE" != "" ]; then
SIZE2=`echo "(( "$SIZE" * 2 ))" | bc -l`
SIZE3=`echo "(( "$SIZE2" / 2048.12749 ))" | bc -l | cut -f 1 -d '.'`
else
SIZE2=""
SIZE3=""
fi
PART1=`echo "$PROBEPART1" | grep "$DRIVES"`
if [ "$1" = -m ]; then
echo "$PART1""$SIZE3"
else
echo "$PART1""$SIZE2"
fi
done
exit 0

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#84 Post by PaulBx1 »

Heh, for a second I got Jesse mixed up with Jason, since Jesse piped in. I meant to refer to you, Jason, in that last post. Hey, your names start with the same letter... :lol:

Your rework of disks.tcl had two good effects. It stopped the abuse of my CD drive (no error messages now). And it seems faster although I haven't timed it rigorously.

The bad news is that after adding sdc, sda still drops out of the picture in pmount. That is a pmount-specific problem it seems.

BTW, that's some pretty fast scripting, J-person! :D

Here is the difference between the various programs. probedisk2 is the original, probedisk 3 is your first hack, probedisk is your latest, probepart3 is the original I think, and probepart your latest:

Code: Select all

sh-3.00# probedisk2
/dev/hdc|cdrom|MATSHITADVD-ROM SR-8175
/dev/hda|disk|IC25N020ATDA04-0
/dev/sda|Direct-Access|I-Stick2 IntelligentStick 
/dev/sdb|Direct-Access|SanDisk  Cruzer Micro     
/dev/sdc|Direct-Access|LEXAR    JD FIREFLY       

sh-3.00# probedisk3
/dev/hdc|cdrom|MATSHITADVD-ROM SR-8175
/dev/hda|disk|IC25N020ATDA04-0
/dev/sda|Direct-Access|I-Stick2 IntelligentStick 
/dev/sdb|Direct-Access|SanDisk Cruzer Micro 
/dev/sdc|Direct-Access|LEXAR JD FIREFLY 

sh-3.00# probedisk
/dev/fd0|floppy|floppy|fd
/dev/hda|disk|IC25N020ATDA04-0
/dev/hdc|cdrom|MATSHITADVD-ROM SR-8175|Data|CDROM|ide-cdrom
/dev/sda|Direct-Access|I-Stick2 IntelligentStick 0.00
/dev/sdb|Direct-Access|SanDisk Cruzer Micro 0.2 
/dev/sdc|Direct-Access|LEXAR JD FIREFLY 3000
sh-3.00# 

sh-3.00# probepart3
/dev/hdc|iso9660|0|MATSHITADVD-ROM SR-8175
/dev/hda1|vfat|36968337|Win95 FAT32 (LBA)
/dev/hda2|swap|2086560|Linux Swap
/dev/sda1|msdos|1991997|DOS 16-bit FAT >=32M
/dev/sdb1|msdos|501149|DOS 16-bit FAT >=32M
/dev/sdc1|msdos|2030560|DOS 16-bit FAT <32M

sh-3.00# probepart
/dev/fd0|floppy|floppy|fd
/dev/hda1|vfat|36968336
/dev/hda2|swap|2086560
/dev/hdc|iso9660|0|MATSHITADVD-ROM SR-8175|Data|CDROM|ide-cdrom
/dev/sda1|vfat|1991996
/dev/sdb1|vfat|NO NAME|501148
/dev/sdc1|vfat|NO NAME|2030560
You can see there are some differences. Your latest (that is, using disks.tcl) also spins up the CD drive while the others didn't.

Say Jesse (other J-person), are you the Jesse who wrote MUT? I wonder if disks.tcl could be tinkered with to get the info from the CDROM without spinning it up?

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#85 Post by plinej »

I totally re-wrote the scripts without using disks.tcl. I did use that /usr/lib/mut/bin/guess_fstype which is great. I also used /var/log/messages and several things in /proc. Once again I don't have a floppy or zip drive so I can't test everything but if anyone has problems with a drive not being recognized or recognized incorrectly let me know so I can work on the scripts. As far as problems with pmount I'd have to see your version since you may not have the latest version. I know dougal did some work to it and then I did again and he mentioned totally re-writing it so it's hard to keep track of the latest version. Also my cd drives don't seem to spin up with these scripts either so it seems pretty fast.
Attachments
probedisk-probepart.tar.gz
(1.1 KiB) Downloaded 330 times

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#86 Post by PaulBx1 »

The header of my pmount says:

# v1.0.7 Nov 2005: bugfix by GuestToo.
# Jan 2006 updated for Puppy2.

It is 20631 bytes. All dates on the file say 4 Oct 2006.

I don't know if that is the latest. If not, where can I find it?

I will try your new probestuff.

<later>
probedisk looks good but probepart seems to be missing the last field (see the below comparison). Also, why does it say my flashdrives are vfat? I think they must be fat16, which is "msdos", like the old probepart says, right?

Code: Select all

sh-3.00# probepart
/dev/hda1|vfat|36968336
/dev/hda2|swap|2086560
/dev/sda1|vfat|1991996
/dev/sdb1|vfat|501148
/dev/sdc1|vfat|2030560
/dev/hdc|iso9660|0
sh-3.00# 
sh-3.00# probepart3
/dev/hdc|iso9660|0|MATSHITADVD-ROM SR-8175
/dev/hda1|vfat|36968337|Win95 FAT32 (LBA)
/dev/hda2|swap|2086560|Linux Swap
/dev/sda1|msdos|1991997|DOS 16-bit FAT >=32M
/dev/sdb1|msdos|501149|DOS 16-bit FAT >=32M
/dev/sdc1|msdos|2030560|DOS 16-bit FAT <32M

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#87 Post by plinej »

The pmount I've got is 24665 bytes. I'll post it below. I didn't add the last field to probepart since I don't think it's used for anything in puppy that I know of. Didn't figure adding the extra code would be necessary. As far as the vfat thing goes it should be the same thing as mut reports since it uses /usr/lib/mut/bin/guess_fstype to retrieve it.
Attachments
pmount.tar.gz
(5.65 KiB) Downloaded 324 times

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#88 Post by PaulBx1 »

OK, I put this new pmount in. First thing I noticed is that it saw all 3 flash drives.

Then I started pulling flash drives and replugging them in, only one out at any one time. When I did refresh in pmount sometimes I was too fast and had to re-do it to find the device (I know there is a delay in there). But everything worked fine, through several cycles.

Then I tried running MUT in parallel and almost immediately, two flash drives swapped names!

I started out as before, with the I-stick2 being sda, the SanDisk being sdb, and the Lexar being sdc. sda and sdb had their names swapped.

Here is /var/log/messages. You will notice at the point they were swapped, it noted two devices were pulled although only one really was pulled. I added two blank lines at that point so you could find it. BTW the second (and I believe, bogus) disconnect has the same time stamp as the following entry.

Code: Select all

Feb 20 17:37:58 (none) user.notice kernel:   Vendor: I-Stick2  Model: IntelligentStick  Rev: 0.00
Feb 20 17:37:58 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 20 17:37:58 (none) user.notice kernel:   Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
Feb 20 17:37:58 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 20 17:37:58 (none) user.notice kernel:   Vendor: LEXAR     Model: JD FIREFLY        Rev: 3000
Feb 20 17:37:58 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 00
Feb 20 17:37:58 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 20 17:37:58 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 20 17:37:58 (none) user.notice kernel: sda: Write Protect is off
Feb 20 17:37:58 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 20 17:37:58 (none) user.err kernel: sda: assuming drive cache: write through
Feb 20 17:37:58 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 17:37:58 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 20 17:37:58 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 17:37:58 (none) user.notice kernel: SCSI device sdc: 2030592 512-byte hdwr sectors (1040 MB)
Feb 20 17:37:58 (none) user.notice kernel: sdc: Write Protect is off
Feb 20 17:37:58 (none) user.debug kernel: sdc: Mode Sense: 43 00 00 00
Feb 20 17:37:58 (none) user.err kernel: sdc: assuming drive cache: write through
Feb 20 17:37:58 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 20 17:37:58 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 20 17:37:58 (none) user.notice kernel: sda: Write Protect is off
Feb 20 17:37:58 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 20 17:37:58 (none) user.err kernel: sda: assuming drive cache: write through
Feb 20 17:37:58 (none) user.notice kernel: SCSI device sdc: 2030592 512-byte hdwr sectors (1040 MB)
Feb 20 17:37:58 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 17:37:58 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 20 17:37:58 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 17:37:58 (none) user.notice kernel: sdc: Write Protect is off
Feb 20 17:37:58 (none) user.debug kernel: sdc: Mode Sense: 43 00 00 00
Feb 20 17:37:58 (none) user.err kernel: sdc: assuming drive cache: write through
Feb 20 17:37:58 (none) user.info kernel:  sdb1
Feb 20 17:37:58 (none) user.notice kernel: sd 1:0:0:0: Attached scsi removable disk sdb
Feb 20 17:37:58 (none) user.debug kernel: usb-storage: device scan complete
Feb 20 17:37:59 (none) user.warn kernel:  sdc1
Feb 20 17:37:59 (none) user.notice kernel: sd 2:0:0:0: Attached scsi removable disk sdc
Feb 20 17:37:59 (none) user.debug kernel: usb-storage: device scan complete
Feb 20 17:37:59 (none) user.warn kernel:  sda1
Feb 20 17:37:59 (none) user.notice kernel: sd 0:0:0:0: Attached scsi removable disk sda
Feb 20 17:37:59 (none) user.debug kernel: usb-storage: device scan complete
Feb 20 18:10:22 (none) user.info kernel: usb 1-1.1: USB disconnect, address 3
Feb 20 18:10:43 (none) user.info kernel: usb 1-1.1: new full speed USB device using uhci_hcd and address 6
Feb 20 18:10:44 (none) user.info kernel: usb 1-1.1: configuration #1 chosen from 1 choice
Feb 20 18:10:44 (none) user.info kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Feb 20 18:10:44 (none) user.debug kernel: usb-storage: device found at 6
Feb 20 18:10:44 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 20 18:10:44 (none) user.info kernel: usb 1-1.3: USB disconnect, address 4
Feb 20 18:10:44 (none) user.info kernel: usb 1-1.3: new full speed USB device using uhci_hcd and address 7
Feb 20 18:10:44 (none) user.info kernel: usb 1-1.3: configuration #1 chosen from 1 choice
Feb 20 18:10:44 (none) user.info kernel: scsi4 : SCSI emulation for USB Mass Storage devices
Feb 20 18:10:44 (none) user.debug kernel: usb-storage: device found at 7
Feb 20 18:10:44 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 20 18:10:49 (none) user.notice kernel:   Vendor: I-Stick2  Model: IntelligentStick  Rev: 0.00
Feb 20 18:10:49 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 20 18:10:49 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 20 18:10:49 (none) user.notice kernel: sda: Write Protect is off
Feb 20 18:10:49 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 20 18:10:49 (none) user.err kernel: sda: assuming drive cache: write through
Feb 20 18:10:49 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 20 18:10:49 (none) user.notice kernel: sda: Write Protect is off
Feb 20 18:10:49 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 20 18:10:49 (none) user.err kernel: sda: assuming drive cache: write through
Feb 20 18:10:49 (none) user.info kernel:  sda1
Feb 20 18:10:49 (none) user.notice kernel: sd 3:0:0:0: Attached scsi removable disk sda
Feb 20 18:10:49 (none) user.debug kernel: usb-storage: device scan complete
Feb 20 18:10:49 (none) user.notice kernel:   Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
Feb 20 18:10:49 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 20 18:10:49 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 20 18:10:49 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 18:10:49 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 20 18:10:49 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 18:10:49 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 20 18:10:49 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 18:10:49 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 20 18:10:49 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 18:10:49 (none) user.info kernel:  sdb1
Feb 20 18:10:49 (none) user.notice kernel: sd 4:0:0:0: Attached scsi removable disk sdb
Feb 20 18:10:49 (none) user.debug kernel: usb-storage: device scan complete
Feb 20 18:14:02 (none) user.info kernel: usb 1-1.1: USB disconnect, address 6
Feb 20 18:14:24 (none) user.info kernel: usb 1-1.1: new full speed USB device using uhci_hcd and address 8
Feb 20 18:14:24 (none) user.info kernel: usb 1-1.1: configuration #1 chosen from 1 choice
Feb 20 18:14:24 (none) user.info kernel: scsi5 : SCSI emulation for USB Mass Storage devices
Feb 20 18:14:24 (none) user.debug kernel: usb-storage: device found at 8
Feb 20 18:14:24 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 20 18:14:24 (none) user.info kernel: usb 1-1.3: USB disconnect, address 7
Feb 20 18:14:24 (none) user.info kernel: usb 1-1.3: new full speed USB device using uhci_hcd and address 9
Feb 20 18:14:24 (none) user.info kernel: usb 1-1.3: configuration #1 chosen from 1 choice
Feb 20 18:14:24 (none) user.info kernel: scsi6 : SCSI emulation for USB Mass Storage devices
Feb 20 18:14:24 (none) user.debug kernel: usb-storage: device found at 9
Feb 20 18:14:24 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 20 18:14:29 (none) user.notice kernel:   Vendor: I-Stick2  Model: IntelligentStick  Rev: 0.00
Feb 20 18:14:29 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 20 18:14:29 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 20 18:14:29 (none) user.notice kernel: sda: Write Protect is off
Feb 20 18:14:29 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 20 18:14:29 (none) user.err kernel: sda: assuming drive cache: write through
Feb 20 18:14:29 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 20 18:14:29 (none) user.notice kernel: sda: Write Protect is off
Feb 20 18:14:29 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 20 18:14:29 (none) user.err kernel: sda: assuming drive cache: write through
Feb 20 18:14:29 (none) user.info kernel:  sda1
Feb 20 18:14:29 (none) user.notice kernel: sd 5:0:0:0: Attached scsi removable disk sda
Feb 20 18:14:29 (none) user.debug kernel: usb-storage: device scan complete
Feb 20 18:14:29 (none) user.notice kernel:   Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
Feb 20 18:14:29 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 20 18:14:29 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 20 18:14:29 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 18:14:29 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 20 18:14:29 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 18:14:29 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 20 18:14:29 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 18:14:29 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 20 18:14:29 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 18:14:29 (none) user.info kernel:  sdb1
Feb 20 18:14:29 (none) user.notice kernel: sd 6:0:0:0: Attached scsi removable disk sdb
Feb 20 18:14:29 (none) user.debug kernel: usb-storage: device scan complete
Feb 20 18:14:57 (none) user.info kernel: usb 1-1.4: USB disconnect, address 5
Feb 20 18:15:16 (none) user.info kernel: usb 1-1.4: new full speed USB device using uhci_hcd and address 10
Feb 20 18:15:16 (none) user.info kernel: usb 1-1.4: configuration #1 chosen from 1 choice
Feb 20 18:15:16 (none) user.info kernel: scsi7 : SCSI emulation for USB Mass Storage devices
Feb 20 18:15:16 (none) user.debug kernel: usb-storage: device found at 10
Feb 20 18:15:16 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 20 18:15:21 (none) user.notice kernel:   Vendor: LEXAR     Model: JD FIREFLY        Rev: 3000
Feb 20 18:15:21 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 00
Feb 20 18:15:21 (none) user.notice kernel: SCSI device sdc: 2030592 512-byte hdwr sectors (1040 MB)
Feb 20 18:15:21 (none) user.notice kernel: sdc: Write Protect is off
Feb 20 18:15:21 (none) user.debug kernel: sdc: Mode Sense: 43 00 00 00
Feb 20 18:15:21 (none) user.err kernel: sdc: assuming drive cache: write through
Feb 20 18:15:21 (none) user.notice kernel: SCSI device sdc: 2030592 512-byte hdwr sectors (1040 MB)
Feb 20 18:15:21 (none) user.notice kernel: sdc: Write Protect is off
Feb 20 18:15:21 (none) user.debug kernel: sdc: Mode Sense: 43 00 00 00
Feb 20 18:15:21 (none) user.err kernel: sdc: assuming drive cache: write through
Feb 20 18:15:21 (none) user.info kernel:  sdc1
Feb 20 18:15:21 (none) user.notice kernel: sd 7:0:0:0: Attached scsi removable disk sdc
Feb 20 18:15:21 (none) user.debug kernel: usb-storage: device scan complete
Feb 20 18:15:47 (none) user.info kernel: usb 1-1.3: USB disconnect, address 9
Feb 20 18:16:05 (none) user.info kernel: usb 1-1.3: new full speed USB device using uhci_hcd and address 11
Feb 20 18:16:05 (none) user.info kernel: usb 1-1.3: configuration #1 chosen from 1 choice
Feb 20 18:16:05 (none) user.info kernel: scsi8 : SCSI emulation for USB Mass Storage devices
Feb 20 18:16:05 (none) user.debug kernel: usb-storage: device found at 11
Feb 20 18:16:05 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 20 18:16:10 (none) user.notice kernel:   Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
Feb 20 18:16:10 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 20 18:16:10 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 20 18:16:10 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 18:16:10 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 20 18:16:10 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 18:16:10 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 20 18:16:10 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 18:16:10 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 20 18:16:10 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 18:16:10 (none) user.info kernel:  sdb1
Feb 20 18:16:10 (none) user.notice kernel: sd 8:0:0:0: Attached scsi removable disk sdb
Feb 20 18:16:10 (none) user.debug kernel: usb-storage: device scan complete

Feb 20 18:16:25 (none) user.info kernel: usb 1-1.1: USB disconnect, address 8
Feb 20 18:17:15 (none) user.info kernel: usb 1-1.3: USB disconnect, address 11

Feb 20 18:17:15 (none) user.info kernel: usb 1-1.3: new full speed USB device using uhci_hcd and address 12
Feb 20 18:17:16 (none) user.info kernel: usb 1-1.3: configuration #1 chosen from 1 choice
Feb 20 18:17:16 (none) user.info kernel: scsi9 : SCSI emulation for USB Mass Storage devices
Feb 20 18:17:16 (none) user.debug kernel: usb-storage: device found at 12
Feb 20 18:17:16 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 20 18:17:16 (none) user.info kernel: usb 1-1.1: new full speed USB device using uhci_hcd and address 13
Feb 20 18:17:16 (none) user.info kernel: usb 1-1.1: configuration #1 chosen from 1 choice
Feb 20 18:17:16 (none) user.info kernel: scsi10 : SCSI emulation for USB Mass Storage devices
Feb 20 18:17:16 (none) user.debug kernel: usb-storage: device found at 13
Feb 20 18:17:16 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 20 18:17:21 (none) user.notice kernel:   Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
Feb 20 18:17:21 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 20 18:17:21 (none) user.notice kernel: SCSI device sda: 501759 512-byte hdwr sectors (257 MB)
Feb 20 18:17:21 (none) user.notice kernel: sda: Write Protect is off
Feb 20 18:17:21 (none) user.debug kernel: sda: Mode Sense: 03 00 00 00
Feb 20 18:17:21 (none) user.err kernel: sda: assuming drive cache: write through
Feb 20 18:17:21 (none) user.notice kernel: SCSI device sda: 501759 512-byte hdwr sectors (257 MB)
Feb 20 18:17:21 (none) user.notice kernel: sda: Write Protect is off
Feb 20 18:17:21 (none) user.debug kernel: sda: Mode Sense: 03 00 00 00
Feb 20 18:17:21 (none) user.err kernel: sda: assuming drive cache: write through
Feb 20 18:17:21 (none) user.info kernel:  sda1
Feb 20 18:17:21 (none) user.notice kernel: sd 9:0:0:0: Attached scsi removable disk sda
Feb 20 18:17:21 (none) user.debug kernel: usb-storage: device scan complete
Feb 20 18:17:21 (none) user.notice kernel:   Vendor: I-Stick2  Model: IntelligentStick  Rev: 0.00
Feb 20 18:17:21 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 20 18:17:21 (none) user.notice kernel: SCSI device sdb: 2007040 512-byte hdwr sectors (1028 MB)
Feb 20 18:17:21 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 18:17:21 (none) user.debug kernel: sdb: Mode Sense: 00 00 00 00
Feb 20 18:17:21 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 18:17:21 (none) user.notice kernel: SCSI device sdb: 2007040 512-byte hdwr sectors (1028 MB)
Feb 20 18:17:21 (none) user.notice kernel: sdb: Write Protect is off
Feb 20 18:17:21 (none) user.debug kernel: sdb: Mode Sense: 00 00 00 00
Feb 20 18:17:21 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 20 18:17:21 (none) user.info kernel:  sdb1
Feb 20 18:17:21 (none) user.notice kernel: sd 10:0:0:0: Attached scsi removable disk sdb
Feb 20 18:17:21 (none) user.debug kernel: usb-storage: device scan complete
So either it was a big coincidence that it failed just when MUT was started, or MUT tripped over pmount.

Say, in the old unix system I used to work on we could send text messages to the log, to delineate events. Is that possible with puppy?

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#89 Post by PaulBx1 »

Woops, scratch that idea.

I just got a simpler one. I booted with all 3 flash drives in their usual spot. Started pmount only, saw them all. Pulled sda, refreshed, it was gone. Plugged it back in, refreshed, and the I-stick (what was called sda) was never seen nor heard from again; pmount now calls the SanDisk sda (was previously sdb). The Lexar Firefly remains sdc as before.

Here is the log:

Code: Select all

Feb 21 12:28:05 (none) user.info kernel: USB Mass Storage support registered.
Feb 21 12:28:10 (none) user.notice kernel:   Vendor: I-Stick2  Model: IntelligentStick  Rev: 0.00
Feb 21 12:28:10 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 21 12:28:10 (none) user.notice kernel:   Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
Feb 21 12:28:10 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 21 12:28:10 (none) user.notice kernel:   Vendor: LEXAR     Model: JD FIREFLY        Rev: 3000
Feb 21 12:28:10 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 00
Feb 21 12:28:10 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 21 12:28:10 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 21 12:28:10 (none) user.notice kernel: sda: Write Protect is off
Feb 21 12:28:10 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 21 12:28:10 (none) user.err kernel: sda: assuming drive cache: write through
Feb 21 12:28:10 (none) user.notice kernel: sdb: Write Protect is off
Feb 21 12:28:10 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 21 12:28:10 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 21 12:28:10 (none) user.notice kernel: SCSI device sdc: 2030592 512-byte hdwr sectors (1040 MB)
Feb 21 12:28:10 (none) user.notice kernel: sdc: Write Protect is off
Feb 21 12:28:10 (none) user.debug kernel: sdc: Mode Sense: 43 00 00 00
Feb 21 12:28:10 (none) user.err kernel: sdc: assuming drive cache: write through
Feb 21 12:28:10 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 21 12:28:10 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 21 12:28:10 (none) user.notice kernel: sda: Write Protect is off
Feb 21 12:28:10 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 21 12:28:10 (none) user.err kernel: sda: assuming drive cache: write through
Feb 21 12:28:10 (none) user.notice kernel: SCSI device sdc: 2030592 512-byte hdwr sectors (1040 MB)
Feb 21 12:28:10 (none) user.notice kernel: sdb: Write Protect is off
Feb 21 12:28:10 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 21 12:28:10 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 21 12:28:10 (none) user.notice kernel: sdc: Write Protect is off
Feb 21 12:28:10 (none) user.debug kernel: sdc: Mode Sense: 43 00 00 00
Feb 21 12:28:10 (none) user.err kernel: sdc: assuming drive cache: write through
Feb 21 12:28:10 (none) user.info kernel:  sdb1
Feb 21 12:28:10 (none) user.notice kernel: sd 1:0:0:0: Attached scsi removable disk sdb
Feb 21 12:28:10 (none) user.debug kernel: usb-storage: device scan complete
Feb 21 12:28:10 (none) user.warn kernel:  sdc1
Feb 21 12:28:10 (none) user.notice kernel: sd 2:0:0:0: Attached scsi removable disk sdc
Feb 21 12:28:10 (none) user.debug kernel: usb-storage: device scan completeFeb 21 12:28:11 (none) user.warn kernel:  sda1
Feb 21 12:28:11 (none) user.notice kernel: sd 0:0:0:0: Attached scsi removable disk sda
Feb 21 12:28:11 (none) user.debug kernel: usb-storage: device scan complete
Feb 21 12:29:37 (none) user.warn kernel: ndiswrapper (iw_set_freq:382): setting configuration failed (C0010015)
Feb 21 12:33:48 (none) user.info kernel: usb 1-1.1: USB disconnect, address 3
Feb 21 12:34:03 (none) user.info kernel: usb 1-1.3: USB disconnect, address 4
Feb 21 12:34:03 (none) user.info kernel: usb 1-1.3: new full speed USB device using uhci_hcd and address 6
Feb 21 12:34:03 (none) user.info kernel: usb 1-1.3: configuration #1 chosen from 1 choice
Feb 21 12:34:03 (none) user.info kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Feb 21 12:34:03 (none) user.debug kernel: usb-storage: device found at 6
Feb 21 12:34:03 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 21 12:34:08 (none) user.notice kernel:   Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
Feb 21 12:34:08 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 21 12:34:08 (none) user.notice kernel: SCSI device sda: 501759 512-byte hdwr sectors (257 MB)
Feb 21 12:34:08 (none) user.notice kernel: sda: Write Protect is off
Feb 21 12:34:08 (none) user.debug kernel: sda: Mode Sense: 03 00 00 00
Feb 21 12:34:08 (none) user.err kernel: sda: assuming drive cache: write through
Feb 21 12:34:08 (none) user.notice kernel: SCSI device sda: 501759 512-byte hdwr sectors (257 MB)
Feb 21 12:34:08 (none) user.notice kernel: sda: Write Protect is off
Feb 21 12:34:08 (none) user.debug kernel: sda: Mode Sense: 03 00 00 00
Feb 21 12:34:08 (none) user.err kernel: sda: assuming drive cache: write through
Feb 21 12:34:08 (none) user.info kernel:  sda1
Feb 21 12:34:08 (none) user.notice kernel: sd 3:0:0:0: Attached scsi removable disk sda
Feb 21 12:34:08 (none) user.debug kernel: usb-storage: device scan complete
An apparently common element remains the double disconnect starting at 12:33:48, when I only pulled one flashdrive. I wonder if sdb is also getting logically disconnected, if not physically?

BTW, what do those port numbers mean? E.g., "usb 1-1.3: USB disconnect, address 4"? Both the "3" and the "address 4" in that seem to have no relation to anything and change all the time. What are they, and are they supposed to work that way?

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#90 Post by GuestToo »

we could send text messages to the log, to delineate events. Is that possible with puppy?
echo "----- PUPPY MESSAGE -----" | logger
tail /var/log/messages

Jesse
Posts: 466
Joined: Sun 08 May 2005, 16:07
Location: Auckland, NZ

#91 Post by Jesse »

Hi PaulBx1,

I had a look-see in the kernel source, and couldn't spot a bug, but that code does look a little confusing to me, I can't say that its 100% bug free... however I did spot something that can possibly help you debug the situation further...

From my 'educated guessing' I discover that the USB bus location "usb 1-1.3" broken down means:
'usb 1' = "usb 1.0 or usb 1.1 standard speeds"
'usb x-1.y' = non-root Hub #1
'usb x-1.3' = non-root Hub #1, hub port 3.

Understandably your hub has only 4? ports. so you can only have addresses through it of x-1.1 x-1.2 x-1.3 x-1.4. These are I guess supposed to correlate to the physical ports.

Notice that the unexpected behavior problem only occurs when you re-insert the device.
According to the dmesg, your other disk goes missing at this point, why? because the inserted disk has the same bus location.
Notice that:

Feb 21 12:34:03 (none) user.info kernel: usb 1-1.3: USB disconnect, address 4
Feb 21 12:34:03 (none) user.info kernel: usb 1-1.3: new full speed USB device using uhci_hcd and address 6

"address 4" and "address 6" type addresses appear to be a unique number for usb devices to identify them.
Logically only one device can occupy a hubs port, so goodbye device known as "address 4".

So it looks like one or more of these things might be true:
1) Your hub can change index on each port.
2) Your hub may have a bug, or non-standard behavior.
3) Kernel drivers do not understand how your hub works.
4) Your SanDisk and hub are not 100% incompatible.

Diagnostic steps:
Debug your hub, use only one device in it at a time, plug in, wait 10 secs, check dmesg usb address for usb-port, unplug, wait 10, re-plug, recheck usbport address. Do this for each port on the hub.
If you get confusing results with a usb disk, try a different disk.
If you get an unexpected port change, keep the disk in the hub, but unplug the hub.
You may find that you need to unplug the hub before unpluging a device, to get it the hub to be consistent.
Have you got another hub to try?

Jesse

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#92 Post by PaulBx1 »

Thanks for going so far as to dig into kernel code, Jesse. This will be embarassing if it turns out to be nothing but a bad hub hardware design.

I tried the one-at-a-time test you suggested. The physical port number guess you made turned out to be correct; I have never seen any problem with the reporting of that. On the "address x" thing, though, it turns out a new address is generated any time another device is plugged in, even if it was the same one that just got pulled out. I was up to address 49 in my testing.

Anyway that test was boring; nothing very interesting happened. Here is one example of a plug and unplug, and the beginning of the next plug:

Code: Select all

Feb 23 12:01:07 (none) user.notice root: ------Using SanDisk in fourth port, multiple plugging/unplugging------
Feb 23 12:01:13 (none) user.info kernel: usb 1-1.4: new full speed USB device using uhci_hcd and address 25
Feb 23 12:01:13 (none) user.info kernel: usb 1-1.4: configuration #1 chosen from 1 choice
Feb 23 12:01:13 (none) user.info kernel: scsi22 : SCSI emulation for USB Mass Storage devices
Feb 23 12:01:13 (none) user.debug kernel: usb-storage: device found at 25
Feb 23 12:01:13 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 23 12:01:18 (none) user.notice kernel:   Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
Feb 23 12:01:18 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 23 12:01:18 (none) user.notice kernel: SCSI device sda: 501759 512-byte hdwr sectors (257 MB)
Feb 23 12:01:18 (none) user.notice kernel: sda: Write Protect is off
Feb 23 12:01:18 (none) user.debug kernel: sda: Mode Sense: 03 00 00 00
Feb 23 12:01:18 (none) user.err kernel: sda: assuming drive cache: write through
Feb 23 12:01:18 (none) user.notice kernel: SCSI device sda: 501759 512-byte hdwr sectors (257 MB)
Feb 23 12:01:18 (none) user.notice kernel: sda: Write Protect is off
Feb 23 12:01:18 (none) user.debug kernel: sda: Mode Sense: 03 00 00 00
Feb 23 12:01:18 (none) user.err kernel: sda: assuming drive cache: write through
Feb 23 12:01:18 (none) user.info kernel:  sda1
Feb 23 12:01:18 (none) user.notice kernel: sd 22:0:0:0: Attached scsi removable disk sda
Feb 23 12:01:18 (none) user.debug kernel: usb-storage: device scan complete
Feb 23 12:01:22 (none) user.info kernel: usb 1-1.4: USB disconnect, address 25
Feb 23 12:01:32 (none) user.info kernel: usb 1-1.4: new full speed USB device using uhci_hcd and address 26
I then plugged the Istick into port 1 and the Sandisk into port 3, as it failed Wednesday (leaving out the Lexar this time). This is what I get (there is no failure):

Code: Select all

Feb 23 12:23:25 (none) user.notice root: ------OK, plugging and unplugging sda again------
Feb 23 12:23:28 (none) user.info kernel: usb 1-1.1: USB disconnect, address 46
Feb 23 12:23:37 (none) user.info kernel: usb 1-1.1: new full speed USB device using uhci_hcd and address 48
Feb 23 12:23:37 (none) user.info kernel: usb 1-1.1: configuration #1 chosen from 1 choice
Feb 23 12:23:37 (none) user.info kernel: scsi45 : SCSI emulation for USB Mass Storage devices
Feb 23 12:23:37 (none) user.debug kernel: usb-storage: device found at 48
Feb 23 12:23:37 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 23 12:23:37 (none) user.info kernel: usb 1-1.3: USB disconnect, address 47
Feb 23 12:23:37 (none) user.info kernel: usb 1-1.3: new full speed USB device using uhci_hcd and address 49
Feb 23 12:23:37 (none) user.info kernel: usb 1-1.3: configuration #1 chosen from 1 choice
Feb 23 12:23:37 (none) user.info kernel: scsi46 : SCSI emulation for USB Mass Storage devices
Feb 23 12:23:37 (none) user.debug kernel: usb-storage: device found at 49
Feb 23 12:23:37 (none) user.debug kernel: usb-storage: waiting for device to settle before scanning
Feb 23 12:23:42 (none) user.notice kernel:   Vendor: I-Stick2  Model: IntelligentStick  Rev: 0.00
Feb 23 12:23:42 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 23 12:23:42 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 23 12:23:42 (none) user.notice kernel: sda: Write Protect is off
Feb 23 12:23:42 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 23 12:23:42 (none) user.err kernel: sda: assuming drive cache: write through
Feb 23 12:23:42 (none) user.notice kernel: SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
Feb 23 12:23:42 (none) user.notice kernel: sda: Write Protect is off
Feb 23 12:23:42 (none) user.debug kernel: sda: Mode Sense: 00 00 00 00
Feb 23 12:23:42 (none) user.err kernel: sda: assuming drive cache: write through
Feb 23 12:23:42 (none) user.info kernel:  sda1
Feb 23 12:23:42 (none) user.notice kernel: sd 45:0:0:0: Attached scsi removable disk sda
Feb 23 12:23:42 (none) user.debug kernel: usb-storage: device scan complete
Feb 23 12:23:42 (none) user.notice kernel:   Vendor: SanDisk   Model: Cruzer Micro      Rev: 0.2 
Feb 23 12:23:42 (none) user.notice kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Feb 23 12:23:42 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 23 12:23:42 (none) user.notice kernel: sdb: Write Protect is off
Feb 23 12:23:42 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 23 12:23:42 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 23 12:23:42 (none) user.notice kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Feb 23 12:23:42 (none) user.notice kernel: sdb: Write Protect is off
Feb 23 12:23:42 (none) user.debug kernel: sdb: Mode Sense: 03 00 00 00
Feb 23 12:23:42 (none) user.err kernel: sdb: assuming drive cache: write through
Feb 23 12:23:42 (none) user.info kernel:  sdb1
Feb 23 12:23:42 (none) user.notice kernel: sd 46:0:0:0: Attached scsi removable disk sdb
Feb 23 12:23:42 (none) user.debug kernel: usb-storage: device scan complete
Like Wednesday, you can see the act of plugging in the Istick caused the Sandisk to become unplugged, even though I hadn't touched the Sandisk. I'm guessing this is a bug in the hub design. Today the kernel still kept working with both the Istick and the Sandisk, however many times I tried it. On Wednesday's log, at Feb 21 12:33:48, you can see it simply stops working with the Istick, doesn't see it at all although I had plugged it in and like today it had triggered a disconnect on port 3.

Since this is kernel stuff there is nothing we can do to fix it. The bug appears to be something in the hub (a CyberPower model CP-H420MO battery-powered hub) or some interaction between it and the kernel. I have no other hub, but I do have a USB2.0 pcmcia card I am going to start using more since it now works with 2.14. On the hub, I will tape a message, "NO HOT-PLUGGING!" :x

While we can assume that this bug caused my two flash drives to be wiped (who knows the actual mechanism), I'm still left with a queasy feeling. Why? Because pakt had the same experience. I wonder if he's got the same hub? :roll:

It looks like Jason's latest probedisk/probepart is good, although more folks ought to test it, and with more applications. Seems to fix pmount anyway.

Thanks for that tip G2. Now I remember we used to "tail -f" the log(s) and watch things happen as they happened, along with dumping messages into the logs to record steps in our test procedures. Brings back the good old days...

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#93 Post by Dougal »

I am curious: does this problem only exist with probepart and probedisk, or also with test-scsi?
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#94 Post by PaulBx1 »

The original problem with probedisk/probepart was that they were not written with hot-pluggable USB devices in mind. It was a USB problem. I think Jason has fixed that now with his latest version, which probably ought to be propagated back into standard puppy if they've been tested for a while (as they are used in several programs).

I don't know what test-scsi is, does that have anything to do with USB? When I try invoking it, nothing happens.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#95 Post by BarryK »

I just tested Jason's probedisk and probepart -- excellent work!
On my laptop probepart printed an inappropriate error message and one line was scrambled. This is because it does not handle extended partitions correctly. I have hda4 extended partition with hda5, hda6 and hda7 logical partitions in it. I fixed that, and took the liberty of making a few changes in a few other places -- for example, it didn't handle the '-k' parameter. It's attached, try it and see if it works okay for you.

Jason, one small point, I don't know if you considered it or if it was mentioned earlier in this thread, but 'fdisk -l' gives much of the info needed about the partitions.
Attachments
probepart.gz
(1.02 KiB) Downloaded 422 times

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#96 Post by PaulBx1 »

Hmmm, comparing the probepart I am using (no longer sure if it is the original or plinej's) with this new one which is in /tmp:

Code: Select all

sh-3.00# probepart
/dev/hda1|vfat|39053952
/dev/hdc|iso9660|0
sh-3.00# /tmp/probepart
/tmp/probepart: line 1: /dev/hda1: Permission denied
/tmp/probepart: line 1: vfat: command not found
/tmp/probepart: line 1: 39053952: command not found
/tmp/probepart: line 2: /dev/hdc: Permission denied
/tmp/probepart: line 2: iso9660: command not found
/tmp/probepart: line 2: 0: command not found
However that probepartm file had this:

Code: Select all

/dev/hda1|vfat|19068
/dev/hdc|iso9660|0

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#97 Post by BarryK »

Huh? Don't put the 'probepart' script into /tmp, as the script creates a temporary file /tmp/probepart.
Note, my new script does not create /tmp/probepartm.

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#98 Post by PaulBx1 »

Well, I didn't put it there; the download did. I just ran it from where it ended up. :) I moved it to /root and it did this:

Code: Select all

sh-3.00# ./probepart
/dev/hda1|vfat|39053952
/dev/hdc|iso9660|0
Just like the "old" one in other words.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#99 Post by plinej »

Sorry, haven't checked this thread in quite a while. I think I did use fdisk -l in one of the versions of the scripts I wrote but can't remember. I haven't messed with this in a while but I'll give your updated version a try. I was thinking of using dougal's idea with test-scsi & test-eide but just haven't thought about it in a while.

plinej
Posts: 1742
Joined: Mon 14 Aug 2006, 02:21

#100 Post by plinej »

Well, I gave it a shot but somehow pmount is missing my hda1 ext3 partition even though it's reported back by (the new) probepart. I am using grafpup but I don't think that should matter since the original probepart works correctly with pmount. Here's what (the new) probepart says:

Code: Select all

sh-3.00# probepart
/dev/hda1|ext3|14683346
/dev/hda2|swap|1028160
/dev/hda3|ext3|71296470
/dev/hda4|ext3|69288344
/dev/sda1|vfat|16002
/dev/sda2|ext3|3903794
/dev/sda3|ext3|308656844
/dev/hdc|iso9660|0
The original porbepart:

Code: Select all

sh-3.00# probepart-old
/dev/hdc|iso9660|0|Optiarc DVD RW AD-5540A
/dev/hda1|ext3|14683347|Linux Ext3FS
/dev/hda2|swap|1028160|Linux Swap
/dev/hda3|ext3|71296470|Linux Ext3FS
/dev/hda4|ext3|69288345|Linux Ext3FS
/dev/sda1|msdos|16002|DOS 16-bit FAT >=32M
/dev/sda2|ext3|3903795|Linux Ext3FS
/dev/sda3|ext3|308656845|Linux Ext3FS
Maybe the information after the size of the drive is necessary to not cause pmount to mess up? Here's a picture of my pmount missing /dev/hda1:
Attachments
pmount-messed-up.jpg
(59.44 KiB) Downloaded 676 times

Post Reply