aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm
diff options
context:
space:
mode:
authorSimon Arlott <simon@fire.lp0.eu>2009-11-21 10:12:21 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:52:59 -0500
commitc68bb0d738897ed39b90c7ccb22e01c938117051 (patch)
tree87dc7503d6ff5923e4e68fef45ca61933bc33cc4 /drivers/usb/atm
parent9fc950d322380dda8e9bc8debe89766085e7a0eb (diff)
USB: cxacru: document how to interact with the flash memory
These commands were found by accident... fortunately it still works even if the flash memory is erased, despite having no USB device IDs. Some example sysfs code for raw command access: http://simon.arlott.org/pub/cxacru/raw.c Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/atm')
-rw-r--r--drivers/usb/atm/cxacru.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c
index 4bead3da3850..5dc21383aa83 100644
--- a/drivers/usb/atm/cxacru.c
+++ b/drivers/usb/atm/cxacru.c
@@ -105,6 +105,26 @@ enum cxacru_cm_request {
105 CM_REQUEST_MAX, 105 CM_REQUEST_MAX,
106}; 106};
107 107
108/* commands for interaction with the flash memory
109 *
110 * read: response is the contents of the first 60 bytes of flash memory
111 * write: request contains the 60 bytes of data to write to flash memory
112 * response is the contents of the first 60 bytes of flash memory
113 *
114 * layout: PP PP VV VV MM MM MM MM MM MM ?? ?? SS SS SS SS SS SS SS SS
115 * SS SS SS SS SS SS SS SS 00 00 00 00 00 00 00 00 00 00 00 00
116 * 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
117 *
118 * P: le16 USB Product ID
119 * V: le16 USB Vendor ID
120 * M: be48 MAC Address
121 * S: le16 ASCII Serial Number
122 */
123enum cxacru_cm_flash {
124 CM_FLASH_READ = 0xa1,
125 CM_FLASH_WRITE = 0xa2
126};
127
108/* reply codes to the commands above */ 128/* reply codes to the commands above */
109enum cxacru_cm_status { 129enum cxacru_cm_status {
110 CM_STATUS_UNDEFINED, 130 CM_STATUS_UNDEFINED,