* [info] Silicon Image device hotplug debounce
@ 2005-07-26 17:28 Jeff Garzik
2005-08-01 4:23 ` Ricky Cheng
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2005-07-26 17:28 UTC (permalink / raw)
To: linux-ide@vger.kernel.org; +Cc: Linux Kernel, lkosewsk
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
This is some info that Silicon Image provided, for use in developing
SATA hotplug. This info is public and not NDA as of the publishing of
the SiI 311x hardware documentation at
http://gkernel.sourceforge.net/specs/sii/
Kudos again to SiI for opening their 311x and CMD680 [PATA] docs.
Jeff
[-- Attachment #2: sata-hotplug.txt --]
[-- Type: text/plain, Size: 1923 bytes --]
Here are some writeups for our 3112/3152 hot plug/unplug handling. Hope it will
help in your open source development.
For the 3114 controller, the sequence is essentially the same as the 3112 except
that the PHYRDY change handler does not need to reset the channel and of course
obvious changes to handle the two additional channels of the 3114.
Best regards,
[silicon image person]
During driver initialization:
Write 0xFFFF0000 to both SERROR registers (BAR 5 offsets 0x108 and 0x188)
to clear any pre-existing serial error bits.
Enable the PHYRDY change interrupt (bit 16) of the SIEN registers
(BAR 5 offsets 0x148 and 0x1C8)
Interrupt handler:
Read PCI Bus Master2 - IDE0 register (BAR 5 offset 0x10) and examine
bits 4 and 6. If either bit is set then read the appropriate SERROR
register and look at bit 16. If this bit is set a PHYRDY change
(hot plug/unplug event) has occurred and the PHYRDY change handler
should be called.
PHYRDY change handler:
If PHYRDY debounce timer is currently running, stop it.
Read the appropriate SSTATUS register (BAR 5 offsets 0x104 or 0x184)
and examine bits 0 and 1. If both of these bits are not set then the
device has been unplugged so perform a hard reset on the channel to
cause the ATA status register to be reset to 0x7F to facilitate device
detection later on if a device plugged back in.
Restart the PHYRDY debounce timer (recommended timer period of ~500ms.)
PHYRDY debounce timer handler:
Read the appropriate SSTATUS register (BAR 5 offsets 0x104 or 0x184)
and examine bits 0 and 1.
If both bits are set a device has been plugged in and the driver should
run its normal device detection/configuration code to make the device
ready for use.
If both bits are not set then the device has been unplugged and the
driver should clean-up any outstanding commands to the removed device.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [info] Silicon Image device hotplug debounce
2005-07-26 17:28 [info] Silicon Image device hotplug debounce Jeff Garzik
@ 2005-08-01 4:23 ` Ricky Cheng
2005-08-01 6:12 ` Lukasz Kosewski
0 siblings, 1 reply; 4+ messages in thread
From: Ricky Cheng @ 2005-08-01 4:23 UTC (permalink / raw)
To: linux-ide
Jeff Garzik <jgarzik <at> pobox.com> writes:
>
>
> This is some info that Silicon Image provided, for use in developing
> SATA hotplug. This info is public and not NDA as of the publishing of
> the SiI 311x hardware documentation at
>
> http://gkernel.sourceforge.net/specs/sii/
>
> Kudos again to SiI for opening their 311x and CMD680 [PATA] docs.
>
> Jeff
>
>
>
>
> Here are some writeups for our 3112/3152 hot plug/unplug handling. Hope it
will
> help in your open source development.
>
> For the 3114 controller, the sequence is essentially the same as the 3112
except
> that the PHYRDY change handler does not need to reset the channel and of
course
> obvious changes to handle the two additional channels of the 3114.
>
> Best regards,
> [silicon image person]
>
Hi, This is Ricky. I am finding solution of sil 3512 chip hotswap problem.
I think this doc can help some. But I don't really understand libata very much.
Can someone help some ideas?..Thanks
I know I should do something in interrupt handler in libata.c like check
status of plug/unplug. Is is right?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [info] Silicon Image device hotplug debounce
2005-08-01 4:23 ` Ricky Cheng
@ 2005-08-01 6:12 ` Lukasz Kosewski
2005-08-01 6:52 ` Ricky Cheng
0 siblings, 1 reply; 4+ messages in thread
From: Lukasz Kosewski @ 2005-08-01 6:12 UTC (permalink / raw)
To: Ricky Cheng; +Cc: linux-ide
On 7/31/05, Ricky Cheng <rickycheng@qnap.com.tw> wrote:
> Hi, This is Ricky. I am finding solution of sil 3512 chip hotswap problem.
> I think this doc can help some. But I don't really understand libata very much.
> Can someone help some ideas?..Thanks
> I know I should do something in interrupt handler in libata.c like check
> status of plug/unplug. Is is right?
Yo.
I'm working on a hotswap infrastructure patch right now that would
give you the API necessary to perform a hotswap. There are
essentially two parts:
1) The driver has to recognize that a plug/unplug event occurred
2) libata has to take the appropriate action to plug/unplug a device.
Currently, I have only done step 1) for the sata_promise driver. Step
2) is being... well, written. Since you're doing hotswap stuff,
great, you can test it for me (I am in China until September with no
goddamn hardware to test with)!
Look (tonight, over the next few hours in fact) for messages of the
type "Add disk hotswap support to libata." I should have some patches
sent in by then.
Luke Kosewski
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-01 6:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-26 17:28 [info] Silicon Image device hotplug debounce Jeff Garzik
2005-08-01 4:23 ` Ricky Cheng
2005-08-01 6:12 ` Lukasz Kosewski
2005-08-01 6:52 ` Ricky Cheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).