From: Edward S. <ejs...@gm...> - 2012-12-26 19:45:25
|
Inspired by seeing that the PL2507 works with "usbjmicron,0" , I have discovered that my PL3507 will work with a slightly altered version of the usbjmicron command. It needs the two bytes 06 7b added on to the end of the command, like so: Index: scsiata.cpp =================================================================== --- scsiata.cpp (revision 3738) +++ scsiata.cpp (working copy) @@ -1007,7 +1007,7 @@ } // Build pass through command - unsigned char cdb[12]; + unsigned char cdb[14]; cdb[ 0] = 0xdf; cdb[ 1] = (rwbit ? 0x10 : 0x00); cdb[ 2] = 0x00; @@ -1020,6 +1020,8 @@ cdb[ 9] = in.in_regs.lba_high; cdb[10] = in.in_regs.device | (m_port == 0 ? 0xa0 : 0xb0); cdb[11] = in.in_regs.command; + cdb[12] = 0x06; + cdb[13] = 0x7b; io_hdr.cmnd = cdb; io_hdr.cmnd_len = sizeof(cdb); @@ -1069,7 +1071,7 @@ bool usbjmicron_device::get_registers(unsigned short addr, unsigned char * buf, unsigned short size) { - unsigned char cdb[12]; + unsigned char cdb[14]; cdb[ 0] = 0xdf; cdb[ 1] = 0x10; cdb[ 2] = 0x00; @@ -1082,6 +1084,8 @@ cdb[ 9] = 0x00; cdb[10] = 0x00; cdb[11] = 0xfd; + cdb[12] = 0x06; + cdb[13] = 0x7b; scsi_cmnd_io io_hdr; memset(&io_hdr, 0, sizeof(io_hdr)); The output isn't perfect but it is sufficient to view SMART attributes and the SMART error log, and run a test. To make things more complicated, it says in the firmware changelog dated 06 Sep 2005 "Add 067B to ATACB_EXECUTE command. [USB]". So I guess that chips with older firmware will work like the PL2507 with "usbjmicron,0", but chips with the newer firmware need the slightly altered command. And unfortunately it is not possible to determine the firmware version without using another prolific special command. |