Documentation
¶
Overview ¶
package goscsi provides a device command interface.
Index ¶
Constants ¶
const ( Page00 = 0x00 Page80 = 0x80 Page83 = 0x83 DataLen = 0xfc )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dev ¶
type Dev struct{ EmbeddedDev }
func (Dev) IDs ¶
IDs() returns the identification descriptors from the page 0x83 EVPD inquiry response.
<https://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068j.pdf>
Table 459 Device Identification VPD page
┏━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┓
┃ Bit┃ 7 ┃ 6 ┃ 5 ┃ 4 ┃ 3 ┃ 2 ┃ 1 ┃ 0 ┃
┃Byte ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃
┣━━━━━╇━━━━━━━━┻━━━━━━━━┻━━━━━━━━╇━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┫
┃ 0 │ PERIPHERAL QUALIFIER │ PERIPHERAL DEVICE TYPE ┃
┠─────┼──────────────────────────┴────────────────────────────────────────────┨
┃ 1 │ PAGE CODE (83h) ┃
┠─────┼───────────────────────────────────────────────────────────────────────┨
┃ 2 │ (MSB) ┃
┠─────┤ PAGE LENGTH (n-3) ┃
┃ 3 │ (LSB) ┃
┠─────┴───────────────────────────────────────────────────────────────────────┨
┃ Identification descriptor list ... ┃
┠─────┬───────────────────────────────────────────────────────────────────────┨
┃ 4 │ First Identification Descriptor (see table 460) ┃
┠─────┼───────────────────────────────────────────────────────────────────────┨
┃ n │ Last Identification Descriptor ┃
┗━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
func (Dev) SerialNumber ¶
SerialNumber() returns the `Product Serial Number` field from the page 0x80 EVPD inquiry response.
<https://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068j.pdf>
Table 484 Unit Serial Number page (80h)
┏━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┓
┃ Bit┃ 7 ┃ 6 ┃ 5 ┃ 4 ┃ 3 ┃ 2 ┃ 1 ┃ 0 ┃
┃Byte ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃
┣━━━━━╇━━━━━━━━┻━━━━━━━━┻━━━━━━━━╇━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┫
┃ 0 │ PERIPHERAL QUALIFIER │ PERIPHERAL DEVICE TYPE ┃
┠─────┼──────────────────────────┴────────────────────────────────────────────┨
┃ 1 │ PAGE CODE (80h) ┃
┠─────┼───────────────────────────────────────────────────────────────────────┨
┃ 2 │ Reserved ┃
┠─────┼───────────────────────────────────────────────────────────────────────┨
┃ 3 │ PAGE LENGTH ┃
┠─────┼───────────────────────────────────────────────────────────────────────┨
┃ 4 │ ┃
┠─────┤ ┃
┃ ... │ Product Serial Number ┃
┠─────┤ ┃
┃ n │ ┃
┗━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
func (Dev) StandardInquiry ¶
func (dev Dev) StandardInquiry() (std StdInqData, err error)
func (Dev) VPDs ¶
VPDs() returns the `SUPPORTED PAGE LIST` from the page 0x00 EVPD inquiry response.
<https://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068j.pdf>
Table 483 Supported Vital Product Data pages ┏━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┓ ┃ Bit┃ 7 ┃ 6 ┃ 5 ┃ 4 ┃ 3 ┃ 2 ┃ 1 ┃ 0 ┃ ┃Byte ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┣━━━━━╇━━━━━━━━┻━━━━━━━━┻━━━━━━━━╇━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┫ ┃ 0 │ PERIPHERAL QUALIFIER │ PERIPHERAL DEVICE TYPE ┃ ┠─────┼──────────────────────────┴────────────────────────────────────────────┨ ┃ 1 │ PAGE CODE (00h) ┃ ┠─────┼───────────────────────────────────────────────────────────────────────┨ ┃ 2 │ Reserved ┃ ┠─────┼───────────────────────────────────────────────────────────────────────┨ ┃ 3 │ PAGE LENGTH (n-3) ┃ ┠─────┼───────────────────────────────────────────────────────────────────────┨ ┃ 4 │ ┃ ┠─────┤ ┃ ┃ ... │ SUPPORTED PAGE LIST ┃ ┠─────┤ ┃ ┃ n │ ┃ ┗━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
type EmbeddedDev ¶
type IdDsc ¶
type IdDsc []byte
<https://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068j.pdf>
Table 460 Identification Descriptor
┏━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┓
┃ Bit┃ 7 ┃ 6 ┃ 5 ┃ 4 ┃ 3 ┃ 2 ┃ 1 ┃ 0 ┃
┃Byte ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┃
┣━━━━━╇━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━╇━━━━━━━━┻━━━━━━━━┻━━━━━━━━┻━━━━━━━━┫
┃ 0 │ PROTOCOL IDENTIFER │ CODE SET ┃
┠─────┼────────┬────────┬─────────────────┼───────────────────────────────────┨
┃ 1 │ PIV │Reserved│ ASSOCIATION │ IDENTIFIER TYPE ┃
┠─────┼────────┴────────┴─────────────────┴───────────────────────────────────┨
┃ 2 │ Reserved ┃
┠─────┼───────────────────────────────────────────────────────────────────────┨
┃ 3 │ IDENTIFIER LENGTH (n-3) ┃
┠─────┼───────────────────────────────────────────────────────────────────────┨
┃ 4 │ ┃
┠─────┤ ┃
┃ ... │ IDENTIFIER ┃
┠─────┤ ┃
┃ n │ ┃
┗━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