XboxHacker BBS
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
June 18, 2013, 05:24:49 PM


Login with username, password and session length


Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 »
  Print  
Author Topic: Using HL3120 drive with linux and plscsi  (Read 111637 times)
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #120 on: March 25, 2006, 05:47:31 PM »

you can use any out of the stock kernel (preferably one from kernel.org) you need to replace 3 files (see links above: ide-cd.c siimage.c pci-ids.h) and everything should work fine; I downloaded the slax base distro but unionfs refuses to work....
Logged
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #121 on: March 25, 2006, 08:33:48 PM »

I am currently uploading a first beta version of the isoimage which has the 3114 and the ide-cd patch included; there were several problems and I had to do a lot of nasty things:
-included unionfs, loop, cloop and squashfs directly in the kernel since the modules in the ramdisk were not found; the livecd scripts generated some strange iso-images with mixed modules (ones with gcc4 and some with gcc-3.4)so that I had to do it by hand... The uploaded slax-isoimage only contains a very basic system (is a modified slax-merlin) but with all kernel modules available, even some too much..
The main problem was while integrating the kernel into the slax-distribution that I had to replace the complete kernel-tree (in the initrd and the 01-kernel package since the original modules were compiled with gcc-3.4 and I use gcc-4.0) (by hand since there seem to be some bugs in the livecd-scripts) and even if I replaced all modules the system gave me loads of errors that it could not find its modules and the kernel panicked.. (thats why I included some additional modules into the kernel)

The system is still nagging on startup about missing modules (for isdn and some weird nls-page modules but it does at least not harm).

The slax-livecd can be easily extended by adding *.mo files; so we can add SeventhSons tools, plscsi and the mn33-2 assembler simply by putting the right files onto the live cd...

This is a very first beta version and it detected my 3114 controller (I currently do not have the 3120 drive in the near so that I can first give it a try on monday...)

The TS drive and the 3120 drive should both be detected and the system should work with the 3112 and 3114 controller...

It would be very nice if someone can give it a try with a ts drive since this part is completely untested (yet)...

Here is the download link:

http://rapidshare.de/files/16432649/livecd.iso.html

comments and suggestions are highly welcome...
Logged
Slack3er
Master Hacker
****
Posts: 110


View Profile
« Reply #122 on: March 25, 2006, 10:17:03 PM »

Great Work, Congrads..  Wink

I didn't test it with my 360, but it detected my 3112 fine.. There are some minor issues, but nothing that will affect a user...  I Think..  Tongue Your ISO is definely going to benefit, the scene... Cool

I sent you a PM, probutus..

Regards;
Slack3er

Edit: If you need any help, making MO Packages, PM.. Theres a converter called Alien, that can convert rpm, deb, tgz, between each other... Then just use the converter tgz2mo... to make MO's....
« Last Edit: March 25, 2006, 11:14:05 PM by Slack3er » Logged
coop
Member
**
Posts: 11


View Profile
« Reply #123 on: March 25, 2006, 11:14:35 PM »

I'll test the TS drive tomorrow probotus and get back to you.
Logged
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #124 on: March 26, 2006, 08:45:11 AM »

Seems that my own debugging output confused me:

The 3114 driver only detects 2 of the available 4 ports; so if you have trouble with the drive try swapping it to another port... will look into siimage again...

SORRY FOR THE INCONVENIANCE (shame on me...)
Logged
Pandor
Master Hacker
****
Posts: 130


Powered by Gentoo


View Profile WWW
« Reply #125 on: March 26, 2006, 12:50:59 PM »

...
The 3114 driver only detects 2 of the available 4 ports; so if you have trouble with the drive try swapping it to another port... will look into siimage again...
...
It's hardcoded in linux/driver/ide/pci/siimage.c  a.f.a.i.c.t...
i'm no hacker but i found this in the source:
Code:
#define DECLARE_SII_DEV(name_str)                       \
        {                                               \
                .name           = name_str,             \
                .init_chipset   = init_chipset_siimage, \
                .init_iops      = init_iops_siimage,    \
                .init_hwif      = init_hwif_siimage,    \
                .fixup          = siimage_fixup,        \
                .channels       = 2,                    \
                .autodma        = AUTODMA,              \
                .bootable       = ON_BOARD,             \
        }

static ide_pci_device_t siimage_chipsets[] __devinitdata = {
        /* 0 */ DECLARE_SII_DEV("SiI680"),
        /* 1 */ DECLARE_SII_DEV("SiI3112 Serial ATA"),
        /* 2 */ DECLARE_SII_DEV("Adaptec AAR-1210SA")
};
« Last Edit: March 26, 2006, 12:52:34 PM by Pandor » Logged

