XboxHacker BBS
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2013, 05:13:35 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 110785 times)
SeventhSon
Global Moderator
Master Hacker
*****
Posts: 276


View Profile WWW
« Reply #260 on: June 24, 2006, 07:32:50 PM »

Hi Pandor,

the issue that there is no vendor specific byte needed anymore when grounding the wire is exactly the point which I do not understand (yet):

Question is: What is this bit which is set to 1 via mode_b; is this  the iopin configuration for the output line?
and what is the purpose of this register (because it seems to skip all vendor specific crap...)?

I red that it is possible to make the TS drive behave in the same way by grounding the wire... So there should be a possibility to have such a command also?

Sorry for not answering questions but raising new ones....

If we can get a clearer picture what is going on inside there it would help improving the live cd with sata drivers...
tray_status is a bidirectional I/O pin. tray_status is initially configured as an output. During drive startup the tray_status line is briefly configured as an input and its value is sampled. If the sampled value is logic 1, then the drive enters modeA. If it is logic 0, then the drive enters modeB. Mode A/B is indicated by (598) bit 6 (0 = modeA, 1 = modeB).

Code:
ROM:0000664E                 mov     0xD98C, A2
ROM:00006651                 mov     0x30, D0 ! '0'
ROM:00006653                 movbu   D0, (A2)            ; tray_status = input
ROM:00006655                 call    sub_628E, [D2], 4   ; delay
ROM:0000665A                 movbu   (word_D98C+1), D0   ; read tray_status
ROM:0000665D                 btst    0x10, D0            ; is tray_status logic 0?
ROM:00006660                 beq     loc_6669            ; Yes, branch
ROM:00006662                 bclr    0x40, (word_598)    ; No, so (598) bit 6 = 0 (modeA)
ROM:00006667                 bra     loc_6680
ROM:00006669 ! ---------------------------------------------------------------------------
ROM:00006669
ROM:00006669 loc_6669:                               ! CODE XREF: sub_654A+116j
ROM:00006669                 bset    0x40, (word_598)  ; (598) bit 6 = 1 (modeB)
ROM:0000666E                 clr     D0
ROM:0000666F                 movbu   D0, (0x8003E6D8)
ROM:00006675                 mov     1, D0
ROM:00006677                 mov     0x64, D1 ! 'd'
ROM:00006679                 call    sub_1EEB3, [D2,D3,A2], 0x10
ROM:00006680
ROM:00006680 loc_6680:
ROM:00006680                 mov     0x20, D0 ! ' '
ROM:00006682                 movbu   D0, (A2)           ; tray_status = output again
ROM:00006684                 ret     [D2,A2], 0xC

In modeB, the Inquiry handler code does not require the bits 0xC0 in the Inquiry packet. It checks (598) bit 6 and, if it's set (modeB), then it doesn't bother to check for the 0xC0 bits in the packet. This is why the grounding the tray_status wire at startup does not require the 0xC0 byte.

Code:
ROM:00024F61                 call    sub_1B53B, [], 0 ;  D0 = (598) bit 6
ROM:00024F68                 extb    D0
ROM:00024F69                 cmp     0, D0            ; is (598) bit 6 zero?
ROM:00024F6B                 bne     loc_24F80        ; no, so skip vendor specific bits check
ROM:00024F6D                 movbu   (word_5BD), D0   ; yes, so check vendor specific bits
ROM:00024F70                 mov     0xC0, D1 ! '+'
ROM:00024F73                 and     D1, D0           ;
ROM:00024F75                 cmp     D1, D0           ; Are vendor specific set?
ROM:00024F76                 beq     loc_24F80        ; yes, so continue
ROM:00024F78                 mov     0xD, D0          : no, so fail

I hope this clears things up. As far as I know, modeB does NOT change the configuration of any I/O pins.
Logged
moontan
Member
**
Posts: 28


View Profile
« Reply #261 on: June 25, 2006, 08:56:18 AM »

with regards to my problem a few posts back, dmesg says unknown parameter for the fix_inq_product_id
Logged
probutus
Master Hacker
****
Posts: 394

$#!t happens


View Profile
« Reply #262 on: June 29, 2006, 07:13:27 AM »

@moontan: you have mail

@SeventhSon: Thank you very much for the information; this clarifies a lot...

I will have a look at the whole story as soon as I am back from vacation ( I was not allowed to take my notebook with me  Sad Im sitting here in a dark backyard in a cheap internet cafe hoping that my girlfriend wont find me  Cheesy )
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