Author Topic: Usb Storage Dies As A Result Of Swap  (Read 4238 times)

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Usb Storage Dies As A Result Of Swap
« on: June 22, 2006, 09:19:31 pm »
I have discovered that when I enable a swap file on my Zaurus, 99% of the time that will cause the usb storage functionality to get hosed.  I have posted before about the USB storage getting all messed up and not working until the Zaurus is rebooted and others have confirmed that they have the problem as well.  I have tested it.  I have gone days without enabling any swap at all.  The USB storage works like a charm the whole time.  Then, I enable a swap, use xqt a little, then disable it when I'm done.  Sure enough, next time I connect my Zaurus to my PC it doesn't work.

Strange isn't it.  I wonder what it could be?  Do any of you others have this issue as I describe it?
« Last Edit: June 30, 2006, 09:41:51 pm by xamindar »
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Usb Storage Dies As A Result Of Swap
« Reply #1 on: June 22, 2006, 10:39:46 pm »
I have a 128mb swapfile enabled all the time, using the memory applet in Cacko lite.
I also use USB storage to transfer files from my PC to my C3100, with no problems.
I have it set to Internal HDD
I have a USB cord on my desk at all times because I use it so much to place files from my PC to my C3100's /hdd3
I never disable my swapfile in Cacko.
If I need to reboot, the first thing I do after Qtopia loads, is enable my 128mb swapfile.
It's located here:
/hdd3/Documents/.swapfile
« Last Edit: June 22, 2006, 11:06:47 pm by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Usb Storage Dies As A Result Of Swap
« Reply #2 on: June 22, 2006, 11:01:06 pm »
Ack!  Sorry, I meant "swap file".  I'll fix that in my first post.  

Hmm, your information helps out.  Thanks.
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Usb Storage Dies As A Result Of Swap
« Reply #3 on: June 22, 2006, 11:06:08 pm »
Edited my last post also..
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Usb Storage Dies As A Result Of Swap
« Reply #4 on: June 22, 2006, 11:06:27 pm »
128mb swap partition here, no problems...
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Usb Storage Dies As A Result Of Swap
« Reply #5 on: June 22, 2006, 11:18:41 pm »
Quote
Ack!  Sorry, I meant "swap file".  I'll fix that in my first post. 

Hmm, your information helps out.  Thanks.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=132485\"][{POST_SNAPBACK}][/a][/div]

that's expected. when usb storage is enabled, /hdd3 is unmounted and then remounted. obviously, if a mounted swapfile sits on /hdd3, its gonna cause troubles.
fix the usbd script to swapoff before remounting hdd3 and then renable swap afterwards.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Usb Storage Dies As A Result Of Swap
« Reply #6 on: June 22, 2006, 11:28:36 pm »
Quote
Quote
Ack!  Sorry, I meant "swap file".  I'll fix that in my first post. 

Hmm, your information helps out.  Thanks.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=132485\"][{POST_SNAPBACK}][/a][/div]

that's expected. when usb storage is enabled, /hdd3 is unmounted and then remounted. obviously, if a mounted swapfile sits on /hdd3, its gonna cause troubles.
fix the usbd script to swapoff before remounting hdd3 and then renable swap afterwards.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=132492\"][{POST_SNAPBACK}][/a][/div]

I even tested it with a swapfile on SD.  It still did it.  Could my zaurus have a hardware problem?
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Usb Storage Dies As A Result Of Swap
« Reply #7 on: June 23, 2006, 12:24:49 am »
Meanie suggests that the swapfile is unmounted along with /hdd3
When /hdd3 is remounted, is the swapfile remounted also?
I ask this because I've always just left my swapfile enabled on /hdd3 and, haven't had any problems suggested by xamindar, or Meanie.
When I plug my C3100 into my windows PC, via USB it just connects.
I do have to wait about 10 seconds, (or until after the hard drive light on my Zaurus stops), to open my zaurus in the storage mode on my PC.
Note: after a fresh reboot, when I connect my Z to windows as above, a small dialog pops up on my Z and asks:
"Please make sure to exit all applications and save data before executing ZaurusDrive."
"Are you sure you want to contunue?"
[Yes] [No]
[] Do not display this message again

If I place an 'X' in the checkbox, this dialog doesn't pop up again unless I reboot.
When this dialog pops up, I get 3 sounds on my windows PC.
1. ding-dong (usb icon on my tray on my PC)
2. dong-ding (usb icon on my tray on my PC disappears)( this is when above dialog appears on my Z)
3. ding-dong (usb icon on my tray on my PC)

