Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  [SOLVED] (iPod Mini 2g) ATA error: -82 on latest 20240612 build, not on 3.15
« previous next »
  • Print
Pages: [1] 2

Author Topic: [SOLVED] (iPod Mini 2g) ATA error: -82 on latest 20240612 build, not on 3.15  (Read 3124 times)

Offline adriaanjelle

  • Member
  • *
  • Posts: 4
[SOLVED] (iPod Mini 2g) ATA error: -82 on latest 20240612 build, not on 3.15
« on: June 12, 2024, 04:58:14 PM »
So I tried installing Rockbox on my 2005 iPod Mini 2nd generation, but for some reason right after installing it, it gives me an ATA error. Yet when using the 3.15 release, this doesn't happen at all.

I have no idea what this means but on the iFlash SD to CF adapter, it works fine. The one that's giving me an error is a brand new SanDisk Extreme 128 GB CF card.

Images are included as an attachment.

I also apologize in advance if I've done something wrong with this post or anything else, I literally just made an account to report this bug.

* PXL_20240612_204750957.jpg (184 kB, 1536x2040 - viewed 219 times.)

* PXL_20240612_204748187.jpg (160.56 kB, 1536x2040 - viewed 204 times.)

* PXL_20240612_204757637.jpg (167.82 kB, 1536x2040 - viewed 203 times.)
« Last Edit: June 17, 2024, 01:16:02 PM by adriaanjelle »
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 651
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #1 on: June 12, 2024, 05:53:09 PM »
Quote from: adriaanjelle on June 12, 2024, 04:58:14 PM
So I tried installing Rockbox on my 2005 iPod Mini 2nd generation, but for some reason right after installing it, it gives me an ATA error. Yet when using the 3.15 release, this doesn't happen at all.

I have no idea what this means but on the iFlash SD to CF adapter, it works fine. The one that's giving me an error is a brand new SanDisk Extreme 128 GB CF card.

Does it work if you boot into the native Apple firmware?

This is the second "CF" card I've run that acts up; the previous one actually claimed it wasn't CF compatible!  I wonder if it's a counterfeit or there are some other shenanigans going on.

Meanwhile, I'm having a very hard time figuring where "-82" is coming from, but it's probably in the code that probes for information and sets up the runtime features we need.  the daily builds are a bit more elaborate than the older devices.

I may have to toss an instrumented debug build your way to figure out exactly what is failing.
Logged

Offline adriaanjelle

  • Member
  • *
  • Posts: 4
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #2 on: June 12, 2024, 06:12:40 PM »
Quote from: speachy on June 12, 2024, 05:53:09 PM
Does it work if you boot into the native Apple firmware?

This is the second "CF" card I've run that acts up; the previous one actually claimed it wasn't CF compatible!  I wonder if it's a counterfeit or there are some other shenanigans going on.

Meanwhile, I'm having a very hard time figuring where "-82" is coming from, but it's probably in the code that probes for information and sets up the runtime features we need.  the daily builds are a bit more elaborate than the older devices.

I may have to toss an instrumented debug build your way to figure out exactly what is failing.

The CF card works fine on the stock firmware and I got it from a reputable seller here in the Netherlands (so definitely not a fake). I'd be willing to test out some stuff if you need me to :)
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 651
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #3 on: June 13, 2024, 03:42:16 PM »
Quote from: adriaanjelle on June 12, 2024, 06:12:40 PM
The CF card works fine on the stock firmware and I got it from a reputable seller here in the Netherlands (so definitely not a fake). I'd be willing to test out some stuff if you need me to :)

Try this:

   https://www.shaftnet.org/~pizza/rockbox-mini2g-debugtest.zip

When it panics it should show the last few events and we can see how far it got.
Logged

Offline adriaanjelle

  • Member
  • *
  • Posts: 4
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #4 on: June 13, 2024, 03:53:58 PM »
Quote from: speachy on June 13, 2024, 03:42:16 PM
Try this:

   https://www.shaftnet.org/~pizza/rockbox-mini2g-debugtest.zip

When it panics it should show the last few events and we can see how far it got.

I put the iPod in disk mode to put the new build on it, rebooted it and this is the result.

* PXL_20240613_194930141.jpg (173.71 kB, 1536x2040 - viewed 197 times.)

* PXL_20240613_194932770.jpg (158.47 kB, 1536x2040 - viewed 206 times.)
Logged

Offline kaaaas

  • Member
  • *
  • Posts: 7
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #5 on: June 14, 2024, 09:46:23 AM »
I have exactly the same behaviour. Its fine in version 3.15 but a daily or dev build give ma an ATA error: -82.
If you want me to runs some tests, I'm more than happy to do so.
Its an ipod gen 2 with a 64Gb sandisk extreme CF card (SDCFXS-064G in disk info)
« Last Edit: June 14, 2024, 09:49:38 AM by kaaaas »
Logged

Offline kaaaas

  • Member
  • *
  • Posts: 7
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #6 on: June 14, 2024, 09:53:27 AM »
@adriaanjelle
Whats your battery life btw? The reasion I was looking into a newer version was to get the ata power management updates of speachy hoping I would get more than 12 hours out of a new 750Mah battery.
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 651
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #7 on: June 14, 2024, 11:06:45 AM »
I believe I've found (and fixed) the problem.

The root cause is that some CF cards lie about supporting a particular feature/command (Advanced Power Management) and throw an error when it's issued.

There is a special case in the ATA driver to catch and ignore this, but it was checking against the index of the driver's internal feature table.  When the table was altered as part of the iflash corruption fixes, the offset changed rendering the test incorrect.

...The fix is to check against the command ID instead of the table index.

This will be in tomorrow's (ie 20240615) daily build but if you can't wait that long you can grab the latest dev build (updated after every commit) from https://build.rockbox.org/ instead.

Logged

Offline kaaaas

  • Member
  • *
  • Posts: 7
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #8 on: June 14, 2024, 12:06:44 PM »
Wow that was really fast!
Does that mean this particular CF card does not support power management?
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 651
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #9 on: June 14, 2024, 12:21:32 PM »
Quote from: kaaaas on June 14, 2024, 12:06:44 PM
Does that mean this particular CF card does not support power management?

It claims to, but in fact does not.

The intent behind the APM commands is to tell the drive how to balancing performance versus power consumption. Rockbox telsl the device to enter the lowest power state that doesn't involve "Standby" modes, because we explicitly manage entering/exiting standby ourselves.

(APM is more meaningful for hard drives, which could save a lot of power by turning off the spindle motor.  But that would introduce significant latency while waiting for it to spin back up again, hurting performance. It's a lot less important for flash devices, which are able to enter/exit low power states far more rapidly.  But we want to maximixe battery life, so we do what we can..)
Logged

Offline kaaaas

  • Member
  • *
  • Posts: 7
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #10 on: June 14, 2024, 12:21:54 PM »
btw trying to run the dev build gives me a checksum error on boot. I'll wait until tomorrow for the daily build.
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 651
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #11 on: June 14, 2024, 12:23:36 PM »
Quote from: kaaaas on June 14, 2024, 12:21:54 PM
btw trying to run the dev build gives me a checksum error on boot. I'll wait until tomorrow for the daily build.

...That sounds like you have disk corruption.

Logged

Offline kaaaas

  • Member
  • *
  • Posts: 7
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #12 on: June 14, 2024, 12:26:15 PM »
Hmm Its a pitty it doesnt support APM. That was the whole reason to buy a CF card instead of an sd card adapter. Hoping to get good battery life.

I installed the 3.15 again thats booting fine without checksum errors.
Logged

Offline speachy

  • Administrator
  • Member
  • *
  • Posts: 651
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #13 on: June 14, 2024, 01:07:34 PM »
Note I'm not saying that the card doesn't support "power management" -- it just lacks support for the "Advanced Power Management" ATA feature set, which consists of two commands:  "set power management mode to X" and "disable/revert to default".  And "default" is essentially "whatever the device wants to do on its own."

Note that there is a separate "Power Management" feature set, which includes things like putting the device to standby and sleep modes; this is the primary knob that Rockbox uses to minimize power consumption.  This has been _required_ feature since before CF existed (over 30 years!), and it's broken in the iFlash CF->SD adapters (and other devices that use the same chipset)

CompactFlash cards use considerably less power than the microdrives that came in the mini1g/mini2g, but even the microdrive spends most of its time powered off so it's not a huge win on the overall battery life curve.  Every bit helps though.

Meanwhile, as I type this I'm listening to stuff on a mini2g with a CF card and the latest dev build straight from the link I posted above, and it works fine.  (And, incidently, what exactly is reporting this "checksum error" ?  If it's the bootloader, then I repeat my assertion that it's a data transfer error of some sort, not the build itself.  Unless that CF card you're using has some other pathological problem...)




Logged

Offline kaaaas

  • Member
  • *
  • Posts: 7
Re: [iPod Mini 2nd gen] ATA error: -82 on latest 20240612 build, not on 3.15
« Reply #14 on: June 14, 2024, 02:10:52 PM »
Ok of course the problem is PEBCAK I downloaded the nano 2G image, that caused the checksum error during boot.
Sorry for wasting your time on this.
And I would really like to express my appreciation for your support. It's ridiculously fast and you solved the problem.
Its working now thanks!
« Last Edit: June 15, 2024, 01:48:32 PM by kaaaas »
Logged

  • Print
Pages: [1] 2
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  [SOLVED] (iPod Mini 2g) ATA error: -82 on latest 20240612 build, not on 3.15
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.064 seconds with 21 queries.