OESF Portables Forum

Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => C1000/3x00 General discussions => Topic started by: xamindar on June 22, 2006, 09:19:31 pm

Title: Usb Storage Dies As A Result Of Swap
Post by: xamindar 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?
Title: Usb Storage Dies As A Result Of Swap
Post by: Jon_J 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
Title: Usb Storage Dies As A Result Of Swap
Post by: xamindar 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.
Title: Usb Storage Dies As A Result Of Swap
Post by: Jon_J on June 22, 2006, 11:06:08 pm
Edited my last post also..
Title: Usb Storage Dies As A Result Of Swap
Post by: bam on June 22, 2006, 11:06:27 pm
128mb swap partition here, no problems...
Title: Usb Storage Dies As A Result Of Swap
Post by: Meanie 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.
Title: Usb Storage Dies As A Result Of Swap
Post by: xamindar 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?
Title: Usb Storage Dies As A Result Of Swap
Post by: Jon_J 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.
Title: Usb Storage Dies As A Result Of Swap
Post by: xamindar 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?
Title: Usb Storage Dies As A Result Of Swap
Post by: xamindar 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.
Title: Usb Storage Dies As A Result Of Swap
Post by: xamindar 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?