Do no underestimate the power of stupid people in large groups.
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #126 on: March 26, 2006, 12:54:08 PM »

This is one of the place where my patch kicked in:

#define DECLARE_SII_DEV(name_str,nof_chan)              \
        {                                               \
                .name           = name_str,             \
                .init_chipset   = init_chipset_siimage, \
                .init_iops      = init_iops_siimage,    \
                .init_hwif      = init_hwif_siimage,    \
                .fixup          = siimage_fixup,        \
                .channels       = nof_chan,             \
                .autodma        = AUTODMA,              \
                .bootable       = ON_BOARD,             \
        }

This seemed to work for 2.6.0-test9 but it doesn't anymore...

static ide_pci_device_t siimage_chipsets[] __devinitdata = {
        /* 0 */ DECLARE_SII_DEV("SiI680",2),
        /* 1 */ DECLARE_SII_DEV("SiI3112 Serial ATA",2),
        /* 2 */ DECLARE_SII_DEV("Adaptec AAR-1210SA",2),
        /* 3 */ DECLARE_SII_DEV("SiI3114 Serial ATA",4),
};

but it seems that the siimage driver doesnt really care for the number of ports...
« Last Edit: March 26, 2006, 12:58:24 PM by probutus » Logged
Slack3er
Master Hacker
****
Posts: 110


View Profile
« Reply #127 on: March 26, 2006, 04:07:43 PM »

I also no expert..., lol  Tongue But this could be a hint or NOT...  Grin

Quote..
Code:
if anyone is able to tell me how to find the io address of the SATA ports I
could make this patch support the 4 drives of Sil3114 (only the 2 first are
working atm).
As I really don't know how to find this, I prefer ask to the kernel experts ;)
Once I have this info, making the patch is a matter of a few minutes I think

I tried looking at lspci/scanpci outputs but could not really find any usefull
informations recording io ports.

Maybe the missing io sata port addresses, are causing the above problem.. Don't really know, I'm no expert.. Embarrassed

Code:
the attached patch makes _both_ drivers work (whereas the previous one
made only the libata one working

There talking about the 3114, with sata_sil and siimage, i believe...

http://www.ussg.iu.edu/hypermail/linux/kernel/0312.1/1112.html
Logged
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #128 on: March 26, 2006, 06:12:12 PM »

I checked the post, but the patch does unfortunately not show how to adress the 2 more ports;

We could try the following:
We should look at the different versions of the file "pci_ids.h" in the kernel source tree from 2.6.0 onwards till the last version where the device id for the 3114 (the 0x3114) got removed and fetch the siimage.c siimage.h files from that version. These device ids were removed when the 3114 support moved completely into the sata_sil driver...
I spied inside the sata_sil driver and found the following for the 3114 (the "secret" ioport offsets..)

EDIT: I posted the wrong values...
Here are the right ones (PCI OFFSETs)

0x100 SATA PORT 0 (3112 + 3114)
0x180 SATA PORT 1 (3112 + 3114)
0x300 SATA PORT 2 (3114)
0x380 SATA PORT 3 (3114)
 
I would propose the following next steps:

1) check the pci_ids.h issue (maybe we then already have a solution which we only need to merge into the 2.6.16 kernel)
2) if that does not succeed we need a way to tell the siimage driver to handle the 2 additional ports... Which would basically mean to replace the  if (ch) a; else b;  by switch (ch) case a case b case c case d ... Boy, That would be interesting... Wink
3) suggestions welcome..
« Last Edit: March 26, 2006, 06:41:17 PM by probutus » Logged
coop
Member
**
Posts: 11


View Profile
« Reply #129 on: March 27, 2006, 03:49:42 AM »

I have to delay testing the TS drive with your live boot iso till tomorrow maybe tuesday just been really busy.  As for your issue with getting all 4 sata ports working is that necessary if with have 2 working?  Also I have a few quick questions:
1)  How is the 3120 FW dumped and any idea on how the FW is being changed for successful boot of burnt image?
My speculation from reading is a return statement(s) is/are being overwritten to return the value(s) the console is expecting based on calculations performed by the DVD firmware based on bad sectors that M$ puts on the discs.  I am just trying to get a better feel for what is going on and what our goal is.
2)  Hopefully with the answer to 1 I could answer 2 myself but anyway... How would I go about dumping the TS FW?
Logged
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #130 on: March 27, 2006, 02:22:38 PM »

Hi coop,

since the siimage driver is just an interim solution until the sata_sil stops nagging around Wink therefore you are right about the four ports (we dont really need it but it would be nice...). But I know from experience that the "interim solutions" often keep for years  Embarrassed