After I have placed an 'X' in the above dialog, my PC only makes one sound and connects.
I do have to wait about 10 seconds as mentioned above to access the drive.
« Last Edit: June 23, 2006, 12:27:31 am by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Usb Storage Dies As A Result Of Swap
« Reply #8 on: June 28, 2006, 04:55:07 pm »
UPDATE:  I have been running my zaurus with a swap file on the hard drive for the past 6 days straight *WITHOUT RUNNING PDAXQTROM AT ALL* to test other possible reasons.

You see, before I started this thread I would enable the swap file ONLY when I ran xqt.  Then I would disable it as soon as I closed xqt to minimize the possability of the USB drive getting messed up.  I assumed it was the swap's fault.

So now again, I am going to make an assumption and conclude that Xqt is at fault, not the swap file.  Meanie or anyone else, can you offer any ideas about this?  I am charging my Zaurus right now and will next attempt to run xqt for a while and then close it and see if my Zaurus is still able to connect as a USB drive or not.  Then I will know if this theary is correct.

If this is the case, how can we prevent of fix it?
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Usb Storage Dies As A Result Of Swap
« Reply #9 on: June 30, 2006, 09:48:48 pm »
Well, today I decided to try running pdaxqtrom a little and then closing it and plugging my zaurus into the usb port.

After using pdaxqtrom, my zaurus seemed to still work when plugged into my windows machine.  But I noticed something is now wrong as explorer will freeze when trying to access my zaurus half the time.  I was able to access it and copy files to/from it but there would be these random freezes that lasted a few minutes.  If I unplugged it then the freeze that windows was experiencing would imediately be gone.

I then tried plugging it into my Linux machine at home and nothing, it wont mount.  Dmesg gives the following error:
Code: [Select]
[31216.541677] usb 1-3.1: new full speed USB device using ehci_hcd and address 6
[31221.613090] scsi1 : SCSI emulation for USB Mass Storage devices
[31221.613176] usb-storage: device found at 6
[31221.613179] usb-storage: waiting for device to settle before scanning
[31226.599620]   Vendor: Sharp     Model: SL-C1000          Rev: 1.00
[31226.599643]   Type:   Direct-Access                      ANSI SCSI revision: 00
[31226.603008] SCSI device sda: 7959168 512-byte hdwr sectors (4075 MB)
[31226.604000] sda: Write Protect is off
[31226.604005] sda: Mode Sense: 43 00 00 00
[31226.604007] sda: assuming drive cache: write through
[31226.607602] SCSI device sda: 7959168 512-byte hdwr sectors (4075 MB)
[31226.609009] sda: Write Protect is off
[31226.609014] sda: Mode Sense: 43 00 00 00
[31226.609017] sda: assuming drive cache: write through
[31226.609022]  sda:
[31226.614666] sd 1:0:0:0: Attached scsi removable disk sda
[31226.616056] usb-storage: device scan complete
[31257.346390] usb 1-3.1: reset full speed USB device using ehci_hcd and address 6
[31287.399763] usb 1-3.1: reset full speed USB device using ehci_hcd and address 6
[31317.454005] usb 1-3.1: reset full speed USB device using ehci_hcd and address 6
[31347.507629] usb 1-3.1: reset full speed USB device using ehci_hcd and address 6
[31377.561501] usb 1-3.1: reset full speed USB device using ehci_hcd and address 6
[31377.652328] sd 1:0:0:0: SCSI error: return code = 0x50000
[31377.652335] end_request: I/O error, dev sda, sector 64
[31377.652341] Buffer I/O error on device sda, logical block 8

Also of note, my Zaurus reports its self as a c1000.  Something it just recently started doing, strange.  But my usb problem precedes this problem so I doubt they are related.

So it is indeed the running of pdaxqtrom that is somehow screwing up the usb drive functionality until I reboot.  Is there anything else I can provide to help diagnose this problem?  I really like being able to use pdaxqtrom but this is a showstopper for me.
« Last Edit: June 30, 2006, 09:53:49 pm by xamindar »
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)

xamindar

  • Hero Member
  • *****
  • Posts: 803
    • View Profile
    • http://www.radnimax.com
Usb Storage Dies As A Result Of Swap
« Reply #10 on: July 11, 2006, 05:37:17 pm »
So is no one else having this problem?  Dang, why do I have these problems when I install things like they are supposed to be and I don't do any odd things to my zaurus?  
SL-C3100 happily Dualbooting Japanese Rom 1.02 and Debian Eabi
Replaced internal CF with 8gb seagate cf hard drive
Ambicom CF GPS
CyberPower battery powered USB hub
D-link DCF-650W (MAN THIS THING IS HUGE!!)