Opened 8 years ago
Last modified 8 years ago
#719 reopened enhancement
Prolific PL2773 USB3.0/eSATAII-to-SATAII bridge via eSATA not working
Reported by: | mamoch | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | undecided |
Component: | all | Version: | 6.5 |
Keywords: | prolific | Cc: |
Description
The external 2.5" HDD enclosure fantec DB-228U3e contains a PL2773 bridge, for which USB support was recently added (cf. #482) and it works with this enclosure. But if you connect via eSATA then you don’t get proper SMART readings
I did some research using the same techniques described in #482: using vendor’s iSmart.exe
and API Monitor
to figure out what the vendor is doing; looking at smartctl
’s raw commands; feeding the raw SCSI commands via sg_raw
to drive.
This is what I found:
smartctl
doesn’t get proper readings of SMART attributes because drive responds toSMART READ ATTRIBUTE VALUES
with same answer as toIDENTIFY DEVICE
.- On the other hand, if you send the raw SCSI commands via
sg_raw
you get valid responses, at least most times. If you do twiceIDENTIFY DEVICE
before SMART commands, just likesmartctl
does, you get more often the ”wrong” answer. Sounds like a race condition? - PL2773 inserts its signature
06 7b 27 73
into the answer ofIDENTIFY DEVICE
at ”retired” words 20 & 21 (cf. ATA Command Set) and modifies some other bytes. SMART READ ATTRIBUTE THRESHOLDS
always fails, even withiSmart.exe
, but works with direct SATA access, so HDD firmware seems fine.
Attachments (7)
Change History (17)
by , 8 years ago
Attachment: | PL2773-eSATA_iSmart.txt added |
---|
by , 8 years ago
Attachment: | PL2773-eSATA_smartctl-A-ioctl2_0.log added |
---|
smartctl -A -r ioctl,2 via PL2773-eSATA #0
by , 8 years ago
Attachment: | PL2773-eSATA_smartctl-A-ioctl2_1.log added |
---|
smartctl -A -r ioctl,2 via PL2773-eSATA #1
by , 8 years ago
Attachment: | PL2773-eSATA_sg-raw_succ_0.log added |
---|
sg_raw via PL2773-eSATA with success
by , 8 years ago
Attachment: | PL2773-eSATA_sg-raw_fail.log added |
---|
sg_raw via PL2773-eSATA with failure
by , 8 years ago
Attachment: | SATA_smartctl-A-ioctl2.log added |
---|
smartctl -A -r ioctl,2 via direct SATA
comment:1 by , 8 years ago
I forgot:
smartctl
shows the same error on Windows.- Inserting
sleep 1
between everysg_raw
call never triggers bad responses. That points again to a race condition.
follow-up: 3 comment:2 by , 8 years ago
Component: | smartctl → all |
---|---|
Keywords: | prolific added; PL2773 eSATA removed |
Milestone: | → undecided |
This is unrelated to Prolific USB support (#482). An eSATA connection should route the ATA commands transparently to the SATA disk.
Do other eSATA devices work properly with the same eSATA controller of the test machine?
Does this device show same behavior on other machines with a different eSATA controller (or on a regular SATA port with SATA<->eSATA adapter) ?
If both is the case, the eSATA implementation of this chip is apparently broken.
comment:3 by , 8 years ago
Replying to chrfranke:
This is unrelated to Prolific USB support (#482). An eSATA connection should route the ATA commands transparently to the SATA disk.
I know that it’s not related to the Prolific USB implementation of smartctl
, but it is the same chip in the HDD enclosure handling the ATA pass-through.
Do other eSATA devices work properly with the same eSATA controller of the test machine?
Yes, as you can see for example from SATA_smartctl-A-ioctl2.log
and SATA_sg-raw.log
which are recorded with a direct connection from that test machine (It’s a notebook.) to the HDD through an eSATA-SATA cable.
Does this device show same behavior on other machines with a different eSATA controller (or on a regular SATA port with SATA<->eSATA adapter) ?
I’ll test that
If both is the case, the eSATA implementation of this chip is apparently broken.
That was my assumption and I hoped, that maybe it is possible to implement a workaround into smartctl
, at least for SMART READ ATTRIBUTE VALUES
because this works with sg_raw
.
comment:4 by , 8 years ago
The enclosure shows exactly the same behavior when connected to a different machine’s SATA port with an eSATA-SATA cable. So most likely the chip has some flaws…
Ironically I always bought enclosures with eSATA ports to get direct SATA access to enclosed HDDs and not to worry about buggy chipsets, because I thought when eSATA is used the enclosure’s circuit board establishes direct wiring of the eSATA pins with the internal SATA connector. Now I must realize that everything still runs through the chip and again one has to rely on proper implementation of pass-through.
comment:5 by , 8 years ago
The same problem was reported for an ICY BOX enclosure with PL2773:
https://sourceforge.net/p/smartmontools/mailman/message/35326008/
There is a firmware update on the Prolific web site, but "For Vendors Only":
http://prolificusa.com/portfolio/pl-2773-usb3-0-esataii-to-sataii-bridge-controller/
comment:6 by , 8 years ago
Milestone: | undecided |
---|---|
Resolution: | → invalid |
Status: | new → closed |
This is a problem of the eSATA firmware of the Prolific PL2773.
comment:7 by , 8 years ago
From the beginning my suspicion was that this is a firmware bug. But one can prevent it by inserting a waiting time between each consecutive SMART query as I mentioned before and of course one should not use the broken SMART READ ATTRIBUTE THRESHOLDS
.
So I hoped that smartmontools
could implement this workaround so that you can at least get all SMART values properly even if the vendor doesn’t fix the problem at all.
PS: How do you know that the firmware update on the Prolific website fixes this issue? There’s no changelog given.
comment:8 by , 8 years ago
A workaround could possibly implemented as a filter class selected by e.g. -d prolific-esata
. Its ata_pass_through()
function shall insert a delay before issuing the supported ATA commands via basedev->ata_pass_through()
and shall reject or emulate the unsupported commands.
PS: Of course I do not know whether the firmware update fixes this problem.
comment:9 by , 8 years ago
Milestone: | → undecided |
---|---|
Type: | defect → enhancement |
Reopen ticket as an enhancement request for a firmware bug workaround. Volunteers with access to an affected device are welcome to provide a patch.
comment:10 by , 8 years ago
Resolution: | invalid |
---|---|
Status: | closed → reopened |
Reopen ticket as an enhancement request for a firmware bug workaround. Volunteers with access to an affected device are welcome to provide a patch.
captured data by API Monitor when using iSmart.exe on eSATA