The next step could be
1) to get some code to upload for unlocking and browsing a 360 game partition (there I am heavily dependant on the "Specialists"  Wink in this Forum...
2) extend and improve the beta iso image to contain the am33-2 assembler,plscsi,  SeventhSons tools, and flashing/recovery tools (if available...)
3) make a small bootable iso which unlocks the drive and restarts (well I assume that 50MB is small enough; if you see the login prompt you can do CTRL-ALT-DEL and reboot to windows)
4) suggestions welcome...

To answer your question 1) The firmware of the 3120 can be dumped via plscsi (see the very beginning of this thread...). Afaik, iI heard that SpenZerX  is working on an utilitiy which could let us flash the 3120 but I do not know the current status... There is no public firmware available which lets you play burnt images (teamxecuter seems to be working on something...)

To 2) This linux driver should (ahemm, I never was able to test it ) be able to make the TS-drive in linux available and you should be able to use it as a "normal" dvd drive AND you should be able to use plscsi.. That could be a first step to get the same progress like on the 3120 (but since there are no debug commands available (please correct me if i'm wrong) so this could get a bit harder but we have the drive at least recognized and can play with it....

EDIT: I did some research on the internet and it seems that the siimage driver for the 3114 never existed (there were only links in the 2.6.0-testingXXX but they were all removed in the 2.6.0-final, maybe in favour to sata_sil)
I have a modified driver for the 3114 which has the correct port settings and offsets for all four ports but there are still only 2 ports checked
You can have a look if you like...

http://rapidshare.de/files/16576088/siimage.c.html
« Last Edit: March 27, 2006, 05:19:17 PM by probutus » Logged
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #131 on: March 27, 2006, 03:34:42 PM »

I tested the slax-iso:

connected 3120 to 3114 booted via "normal" cdrom: works
connected 3120 via sata/pata and booted via 3120: works also!

now we have to add some "flesh" to the very bare cd (in form of mo-packages... Grin )

EDIT: a first package can be downloaded here:

http://rapidshare.de/files/16587924/360_dvd_base.mo.html

I tested it while putting it into the "base" folder but according to Slack3er it would be better in the "modules" directory

It contains the following tools
- plscsi (which also works with ide drives; see post by pandor above)
- kev's tools (hopefully he forgot the copyright message  Wink ) ec aka execute_command, pp aka peekpoke and memdump
- the mn10300 binutils (addr2line, ar, ld ranlib, strip (i like that one  Grin ), mn readelf, as, objcopy, dump, objdump, size, strings, c++filt)

not much but a beginning...

Great thanks go to Slack3er for the help with the mo packages!!!
« Last Edit: March 27, 2006, 05:00:21 PM by probutus » Logged
Slack3er
Master Hacker
****
Posts: 110


View Profile
« Reply #132 on: March 27, 2006, 05:57:41 PM »

Congrad's, Great Work... Cheesy

I put the MO package, into the module(Never tryied installing to base, but if it works use it..) folder on the iso. You package installs and runs fine... Grin Now only if we had a linux flasher/patcher...  Grin

Regards;
Slack3er
Logged
coop
Member
**
Posts: 11


View Profile
« Reply #133 on: March 28, 2006, 06:06:03 PM »

Tested the TS drive finally.  My sii3112 controller recognizes the TS drive.  I booted the slax iso image with the 360 dvd module(placed on modules dir on iso).  Seems to boot up and recognize everything, loads the module, but then I get a bunch of errors similar to:
linux live end
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 46160
Buffer I/O error on device hdc, logical block 11558
hdc: media error (bad sector): status=0x51 { DriveReady SeekComplete Error }
hdc: media error (bad sector): error=0x34 { AbortedCommand LastFailedSense=0x03 }

then they continue on for a few seconds and stop.  It seems it is detecting the device and labeling it hdc (hda is my maxtor sata drive and hdb is my maxtor usb drive).
Also it seems to do it for sectors:
46160
46232-46320
« Last Edit: March 28, 2006, 06:11:20 PM by coop » Logged
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #134 on: March 29, 2006, 02:45:37 AM »

Thanks for testing! So if the drive is recognized we seem to have a "50% success" already...

this looks like common read-errors to me....
Can you post a dmesg output? Was there something like "faking capabilities" printed on startup?
With my 3120 I also have problems with CD-RW/DVD-RW media: the drive ejects these discs normally (I have a Toshiba SD-6742 DVD-Writer; even my ancient DVD-Rom can read these discs but the 3120 not..)

Can you tell me which disk (a 360 game, a CD-R,RW,DVD,) was inserted when the errors occured? Does this also happen when there is NO disc inserted... It could be that the "faked" capabilites are not optimal yet... Will work on it
Logged
Dzgx216
Master Hacker
****
Posts: 171


View Profile
« Reply #135 on: March 29, 2006, 03:02:01 AM »

Probutus / slack3r

   THings are going great here with all your wonderful toys.  A word of note for other users. (I can swear I heard of this before too, but can't find it to point to it)

 1. Sometimes, during the HIT command the drive will freeze.  Simply ejecting the tray will fix this.
 2. After being put into Mode B, sometimes the disc wil start to spin up, spin back down and eject by itself.  It also takes two presses of eject, which causes it to do this again)  If you let it open itself, press eject once, then push the tray until it self closes it should spin up and stay that way. 

  Like I said, I could swear someone, somewhere mentioned this before, but I couldn't find it.
Logged

- Danzig -
SeventhSon
Global Moderator
Master Hacker
*****
Posts: 276


View Profile WWW
« Reply #136 on: March 29, 2006, 03:06:51 AM »

2. After being put into Mode B, sometimes the disc wil start to spin up, spin back down and eject by itself.  It also takes two presses of eject, which causes it to do this again)  If you let it open itself, press eject once, then push the tray until it self closes it should spin up and stay that way. 
Are you powering the drive from the 360? If so, this is caused by the differing behaviour of tray_status under modeA and B.

If you don't mind mutilating your power cable, then cut the tray_status wire and tie the 360 end directly to +3.3V. Leave the drive's end unconnected. That should sort it out. Eject will still take 2 presses, but it shouldn't eject on it's own.

-Kev
« Last Edit: March 29, 2006, 03:10:16 AM by SeventhSon » Logged
coop
Member
**
Posts: 11


View Profile
« Reply #137 on: March 29, 2006, 03:12:16 AM »

I'll do some more testing later today I have to get to bed I have some golfing to do in the morning but after that I'm free for a few hours.  Oh probutus,  I will try some different media but the disc seemed to read well as far as I could tell.  I was using a old CompUSA cd-rw I have some other cd-r/w's I'll try and a DVD-RW.  I am reloading my linux server which has my good DVD-RW drive on it so I will get that up and working and burn some DVD-RW media to test with.  Get back to you this evening.
Logged
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #138 on: March 29, 2006, 01:27:04 PM »

can you please try the drive with a cd-r? (I have the strange impression that RW-Media is not very appreciated by the drive... (deja-vu?)

tomorrow afternoon I have access to my xbox again (I am not @home since a couple of days..). Will try to do some improvements... (please remember the dmesg output, since I do not have a ts drive I am heavily dependant on your support)..
Logged
coop
Member
**
Posts: 11


View Profile
« Reply #139 on: March 30, 2006, 07:27:53 PM »

dmesg from slax live ISO, this is booting from my DVD-RW from my linux server.  Everything booted up it detected the TS drive and I was able to mount a disc on it and everything was readable.  Here is dmesg:

Probing IDE interface ide0...
hda: WDC WD400JB-00ENA0, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: SONY DVD RW DRU-510A, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
SiI3112 Serial ATA: IDE controller at PCI slot 0000:01:0b.0
ACPI: PCI Interrupt Link [LNK3] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
ACPI: PCI Interrupt 0000:01:0b.0[A] -> Link [LNK3] -> GSI 11 (level, low) -> IRQ 11
SiI3112 Serial ATA: chipset revision 1
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
SiI3112 Serial ATA: 100% native mode on irq 11
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
    ide2: MMIO-DMA , BIOS settings: hde:DMA, hdf:DMA
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
    ide3: MMIO-DMA , BIOS settings: hdg:pio, hdh:pio
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
Probing IDE interface ide2...
hde: Maxtor 7L300S0, ATA DISK drive
<--- This is my primary SATA device
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
ide2 at 0xe0802080-0xe0802087,0xe080208a on irq 11
Probing IDE interface ide3...
hdg: TSSTcorpDVD-ROM TS-H943A, ATAPI CD/DVD-ROM drive
<---- 360 TS drive
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
siimage: pdev_is_sata: ID:12562
siimage: sata_device with pci_id:12562 found!
ide3 at 0xe08020c0-0xe08020c7,0xe08020ca on irq 11
hda: max request size: 128KiB
hda: 78165360 sectors (40020 MB) w/8192KiB Cache, CHS=65535/16/63, UDMA(100)
hda: cache flushes not supported
 hda: hda1 hda2 hda3
hde: max request size: 64KiB
hde: 586114704 sectors (300090 MB) w/16384KiB Cache, CHS=36483/255/63
hde: cache flushes supported
 hde: hde1
hdc: ATAPI 32X DVD-ROM DVD-R CD-R/RW drive, 8192kB Cache, UDMA(33) faking capabilities


This is only part of the dmesg for a full output:
Http://www.amrl.uakron.edu/dmesg_TS.txt
« Last Edit: March 30, 2006, 07:46:20 PM by coop » Logged
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM