| /kernel/linux/linux-6.6/drivers/usb/storage/ |
| D | transport.c | 67 * sets the machine state and the ABORTING bit in us->dflags to prevent 69 * below, which atomically tests-and-clears the URB_ACTIVE bit in us->dflags 74 * When a disconnect occurs, the DISCONNECTING bit in us->dflags is set to 98 * This is the completion handler which will wake us up when an URB 115 static int usb_stor_msg_common(struct us_data *us, int timeout) in usb_stor_msg_common() argument 122 if (test_bit(US_FLIDX_ABORTING, &us->dflags)) in usb_stor_msg_common() 129 us->current_urb->context = &urb_done; in usb_stor_msg_common() 130 us->current_urb->transfer_flags = 0; in usb_stor_msg_common() 133 * we assume that if transfer_buffer isn't us->iobuf then it in usb_stor_msg_common() 135 * easier than always having the caller tell us whether the in usb_stor_msg_common() [all …]
|
| D | usb.c | 148 for (i = 0; i < config->desc.bNumInterfaces; i++) { in us_set_lock_class() 171 struct us_data *us = usb_get_intfdata(iface); in usb_stor_suspend() local 174 mutex_lock(&us->dev_mutex); in usb_stor_suspend() 176 if (us->suspend_resume_hook) in usb_stor_suspend() 177 (us->suspend_resume_hook)(us, US_SUSPEND); in usb_stor_suspend() 184 mutex_unlock(&us->dev_mutex); in usb_stor_suspend() 185 return 0; in usb_stor_suspend() 191 struct us_data *us = usb_get_intfdata(iface); in usb_stor_resume() local 193 mutex_lock(&us->dev_mutex); in usb_stor_resume() 195 if (us->suspend_resume_hook) in usb_stor_resume() [all …]
|
| D | realtek_cr.c | 42 MODULE_PARM_DESC(auto_delink_en, "auto delink mode (0=firmware, 1=software [default])"); 100 struct us_data *us; member 115 #define FLIDX_AUTO_DELINK 0x01 131 #define VENDOR_ID(chip) ((chip)->status[0].vid) 132 #define PRODUCT_ID(chip) ((chip)->status[0].pid) 133 #define FW_VERSION(chip) ((chip)->status[0].fw_ver) 136 #define STATUS_SUCCESS 0 141 CHK_BIT((chip)->status[0].function[0], 1) 143 CHK_BIT((chip)->status[0].function[0], 2) 145 CHK_BIT((chip)->status[0].function[0], 3) [all …]
|
| D | alauda.c | 44 #define ALAUDA_STATUS_ERROR 0x01 45 #define ALAUDA_STATUS_READY 0x40 50 #define ALAUDA_GET_XD_MEDIA_STATUS 0x08 51 #define ALAUDA_GET_SM_MEDIA_STATUS 0x98 52 #define ALAUDA_ACK_XD_MEDIA_CHANGE 0x0a 53 #define ALAUDA_ACK_SM_MEDIA_CHANGE 0x9a 54 #define ALAUDA_GET_XD_MEDIA_SIG 0x86 55 #define ALAUDA_GET_SM_MEDIA_SIG 0x96 58 * Bulk command identity (byte 0) 60 #define ALAUDA_BULK_CMD 0x40 [all …]
|
| D | shuttle_usbat.c | 54 #define USBAT_DEV_HP8200 0x01 55 #define USBAT_DEV_FLASH 0x02 57 #define USBAT_EPP_PORT 0x10 58 #define USBAT_EPP_REGISTER 0x30 59 #define USBAT_ATA 0x40 60 #define USBAT_ISA 0x50 63 #define USBAT_CMD_READ_REG 0x00 64 #define USBAT_CMD_WRITE_REG 0x01 65 #define USBAT_CMD_READ_BLOCK 0x02 66 #define USBAT_CMD_WRITE_BLOCK 0x03 [all …]
|
| D | freecom.c | 35 static void pdump(struct us_data *us, void *ibuffer, int length); 39 #define ERR_STAT 0x01 40 #define DRQ_STAT 0x08 80 #define FCM_INT_STATUS 0x02 /* INDEX_STAT */ 81 #define FCM_STATUS_BUSY 0x80 87 #define FCM_PACKET_ATAPI 0x21 88 #define FCM_PACKET_STATUS 0x20 94 #define FCM_PACKET_INPUT 0x81 97 #define FCM_PACKET_OUTPUT 0x01 103 #define FCM_PACKET_IDE_WRITE 0x40 [all …]
|
| D | ene_ub6250.c | 78 #define ENE_BIN_CODE_LEN 0x800 80 #define REG_CARD_STATUS 0xFF83 81 #define REG_HW_TRAP1 0xFF89 84 #define SS_SUCCESS 0x000000 /* No Sense */ 85 #define SS_NOT_READY 0x023A00 /* Medium not present */ 86 #define SS_MEDIUM_ERR 0x031100 /* Unrecovered read error */ 87 #define SS_HW_ERR 0x040800 /* Communication failure */ 88 #define SS_ILLEGAL_REQUEST 0x052000 /* Invalid command */ 89 #define SS_UNIT_ATTENTION 0x062900 /* Reset occurred */ 101 #define FDIR_WRITE 0 [all …]
|
| D | isd200.c | 58 static int isd200_Initialization(struct us_data *us); 106 #define DF_ATA_DEVICE 0x0001 107 #define DF_MEDIA_STATUS_ENABLED 0x0002 108 #define DF_REMOVABLE_MEDIA 0x0004 111 #define CAPABILITY_DMA 0x01 112 #define CAPABILITY_LBA 0x02 115 #define COMMANDSET_REMOVABLE 0x02 116 #define COMMANDSET_MEDIA_STATUS 0x10 119 #define ATA_ADDRESS_DEVHEAD_STD 0xa0 120 #define ATA_ADDRESS_DEVHEAD_LBA_MODE 0x40 [all …]
|
| D | jumpshot.c | 105 static inline int jumpshot_bulk_read(struct us_data *us, in jumpshot_bulk_read() argument 109 if (len == 0) in jumpshot_bulk_read() 112 usb_stor_dbg(us, "len = %d\n", len); in jumpshot_bulk_read() 113 return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in jumpshot_bulk_read() 118 static inline int jumpshot_bulk_write(struct us_data *us, in jumpshot_bulk_write() argument 122 if (len == 0) in jumpshot_bulk_write() 125 usb_stor_dbg(us, "len = %d\n", len); in jumpshot_bulk_write() 126 return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in jumpshot_bulk_write() 131 static int jumpshot_get_status(struct us_data *us) in jumpshot_get_status() argument 135 if (!us) in jumpshot_get_status() [all …]
|
| D | datafab.c | 70 static int datafab_determine_lun(struct us_data *us, 114 datafab_bulk_read(struct us_data *us, unsigned char *data, unsigned int len) { in datafab_bulk_read() argument 115 if (len == 0) in datafab_bulk_read() 118 usb_stor_dbg(us, "len = %d\n", len); in datafab_bulk_read() 119 return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in datafab_bulk_read() 125 datafab_bulk_write(struct us_data *us, unsigned char *data, unsigned int len) { in datafab_bulk_write() argument 126 if (len == 0) in datafab_bulk_write() 129 usb_stor_dbg(us, "len = %d\n", len); in datafab_bulk_write() 130 return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in datafab_bulk_write() 135 static int datafab_read_data(struct us_data *us, in datafab_read_data() argument [all …]
|
| D | karma.c | 31 #define RIO_RECV_LEN 0x200 33 #define RIO_ENTER_STORAGE 0x1 34 #define RIO_LEAVE_STORAGE 0x2 35 #define RIO_RESET 0xC 42 static int rio_karma_init(struct us_data *us); 87 * For each command we send 40 bytes starting 'RIOP\0' followed by 94 static int rio_karma_send_command(char cmd, struct us_data *us) in rio_karma_send_command() argument 99 struct karma_data *data = (struct karma_data *) us->extra; in rio_karma_send_command() 101 usb_stor_dbg(us, "sending command %04x\n", cmd); in rio_karma_send_command() 102 memset(us->iobuf, 0, RIO_SEND_LEN); in rio_karma_send_command() [all …]
|
| D | sddr09.c | 52 static int usb_stor_sddr09_dpcm_init(struct us_data *us); 53 static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us); 54 static int usb_stor_sddr09_init(struct us_data *us); 97 #define LSB_of(s) ((s)&0xFF) 120 #define NAND_MFR_AMD 0x01 121 #define NAND_MFR_NATSEMI 0x8f 122 #define NAND_MFR_TOSHIBA 0x98 123 #define NAND_MFR_SAMSUNG 0xec 144 * 256 MB NAND flash has a 5-byte ID with 2nd byte 0xaa, 0xba, 0xca or 0xda. 149 { 0x6e, 20, 8, 4, 8, 2}, /* 1 MB */ [all …]
|
| /kernel/linux/linux-5.10/drivers/usb/storage/ |
| D | transport.c | 67 * sets the machine state and the ABORTING bit in us->dflags to prevent 69 * below, which atomically tests-and-clears the URB_ACTIVE bit in us->dflags 74 * When a disconnect occurs, the DISCONNECTING bit in us->dflags is set to 98 * This is the completion handler which will wake us up when an URB 115 static int usb_stor_msg_common(struct us_data *us, int timeout) in usb_stor_msg_common() argument 122 if (test_bit(US_FLIDX_ABORTING, &us->dflags)) in usb_stor_msg_common() 129 us->current_urb->context = &urb_done; in usb_stor_msg_common() 130 us->current_urb->transfer_flags = 0; in usb_stor_msg_common() 133 * we assume that if transfer_buffer isn't us->iobuf then it in usb_stor_msg_common() 135 * easier than always having the caller tell us whether the in usb_stor_msg_common() [all …]
|
| D | usb.c | 148 for (i = 0; i < config->desc.bNumInterfaces; i++) { in us_set_lock_class() 171 struct us_data *us = usb_get_intfdata(iface); in usb_stor_suspend() local 174 mutex_lock(&us->dev_mutex); in usb_stor_suspend() 176 if (us->suspend_resume_hook) in usb_stor_suspend() 177 (us->suspend_resume_hook)(us, US_SUSPEND); in usb_stor_suspend() 184 mutex_unlock(&us->dev_mutex); in usb_stor_suspend() 185 return 0; in usb_stor_suspend() 191 struct us_data *us = usb_get_intfdata(iface); in usb_stor_resume() local 193 mutex_lock(&us->dev_mutex); in usb_stor_resume() 195 if (us->suspend_resume_hook) in usb_stor_resume() [all …]
|
| D | realtek_cr.c | 42 MODULE_PARM_DESC(auto_delink_en, "auto delink mode (0=firmware, 1=software [default])"); 100 struct us_data *us; member 115 #define FLIDX_AUTO_DELINK 0x01 131 #define VENDOR_ID(chip) ((chip)->status[0].vid) 132 #define PRODUCT_ID(chip) ((chip)->status[0].pid) 133 #define FW_VERSION(chip) ((chip)->status[0].fw_ver) 136 #define STATUS_SUCCESS 0 141 CHK_BIT((chip)->status[0].function[0], 1) 143 CHK_BIT((chip)->status[0].function[0], 2) 145 CHK_BIT((chip)->status[0].function[0], 3) [all …]
|
| D | alauda.c | 44 #define ALAUDA_STATUS_ERROR 0x01 45 #define ALAUDA_STATUS_READY 0x40 50 #define ALAUDA_GET_XD_MEDIA_STATUS 0x08 51 #define ALAUDA_GET_SM_MEDIA_STATUS 0x98 52 #define ALAUDA_ACK_XD_MEDIA_CHANGE 0x0a 53 #define ALAUDA_ACK_SM_MEDIA_CHANGE 0x9a 54 #define ALAUDA_GET_XD_MEDIA_SIG 0x86 55 #define ALAUDA_GET_SM_MEDIA_SIG 0x96 58 * Bulk command identity (byte 0) 60 #define ALAUDA_BULK_CMD 0x40 [all …]
|
| D | shuttle_usbat.c | 54 #define USBAT_DEV_HP8200 0x01 55 #define USBAT_DEV_FLASH 0x02 57 #define USBAT_EPP_PORT 0x10 58 #define USBAT_EPP_REGISTER 0x30 59 #define USBAT_ATA 0x40 60 #define USBAT_ISA 0x50 63 #define USBAT_CMD_READ_REG 0x00 64 #define USBAT_CMD_WRITE_REG 0x01 65 #define USBAT_CMD_READ_BLOCK 0x02 66 #define USBAT_CMD_WRITE_BLOCK 0x03 [all …]
|
| D | freecom.c | 35 static void pdump(struct us_data *us, void *ibuffer, int length); 39 #define ERR_STAT 0x01 40 #define DRQ_STAT 0x08 80 #define FCM_INT_STATUS 0x02 /* INDEX_STAT */ 81 #define FCM_STATUS_BUSY 0x80 87 #define FCM_PACKET_ATAPI 0x21 88 #define FCM_PACKET_STATUS 0x20 94 #define FCM_PACKET_INPUT 0x81 97 #define FCM_PACKET_OUTPUT 0x01 103 #define FCM_PACKET_IDE_WRITE 0x40 [all …]
|
| D | ene_ub6250.c | 78 #define ENE_BIN_CODE_LEN 0x800 80 #define REG_CARD_STATUS 0xFF83 81 #define REG_HW_TRAP1 0xFF89 84 #define SS_SUCCESS 0x000000 /* No Sense */ 85 #define SS_NOT_READY 0x023A00 /* Medium not present */ 86 #define SS_MEDIUM_ERR 0x031100 /* Unrecovered read error */ 87 #define SS_HW_ERR 0x040800 /* Communication failure */ 88 #define SS_ILLEGAL_REQUEST 0x052000 /* Invalid command */ 89 #define SS_UNIT_ATTENTION 0x062900 /* Reset occurred */ 101 #define FDIR_WRITE 0 [all …]
|
| D | isd200.c | 58 static int isd200_Initialization(struct us_data *us); 106 #define DF_ATA_DEVICE 0x0001 107 #define DF_MEDIA_STATUS_ENABLED 0x0002 108 #define DF_REMOVABLE_MEDIA 0x0004 111 #define CAPABILITY_DMA 0x01 112 #define CAPABILITY_LBA 0x02 115 #define COMMANDSET_REMOVABLE 0x02 116 #define COMMANDSET_MEDIA_STATUS 0x10 119 #define ATA_ADDRESS_DEVHEAD_STD 0xa0 120 #define ATA_ADDRESS_DEVHEAD_LBA_MODE 0x40 [all …]
|
| D | jumpshot.c | 105 static inline int jumpshot_bulk_read(struct us_data *us, in jumpshot_bulk_read() argument 109 if (len == 0) in jumpshot_bulk_read() 112 usb_stor_dbg(us, "len = %d\n", len); in jumpshot_bulk_read() 113 return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in jumpshot_bulk_read() 118 static inline int jumpshot_bulk_write(struct us_data *us, in jumpshot_bulk_write() argument 122 if (len == 0) in jumpshot_bulk_write() 125 usb_stor_dbg(us, "len = %d\n", len); in jumpshot_bulk_write() 126 return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in jumpshot_bulk_write() 131 static int jumpshot_get_status(struct us_data *us) in jumpshot_get_status() argument 135 if (!us) in jumpshot_get_status() [all …]
|
| D | datafab.c | 70 static int datafab_determine_lun(struct us_data *us, 114 datafab_bulk_read(struct us_data *us, unsigned char *data, unsigned int len) { in datafab_bulk_read() argument 115 if (len == 0) in datafab_bulk_read() 118 usb_stor_dbg(us, "len = %d\n", len); in datafab_bulk_read() 119 return usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in datafab_bulk_read() 125 datafab_bulk_write(struct us_data *us, unsigned char *data, unsigned int len) { in datafab_bulk_write() argument 126 if (len == 0) in datafab_bulk_write() 129 usb_stor_dbg(us, "len = %d\n", len); in datafab_bulk_write() 130 return usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in datafab_bulk_write() 135 static int datafab_read_data(struct us_data *us, in datafab_read_data() argument [all …]
|
| D | karma.c | 31 #define RIO_RECV_LEN 0x200 33 #define RIO_ENTER_STORAGE 0x1 34 #define RIO_LEAVE_STORAGE 0x2 35 #define RIO_RESET 0xC 42 static int rio_karma_init(struct us_data *us); 87 * For each command we send 40 bytes starting 'RIOP\0' followed by 94 static int rio_karma_send_command(char cmd, struct us_data *us) in rio_karma_send_command() argument 99 struct karma_data *data = (struct karma_data *) us->extra; in rio_karma_send_command() 101 usb_stor_dbg(us, "sending command %04x\n", cmd); in rio_karma_send_command() 102 memset(us->iobuf, 0, RIO_SEND_LEN); in rio_karma_send_command() [all …]
|
| D | sddr09.c | 52 static int usb_stor_sddr09_dpcm_init(struct us_data *us); 53 static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us); 54 static int usb_stor_sddr09_init(struct us_data *us); 97 #define LSB_of(s) ((s)&0xFF) 120 #define NAND_MFR_AMD 0x01 121 #define NAND_MFR_NATSEMI 0x8f 122 #define NAND_MFR_TOSHIBA 0x98 123 #define NAND_MFR_SAMSUNG 0xec 144 * 256 MB NAND flash has a 5-byte ID with 2nd byte 0xaa, 0xba, 0xca or 0xda. 149 { 0x6e, 20, 8, 4, 8, 2}, /* 1 MB */ [all …]
|
| D | option_ms.c | 19 #define ZCD_FORCE_MODEM 0x01 20 #define ZCD_ALLOW_MS 0x02 29 static int option_rezero(struct us_data *us) in option_rezero() argument 32 0x55, 0x53, 0x42, 0x43, 0x78, 0x56, 0x34, 0x12, in option_rezero() 33 0x01, 0x00, 0x00, 0x00, 0x80, 0x00, 0x06, 0x01, in option_rezero() 34 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, in option_rezero() 35 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 in option_rezero() 40 usb_stor_dbg(us, "Option MS: %s\n", "DEVICE MODE SWITCH"); in option_rezero() 47 result = usb_stor_bulk_transfer_buf(us, in option_rezero() 48 us->send_bulk_pipe, in option_rezero() [all …]
|