diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-04-18 06:09:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-26 18:04:38 -0400 |
commit | f0183a338e4f90e59a4b4daa10cba0fae8e3fca7 (patch) | |
tree | a68b5c6a0074dca1802e2287c2244f21514842ba | |
parent | 5b91dfe187bbe3a8116432016375f39fff91a237 (diff) |
usb: storage: fix multi-line comment style
No functional changes here, just making sure our
storage driver uses a consistent multi-line comment
style.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
42 files changed, 829 insertions, 455 deletions
diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c index 171fa7d793bc..1d8b03c81030 100644 --- a/drivers/usb/storage/alauda.c +++ b/drivers/usb/storage/alauda.c | |||
@@ -829,8 +829,10 @@ static int alauda_write_lba(struct us_data *us, u16 lba, | |||
829 | 829 | ||
830 | pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset]; | 830 | pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset]; |
831 | if (pba == 1) { | 831 | if (pba == 1) { |
832 | /* Maybe it is impossible to write to PBA 1. | 832 | /* |
833 | Fake success, but don't do anything. */ | 833 | * Maybe it is impossible to write to PBA 1. |
834 | * Fake success, but don't do anything. | ||
835 | */ | ||
834 | printk(KERN_WARNING | 836 | printk(KERN_WARNING |
835 | "alauda_write_lba: avoid writing to pba 1\n"); | 837 | "alauda_write_lba: avoid writing to pba 1\n"); |
836 | return USB_STOR_TRANSPORT_GOOD; | 838 | return USB_STOR_TRANSPORT_GOOD; |
@@ -977,10 +979,12 @@ static int alauda_read_data(struct us_data *us, unsigned long address, | |||
977 | usb_stor_dbg(us, "Read %d zero pages (LBA %d) page %d\n", | 979 | usb_stor_dbg(us, "Read %d zero pages (LBA %d) page %d\n", |
978 | pages, lba, page); | 980 | pages, lba, page); |
979 | 981 | ||
980 | /* This is not really an error. It just means | 982 | /* |
981 | that the block has never been written. | 983 | * This is not really an error. It just means |
982 | Instead of returning USB_STOR_TRANSPORT_ERROR | 984 | * that the block has never been written. |
983 | it is better to return all zero data. */ | 985 | * Instead of returning USB_STOR_TRANSPORT_ERROR |
986 | * it is better to return all zero data. | ||
987 | */ | ||
984 | 988 | ||
985 | memset(buffer, 0, len); | 989 | memset(buffer, 0, len); |
986 | } else { | 990 | } else { |
@@ -1222,8 +1226,10 @@ static int alauda_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1222 | } | 1226 | } |
1223 | 1227 | ||
1224 | if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { | 1228 | if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { |
1225 | /* sure. whatever. not like we can stop the user from popping | 1229 | /* |
1226 | the media out of the device (no locking doors, etc) */ | 1230 | * sure. whatever. not like we can stop the user from popping |
1231 | * the media out of the device (no locking doors, etc) | ||
1232 | */ | ||
1227 | return USB_STOR_TRANSPORT_GOOD; | 1233 | return USB_STOR_TRANSPORT_GOOD; |
1228 | } | 1234 | } |
1229 | 1235 | ||
diff --git a/drivers/usb/storage/cypress_atacb.c b/drivers/usb/storage/cypress_atacb.c index c80d3dec9a34..5e4af44d7d9f 100644 --- a/drivers/usb/storage/cypress_atacb.c +++ b/drivers/usb/storage/cypress_atacb.c | |||
@@ -110,13 +110,17 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) | |||
110 | /* first build the ATACB command */ | 110 | /* first build the ATACB command */ |
111 | srb->cmd_len = 16; | 111 | srb->cmd_len = 16; |
112 | 112 | ||
113 | srb->cmnd[0] = 0x24; /* bVSCBSignature : vendor-specific command | 113 | srb->cmnd[0] = 0x24; /* |
114 | this value can change, but most(all ?) manufacturers | 114 | * bVSCBSignature : vendor-specific command |
115 | keep the cypress default : 0x24 */ | 115 | * this value can change, but most(all ?) manufacturers |
116 | * keep the cypress default : 0x24 | ||
117 | */ | ||
116 | srb->cmnd[1] = 0x24; /* bVSCBSubCommand : 0x24 for ATACB */ | 118 | srb->cmnd[1] = 0x24; /* bVSCBSubCommand : 0x24 for ATACB */ |
117 | 119 | ||
118 | srb->cmnd[3] = 0xff - 1; /* features, sector count, lba low, lba med | 120 | srb->cmnd[3] = 0xff - 1; /* |
119 | lba high, device, command are valid */ | 121 | * features, sector count, lba low, lba med |
122 | * lba high, device, command are valid | ||
123 | */ | ||
120 | srb->cmnd[4] = 1; /* TransferBlockCount : 512 */ | 124 | srb->cmnd[4] = 1; /* TransferBlockCount : 512 */ |
121 | 125 | ||
122 | if (save_cmnd[0] == ATA_16) { | 126 | if (save_cmnd[0] == ATA_16) { |
@@ -155,8 +159,7 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) | |||
155 | 159 | ||
156 | usb_stor_transparent_scsi_command(srb, us); | 160 | usb_stor_transparent_scsi_command(srb, us); |
157 | 161 | ||
158 | /* if the device doesn't support ATACB | 162 | /* if the device doesn't support ATACB */ |
159 | */ | ||
160 | if (srb->result == SAM_STAT_CHECK_CONDITION && | 163 | if (srb->result == SAM_STAT_CHECK_CONDITION && |
161 | memcmp(srb->sense_buffer, usb_stor_sense_invalidCDB, | 164 | memcmp(srb->sense_buffer, usb_stor_sense_invalidCDB, |
162 | sizeof(usb_stor_sense_invalidCDB)) == 0) { | 165 | sizeof(usb_stor_sense_invalidCDB)) == 0) { |
@@ -164,7 +167,8 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) | |||
164 | goto end; | 167 | goto end; |
165 | } | 168 | } |
166 | 169 | ||
167 | /* if ck_cond flags is set, and there wasn't critical error, | 170 | /* |
171 | * if ck_cond flags is set, and there wasn't critical error, | ||
168 | * build the special sense | 172 | * build the special sense |
169 | */ | 173 | */ |
170 | if ((srb->result != (DID_ERROR << 16) && | 174 | if ((srb->result != (DID_ERROR << 16) && |
@@ -176,11 +180,11 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) | |||
176 | unsigned char *desc = sb + 8; | 180 | unsigned char *desc = sb + 8; |
177 | int tmp_result; | 181 | int tmp_result; |
178 | 182 | ||
179 | /* build the command for | 183 | /* build the command for reading the ATA registers */ |
180 | * reading the ATA registers */ | ||
181 | scsi_eh_prep_cmnd(srb, &ses, NULL, 0, sizeof(regs)); | 184 | scsi_eh_prep_cmnd(srb, &ses, NULL, 0, sizeof(regs)); |
182 | 185 | ||
183 | /* we use the same command as before, but we set | 186 | /* |
187 | * we use the same command as before, but we set | ||
184 | * the read taskfile bit, for not executing atacb command, | 188 | * the read taskfile bit, for not executing atacb command, |
185 | * but reading register selected in srb->cmnd[4] | 189 | * but reading register selected in srb->cmnd[4] |
186 | */ | 190 | */ |
@@ -204,10 +208,11 @@ static void cypress_atacb_passthrough(struct scsi_cmnd *srb, struct us_data *us) | |||
204 | sb[2] = 0; /* ATA PASS THROUGH INFORMATION AVAILABLE */ | 208 | sb[2] = 0; /* ATA PASS THROUGH INFORMATION AVAILABLE */ |
205 | sb[3] = 0x1D; | 209 | sb[3] = 0x1D; |
206 | 210 | ||
207 | /* XXX we should generate sk, asc, ascq from status and error | 211 | /* |
212 | * XXX we should generate sk, asc, ascq from status and error | ||
208 | * regs | 213 | * regs |
209 | * (see 11.1 Error translation ATA device error to SCSI error | 214 | * (see 11.1 Error translation ATA device error to SCSI error |
210 | * map, and ata_to_sense_error from libata.) | 215 | * map, and ata_to_sense_error from libata.) |
211 | */ | 216 | */ |
212 | 217 | ||
213 | /* Sense data is current and format is descriptor. */ | 218 | /* Sense data is current and format is descriptor. */ |
@@ -258,7 +263,8 @@ static int cypress_probe(struct usb_interface *intf, | |||
258 | if (result) | 263 | if (result) |
259 | return result; | 264 | return result; |
260 | 265 | ||
261 | /* Among CY7C68300 chips, the A revision does not support Cypress ATACB | 266 | /* |
267 | * Among CY7C68300 chips, the A revision does not support Cypress ATACB | ||
262 | * Filter out this revision from EEPROM default descriptor values | 268 | * Filter out this revision from EEPROM default descriptor values |
263 | */ | 269 | */ |
264 | device = interface_to_usbdev(intf); | 270 | device = interface_to_usbdev(intf); |
diff --git a/drivers/usb/storage/datafab.c b/drivers/usb/storage/datafab.c index aa4f51944a4a..723197af6ec5 100644 --- a/drivers/usb/storage/datafab.c +++ b/drivers/usb/storage/datafab.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for Datafab USB Compact Flash reader | 1 | /* |
2 | * Driver for Datafab USB Compact Flash reader | ||
2 | * | 3 | * |
3 | * datafab driver v0.1: | 4 | * datafab driver v0.1: |
4 | * | 5 | * |
@@ -693,18 +694,23 @@ static int datafab_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
693 | } | 694 | } |
694 | 695 | ||
695 | if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { | 696 | if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { |
696 | // sure. whatever. not like we can stop the user from | 697 | /* |
697 | // popping the media out of the device (no locking doors, etc) | 698 | * sure. whatever. not like we can stop the user from |
698 | // | 699 | * popping the media out of the device (no locking doors, etc) |
700 | */ | ||
699 | return USB_STOR_TRANSPORT_GOOD; | 701 | return USB_STOR_TRANSPORT_GOOD; |
700 | } | 702 | } |
701 | 703 | ||
702 | if (srb->cmnd[0] == START_STOP) { | 704 | if (srb->cmnd[0] == START_STOP) { |
703 | /* this is used by sd.c'check_scsidisk_media_change to detect | 705 | /* |
704 | media change */ | 706 | * this is used by sd.c'check_scsidisk_media_change to detect |
707 | * media change | ||
708 | */ | ||
705 | usb_stor_dbg(us, "START_STOP\n"); | 709 | usb_stor_dbg(us, "START_STOP\n"); |
706 | /* the first datafab_id_device after a media change returns | 710 | /* |
707 | an error (determined experimentally) */ | 711 | * the first datafab_id_device after a media change returns |
712 | * an error (determined experimentally) | ||
713 | */ | ||
708 | rc = datafab_id_device(us, info); | 714 | rc = datafab_id_device(us, info); |
709 | if (rc == USB_STOR_TRANSPORT_GOOD) { | 715 | if (rc == USB_STOR_TRANSPORT_GOOD) { |
710 | info->sense_key = NO_SENSE; | 716 | info->sense_key = NO_SENSE; |
diff --git a/drivers/usb/storage/debug.c b/drivers/usb/storage/debug.c index 5a12c03138f8..8d20804a59e6 100644 --- a/drivers/usb/storage/debug.c +++ b/drivers/usb/storage/debug.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * Debugging Functions Source Code File | 3 | * Debugging Functions Source Code File |
3 | * | 4 | * |
4 | * Current development and maintenance by: | 5 | * Current development and maintenance by: |
diff --git a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h index 6b365ce4e610..8ab73299b650 100644 --- a/drivers/usb/storage/debug.h +++ b/drivers/usb/storage/debug.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * Debugging Functions Header File | 3 | * Debugging Functions Header File |
3 | * | 4 | * |
4 | * Current development and maintenance by: | 5 | * Current development and maintenance by: |
diff --git a/drivers/usb/storage/ene_ub6250.c b/drivers/usb/storage/ene_ub6250.c index d3a17c65a702..02bdaa912164 100644 --- a/drivers/usb/storage/ene_ub6250.c +++ b/drivers/usb/storage/ene_ub6250.c | |||
@@ -560,8 +560,10 @@ static int ene_send_scsi_cmd(struct us_data *us, u8 fDir, void *buf, int use_sg) | |||
560 | /* check bulk status */ | 560 | /* check bulk status */ |
561 | residue = le32_to_cpu(bcs->Residue); | 561 | residue = le32_to_cpu(bcs->Residue); |
562 | 562 | ||
563 | /* try to compute the actual residue, based on how much data | 563 | /* |
564 | * was really transferred and what the device tells us */ | 564 | * try to compute the actual residue, based on how much data |
565 | * was really transferred and what the device tells us | ||
566 | */ | ||
565 | if (residue && !(us->fflags & US_FL_IGNORE_RESIDUE)) { | 567 | if (residue && !(us->fflags & US_FL_IGNORE_RESIDUE)) { |
566 | residue = min(residue, transfer_length); | 568 | residue = min(residue, transfer_length); |
567 | if (us->srb != NULL) | 569 | if (us->srb != NULL) |
@@ -862,9 +864,6 @@ static int ms_read_readpage(struct us_data *us, u32 PhyBlockAddr, | |||
862 | u8 ExtBuf[4]; | 864 | u8 ExtBuf[4]; |
863 | u32 bn = PhyBlockAddr * 0x20 + PageNum; | 865 | u32 bn = PhyBlockAddr * 0x20 + PageNum; |
864 | 866 | ||
865 | /* printk(KERN_INFO "MS --- MS_ReaderReadPage, | ||
866 | PhyBlockAddr = %x, PageNum = %x\n", PhyBlockAddr, PageNum); */ | ||
867 | |||
868 | result = ene_load_bincode(us, MS_RW_PATTERN); | 867 | result = ene_load_bincode(us, MS_RW_PATTERN); |
869 | if (result != USB_STOR_XFER_GOOD) | 868 | if (result != USB_STOR_XFER_GOOD) |
870 | return USB_STOR_TRANSPORT_ERROR; | 869 | return USB_STOR_TRANSPORT_ERROR; |
@@ -1141,8 +1140,6 @@ static int ms_read_copyblock(struct us_data *us, u16 oldphy, u16 newphy, | |||
1141 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf; | 1140 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf; |
1142 | int result; | 1141 | int result; |
1143 | 1142 | ||
1144 | /* printk(KERN_INFO "MS_ReaderCopyBlock --- PhyBlockAddr = %x, | ||
1145 | PageNum = %x\n", PhyBlockAddr, PageNum); */ | ||
1146 | result = ene_load_bincode(us, MS_RW_PATTERN); | 1143 | result = ene_load_bincode(us, MS_RW_PATTERN); |
1147 | if (result != USB_STOR_XFER_GOOD) | 1144 | if (result != USB_STOR_XFER_GOOD) |
1148 | return USB_STOR_TRANSPORT_ERROR; | 1145 | return USB_STOR_TRANSPORT_ERROR; |
@@ -1176,8 +1173,6 @@ static int ms_read_eraseblock(struct us_data *us, u32 PhyBlockAddr) | |||
1176 | int result; | 1173 | int result; |
1177 | u32 bn = PhyBlockAddr; | 1174 | u32 bn = PhyBlockAddr; |
1178 | 1175 | ||
1179 | /* printk(KERN_INFO "MS --- ms_read_eraseblock, | ||
1180 | PhyBlockAddr = %x\n", PhyBlockAddr); */ | ||
1181 | result = ene_load_bincode(us, MS_RW_PATTERN); | 1176 | result = ene_load_bincode(us, MS_RW_PATTERN); |
1182 | if (result != USB_STOR_XFER_GOOD) | 1177 | if (result != USB_STOR_XFER_GOOD) |
1183 | return USB_STOR_TRANSPORT_ERROR; | 1178 | return USB_STOR_TRANSPORT_ERROR; |
@@ -1255,8 +1250,6 @@ static int ms_lib_overwrite_extra(struct us_data *us, u32 PhyBlockAddr, | |||
1255 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf; | 1250 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf; |
1256 | int result; | 1251 | int result; |
1257 | 1252 | ||
1258 | /* printk("MS --- MS_LibOverwriteExtra, | ||
1259 | PhyBlockAddr = %x, PageNum = %x\n", PhyBlockAddr, PageNum); */ | ||
1260 | result = ene_load_bincode(us, MS_RW_PATTERN); | 1253 | result = ene_load_bincode(us, MS_RW_PATTERN); |
1261 | if (result != USB_STOR_XFER_GOOD) | 1254 | if (result != USB_STOR_XFER_GOOD) |
1262 | return USB_STOR_TRANSPORT_ERROR; | 1255 | return USB_STOR_TRANSPORT_ERROR; |
@@ -1342,7 +1335,6 @@ static int ms_lib_read_extra(struct us_data *us, u32 PhyBlock, | |||
1342 | int result; | 1335 | int result; |
1343 | u8 ExtBuf[4]; | 1336 | u8 ExtBuf[4]; |
1344 | 1337 | ||
1345 | /* printk("MS_LibReadExtra --- PhyBlock = %x, PageNum = %x\n", PhyBlock, PageNum); */ | ||
1346 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); | 1338 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
1347 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 1339 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
1348 | bcb->DataTransferLength = 0x4; | 1340 | bcb->DataTransferLength = 0x4; |
@@ -1541,9 +1533,6 @@ static int ms_lib_read_extrablock(struct us_data *us, u32 PhyBlock, | |||
1541 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf; | 1533 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap *) us->iobuf; |
1542 | int result; | 1534 | int result; |
1543 | 1535 | ||
1544 | /* printk("MS_LibReadExtraBlock --- PhyBlock = %x, | ||
1545 | PageNum = %x, blen = %x\n", PhyBlock, PageNum, blen); */ | ||
1546 | |||
1547 | /* Read Extra Data */ | 1536 | /* Read Extra Data */ |
1548 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); | 1537 | memset(bcb, 0, sizeof(struct bulk_cb_wrap)); |
1549 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); | 1538 | bcb->Signature = cpu_to_le32(US_BULK_CB_SIGN); |
@@ -2390,8 +2379,10 @@ static int ene_ub6250_reset_resume(struct usb_interface *iface) | |||
2390 | /* Report the reset to the SCSI core */ | 2379 | /* Report the reset to the SCSI core */ |
2391 | usb_stor_reset_resume(iface); | 2380 | usb_stor_reset_resume(iface); |
2392 | 2381 | ||
2393 | /* FIXME: Notify the subdrivers that they need to reinitialize | 2382 | /* |
2394 | * the device */ | 2383 | * FIXME: Notify the subdrivers that they need to reinitialize |
2384 | * the device | ||
2385 | */ | ||
2395 | info->Power_IsResum = true; | 2386 | info->Power_IsResum = true; |
2396 | /*info->SD_Status.Ready = 0; */ | 2387 | /*info->SD_Status.Ready = 0; */ |
2397 | info->SD_Status = *(struct SD_STATUS *)&tmp; | 2388 | info->SD_Status = *(struct SD_STATUS *)&tmp; |
diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c index 3f2b08966b9d..c0a5d954414b 100644 --- a/drivers/usb/storage/freecom.c +++ b/drivers/usb/storage/freecom.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for Freecom USB/IDE adaptor | 1 | /* |
2 | * Driver for Freecom USB/IDE adaptor | ||
2 | * | 3 | * |
3 | * Freecom v0.1: | 4 | * Freecom v0.1: |
4 | * | 5 | * |
@@ -84,25 +85,33 @@ struct freecom_status { | |||
84 | u8 Pad[60]; | 85 | u8 Pad[60]; |
85 | }; | 86 | }; |
86 | 87 | ||
87 | /* Freecom stuffs the interrupt status in the INDEX_STAT bit of the ide | 88 | /* |
88 | * register. */ | 89 | * Freecom stuffs the interrupt status in the INDEX_STAT bit of the ide |
90 | * register. | ||
91 | */ | ||
89 | #define FCM_INT_STATUS 0x02 /* INDEX_STAT */ | 92 | #define FCM_INT_STATUS 0x02 /* INDEX_STAT */ |
90 | #define FCM_STATUS_BUSY 0x80 | 93 | #define FCM_STATUS_BUSY 0x80 |
91 | 94 | ||
92 | /* These are the packet types. The low bit indicates that this command | 95 | /* |
93 | * should wait for an interrupt. */ | 96 | * These are the packet types. The low bit indicates that this command |
97 | * should wait for an interrupt. | ||
98 | */ | ||
94 | #define FCM_PACKET_ATAPI 0x21 | 99 | #define FCM_PACKET_ATAPI 0x21 |
95 | #define FCM_PACKET_STATUS 0x20 | 100 | #define FCM_PACKET_STATUS 0x20 |
96 | 101 | ||
97 | /* Receive data from the IDE interface. The ATAPI packet has already | 102 | /* |
98 | * waited, so the data should be immediately available. */ | 103 | * Receive data from the IDE interface. The ATAPI packet has already |
104 | * waited, so the data should be immediately available. | ||
105 | */ | ||
99 | #define FCM_PACKET_INPUT 0x81 | 106 | #define FCM_PACKET_INPUT 0x81 |
100 | 107 | ||
101 | /* Send data to the IDE interface. */ | 108 | /* Send data to the IDE interface. */ |
102 | #define FCM_PACKET_OUTPUT 0x01 | 109 | #define FCM_PACKET_OUTPUT 0x01 |
103 | 110 | ||
104 | /* Write a value to an ide register. Or the ide register to write after | 111 | /* |
105 | * munging the address a bit. */ | 112 | * Write a value to an ide register. Or the ide register to write after |
113 | * munging the address a bit. | ||
114 | */ | ||
106 | #define FCM_PACKET_IDE_WRITE 0x40 | 115 | #define FCM_PACKET_IDE_WRITE 0x40 |
107 | #define FCM_PACKET_IDE_READ 0xC0 | 116 | #define FCM_PACKET_IDE_READ 0xC0 |
108 | 117 | ||
@@ -251,16 +260,20 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
251 | result = usb_stor_bulk_transfer_buf (us, opipe, fcb, | 260 | result = usb_stor_bulk_transfer_buf (us, opipe, fcb, |
252 | FCM_PACKET_LENGTH, NULL); | 261 | FCM_PACKET_LENGTH, NULL); |
253 | 262 | ||
254 | /* The Freecom device will only fail if there is something wrong in | 263 | /* |
264 | * The Freecom device will only fail if there is something wrong in | ||
255 | * USB land. It returns the status in its own registers, which | 265 | * USB land. It returns the status in its own registers, which |
256 | * come back in the bulk pipe. */ | 266 | * come back in the bulk pipe. |
267 | */ | ||
257 | if (result != USB_STOR_XFER_GOOD) { | 268 | if (result != USB_STOR_XFER_GOOD) { |
258 | usb_stor_dbg(us, "freecom transport error\n"); | 269 | usb_stor_dbg(us, "freecom transport error\n"); |
259 | return USB_STOR_TRANSPORT_ERROR; | 270 | return USB_STOR_TRANSPORT_ERROR; |
260 | } | 271 | } |
261 | 272 | ||
262 | /* There are times we can optimize out this status read, but it | 273 | /* |
263 | * doesn't hurt us to always do it now. */ | 274 | * There are times we can optimize out this status read, but it |
275 | * doesn't hurt us to always do it now. | ||
276 | */ | ||
264 | result = usb_stor_bulk_transfer_buf (us, ipipe, fst, | 277 | result = usb_stor_bulk_transfer_buf (us, ipipe, fst, |
265 | FCM_STATUS_PACKET_LENGTH, &partial); | 278 | FCM_STATUS_PACKET_LENGTH, &partial); |
266 | usb_stor_dbg(us, "foo Status result %d %u\n", result, partial); | 279 | usb_stor_dbg(us, "foo Status result %d %u\n", result, partial); |
@@ -269,7 +282,8 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
269 | 282 | ||
270 | US_DEBUG(pdump(us, (void *)fst, partial)); | 283 | US_DEBUG(pdump(us, (void *)fst, partial)); |
271 | 284 | ||
272 | /* The firmware will time-out commands after 20 seconds. Some commands | 285 | /* |
286 | * The firmware will time-out commands after 20 seconds. Some commands | ||
273 | * can legitimately take longer than this, so we use a different | 287 | * can legitimately take longer than this, so we use a different |
274 | * command that only waits for the interrupt and then sends status, | 288 | * command that only waits for the interrupt and then sends status, |
275 | * without having to send a new ATAPI command to the device. | 289 | * without having to send a new ATAPI command to the device. |
@@ -291,7 +305,8 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
291 | result = usb_stor_bulk_transfer_buf (us, opipe, fcb, | 305 | result = usb_stor_bulk_transfer_buf (us, opipe, fcb, |
292 | FCM_PACKET_LENGTH, NULL); | 306 | FCM_PACKET_LENGTH, NULL); |
293 | 307 | ||
294 | /* The Freecom device will only fail if there is something | 308 | /* |
309 | * The Freecom device will only fail if there is something | ||
295 | * wrong in USB land. It returns the status in its own | 310 | * wrong in USB land. It returns the status in its own |
296 | * registers, which come back in the bulk pipe. | 311 | * registers, which come back in the bulk pipe. |
297 | */ | 312 | */ |
@@ -318,9 +333,11 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
318 | return USB_STOR_TRANSPORT_FAILED; | 333 | return USB_STOR_TRANSPORT_FAILED; |
319 | } | 334 | } |
320 | 335 | ||
321 | /* The device might not have as much data available as we | 336 | /* |
337 | * The device might not have as much data available as we | ||
322 | * requested. If you ask for more than the device has, this reads | 338 | * requested. If you ask for more than the device has, this reads |
323 | * and such will hang. */ | 339 | * and such will hang. |
340 | */ | ||
324 | usb_stor_dbg(us, "Device indicates that it has %d bytes available\n", | 341 | usb_stor_dbg(us, "Device indicates that it has %d bytes available\n", |
325 | le16_to_cpu(fst->Count)); | 342 | le16_to_cpu(fst->Count)); |
326 | usb_stor_dbg(us, "SCSI requested %d\n", scsi_bufflen(srb)); | 343 | usb_stor_dbg(us, "SCSI requested %d\n", scsi_bufflen(srb)); |
@@ -344,16 +361,20 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
344 | length); | 361 | length); |
345 | } | 362 | } |
346 | 363 | ||
347 | /* What we do now depends on what direction the data is supposed to | 364 | /* |
348 | * move in. */ | 365 | * What we do now depends on what direction the data is supposed to |
366 | * move in. | ||
367 | */ | ||
349 | 368 | ||
350 | switch (us->srb->sc_data_direction) { | 369 | switch (us->srb->sc_data_direction) { |
351 | case DMA_FROM_DEVICE: | 370 | case DMA_FROM_DEVICE: |
352 | /* catch bogus "read 0 length" case */ | 371 | /* catch bogus "read 0 length" case */ |
353 | if (!length) | 372 | if (!length) |
354 | break; | 373 | break; |
355 | /* Make sure that the status indicates that the device | 374 | /* |
356 | * wants data as well. */ | 375 | * Make sure that the status indicates that the device |
376 | * wants data as well. | ||
377 | */ | ||
357 | if ((fst->Status & DRQ_STAT) == 0 || (fst->Reason & 3) != 2) { | 378 | if ((fst->Status & DRQ_STAT) == 0 || (fst->Reason & 3) != 2) { |
358 | usb_stor_dbg(us, "SCSI wants data, drive doesn't have any\n"); | 379 | usb_stor_dbg(us, "SCSI wants data, drive doesn't have any\n"); |
359 | return USB_STOR_TRANSPORT_FAILED; | 380 | return USB_STOR_TRANSPORT_FAILED; |
@@ -384,8 +405,10 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
384 | /* catch bogus "write 0 length" case */ | 405 | /* catch bogus "write 0 length" case */ |
385 | if (!length) | 406 | if (!length) |
386 | break; | 407 | break; |
387 | /* Make sure the status indicates that the device wants to | 408 | /* |
388 | * send us data. */ | 409 | * Make sure the status indicates that the device wants to |
410 | * send us data. | ||
411 | */ | ||
389 | /* !!IMPLEMENT!! */ | 412 | /* !!IMPLEMENT!! */ |
390 | result = freecom_writedata (srb, us, ipipe, opipe, length); | 413 | result = freecom_writedata (srb, us, ipipe, opipe, length); |
391 | if (result != USB_STOR_TRANSPORT_GOOD) | 414 | if (result != USB_STOR_TRANSPORT_GOOD) |
@@ -431,7 +454,8 @@ static int init_freecom(struct us_data *us) | |||
431 | int result; | 454 | int result; |
432 | char *buffer = us->iobuf; | 455 | char *buffer = us->iobuf; |
433 | 456 | ||
434 | /* The DMA-mapped I/O buffer is 64 bytes long, just right for | 457 | /* |
458 | * The DMA-mapped I/O buffer is 64 bytes long, just right for | ||
435 | * all our packets. No need to allocate any extra buffer space. | 459 | * all our packets. No need to allocate any extra buffer space. |
436 | */ | 460 | */ |
437 | 461 | ||
@@ -440,7 +464,8 @@ static int init_freecom(struct us_data *us) | |||
440 | buffer[32] = '\0'; | 464 | buffer[32] = '\0'; |
441 | usb_stor_dbg(us, "String returned from FC init is: %s\n", buffer); | 465 | usb_stor_dbg(us, "String returned from FC init is: %s\n", buffer); |
442 | 466 | ||
443 | /* Special thanks to the people at Freecom for providing me with | 467 | /* |
468 | * Special thanks to the people at Freecom for providing me with | ||
444 | * this "magic sequence", which they use in their Windows and MacOS | 469 | * this "magic sequence", which they use in their Windows and MacOS |
445 | * drivers to make sure that all the attached perhiperals are | 470 | * drivers to make sure that all the attached perhiperals are |
446 | * properly reset. | 471 | * properly reset. |
diff --git a/drivers/usb/storage/initializers.c b/drivers/usb/storage/initializers.c index 31fa2e92065b..d9d8c17e05d1 100644 --- a/drivers/usb/storage/initializers.c +++ b/drivers/usb/storage/initializers.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Special Initializers for certain USB Mass Storage devices | 1 | /* |
2 | * Special Initializers for certain USB Mass Storage devices | ||
2 | * | 3 | * |
3 | * Current development and maintenance by: | 4 | * Current development and maintenance by: |
4 | * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net) | 5 | * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net) |
@@ -42,8 +43,10 @@ | |||
42 | #include "debug.h" | 43 | #include "debug.h" |
43 | #include "transport.h" | 44 | #include "transport.h" |
44 | 45 | ||
45 | /* This places the Shuttle/SCM USB<->SCSI bridge devices in multi-target | 46 | /* |
46 | * mode */ | 47 | * This places the Shuttle/SCM USB<->SCSI bridge devices in multi-target |
48 | * mode | ||
49 | */ | ||
47 | int usb_stor_euscsi_init(struct us_data *us) | 50 | int usb_stor_euscsi_init(struct us_data *us) |
48 | { | 51 | { |
49 | int result; | 52 | int result; |
@@ -57,8 +60,10 @@ int usb_stor_euscsi_init(struct us_data *us) | |||
57 | return 0; | 60 | return 0; |
58 | } | 61 | } |
59 | 62 | ||
60 | /* This function is required to activate all four slots on the UCR-61S2B | 63 | /* |
61 | * flash reader */ | 64 | * This function is required to activate all four slots on the UCR-61S2B |
65 | * flash reader | ||
66 | */ | ||
62 | int usb_stor_ucr61s2b_init(struct us_data *us) | 67 | int usb_stor_ucr61s2b_init(struct us_data *us) |
63 | { | 68 | { |
64 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap*) us->iobuf; | 69 | struct bulk_cb_wrap *bcb = (struct bulk_cb_wrap*) us->iobuf; |
diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h index 529327fbb06b..039abf4d1cb7 100644 --- a/drivers/usb/storage/initializers.h +++ b/drivers/usb/storage/initializers.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Header file for Special Initializers for certain USB Mass Storage devices | 1 | /* |
2 | * Header file for Special Initializers for certain USB Mass Storage devices | ||
2 | * | 3 | * |
3 | * Current development and maintenance by: | 4 | * Current development and maintenance by: |
4 | * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net) | 5 | * (c) 1999, 2000 Matthew Dharm (mdharm-usb@one-eyed-alien.net) |
@@ -38,12 +39,16 @@ | |||
38 | #include "usb.h" | 39 | #include "usb.h" |
39 | #include "transport.h" | 40 | #include "transport.h" |
40 | 41 | ||
41 | /* This places the Shuttle/SCM USB<->SCSI bridge devices in multi-target | 42 | /* |
42 | * mode */ | 43 | * This places the Shuttle/SCM USB<->SCSI bridge devices in multi-target |
44 | * mode | ||
45 | */ | ||
43 | int usb_stor_euscsi_init(struct us_data *us); | 46 | int usb_stor_euscsi_init(struct us_data *us); |
44 | 47 | ||
45 | /* This function is required to activate all four slots on the UCR-61S2B | 48 | /* |
46 | * flash reader */ | 49 | * This function is required to activate all four slots on the UCR-61S2B |
50 | * flash reader | ||
51 | */ | ||
47 | int usb_stor_ucr61s2b_init(struct us_data *us); | 52 | int usb_stor_ucr61s2b_init(struct us_data *us); |
48 | 53 | ||
49 | /* This places the HUAWEI E220 devices in multi-port mode */ | 54 | /* This places the HUAWEI E220 devices in multi-port mode */ |
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index 39afd7045c43..fba4005dd737 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Transport & Protocol Driver for In-System Design, Inc. ISD200 ASIC | 1 | /* |
2 | * Transport & Protocol Driver for In-System Design, Inc. ISD200 ASIC | ||
2 | * | 3 | * |
3 | * Current development and maintenance: | 4 | * Current development and maintenance: |
4 | * (C) 2001-2002 Björn Stenberg (bjorn@haxx.se) | 5 | * (C) 2001-2002 Björn Stenberg (bjorn@haxx.se) |
@@ -628,7 +629,8 @@ static void isd200_invoke_transport( struct us_data *us, | |||
628 | srb->cmd_len = sizeof(ataCdb->generic); | 629 | srb->cmd_len = sizeof(ataCdb->generic); |
629 | transferStatus = usb_stor_Bulk_transport(srb, us); | 630 | transferStatus = usb_stor_Bulk_transport(srb, us); |
630 | 631 | ||
631 | /* if the command gets aborted by the higher layers, we need to | 632 | /* |
633 | * if the command gets aborted by the higher layers, we need to | ||
632 | * short-circuit all other processing | 634 | * short-circuit all other processing |
633 | */ | 635 | */ |
634 | if (test_bit(US_FLIDX_TIMED_OUT, &us->dflags)) { | 636 | if (test_bit(US_FLIDX_TIMED_OUT, &us->dflags)) { |
@@ -695,15 +697,18 @@ static void isd200_invoke_transport( struct us_data *us, | |||
695 | } | 697 | } |
696 | } | 698 | } |
697 | 699 | ||
698 | /* Regardless of auto-sense, if we _know_ we have an error | 700 | /* |
701 | * Regardless of auto-sense, if we _know_ we have an error | ||
699 | * condition, show that in the result code | 702 | * condition, show that in the result code |
700 | */ | 703 | */ |
701 | if (transferStatus == USB_STOR_TRANSPORT_FAILED) | 704 | if (transferStatus == USB_STOR_TRANSPORT_FAILED) |
702 | srb->result = SAM_STAT_CHECK_CONDITION; | 705 | srb->result = SAM_STAT_CHECK_CONDITION; |
703 | return; | 706 | return; |
704 | 707 | ||
705 | /* abort processing: the bulk-only transport requires a reset | 708 | /* |
706 | * following an abort */ | 709 | * abort processing: the bulk-only transport requires a reset |
710 | * following an abort | ||
711 | */ | ||
707 | Handle_Abort: | 712 | Handle_Abort: |
708 | srb->result = DID_ABORT << 16; | 713 | srb->result = DID_ABORT << 16; |
709 | 714 | ||
@@ -965,20 +970,22 @@ static int isd200_try_enum(struct us_data *us, unsigned char master_slave, | |||
965 | info->DeviceHead = master_slave; | 970 | info->DeviceHead = master_slave; |
966 | break; | 971 | break; |
967 | } | 972 | } |
968 | /* check Cylinder High/Low to | 973 | /* |
969 | determine if it is an ATAPI device | 974 | * check Cylinder High/Low to |
970 | */ | 975 | * determine if it is an ATAPI device |
976 | */ | ||
971 | else if (regs[ATA_REG_HCYL_OFFSET] == 0xEB && | 977 | else if (regs[ATA_REG_HCYL_OFFSET] == 0xEB && |
972 | regs[ATA_REG_LCYL_OFFSET] == 0x14) { | 978 | regs[ATA_REG_LCYL_OFFSET] == 0x14) { |
973 | /* It seems that the RICOH | 979 | /* |
974 | MP6200A CD/RW drive will | 980 | * It seems that the RICOH |
975 | report itself okay as a | 981 | * MP6200A CD/RW drive will |
976 | slave when it is really a | 982 | * report itself okay as a |
977 | master. So this check again | 983 | * slave when it is really a |
978 | as a master device just to | 984 | * master. So this check again |
979 | make sure it doesn't report | 985 | * as a master device just to |
980 | itself okay as a master also | 986 | * make sure it doesn't report |
981 | */ | 987 | * itself okay as a master also |
988 | */ | ||
982 | if ((master_slave & ATA_ADDRESS_DEVHEAD_SLAVE) && | 989 | if ((master_slave & ATA_ADDRESS_DEVHEAD_SLAVE) && |
983 | !recheckAsMaster) { | 990 | !recheckAsMaster) { |
984 | usb_stor_dbg(us, " Identified ATAPI device as slave. Rechecking again as master\n"); | 991 | usb_stor_dbg(us, " Identified ATAPI device as slave. Rechecking again as master\n"); |
@@ -1176,9 +1183,11 @@ static int isd200_get_inquiry_data( struct us_data *us ) | |||
1176 | if (id[ATA_ID_COMMAND_SET_2] & COMMANDSET_MEDIA_STATUS) { | 1183 | if (id[ATA_ID_COMMAND_SET_2] & COMMANDSET_MEDIA_STATUS) { |
1177 | usb_stor_dbg(us, " Device supports Media Status Notification\n"); | 1184 | usb_stor_dbg(us, " Device supports Media Status Notification\n"); |
1178 | 1185 | ||
1179 | /* Indicate that it is enabled, even though it is not | 1186 | /* |
1180 | * This allows the lock/unlock of the media to work | 1187 | * Indicate that it is enabled, even |
1181 | * correctly. | 1188 | * though it is not. |
1189 | * This allows the lock/unlock of the | ||
1190 | * media to work correctly. | ||
1182 | */ | 1191 | */ |
1183 | info->DeviceFlags |= DF_MEDIA_STATUS_ENABLED; | 1192 | info->DeviceFlags |= DF_MEDIA_STATUS_ENABLED; |
1184 | } | 1193 | } |
@@ -1197,7 +1206,7 @@ static int isd200_get_inquiry_data( struct us_data *us ) | |||
1197 | usb_stor_dbg(us, "Protocol changed to: %s\n", | 1206 | usb_stor_dbg(us, "Protocol changed to: %s\n", |
1198 | us->protocol_name); | 1207 | us->protocol_name); |
1199 | 1208 | ||
1200 | /* Free driver structure */ | 1209 | /* Free driver structure */ |
1201 | us->extra_destructor(info); | 1210 | us->extra_destructor(info); |
1202 | kfree(info); | 1211 | kfree(info); |
1203 | us->extra = NULL; | 1212 | us->extra = NULL; |
diff --git a/drivers/usb/storage/jumpshot.c b/drivers/usb/storage/jumpshot.c index ee613e258db0..011e5270690a 100644 --- a/drivers/usb/storage/jumpshot.c +++ b/drivers/usb/storage/jumpshot.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for Lexar "Jumpshot" Compact Flash reader | 1 | /* |
2 | * Driver for Lexar "Jumpshot" Compact Flash reader | ||
2 | * | 3 | * |
3 | * jumpshot driver v0.1: | 4 | * jumpshot driver v0.1: |
4 | * | 5 | * |
@@ -618,18 +619,23 @@ static int jumpshot_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
618 | } | 619 | } |
619 | 620 | ||
620 | if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { | 621 | if (srb->cmnd[0] == ALLOW_MEDIUM_REMOVAL) { |
621 | // sure. whatever. not like we can stop the user from popping | 622 | /* |
622 | // the media out of the device (no locking doors, etc) | 623 | * sure. whatever. not like we can stop the user from popping |
623 | // | 624 | * the media out of the device (no locking doors, etc) |
625 | */ | ||
624 | return USB_STOR_TRANSPORT_GOOD; | 626 | return USB_STOR_TRANSPORT_GOOD; |
625 | } | 627 | } |
626 | 628 | ||
627 | if (srb->cmnd[0] == START_STOP) { | 629 | if (srb->cmnd[0] == START_STOP) { |
628 | /* this is used by sd.c'check_scsidisk_media_change to detect | 630 | /* |
629 | media change */ | 631 | * this is used by sd.c'check_scsidisk_media_change to detect |
632 | * media change | ||
633 | */ | ||
630 | usb_stor_dbg(us, "START_STOP\n"); | 634 | usb_stor_dbg(us, "START_STOP\n"); |
631 | /* the first jumpshot_id_device after a media change returns | 635 | /* |
632 | an error (determined experimentally) */ | 636 | * the first jumpshot_id_device after a media change returns |
637 | * an error (determined experimentally) | ||
638 | */ | ||
633 | rc = jumpshot_id_device(us, info); | 639 | rc = jumpshot_id_device(us, info); |
634 | if (rc == USB_STOR_TRANSPORT_GOOD) { | 640 | if (rc == USB_STOR_TRANSPORT_GOOD) { |
635 | info->sense_key = NO_SENSE; | 641 | info->sense_key = NO_SENSE; |
diff --git a/drivers/usb/storage/karma.c b/drivers/usb/storage/karma.c index ae201e69475c..f9d407f0b508 100644 --- a/drivers/usb/storage/karma.c +++ b/drivers/usb/storage/karma.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for Rio Karma | 1 | /* |
2 | * Driver for Rio Karma | ||
2 | * | 3 | * |
3 | * (c) 2006 Bob Copeland <me@bobcopeland.com> | 4 | * (c) 2006 Bob Copeland <me@bobcopeland.com> |
4 | * (c) 2006 Keith Bennett <keith@mcs.st-and.ac.uk> | 5 | * (c) 2006 Keith Bennett <keith@mcs.st-and.ac.uk> |
diff --git a/drivers/usb/storage/option_ms.c b/drivers/usb/storage/option_ms.c index b2b35b1d7de8..57282f12317b 100644 --- a/drivers/usb/storage/option_ms.c +++ b/drivers/usb/storage/option_ms.c | |||
@@ -65,7 +65,8 @@ static int option_rezero(struct us_data *us) | |||
65 | goto out; | 65 | goto out; |
66 | } | 66 | } |
67 | 67 | ||
68 | /* Some of the devices need to be asked for a response, but we don't | 68 | /* |
69 | * Some of the devices need to be asked for a response, but we don't | ||
69 | * care what that response is. | 70 | * care what that response is. |
70 | */ | 71 | */ |
71 | usb_stor_bulk_transfer_buf(us, | 72 | usb_stor_bulk_transfer_buf(us, |
@@ -140,7 +141,8 @@ int option_ms_init(struct us_data *us) | |||
140 | 141 | ||
141 | usb_stor_dbg(us, "Option MS: %s\n", "option_ms_init called"); | 142 | usb_stor_dbg(us, "Option MS: %s\n", "option_ms_init called"); |
142 | 143 | ||
143 | /* Additional test for vendor information via INQUIRY, | 144 | /* |
145 | * Additional test for vendor information via INQUIRY, | ||
144 | * because some vendor/product IDs are ambiguous | 146 | * because some vendor/product IDs are ambiguous |
145 | */ | 147 | */ |
146 | result = option_inquiry(us); | 148 | result = option_inquiry(us); |
diff --git a/drivers/usb/storage/protocol.c b/drivers/usb/storage/protocol.c index 12e3c2fac642..74c38870a17e 100644 --- a/drivers/usb/storage/protocol.c +++ b/drivers/usb/storage/protocol.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * | 3 | * |
3 | * Current development and maintenance by: | 4 | * Current development and maintenance by: |
4 | * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net) | 5 | * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net) |
@@ -75,7 +76,8 @@ void usb_stor_pad12_command(struct scsi_cmnd *srb, struct us_data *us) | |||
75 | 76 | ||
76 | void usb_stor_ufi_command(struct scsi_cmnd *srb, struct us_data *us) | 77 | void usb_stor_ufi_command(struct scsi_cmnd *srb, struct us_data *us) |
77 | { | 78 | { |
78 | /* fix some commands -- this is a form of mode translation | 79 | /* |
80 | * fix some commands -- this is a form of mode translation | ||
79 | * UFI devices only accept 12 byte long commands | 81 | * UFI devices only accept 12 byte long commands |
80 | * | 82 | * |
81 | * NOTE: This only works because a scsi_cmnd struct field contains | 83 | * NOTE: This only works because a scsi_cmnd struct field contains |
@@ -127,7 +129,8 @@ EXPORT_SYMBOL_GPL(usb_stor_transparent_scsi_command); | |||
127 | * Scatter-gather transfer buffer access routines | 129 | * Scatter-gather transfer buffer access routines |
128 | ***********************************************************************/ | 130 | ***********************************************************************/ |
129 | 131 | ||
130 | /* Copy a buffer of length buflen to/from the srb's transfer buffer. | 132 | /* |
133 | * Copy a buffer of length buflen to/from the srb's transfer buffer. | ||
131 | * Update the **sgptr and *offset variables so that the next copy will | 134 | * Update the **sgptr and *offset variables so that the next copy will |
132 | * pick up from where this one left off. | 135 | * pick up from where this one left off. |
133 | */ | 136 | */ |
@@ -175,7 +178,8 @@ unsigned int usb_stor_access_xfer_buf(unsigned char *buffer, | |||
175 | } | 178 | } |
176 | EXPORT_SYMBOL_GPL(usb_stor_access_xfer_buf); | 179 | EXPORT_SYMBOL_GPL(usb_stor_access_xfer_buf); |
177 | 180 | ||
178 | /* Store the contents of buffer into srb's transfer buffer and set the | 181 | /* |
182 | * Store the contents of buffer into srb's transfer buffer and set the | ||
179 | * SCSI residue. | 183 | * SCSI residue. |
180 | */ | 184 | */ |
181 | void usb_stor_set_xfer_buf(unsigned char *buffer, | 185 | void usb_stor_set_xfer_buf(unsigned char *buffer, |
diff --git a/drivers/usb/storage/protocol.h b/drivers/usb/storage/protocol.h index ffc3e2af0156..a55666880b7b 100644 --- a/drivers/usb/storage/protocol.h +++ b/drivers/usb/storage/protocol.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * Protocol Functions Header File | 3 | * Protocol Functions Header File |
3 | * | 4 | * |
4 | * Current development and maintenance by: | 5 | * Current development and maintenance by: |
diff --git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c index 20433563a601..4176d1af9bf2 100644 --- a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for Realtek RTS51xx USB card reader | 1 | /* |
2 | * Driver for Realtek RTS51xx USB card reader | ||
2 | * | 3 | * |
3 | * Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved. | 4 | * Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved. |
4 | * | 5 | * |
@@ -267,8 +268,10 @@ static int rts51x_bulk_transport(struct us_data *us, u8 lun, | |||
267 | if (bcs->Tag != us->tag) | 268 | if (bcs->Tag != us->tag) |
268 | return USB_STOR_TRANSPORT_ERROR; | 269 | return USB_STOR_TRANSPORT_ERROR; |
269 | 270 | ||
270 | /* try to compute the actual residue, based on how much data | 271 | /* |
271 | * was really transferred and what the device tells us */ | 272 | * try to compute the actual residue, based on how much data |
273 | * was really transferred and what the device tells us | ||
274 | */ | ||
272 | if (residue) | 275 | if (residue) |
273 | residue = residue < buf_len ? residue : buf_len; | 276 | residue = residue < buf_len ? residue : buf_len; |
274 | 277 | ||
@@ -286,7 +289,8 @@ static int rts51x_bulk_transport(struct us_data *us, u8 lun, | |||
286 | return USB_STOR_TRANSPORT_FAILED; | 289 | return USB_STOR_TRANSPORT_FAILED; |
287 | 290 | ||
288 | case US_BULK_STAT_PHASE: | 291 | case US_BULK_STAT_PHASE: |
289 | /* phase error -- note that a transport reset will be | 292 | /* |
293 | * phase error -- note that a transport reset will be | ||
290 | * invoked by the invoke_transport() function | 294 | * invoked by the invoke_transport() function |
291 | */ | 295 | */ |
292 | return USB_STOR_TRANSPORT_ERROR; | 296 | return USB_STOR_TRANSPORT_ERROR; |
diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 88920142e375..7adb6c9c7018 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * SCSI layer glue code | 3 | * SCSI layer glue code |
3 | * | 4 | * |
4 | * Current development and maintenance by: | 5 | * Current development and maintenance by: |
@@ -58,7 +59,8 @@ | |||
58 | #include "transport.h" | 59 | #include "transport.h" |
59 | #include "protocol.h" | 60 | #include "protocol.h" |
60 | 61 | ||
61 | /* Vendor IDs for companies that seem to include the READ CAPACITY bug | 62 | /* |
63 | * Vendor IDs for companies that seem to include the READ CAPACITY bug | ||
62 | * in all their devices | 64 | * in all their devices |
63 | */ | 65 | */ |
64 | #define VENDOR_ID_NOKIA 0x0421 | 66 | #define VENDOR_ID_NOKIA 0x0421 |
@@ -87,7 +89,8 @@ static int slave_alloc (struct scsi_device *sdev) | |||
87 | */ | 89 | */ |
88 | sdev->inquiry_len = 36; | 90 | sdev->inquiry_len = 36; |
89 | 91 | ||
90 | /* USB has unusual DMA-alignment requirements: Although the | 92 | /* |
93 | * USB has unusual DMA-alignment requirements: Although the | ||
91 | * starting address of each scatter-gather element doesn't matter, | 94 | * starting address of each scatter-gather element doesn't matter, |
92 | * the length of each element except the last must be divisible | 95 | * the length of each element except the last must be divisible |
93 | * by the Bulk maxpacket value. There's currently no way to | 96 | * by the Bulk maxpacket value. There's currently no way to |
@@ -115,7 +118,8 @@ static int slave_configure(struct scsi_device *sdev) | |||
115 | { | 118 | { |
116 | struct us_data *us = host_to_us(sdev->host); | 119 | struct us_data *us = host_to_us(sdev->host); |
117 | 120 | ||
118 | /* Many devices have trouble transferring more than 32KB at a time, | 121 | /* |
122 | * Many devices have trouble transferring more than 32KB at a time, | ||
119 | * while others have trouble with more than 64K. At this time we | 123 | * while others have trouble with more than 64K. At this time we |
120 | * are limiting both to 32K (64 sectores). | 124 | * are limiting both to 32K (64 sectores). |
121 | */ | 125 | */ |
@@ -128,19 +132,22 @@ static int slave_configure(struct scsi_device *sdev) | |||
128 | blk_queue_max_hw_sectors(sdev->request_queue, | 132 | blk_queue_max_hw_sectors(sdev->request_queue, |
129 | max_sectors); | 133 | max_sectors); |
130 | } else if (sdev->type == TYPE_TAPE) { | 134 | } else if (sdev->type == TYPE_TAPE) { |
131 | /* Tapes need much higher max_sector limits, so just | 135 | /* |
136 | * Tapes need much higher max_sector limits, so just | ||
132 | * raise it to the maximum possible (4 GB / 512) and | 137 | * raise it to the maximum possible (4 GB / 512) and |
133 | * let the queue segment size sort out the real limit. | 138 | * let the queue segment size sort out the real limit. |
134 | */ | 139 | */ |
135 | blk_queue_max_hw_sectors(sdev->request_queue, 0x7FFFFF); | 140 | blk_queue_max_hw_sectors(sdev->request_queue, 0x7FFFFF); |
136 | } else if (us->pusb_dev->speed >= USB_SPEED_SUPER) { | 141 | } else if (us->pusb_dev->speed >= USB_SPEED_SUPER) { |
137 | /* USB3 devices will be limited to 2048 sectors. This gives us | 142 | /* |
143 | * USB3 devices will be limited to 2048 sectors. This gives us | ||
138 | * better throughput on most devices. | 144 | * better throughput on most devices. |
139 | */ | 145 | */ |
140 | blk_queue_max_hw_sectors(sdev->request_queue, 2048); | 146 | blk_queue_max_hw_sectors(sdev->request_queue, 2048); |
141 | } | 147 | } |
142 | 148 | ||
143 | /* Some USB host controllers can't do DMA; they have to use PIO. | 149 | /* |
150 | * Some USB host controllers can't do DMA; they have to use PIO. | ||
144 | * They indicate this by setting their dma_mask to NULL. For | 151 | * They indicate this by setting their dma_mask to NULL. For |
145 | * such controllers we need to make sure the block layer sets | 152 | * such controllers we need to make sure the block layer sets |
146 | * up bounce buffers in addressable memory. | 153 | * up bounce buffers in addressable memory. |
@@ -148,17 +155,21 @@ static int slave_configure(struct scsi_device *sdev) | |||
148 | if (!us->pusb_dev->bus->controller->dma_mask) | 155 | if (!us->pusb_dev->bus->controller->dma_mask) |
149 | blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_HIGH); | 156 | blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_HIGH); |
150 | 157 | ||
151 | /* We can't put these settings in slave_alloc() because that gets | 158 | /* |
159 | * We can't put these settings in slave_alloc() because that gets | ||
152 | * called before the device type is known. Consequently these | 160 | * called before the device type is known. Consequently these |
153 | * settings can't be overridden via the scsi devinfo mechanism. */ | 161 | * settings can't be overridden via the scsi devinfo mechanism. |
162 | */ | ||
154 | if (sdev->type == TYPE_DISK) { | 163 | if (sdev->type == TYPE_DISK) { |
155 | 164 | ||
156 | /* Some vendors seem to put the READ CAPACITY bug into | 165 | /* |
166 | * Some vendors seem to put the READ CAPACITY bug into | ||
157 | * all their devices -- primarily makers of cell phones | 167 | * all their devices -- primarily makers of cell phones |
158 | * and digital cameras. Since these devices always use | 168 | * and digital cameras. Since these devices always use |
159 | * flash media and can be expected to have an even number | 169 | * flash media and can be expected to have an even number |
160 | * of sectors, we will always enable the CAPACITY_HEURISTICS | 170 | * of sectors, we will always enable the CAPACITY_HEURISTICS |
161 | * flag unless told otherwise. */ | 171 | * flag unless told otherwise. |
172 | */ | ||
162 | switch (le16_to_cpu(us->pusb_dev->descriptor.idVendor)) { | 173 | switch (le16_to_cpu(us->pusb_dev->descriptor.idVendor)) { |
163 | case VENDOR_ID_NOKIA: | 174 | case VENDOR_ID_NOKIA: |
164 | case VENDOR_ID_NIKON: | 175 | case VENDOR_ID_NIKON: |
@@ -170,28 +181,36 @@ static int slave_configure(struct scsi_device *sdev) | |||
170 | break; | 181 | break; |
171 | } | 182 | } |
172 | 183 | ||
173 | /* Disk-type devices use MODE SENSE(6) if the protocol | 184 | /* |
185 | * Disk-type devices use MODE SENSE(6) if the protocol | ||
174 | * (SubClass) is Transparent SCSI, otherwise they use | 186 | * (SubClass) is Transparent SCSI, otherwise they use |
175 | * MODE SENSE(10). */ | 187 | * MODE SENSE(10). |
188 | */ | ||
176 | if (us->subclass != USB_SC_SCSI && us->subclass != USB_SC_CYP_ATACB) | 189 | if (us->subclass != USB_SC_SCSI && us->subclass != USB_SC_CYP_ATACB) |
177 | sdev->use_10_for_ms = 1; | 190 | sdev->use_10_for_ms = 1; |
178 | 191 | ||
179 | /* Many disks only accept MODE SENSE transfer lengths of | 192 | /* |
180 | * 192 bytes (that's what Windows uses). */ | 193 | *Many disks only accept MODE SENSE transfer lengths of |
194 | * 192 bytes (that's what Windows uses). | ||
195 | */ | ||
181 | sdev->use_192_bytes_for_3f = 1; | 196 | sdev->use_192_bytes_for_3f = 1; |
182 | 197 | ||
183 | /* Some devices don't like MODE SENSE with page=0x3f, | 198 | /* |
199 | * Some devices don't like MODE SENSE with page=0x3f, | ||
184 | * which is the command used for checking if a device | 200 | * which is the command used for checking if a device |
185 | * is write-protected. Now that we tell the sd driver | 201 | * is write-protected. Now that we tell the sd driver |
186 | * to do a 192-byte transfer with this command the | 202 | * to do a 192-byte transfer with this command the |
187 | * majority of devices work fine, but a few still can't | 203 | * majority of devices work fine, but a few still can't |
188 | * handle it. The sd driver will simply assume those | 204 | * handle it. The sd driver will simply assume those |
189 | * devices are write-enabled. */ | 205 | * devices are write-enabled. |
206 | */ | ||
190 | if (us->fflags & US_FL_NO_WP_DETECT) | 207 | if (us->fflags & US_FL_NO_WP_DETECT) |
191 | sdev->skip_ms_page_3f = 1; | 208 | sdev->skip_ms_page_3f = 1; |
192 | 209 | ||
193 | /* A number of devices have problems with MODE SENSE for | 210 | /* |
194 | * page x08, so we will skip it. */ | 211 | * A number of devices have problems with MODE SENSE for |
212 | * page x08, so we will skip it. | ||
213 | */ | ||
195 | sdev->skip_ms_page_8 = 1; | 214 | sdev->skip_ms_page_8 = 1; |
196 | 215 | ||
197 | /* Some devices don't handle VPD pages correctly */ | 216 | /* Some devices don't handle VPD pages correctly */ |
@@ -203,15 +222,19 @@ static int slave_configure(struct scsi_device *sdev) | |||
203 | /* Do not attempt to use WRITE SAME */ | 222 | /* Do not attempt to use WRITE SAME */ |
204 | sdev->no_write_same = 1; | 223 | sdev->no_write_same = 1; |
205 | 224 | ||
206 | /* Some disks return the total number of blocks in response | 225 | /* |
226 | * Some disks return the total number of blocks in response | ||
207 | * to READ CAPACITY rather than the highest block number. | 227 | * to READ CAPACITY rather than the highest block number. |
208 | * If this device makes that mistake, tell the sd driver. */ | 228 | * If this device makes that mistake, tell the sd driver. |
229 | */ | ||
209 | if (us->fflags & US_FL_FIX_CAPACITY) | 230 | if (us->fflags & US_FL_FIX_CAPACITY) |
210 | sdev->fix_capacity = 1; | 231 | sdev->fix_capacity = 1; |
211 | 232 | ||
212 | /* A few disks have two indistinguishable version, one of | 233 | /* |
234 | * A few disks have two indistinguishable version, one of | ||
213 | * which reports the correct capacity and the other does not. | 235 | * which reports the correct capacity and the other does not. |
214 | * The sd driver has to guess which is the case. */ | 236 | * The sd driver has to guess which is the case. |
237 | */ | ||
215 | if (us->fflags & US_FL_CAPACITY_HEURISTICS) | 238 | if (us->fflags & US_FL_CAPACITY_HEURISTICS) |
216 | sdev->guess_capacity = 1; | 239 | sdev->guess_capacity = 1; |
217 | 240 | ||
@@ -232,26 +255,34 @@ static int slave_configure(struct scsi_device *sdev) | |||
232 | if (sdev->scsi_level > SCSI_SPC_2) | 255 | if (sdev->scsi_level > SCSI_SPC_2) |
233 | us->fflags |= US_FL_SANE_SENSE; | 256 | us->fflags |= US_FL_SANE_SENSE; |
234 | 257 | ||
235 | /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable | 258 | /* |
259 | * USB-IDE bridges tend to report SK = 0x04 (Non-recoverable | ||
236 | * Hardware Error) when any low-level error occurs, | 260 | * Hardware Error) when any low-level error occurs, |
237 | * recoverable or not. Setting this flag tells the SCSI | 261 | * recoverable or not. Setting this flag tells the SCSI |
238 | * midlayer to retry such commands, which frequently will | 262 | * midlayer to retry such commands, which frequently will |
239 | * succeed and fix the error. The worst this can lead to | 263 | * succeed and fix the error. The worst this can lead to |
240 | * is an occasional series of retries that will all fail. */ | 264 | * is an occasional series of retries that will all fail. |
265 | */ | ||
241 | sdev->retry_hwerror = 1; | 266 | sdev->retry_hwerror = 1; |
242 | 267 | ||
243 | /* USB disks should allow restart. Some drives spin down | 268 | /* |
244 | * automatically, requiring a START-STOP UNIT command. */ | 269 | * USB disks should allow restart. Some drives spin down |
270 | * automatically, requiring a START-STOP UNIT command. | ||
271 | */ | ||
245 | sdev->allow_restart = 1; | 272 | sdev->allow_restart = 1; |
246 | 273 | ||
247 | /* Some USB cardreaders have trouble reading an sdcard's last | 274 | /* |
275 | * Some USB cardreaders have trouble reading an sdcard's last | ||
248 | * sector in a larger then 1 sector read, since the performance | 276 | * sector in a larger then 1 sector read, since the performance |
249 | * impact is negligible we set this flag for all USB disks */ | 277 | * impact is negligible we set this flag for all USB disks |
278 | */ | ||
250 | sdev->last_sector_bug = 1; | 279 | sdev->last_sector_bug = 1; |
251 | 280 | ||
252 | /* Enable last-sector hacks for single-target devices using | 281 | /* |
282 | * Enable last-sector hacks for single-target devices using | ||
253 | * the Bulk-only transport, unless we already know the | 283 | * the Bulk-only transport, unless we already know the |
254 | * capacity will be decremented or is correct. */ | 284 | * capacity will be decremented or is correct. |
285 | */ | ||
255 | if (!(us->fflags & (US_FL_FIX_CAPACITY | US_FL_CAPACITY_OK | | 286 | if (!(us->fflags & (US_FL_FIX_CAPACITY | US_FL_CAPACITY_OK | |
256 | US_FL_SCM_MULT_TARG)) && | 287 | US_FL_SCM_MULT_TARG)) && |
257 | us->protocol == USB_PR_BULK) | 288 | us->protocol == USB_PR_BULK) |
@@ -267,9 +298,11 @@ static int slave_configure(struct scsi_device *sdev) | |||
267 | 298 | ||
268 | } else { | 299 | } else { |
269 | 300 | ||
270 | /* Non-disk-type devices don't need to blacklist any pages | 301 | /* |
302 | * Non-disk-type devices don't need to blacklist any pages | ||
271 | * or to force 192-byte transfer lengths for MODE SENSE. | 303 | * or to force 192-byte transfer lengths for MODE SENSE. |
272 | * But they do need to use MODE SENSE(10). */ | 304 | * But they do need to use MODE SENSE(10). |
305 | */ | ||
273 | sdev->use_10_for_ms = 1; | 306 | sdev->use_10_for_ms = 1; |
274 | 307 | ||
275 | /* Some (fake) usb cdrom devices don't like READ_DISC_INFO */ | 308 | /* Some (fake) usb cdrom devices don't like READ_DISC_INFO */ |
@@ -277,7 +310,8 @@ static int slave_configure(struct scsi_device *sdev) | |||
277 | sdev->no_read_disc_info = 1; | 310 | sdev->no_read_disc_info = 1; |
278 | } | 311 | } |
279 | 312 | ||
280 | /* The CB and CBI transports have no way to pass LUN values | 313 | /* |
314 | * The CB and CBI transports have no way to pass LUN values | ||
281 | * other than the bits in the second byte of a CDB. But those | 315 | * other than the bits in the second byte of a CDB. But those |
282 | * bits don't get set to the LUN value if the device reports | 316 | * bits don't get set to the LUN value if the device reports |
283 | * scsi_level == 0 (UNKNOWN). Hence such devices must necessarily | 317 | * scsi_level == 0 (UNKNOWN). Hence such devices must necessarily |
@@ -287,13 +321,17 @@ static int slave_configure(struct scsi_device *sdev) | |||
287 | sdev->scsi_level == SCSI_UNKNOWN) | 321 | sdev->scsi_level == SCSI_UNKNOWN) |
288 | us->max_lun = 0; | 322 | us->max_lun = 0; |
289 | 323 | ||
290 | /* Some devices choke when they receive a PREVENT-ALLOW MEDIUM | 324 | /* |
291 | * REMOVAL command, so suppress those commands. */ | 325 | * Some devices choke when they receive a PREVENT-ALLOW MEDIUM |
326 | * REMOVAL command, so suppress those commands. | ||
327 | */ | ||
292 | if (us->fflags & US_FL_NOT_LOCKABLE) | 328 | if (us->fflags & US_FL_NOT_LOCKABLE) |
293 | sdev->lockable = 0; | 329 | sdev->lockable = 0; |
294 | 330 | ||
295 | /* this is to satisfy the compiler, tho I don't think the | 331 | /* |
296 | * return code is ever checked anywhere. */ | 332 | * this is to satisfy the compiler, tho I don't think the |
333 | * return code is ever checked anywhere. | ||
334 | */ | ||
297 | return 0; | 335 | return 0; |
298 | } | 336 | } |
299 | 337 | ||
@@ -367,8 +405,10 @@ static int command_abort(struct scsi_cmnd *srb) | |||
367 | 405 | ||
368 | usb_stor_dbg(us, "%s called\n", __func__); | 406 | usb_stor_dbg(us, "%s called\n", __func__); |
369 | 407 | ||
370 | /* us->srb together with the TIMED_OUT, RESETTING, and ABORTING | 408 | /* |
371 | * bits are protected by the host lock. */ | 409 | * us->srb together with the TIMED_OUT, RESETTING, and ABORTING |
410 | * bits are protected by the host lock. | ||
411 | */ | ||
372 | scsi_lock(us_to_host(us)); | 412 | scsi_lock(us_to_host(us)); |
373 | 413 | ||
374 | /* Is this command still active? */ | 414 | /* Is this command still active? */ |
@@ -378,11 +418,13 @@ static int command_abort(struct scsi_cmnd *srb) | |||
378 | return FAILED; | 418 | return FAILED; |
379 | } | 419 | } |
380 | 420 | ||
381 | /* Set the TIMED_OUT bit. Also set the ABORTING bit, but only if | 421 | /* |
422 | * Set the TIMED_OUT bit. Also set the ABORTING bit, but only if | ||
382 | * a device reset isn't already in progress (to avoid interfering | 423 | * a device reset isn't already in progress (to avoid interfering |
383 | * with the reset). Note that we must retain the host lock while | 424 | * with the reset). Note that we must retain the host lock while |
384 | * calling usb_stor_stop_transport(); otherwise it might interfere | 425 | * calling usb_stor_stop_transport(); otherwise it might interfere |
385 | * with an auto-reset that begins as soon as we release the lock. */ | 426 | * with an auto-reset that begins as soon as we release the lock. |
427 | */ | ||
386 | set_bit(US_FLIDX_TIMED_OUT, &us->dflags); | 428 | set_bit(US_FLIDX_TIMED_OUT, &us->dflags); |
387 | if (!test_bit(US_FLIDX_RESETTING, &us->dflags)) { | 429 | if (!test_bit(US_FLIDX_RESETTING, &us->dflags)) { |
388 | set_bit(US_FLIDX_ABORTING, &us->dflags); | 430 | set_bit(US_FLIDX_ABORTING, &us->dflags); |
@@ -395,8 +437,10 @@ static int command_abort(struct scsi_cmnd *srb) | |||
395 | return SUCCESS; | 437 | return SUCCESS; |
396 | } | 438 | } |
397 | 439 | ||
398 | /* This invokes the transport reset mechanism to reset the state of the | 440 | /* |
399 | * device */ | 441 | * This invokes the transport reset mechanism to reset the state of the |
442 | * device | ||
443 | */ | ||
400 | static int device_reset(struct scsi_cmnd *srb) | 444 | static int device_reset(struct scsi_cmnd *srb) |
401 | { | 445 | { |
402 | struct us_data *us = host_to_us(srb->device->host); | 446 | struct us_data *us = host_to_us(srb->device->host); |
@@ -424,9 +468,11 @@ static int bus_reset(struct scsi_cmnd *srb) | |||
424 | return result < 0 ? FAILED : SUCCESS; | 468 | return result < 0 ? FAILED : SUCCESS; |
425 | } | 469 | } |
426 | 470 | ||
427 | /* Report a driver-initiated device reset to the SCSI layer. | 471 | /* |
472 | * Report a driver-initiated device reset to the SCSI layer. | ||
428 | * Calling this for a SCSI-initiated reset is unnecessary but harmless. | 473 | * Calling this for a SCSI-initiated reset is unnecessary but harmless. |
429 | * The caller must own the SCSI host lock. */ | 474 | * The caller must own the SCSI host lock. |
475 | */ | ||
430 | void usb_stor_report_device_reset(struct us_data *us) | 476 | void usb_stor_report_device_reset(struct us_data *us) |
431 | { | 477 | { |
432 | int i; | 478 | int i; |
@@ -439,9 +485,11 @@ void usb_stor_report_device_reset(struct us_data *us) | |||
439 | } | 485 | } |
440 | } | 486 | } |
441 | 487 | ||
442 | /* Report a driver-initiated bus reset to the SCSI layer. | 488 | /* |
489 | * Report a driver-initiated bus reset to the SCSI layer. | ||
443 | * Calling this for a SCSI-initiated reset is unnecessary but harmless. | 490 | * Calling this for a SCSI-initiated reset is unnecessary but harmless. |
444 | * The caller must not own the SCSI host lock. */ | 491 | * The caller must not own the SCSI host lock. |
492 | */ | ||
445 | void usb_stor_report_bus_reset(struct us_data *us) | 493 | void usb_stor_report_bus_reset(struct us_data *us) |
446 | { | 494 | { |
447 | struct Scsi_Host *host = us_to_host(us); | 495 | struct Scsi_Host *host = us_to_host(us); |
@@ -590,7 +638,8 @@ static const struct scsi_host_template usb_stor_host_template = { | |||
590 | */ | 638 | */ |
591 | .max_sectors = 240, | 639 | .max_sectors = 240, |
592 | 640 | ||
593 | /* merge commands... this seems to help performance, but | 641 | /* |
642 | * merge commands... this seems to help performance, but | ||
594 | * periodically someone should test to see which setting is more | 643 | * periodically someone should test to see which setting is more |
595 | * optimal. | 644 | * optimal. |
596 | */ | 645 | */ |
diff --git a/drivers/usb/storage/scsiglue.h b/drivers/usb/storage/scsiglue.h index 5494d87607fb..d0a331dd9bc5 100644 --- a/drivers/usb/storage/scsiglue.h +++ b/drivers/usb/storage/scsiglue.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * SCSI Connecting Glue Header File | 3 | * SCSI Connecting Glue Header File |
3 | * | 4 | * |
4 | * Current development and maintenance by: | 5 | * Current development and maintenance by: |
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c index 79224fcf9b59..c5797fa2125e 100644 --- a/drivers/usb/storage/sddr09.c +++ b/drivers/usb/storage/sddr09.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for SanDisk SDDR-09 SmartMedia reader | 1 | /* |
2 | * Driver for SanDisk SDDR-09 SmartMedia reader | ||
2 | * | 3 | * |
3 | * (c) 2000, 2001 Robert Baruch (autophile@starband.net) | 4 | * (c) 2000, 2001 Robert Baruch (autophile@starband.net) |
4 | * (c) 2002 Andries Brouwer (aeb@cwi.nl) | 5 | * (c) 2002 Andries Brouwer (aeb@cwi.nl) |
@@ -799,10 +800,12 @@ sddr09_read_data(struct us_data *us, | |||
799 | usb_stor_dbg(us, "Read %d zero pages (LBA %d) page %d\n", | 800 | usb_stor_dbg(us, "Read %d zero pages (LBA %d) page %d\n", |
800 | pages, lba, page); | 801 | pages, lba, page); |
801 | 802 | ||
802 | /* This is not really an error. It just means | 803 | /* |
803 | that the block has never been written. | 804 | * This is not really an error. It just means |
804 | Instead of returning an error | 805 | * that the block has never been written. |
805 | it is better to return all zero data. */ | 806 | * Instead of returning an error |
807 | * it is better to return all zero data. | ||
808 | */ | ||
806 | 809 | ||
807 | memset(buffer, 0, len); | 810 | memset(buffer, 0, len); |
808 | 811 | ||
@@ -890,8 +893,10 @@ sddr09_write_lba(struct us_data *us, unsigned int lba, | |||
890 | } | 893 | } |
891 | 894 | ||
892 | if (pba == 1) { | 895 | if (pba == 1) { |
893 | /* Maybe it is impossible to write to PBA 1. | 896 | /* |
894 | Fake success, but don't do anything. */ | 897 | * Maybe it is impossible to write to PBA 1. |
898 | * Fake success, but don't do anything. | ||
899 | */ | ||
895 | printk(KERN_WARNING "sddr09: avoid writing to pba 1\n"); | 900 | printk(KERN_WARNING "sddr09: avoid writing to pba 1\n"); |
896 | return 0; | 901 | return 0; |
897 | } | 902 | } |
@@ -979,18 +984,22 @@ sddr09_write_data(struct us_data *us, | |||
979 | struct scatterlist *sg; | 984 | struct scatterlist *sg; |
980 | int result; | 985 | int result; |
981 | 986 | ||
982 | // Figure out the initial LBA and page | 987 | /* Figure out the initial LBA and page */ |
983 | lba = address >> info->blockshift; | 988 | lba = address >> info->blockshift; |
984 | page = (address & info->blockmask); | 989 | page = (address & info->blockmask); |
985 | maxlba = info->capacity >> (info->pageshift + info->blockshift); | 990 | maxlba = info->capacity >> (info->pageshift + info->blockshift); |
986 | if (lba >= maxlba) | 991 | if (lba >= maxlba) |
987 | return -EIO; | 992 | return -EIO; |
988 | 993 | ||
989 | // blockbuffer is used for reading in the old data, overwriting | 994 | /* |
990 | // with the new data, and performing ECC calculations | 995 | * blockbuffer is used for reading in the old data, overwriting |
996 | * with the new data, and performing ECC calculations | ||
997 | */ | ||
991 | 998 | ||
992 | /* TODO: instead of doing kmalloc/kfree for each write, | 999 | /* |
993 | add a bufferpointer to the info structure */ | 1000 | * TODO: instead of doing kmalloc/kfree for each write, |
1001 | * add a bufferpointer to the info structure | ||
1002 | */ | ||
994 | 1003 | ||
995 | pagelen = (1 << info->pageshift) + (1 << CONTROL_SHIFT); | 1004 | pagelen = (1 << info->pageshift) + (1 << CONTROL_SHIFT); |
996 | blocklen = (pagelen << info->blockshift); | 1005 | blocklen = (pagelen << info->blockshift); |
@@ -1000,9 +1009,11 @@ sddr09_write_data(struct us_data *us, | |||
1000 | return -ENOMEM; | 1009 | return -ENOMEM; |
1001 | } | 1010 | } |
1002 | 1011 | ||
1003 | // Since we don't write the user data directly to the device, | 1012 | /* |
1004 | // we have to create a bounce buffer and move the data a piece | 1013 | * Since we don't write the user data directly to the device, |
1005 | // at a time between the bounce buffer and the actual transfer buffer. | 1014 | * we have to create a bounce buffer and move the data a piece |
1015 | * at a time between the bounce buffer and the actual transfer buffer. | ||
1016 | */ | ||
1006 | 1017 | ||
1007 | len = min(sectors, (unsigned int) info->blocksize) * info->pagesize; | 1018 | len = min(sectors, (unsigned int) info->blocksize) * info->pagesize; |
1008 | buffer = kmalloc(len, GFP_NOIO); | 1019 | buffer = kmalloc(len, GFP_NOIO); |
@@ -1018,7 +1029,7 @@ sddr09_write_data(struct us_data *us, | |||
1018 | 1029 | ||
1019 | while (sectors > 0) { | 1030 | while (sectors > 0) { |
1020 | 1031 | ||
1021 | // Write as many sectors as possible in this block | 1032 | /* Write as many sectors as possible in this block */ |
1022 | 1033 | ||
1023 | pages = min(sectors, info->blocksize - page); | 1034 | pages = min(sectors, info->blocksize - page); |
1024 | len = (pages << info->pageshift); | 1035 | len = (pages << info->pageshift); |
@@ -1031,7 +1042,7 @@ sddr09_write_data(struct us_data *us, | |||
1031 | break; | 1042 | break; |
1032 | } | 1043 | } |
1033 | 1044 | ||
1034 | // Get the data from the transfer buffer | 1045 | /* Get the data from the transfer buffer */ |
1035 | usb_stor_access_xfer_buf(buffer, len, us->srb, | 1046 | usb_stor_access_xfer_buf(buffer, len, us->srb, |
1036 | &sg, &offset, FROM_XFER_BUF); | 1047 | &sg, &offset, FROM_XFER_BUF); |
1037 | 1048 | ||
@@ -1168,9 +1179,11 @@ sddr09_get_cardinfo(struct us_data *us, unsigned char flags) { | |||
1168 | /* Byte 1 is the device type */ | 1179 | /* Byte 1 is the device type */ |
1169 | cardinfo = nand_find_id(deviceID[1]); | 1180 | cardinfo = nand_find_id(deviceID[1]); |
1170 | if (cardinfo) { | 1181 | if (cardinfo) { |
1171 | /* MB or MiB? It is neither. A 16 MB card has | 1182 | /* |
1172 | 17301504 raw bytes, of which 16384000 are | 1183 | * MB or MiB? It is neither. A 16 MB card has |
1173 | usable for user data. */ | 1184 | * 17301504 raw bytes, of which 16384000 are |
1185 | * usable for user data. | ||
1186 | */ | ||
1174 | sprintf(blurbtxt + strlen(blurbtxt), | 1187 | sprintf(blurbtxt + strlen(blurbtxt), |
1175 | ", %d MB", 1<<(cardinfo->chipshift - 20)); | 1188 | ", %d MB", 1<<(cardinfo->chipshift - 20)); |
1176 | } else { | 1189 | } else { |
@@ -1211,14 +1224,18 @@ sddr09_read_map(struct us_data *us) { | |||
1211 | if (!info->capacity) | 1224 | if (!info->capacity) |
1212 | return -1; | 1225 | return -1; |
1213 | 1226 | ||
1214 | // size of a block is 1 << (blockshift + pageshift) bytes | 1227 | /* |
1215 | // divide into the total capacity to get the number of blocks | 1228 | * size of a block is 1 << (blockshift + pageshift) bytes |
1229 | * divide into the total capacity to get the number of blocks | ||
1230 | */ | ||
1216 | 1231 | ||
1217 | numblocks = info->capacity >> (info->blockshift + info->pageshift); | 1232 | numblocks = info->capacity >> (info->blockshift + info->pageshift); |
1218 | 1233 | ||
1219 | // read 64 bytes for every block (actually 1 << CONTROL_SHIFT) | 1234 | /* |
1220 | // but only use a 64 KB buffer | 1235 | * read 64 bytes for every block (actually 1 << CONTROL_SHIFT) |
1221 | // buffer size used must be a multiple of (1 << CONTROL_SHIFT) | 1236 | * but only use a 64 KB buffer |
1237 | * buffer size used must be a multiple of (1 << CONTROL_SHIFT) | ||
1238 | */ | ||
1222 | #define SDDR09_READ_MAP_BUFSZ 65536 | 1239 | #define SDDR09_READ_MAP_BUFSZ 65536 |
1223 | 1240 | ||
1224 | alloc_blocks = min(numblocks, SDDR09_READ_MAP_BUFSZ >> CONTROL_SHIFT); | 1241 | alloc_blocks = min(numblocks, SDDR09_READ_MAP_BUFSZ >> CONTROL_SHIFT); |
@@ -1575,8 +1592,10 @@ static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1575 | 1592 | ||
1576 | havefakesense = 1; | 1593 | havefakesense = 1; |
1577 | 1594 | ||
1578 | /* Dummy up a response for INQUIRY since SDDR09 doesn't | 1595 | /* |
1579 | respond to INQUIRY commands */ | 1596 | * Dummy up a response for INQUIRY since SDDR09 doesn't |
1597 | * respond to INQUIRY commands | ||
1598 | */ | ||
1580 | 1599 | ||
1581 | if (srb->cmnd[0] == INQUIRY) { | 1600 | if (srb->cmnd[0] == INQUIRY) { |
1582 | memcpy(ptr, inquiry_response, 8); | 1601 | memcpy(ptr, inquiry_response, 8); |
@@ -1628,8 +1647,10 @@ static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1628 | if (srb->cmnd[0] == MODE_SENSE_10) { | 1647 | if (srb->cmnd[0] == MODE_SENSE_10) { |
1629 | int modepage = (srb->cmnd[2] & 0x3F); | 1648 | int modepage = (srb->cmnd[2] & 0x3F); |
1630 | 1649 | ||
1631 | /* They ask for the Read/Write error recovery page, | 1650 | /* |
1632 | or for all pages. */ | 1651 | * They ask for the Read/Write error recovery page, |
1652 | * or for all pages. | ||
1653 | */ | ||
1633 | /* %% We should check DBD %% */ | 1654 | /* %% We should check DBD %% */ |
1634 | if (modepage == 0x01 || modepage == 0x3F) { | 1655 | if (modepage == 0x01 || modepage == 0x3F) { |
1635 | usb_stor_dbg(us, "Dummy up request for mode page 0x%x\n", | 1656 | usb_stor_dbg(us, "Dummy up request for mode page 0x%x\n", |
@@ -1682,7 +1703,8 @@ static int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1682 | USB_STOR_TRANSPORT_ERROR); | 1703 | USB_STOR_TRANSPORT_ERROR); |
1683 | } | 1704 | } |
1684 | 1705 | ||
1685 | /* catch-all for all other commands, except | 1706 | /* |
1707 | * catch-all for all other commands, except | ||
1686 | * pass TEST_UNIT_READY and REQUEST_SENSE through | 1708 | * pass TEST_UNIT_READY and REQUEST_SENSE through |
1687 | */ | 1709 | */ |
1688 | if (srb->cmnd[0] != TEST_UNIT_READY && | 1710 | if (srb->cmnd[0] != TEST_UNIT_READY && |
diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c index e5e0a25ecd96..147c50b3e00f 100644 --- a/drivers/usb/storage/sddr55.c +++ b/drivers/usb/storage/sddr55.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for SanDisk SDDR-55 SmartMedia reader | 1 | /* |
2 | * Driver for SanDisk SDDR-55 SmartMedia reader | ||
2 | * | 3 | * |
3 | * SDDR55 driver v0.1: | 4 | * SDDR55 driver v0.1: |
4 | * | 5 | * |
@@ -130,7 +131,8 @@ sddr55_bulk_transport(struct us_data *us, int direction, | |||
130 | return usb_stor_bulk_transfer_buf(us, pipe, data, len, NULL); | 131 | return usb_stor_bulk_transfer_buf(us, pipe, data, len, NULL); |
131 | } | 132 | } |
132 | 133 | ||
133 | /* check if card inserted, if there is, update read_only status | 134 | /* |
135 | * check if card inserted, if there is, update read_only status | ||
134 | * return non zero if no card | 136 | * return non zero if no card |
135 | */ | 137 | */ |
136 | 138 | ||
@@ -714,15 +716,18 @@ static int sddr55_read_map(struct us_data *us) { | |||
714 | if (max_lba > 1000) | 716 | if (max_lba > 1000) |
715 | max_lba = 1000; | 717 | max_lba = 1000; |
716 | 718 | ||
717 | // Each block is 64 bytes of control data, so block i is located in | 719 | /* |
718 | // scatterlist block i*64/128k = i*(2^6)*(2^-17) = i*(2^-11) | 720 | * Each block is 64 bytes of control data, so block i is located in |
721 | * scatterlist block i*64/128k = i*(2^6)*(2^-17) = i*(2^-11) | ||
722 | */ | ||
719 | 723 | ||
720 | for (i=0; i<numblocks; i++) { | 724 | for (i=0; i<numblocks; i++) { |
721 | int zone = i / 1024; | 725 | int zone = i / 1024; |
722 | 726 | ||
723 | lba = short_pack(buffer[i * 2], buffer[i * 2 + 1]); | 727 | lba = short_pack(buffer[i * 2], buffer[i * 2 + 1]); |
724 | 728 | ||
725 | /* Every 1024 physical blocks ("zone"), the LBA numbers | 729 | /* |
730 | * Every 1024 physical blocks ("zone"), the LBA numbers | ||
726 | * go back to zero, but are within a higher | 731 | * go back to zero, but are within a higher |
727 | * block of LBA's. Also, there is a maximum of | 732 | * block of LBA's. Also, there is a maximum of |
728 | * 1000 LBA's per zone. In other words, in PBA | 733 | * 1000 LBA's per zone. In other words, in PBA |
@@ -733,7 +738,8 @@ static int sddr55_read_map(struct us_data *us) { | |||
733 | * are 24 spare blocks to use when blocks do go bad. | 738 | * are 24 spare blocks to use when blocks do go bad. |
734 | */ | 739 | */ |
735 | 740 | ||
736 | /* SDDR55 returns 0xffff for a bad block, and 0x400 for the | 741 | /* |
742 | * SDDR55 returns 0xffff for a bad block, and 0x400 for the | ||
737 | * CIS block. (Is this true for cards 8MB or less??) | 743 | * CIS block. (Is this true for cards 8MB or less??) |
738 | * Record these in the physical to logical map | 744 | * Record these in the physical to logical map |
739 | */ | 745 | */ |
@@ -824,8 +830,10 @@ static int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
824 | 830 | ||
825 | memset (info->sense_data, 0, sizeof info->sense_data); | 831 | memset (info->sense_data, 0, sizeof info->sense_data); |
826 | 832 | ||
827 | /* Dummy up a response for INQUIRY since SDDR55 doesn't | 833 | /* |
828 | respond to INQUIRY commands */ | 834 | * Dummy up a response for INQUIRY since SDDR55 doesn't |
835 | * respond to INQUIRY commands | ||
836 | */ | ||
829 | 837 | ||
830 | if (srb->cmnd[0] == INQUIRY) { | 838 | if (srb->cmnd[0] == INQUIRY) { |
831 | memcpy(ptr, inquiry_response, 8); | 839 | memcpy(ptr, inquiry_response, 8); |
@@ -833,7 +841,8 @@ static int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
833 | return USB_STOR_TRANSPORT_GOOD; | 841 | return USB_STOR_TRANSPORT_GOOD; |
834 | } | 842 | } |
835 | 843 | ||
836 | /* only check card status if the map isn't allocated, ie no card seen yet | 844 | /* |
845 | * only check card status if the map isn't allocated, ie no card seen yet | ||
837 | * or if it's been over half a second since we last accessed it | 846 | * or if it's been over half a second since we last accessed it |
838 | */ | 847 | */ |
839 | if (info->lba_to_pba == NULL || time_after(jiffies, info->last_access + HZ/2)) { | 848 | if (info->lba_to_pba == NULL || time_after(jiffies, info->last_access + HZ/2)) { |
@@ -849,8 +858,10 @@ static int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
849 | } | 858 | } |
850 | } | 859 | } |
851 | 860 | ||
852 | /* if we detected a problem with the map when writing, | 861 | /* |
853 | don't allow any more access */ | 862 | * if we detected a problem with the map when writing, |
863 | * don't allow any more access | ||
864 | */ | ||
854 | if (info->fatal_error) { | 865 | if (info->fatal_error) { |
855 | 866 | ||
856 | set_sense_info (3, 0x31, 0); | 867 | set_sense_info (3, 0x31, 0); |
@@ -868,12 +879,16 @@ static int sddr55_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
868 | 879 | ||
869 | info->capacity = capacity; | 880 | info->capacity = capacity; |
870 | 881 | ||
871 | /* figure out the maximum logical block number, allowing for | 882 | /* |
872 | * the fact that only 250 out of every 256 are used */ | 883 | * figure out the maximum logical block number, allowing for |
884 | * the fact that only 250 out of every 256 are used | ||
885 | */ | ||
873 | info->max_log_blks = ((info->capacity >> (info->pageshift + info->blockshift)) / 256) * 250; | 886 | info->max_log_blks = ((info->capacity >> (info->pageshift + info->blockshift)) / 256) * 250; |
874 | 887 | ||
875 | /* Last page in the card, adjust as we only use 250 out of | 888 | /* |
876 | * every 256 pages */ | 889 | * Last page in the card, adjust as we only use 250 out of |
890 | * every 256 pages | ||
891 | */ | ||
877 | capacity = (capacity / 256) * 250; | 892 | capacity = (capacity / 256) * 250; |
878 | 893 | ||
879 | capacity /= PAGESIZE; | 894 | capacity /= PAGESIZE; |
diff --git a/drivers/usb/storage/shuttle_usbat.c b/drivers/usb/storage/shuttle_usbat.c index a3ec86b913a1..3b0294e4df93 100644 --- a/drivers/usb/storage/shuttle_usbat.c +++ b/drivers/usb/storage/shuttle_usbat.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for SCM Microsystems (a.k.a. Shuttle) USB-ATAPI cable | 1 | /* |
2 | * Driver for SCM Microsystems (a.k.a. Shuttle) USB-ATAPI cable | ||
2 | * | 3 | * |
3 | * Current development and maintenance by: | 4 | * Current development and maintenance by: |
4 | * (c) 2000, 2001 Robert Baruch (autophile@starband.net) | 5 | * (c) 2000, 2001 Robert Baruch (autophile@starband.net) |
@@ -408,7 +409,8 @@ static int usbat_wait_not_busy(struct us_data *us, int minutes) | |||
408 | int result; | 409 | int result; |
409 | unsigned char *status = us->iobuf; | 410 | unsigned char *status = us->iobuf; |
410 | 411 | ||
411 | /* Synchronizing cache on a CDR could take a heck of a long time, | 412 | /* |
413 | * Synchronizing cache on a CDR could take a heck of a long time, | ||
412 | * but probably not more than 10 minutes or so. On the other hand, | 414 | * but probably not more than 10 minutes or so. On the other hand, |
413 | * doing a full blank on a CDRW at speed 1 will take about 75 | 415 | * doing a full blank on a CDRW at speed 1 will take about 75 |
414 | * minutes! | 416 | * minutes! |
@@ -1570,9 +1572,10 @@ static int usbat_hp8200e_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1570 | 1572 | ||
1571 | len = scsi_bufflen(srb); | 1573 | len = scsi_bufflen(srb); |
1572 | 1574 | ||
1573 | /* Send A0 (ATA PACKET COMMAND). | 1575 | /* |
1574 | Note: I guess we're never going to get any of the ATA | 1576 | * Send A0 (ATA PACKET COMMAND). |
1575 | commands... just ATA Packet Commands. | 1577 | * Note: I guess we're never going to get any of the ATA |
1578 | * commands... just ATA Packet Commands. | ||
1576 | */ | 1579 | */ |
1577 | 1580 | ||
1578 | registers[0] = USBAT_ATA_FEATURES; | 1581 | registers[0] = USBAT_ATA_FEATURES; |
@@ -1851,7 +1854,8 @@ static int usbat_probe(struct usb_interface *intf, | |||
1851 | if (result) | 1854 | if (result) |
1852 | return result; | 1855 | return result; |
1853 | 1856 | ||
1854 | /* The actual transport will be determined later by the | 1857 | /* |
1858 | * The actual transport will be determined later by the | ||
1855 | * initialization routine; this is just a placeholder. | 1859 | * initialization routine; this is just a placeholder. |
1856 | */ | 1860 | */ |
1857 | us->transport_name = "Shuttle USBAT"; | 1861 | us->transport_name = "Shuttle USBAT"; |
diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c index 2ea657be14c8..9a51019ac7b2 100644 --- a/drivers/usb/storage/sierra_ms.c +++ b/drivers/usb/storage/sierra_ms.c | |||
@@ -177,7 +177,8 @@ int sierra_ms_init(struct us_data *us) | |||
177 | 177 | ||
178 | debug_swoc(&us->pusb_dev->dev, swocInfo); | 178 | debug_swoc(&us->pusb_dev->dev, swocInfo); |
179 | 179 | ||
180 | /* If there is not Linux software on the TRU-Install device | 180 | /* |
181 | * If there is not Linux software on the TRU-Install device | ||
181 | * then switch to modem mode | 182 | * then switch to modem mode |
182 | */ | 183 | */ |
183 | if (!containsFullLinuxPackage(swocInfo)) { | 184 | if (!containsFullLinuxPackage(swocInfo)) { |
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index 5e67f63b2e46..ffd086733421 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * | 3 | * |
3 | * Current development and maintenance by: | 4 | * Current development and maintenance by: |
4 | * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net) | 5 | * (c) 1999-2002 Matthew Dharm (mdharm-usb@one-eyed-alien.net) |
@@ -109,7 +110,8 @@ | |||
109 | * called more than once or from being called during usb_submit_urb(). | 110 | * called more than once or from being called during usb_submit_urb(). |
110 | */ | 111 | */ |
111 | 112 | ||
112 | /* This is the completion handler which will wake us up when an URB | 113 | /* |
114 | * This is the completion handler which will wake us up when an URB | ||
113 | * completes. | 115 | * completes. |
114 | */ | 116 | */ |
115 | static void usb_stor_blocking_completion(struct urb *urb) | 117 | static void usb_stor_blocking_completion(struct urb *urb) |
@@ -119,7 +121,8 @@ static void usb_stor_blocking_completion(struct urb *urb) | |||
119 | complete(urb_done_ptr); | 121 | complete(urb_done_ptr); |
120 | } | 122 | } |
121 | 123 | ||
122 | /* This is the common part of the URB message submission code | 124 | /* |
125 | * This is the common part of the URB message submission code | ||
123 | * | 126 | * |
124 | * All URBs from the usb-storage driver involved in handling a queued scsi | 127 | * All URBs from the usb-storage driver involved in handling a queued scsi |
125 | * command _must_ pass through this function (or something like it) for the | 128 | * command _must_ pass through this function (or something like it) for the |
@@ -142,10 +145,12 @@ static int usb_stor_msg_common(struct us_data *us, int timeout) | |||
142 | us->current_urb->context = &urb_done; | 145 | us->current_urb->context = &urb_done; |
143 | us->current_urb->transfer_flags = 0; | 146 | us->current_urb->transfer_flags = 0; |
144 | 147 | ||
145 | /* we assume that if transfer_buffer isn't us->iobuf then it | 148 | /* |
149 | * we assume that if transfer_buffer isn't us->iobuf then it | ||
146 | * hasn't been mapped for DMA. Yes, this is clunky, but it's | 150 | * hasn't been mapped for DMA. Yes, this is clunky, but it's |
147 | * easier than always having the caller tell us whether the | 151 | * easier than always having the caller tell us whether the |
148 | * transfer buffer has already been mapped. */ | 152 | * transfer buffer has already been mapped. |
153 | */ | ||
149 | if (us->current_urb->transfer_buffer == us->iobuf) | 154 | if (us->current_urb->transfer_buffer == us->iobuf) |
150 | us->current_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; | 155 | us->current_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP; |
151 | us->current_urb->transfer_dma = us->iobuf_dma; | 156 | us->current_urb->transfer_dma = us->iobuf_dma; |
@@ -157,8 +162,10 @@ static int usb_stor_msg_common(struct us_data *us, int timeout) | |||
157 | return status; | 162 | return status; |
158 | } | 163 | } |
159 | 164 | ||
160 | /* since the URB has been submitted successfully, it's now okay | 165 | /* |
161 | * to cancel it */ | 166 | * since the URB has been submitted successfully, it's now okay |
167 | * to cancel it | ||
168 | */ | ||
162 | set_bit(US_FLIDX_URB_ACTIVE, &us->dflags); | 169 | set_bit(US_FLIDX_URB_ACTIVE, &us->dflags); |
163 | 170 | ||
164 | /* did an abort occur during the submission? */ | 171 | /* did an abort occur during the submission? */ |
@@ -220,7 +227,8 @@ int usb_stor_control_msg(struct us_data *us, unsigned int pipe, | |||
220 | } | 227 | } |
221 | EXPORT_SYMBOL_GPL(usb_stor_control_msg); | 228 | EXPORT_SYMBOL_GPL(usb_stor_control_msg); |
222 | 229 | ||
223 | /* This is a version of usb_clear_halt() that allows early termination and | 230 | /* |
231 | * This is a version of usb_clear_halt() that allows early termination and | ||
224 | * doesn't read the status from the device -- this is because some devices | 232 | * doesn't read the status from the device -- this is because some devices |
225 | * crash their internal firmware when the status is requested after a halt. | 233 | * crash their internal firmware when the status is requested after a halt. |
226 | * | 234 | * |
@@ -280,8 +288,10 @@ static int interpret_urb_result(struct us_data *us, unsigned int pipe, | |||
280 | 288 | ||
281 | /* stalled */ | 289 | /* stalled */ |
282 | case -EPIPE: | 290 | case -EPIPE: |
283 | /* for control endpoints, (used by CB[I]) a stall indicates | 291 | /* |
284 | * a failed command */ | 292 | * for control endpoints, (used by CB[I]) a stall indicates |
293 | * a failed command | ||
294 | */ | ||
285 | if (usb_pipecontrol(pipe)) { | 295 | if (usb_pipecontrol(pipe)) { |
286 | usb_stor_dbg(us, "-- stall on control pipe\n"); | 296 | usb_stor_dbg(us, "-- stall on control pipe\n"); |
287 | return USB_STOR_XFER_STALLED; | 297 | return USB_STOR_XFER_STALLED; |
@@ -433,8 +443,10 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe, | |||
433 | return USB_STOR_XFER_ERROR; | 443 | return USB_STOR_XFER_ERROR; |
434 | } | 444 | } |
435 | 445 | ||
436 | /* since the block has been initialized successfully, it's now | 446 | /* |
437 | * okay to cancel it */ | 447 | * since the block has been initialized successfully, it's now |
448 | * okay to cancel it | ||
449 | */ | ||
438 | set_bit(US_FLIDX_SG_ACTIVE, &us->dflags); | 450 | set_bit(US_FLIDX_SG_ACTIVE, &us->dflags); |
439 | 451 | ||
440 | /* did an abort occur during the submission? */ | 452 | /* did an abort occur during the submission? */ |
@@ -515,7 +527,8 @@ EXPORT_SYMBOL_GPL(usb_stor_bulk_transfer_sg); | |||
515 | * Transport routines | 527 | * Transport routines |
516 | ***********************************************************************/ | 528 | ***********************************************************************/ |
517 | 529 | ||
518 | /* There are so many devices that report the capacity incorrectly, | 530 | /* |
531 | * There are so many devices that report the capacity incorrectly, | ||
519 | * this routine was written to counteract some of the resulting | 532 | * this routine was written to counteract some of the resulting |
520 | * problems. | 533 | * problems. |
521 | */ | 534 | */ |
@@ -533,7 +546,8 @@ static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb) | |||
533 | [12] = 0x14 /* Record Not Found */ | 546 | [12] = 0x14 /* Record Not Found */ |
534 | }; | 547 | }; |
535 | 548 | ||
536 | /* If last-sector problems can't occur, whether because the | 549 | /* |
550 | * If last-sector problems can't occur, whether because the | ||
537 | * capacity was already decremented or because the device is | 551 | * capacity was already decremented or because the device is |
538 | * known to report the correct capacity, then we don't need | 552 | * known to report the correct capacity, then we don't need |
539 | * to do anything. | 553 | * to do anything. |
@@ -559,13 +573,15 @@ static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb) | |||
559 | 573 | ||
560 | if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) { | 574 | if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) { |
561 | 575 | ||
562 | /* The command succeeded. We know this device doesn't | 576 | /* |
577 | * The command succeeded. We know this device doesn't | ||
563 | * have the last-sector bug, so stop checking it. | 578 | * have the last-sector bug, so stop checking it. |
564 | */ | 579 | */ |
565 | us->use_last_sector_hacks = 0; | 580 | us->use_last_sector_hacks = 0; |
566 | 581 | ||
567 | } else { | 582 | } else { |
568 | /* The command failed. Allow up to 3 retries in case this | 583 | /* |
584 | * The command failed. Allow up to 3 retries in case this | ||
569 | * is some normal sort of failure. After that, assume the | 585 | * is some normal sort of failure. After that, assume the |
570 | * capacity is wrong and we're trying to access the sector | 586 | * capacity is wrong and we're trying to access the sector |
571 | * beyond the end. Replace the result code and sense data | 587 | * beyond the end. Replace the result code and sense data |
@@ -581,7 +597,8 @@ static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb) | |||
581 | } | 597 | } |
582 | 598 | ||
583 | done: | 599 | done: |
584 | /* Don't reset the retry counter for TEST UNIT READY commands, | 600 | /* |
601 | * Don't reset the retry counter for TEST UNIT READY commands, | ||
585 | * because they get issued after device resets which might be | 602 | * because they get issued after device resets which might be |
586 | * caused by a failed last-sector access. | 603 | * caused by a failed last-sector access. |
587 | */ | 604 | */ |
@@ -589,7 +606,8 @@ static void last_sector_hacks(struct us_data *us, struct scsi_cmnd *srb) | |||
589 | us->last_sector_retries = 0; | 606 | us->last_sector_retries = 0; |
590 | } | 607 | } |
591 | 608 | ||
592 | /* Invoke the transport and basic error-handling/recovery methods | 609 | /* |
610 | * Invoke the transport and basic error-handling/recovery methods | ||
593 | * | 611 | * |
594 | * This is used by the protocol layers to actually send the message to | 612 | * This is used by the protocol layers to actually send the message to |
595 | * the device and receive the response. | 613 | * the device and receive the response. |
@@ -603,7 +621,8 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
603 | scsi_set_resid(srb, 0); | 621 | scsi_set_resid(srb, 0); |
604 | result = us->transport(srb, us); | 622 | result = us->transport(srb, us); |
605 | 623 | ||
606 | /* if the command gets aborted by the higher layers, we need to | 624 | /* |
625 | * if the command gets aborted by the higher layers, we need to | ||
607 | * short-circuit all other processing | 626 | * short-circuit all other processing |
608 | */ | 627 | */ |
609 | if (test_bit(US_FLIDX_TIMED_OUT, &us->dflags)) { | 628 | if (test_bit(US_FLIDX_TIMED_OUT, &us->dflags)) { |
@@ -628,7 +647,8 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
628 | 647 | ||
629 | srb->result = SAM_STAT_GOOD; | 648 | srb->result = SAM_STAT_GOOD; |
630 | 649 | ||
631 | /* Determine if we need to auto-sense | 650 | /* |
651 | * Determine if we need to auto-sense | ||
632 | * | 652 | * |
633 | * I normally don't use a flag like this, but it's almost impossible | 653 | * I normally don't use a flag like this, but it's almost impossible |
634 | * to understand what's going on here if I don't. | 654 | * to understand what's going on here if I don't. |
@@ -728,7 +748,8 @@ Retry_Sense: | |||
728 | goto Handle_Errors; | 748 | goto Handle_Errors; |
729 | } | 749 | } |
730 | 750 | ||
731 | /* Some devices claim to support larger sense but fail when | 751 | /* |
752 | * Some devices claim to support larger sense but fail when | ||
732 | * trying to request it. When a transport failure happens | 753 | * trying to request it. When a transport failure happens |
733 | * using US_FS_SANE_SENSE, we always retry with a standard | 754 | * using US_FS_SANE_SENSE, we always retry with a standard |
734 | * (small) sense request. This fixes some USB GSM modems | 755 | * (small) sense request. This fixes some USB GSM modems |
@@ -746,7 +767,8 @@ Retry_Sense: | |||
746 | if (temp_result != USB_STOR_TRANSPORT_GOOD) { | 767 | if (temp_result != USB_STOR_TRANSPORT_GOOD) { |
747 | usb_stor_dbg(us, "-- auto-sense failure\n"); | 768 | usb_stor_dbg(us, "-- auto-sense failure\n"); |
748 | 769 | ||
749 | /* we skip the reset if this happens to be a | 770 | /* |
771 | * we skip the reset if this happens to be a | ||
750 | * multi-target device, since failure of an | 772 | * multi-target device, since failure of an |
751 | * auto-sense is perfectly valid | 773 | * auto-sense is perfectly valid |
752 | */ | 774 | */ |
@@ -756,7 +778,8 @@ Retry_Sense: | |||
756 | return; | 778 | return; |
757 | } | 779 | } |
758 | 780 | ||
759 | /* If the sense data returned is larger than 18-bytes then we | 781 | /* |
782 | * If the sense data returned is larger than 18-bytes then we | ||
760 | * assume this device supports requesting more in the future. | 783 | * assume this device supports requesting more in the future. |
761 | * The response code must be 70h through 73h inclusive. | 784 | * The response code must be 70h through 73h inclusive. |
762 | */ | 785 | */ |
@@ -767,7 +790,8 @@ Retry_Sense: | |||
767 | usb_stor_dbg(us, "-- SANE_SENSE support enabled\n"); | 790 | usb_stor_dbg(us, "-- SANE_SENSE support enabled\n"); |
768 | us->fflags |= US_FL_SANE_SENSE; | 791 | us->fflags |= US_FL_SANE_SENSE; |
769 | 792 | ||
770 | /* Indicate to the user that we truncated their sense | 793 | /* |
794 | * Indicate to the user that we truncated their sense | ||
771 | * because we didn't know it supported larger sense. | 795 | * because we didn't know it supported larger sense. |
772 | */ | 796 | */ |
773 | usb_stor_dbg(us, "-- Sense data truncated to %i from %i\n", | 797 | usb_stor_dbg(us, "-- Sense data truncated to %i from %i\n", |
@@ -795,13 +819,15 @@ Retry_Sense: | |||
795 | SCSI_SENSE_BUFFERSIZE, 4); | 819 | SCSI_SENSE_BUFFERSIZE, 4); |
796 | fm_ili = (scdd ? scdd[3] : srb->sense_buffer[2]) & 0xA0; | 820 | fm_ili = (scdd ? scdd[3] : srb->sense_buffer[2]) & 0xA0; |
797 | 821 | ||
798 | /* We often get empty sense data. This could indicate that | 822 | /* |
823 | * We often get empty sense data. This could indicate that | ||
799 | * everything worked or that there was an unspecified | 824 | * everything worked or that there was an unspecified |
800 | * problem. We have to decide which. | 825 | * problem. We have to decide which. |
801 | */ | 826 | */ |
802 | if (sshdr.sense_key == 0 && sshdr.asc == 0 && sshdr.ascq == 0 && | 827 | if (sshdr.sense_key == 0 && sshdr.asc == 0 && sshdr.ascq == 0 && |
803 | fm_ili == 0) { | 828 | fm_ili == 0) { |
804 | /* If things are really okay, then let's show that. | 829 | /* |
830 | * If things are really okay, then let's show that. | ||
805 | * Zero out the sense buffer so the higher layers | 831 | * Zero out the sense buffer so the higher layers |
806 | * won't realize we did an unsolicited auto-sense. | 832 | * won't realize we did an unsolicited auto-sense. |
807 | */ | 833 | */ |
@@ -809,7 +835,8 @@ Retry_Sense: | |||
809 | srb->result = SAM_STAT_GOOD; | 835 | srb->result = SAM_STAT_GOOD; |
810 | srb->sense_buffer[0] = 0x0; | 836 | srb->sense_buffer[0] = 0x0; |
811 | 837 | ||
812 | /* If there was a problem, report an unspecified | 838 | /* |
839 | * If there was a problem, report an unspecified | ||
813 | * hardware error to prevent the higher layers from | 840 | * hardware error to prevent the higher layers from |
814 | * entering an infinite retry loop. | 841 | * entering an infinite retry loop. |
815 | */ | 842 | */ |
@@ -860,20 +887,26 @@ Retry_Sense: | |||
860 | last_sector_hacks(us, srb); | 887 | last_sector_hacks(us, srb); |
861 | return; | 888 | return; |
862 | 889 | ||
863 | /* Error and abort processing: try to resynchronize with the device | 890 | /* |
891 | * Error and abort processing: try to resynchronize with the device | ||
864 | * by issuing a port reset. If that fails, try a class-specific | 892 | * by issuing a port reset. If that fails, try a class-specific |
865 | * device reset. */ | 893 | * device reset. |
894 | */ | ||
866 | Handle_Errors: | 895 | Handle_Errors: |
867 | 896 | ||
868 | /* Set the RESETTING bit, and clear the ABORTING bit so that | 897 | /* |
869 | * the reset may proceed. */ | 898 | * Set the RESETTING bit, and clear the ABORTING bit so that |
899 | * the reset may proceed. | ||
900 | */ | ||
870 | scsi_lock(us_to_host(us)); | 901 | scsi_lock(us_to_host(us)); |
871 | set_bit(US_FLIDX_RESETTING, &us->dflags); | 902 | set_bit(US_FLIDX_RESETTING, &us->dflags); |
872 | clear_bit(US_FLIDX_ABORTING, &us->dflags); | 903 | clear_bit(US_FLIDX_ABORTING, &us->dflags); |
873 | scsi_unlock(us_to_host(us)); | 904 | scsi_unlock(us_to_host(us)); |
874 | 905 | ||
875 | /* We must release the device lock because the pre_reset routine | 906 | /* |
876 | * will want to acquire it. */ | 907 | * We must release the device lock because the pre_reset routine |
908 | * will want to acquire it. | ||
909 | */ | ||
877 | mutex_unlock(&us->dev_mutex); | 910 | mutex_unlock(&us->dev_mutex); |
878 | result = usb_stor_port_reset(us); | 911 | result = usb_stor_port_reset(us); |
879 | mutex_lock(&us->dev_mutex); | 912 | mutex_lock(&us->dev_mutex); |
@@ -891,10 +924,12 @@ Retry_Sense: | |||
891 | /* Stop the current URB transfer */ | 924 | /* Stop the current URB transfer */ |
892 | void usb_stor_stop_transport(struct us_data *us) | 925 | void usb_stor_stop_transport(struct us_data *us) |
893 | { | 926 | { |
894 | /* If the state machine is blocked waiting for an URB, | 927 | /* |
928 | * If the state machine is blocked waiting for an URB, | ||
895 | * let's wake it up. The test_and_clear_bit() call | 929 | * let's wake it up. The test_and_clear_bit() call |
896 | * guarantees that if a URB has just been submitted, | 930 | * guarantees that if a URB has just been submitted, |
897 | * it won't be cancelled more than once. */ | 931 | * it won't be cancelled more than once. |
932 | */ | ||
898 | if (test_and_clear_bit(US_FLIDX_URB_ACTIVE, &us->dflags)) { | 933 | if (test_and_clear_bit(US_FLIDX_URB_ACTIVE, &us->dflags)) { |
899 | usb_stor_dbg(us, "-- cancelling URB\n"); | 934 | usb_stor_dbg(us, "-- cancelling URB\n"); |
900 | usb_unlink_urb(us->current_urb); | 935 | usb_unlink_urb(us->current_urb); |
@@ -955,7 +990,8 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
955 | 990 | ||
956 | /* STATUS STAGE */ | 991 | /* STATUS STAGE */ |
957 | 992 | ||
958 | /* NOTE: CB does not have a status stage. Silly, I know. So | 993 | /* |
994 | * NOTE: CB does not have a status stage. Silly, I know. So | ||
959 | * we have to catch this at a higher level. | 995 | * we have to catch this at a higher level. |
960 | */ | 996 | */ |
961 | if (us->protocol != USB_PR_CBI) | 997 | if (us->protocol != USB_PR_CBI) |
@@ -967,7 +1003,8 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
967 | if (result != USB_STOR_XFER_GOOD) | 1003 | if (result != USB_STOR_XFER_GOOD) |
968 | return USB_STOR_TRANSPORT_ERROR; | 1004 | return USB_STOR_TRANSPORT_ERROR; |
969 | 1005 | ||
970 | /* UFI gives us ASC and ASCQ, like a request sense | 1006 | /* |
1007 | * UFI gives us ASC and ASCQ, like a request sense | ||
971 | * | 1008 | * |
972 | * REQUEST_SENSE and INQUIRY don't affect the sense data on UFI | 1009 | * REQUEST_SENSE and INQUIRY don't affect the sense data on UFI |
973 | * devices, so we ignore the information for those commands. Note | 1010 | * devices, so we ignore the information for those commands. Note |
@@ -983,7 +1020,8 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
983 | return USB_STOR_TRANSPORT_GOOD; | 1020 | return USB_STOR_TRANSPORT_GOOD; |
984 | } | 1021 | } |
985 | 1022 | ||
986 | /* If not UFI, we interpret the data as a result code | 1023 | /* |
1024 | * If not UFI, we interpret the data as a result code | ||
987 | * The first byte should always be a 0x0. | 1025 | * The first byte should always be a 0x0. |
988 | * | 1026 | * |
989 | * Some bogus devices don't follow that rule. They stuff the ASC | 1027 | * Some bogus devices don't follow that rule. They stuff the ASC |
@@ -1005,7 +1043,8 @@ int usb_stor_CB_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1005 | } | 1043 | } |
1006 | return USB_STOR_TRANSPORT_ERROR; | 1044 | return USB_STOR_TRANSPORT_ERROR; |
1007 | 1045 | ||
1008 | /* the CBI spec requires that the bulk pipe must be cleared | 1046 | /* |
1047 | * the CBI spec requires that the bulk pipe must be cleared | ||
1009 | * following any data-in/out command failure (section 2.4.3.1.3) | 1048 | * following any data-in/out command failure (section 2.4.3.1.3) |
1010 | */ | 1049 | */ |
1011 | Failed: | 1050 | Failed: |
@@ -1107,9 +1146,11 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1107 | /* DATA STAGE */ | 1146 | /* DATA STAGE */ |
1108 | /* send/receive data payload, if there is any */ | 1147 | /* send/receive data payload, if there is any */ |
1109 | 1148 | ||
1110 | /* Some USB-IDE converter chips need a 100us delay between the | 1149 | /* |
1150 | * Some USB-IDE converter chips need a 100us delay between the | ||
1111 | * command phase and the data phase. Some devices need a little | 1151 | * command phase and the data phase. Some devices need a little |
1112 | * more than that, probably because of clock rate inaccuracies. */ | 1152 | * more than that, probably because of clock rate inaccuracies. |
1153 | */ | ||
1113 | if (unlikely(us->fflags & US_FL_GO_SLOW)) | 1154 | if (unlikely(us->fflags & US_FL_GO_SLOW)) |
1114 | usleep_range(125, 150); | 1155 | usleep_range(125, 150); |
1115 | 1156 | ||
@@ -1121,7 +1162,8 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1121 | if (result == USB_STOR_XFER_ERROR) | 1162 | if (result == USB_STOR_XFER_ERROR) |
1122 | return USB_STOR_TRANSPORT_ERROR; | 1163 | return USB_STOR_TRANSPORT_ERROR; |
1123 | 1164 | ||
1124 | /* If the device tried to send back more data than the | 1165 | /* |
1166 | * If the device tried to send back more data than the | ||
1125 | * amount requested, the spec requires us to transfer | 1167 | * amount requested, the spec requires us to transfer |
1126 | * the CSW anyway. Since there's no point retrying the | 1168 | * the CSW anyway. Since there's no point retrying the |
1127 | * the command, we'll return fake sense data indicating | 1169 | * the command, we'll return fake sense data indicating |
@@ -1156,7 +1198,8 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1156 | } | 1198 | } |
1157 | } | 1199 | } |
1158 | 1200 | ||
1159 | /* See flow chart on pg 15 of the Bulk Only Transport spec for | 1201 | /* |
1202 | * See flow chart on pg 15 of the Bulk Only Transport spec for | ||
1160 | * an explanation of how this code works. | 1203 | * an explanation of how this code works. |
1161 | */ | 1204 | */ |
1162 | 1205 | ||
@@ -1165,7 +1208,8 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1165 | result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, | 1208 | result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, |
1166 | bcs, US_BULK_CS_WRAP_LEN, &cswlen); | 1209 | bcs, US_BULK_CS_WRAP_LEN, &cswlen); |
1167 | 1210 | ||
1168 | /* Some broken devices add unnecessary zero-length packets to the | 1211 | /* |
1212 | * Some broken devices add unnecessary zero-length packets to the | ||
1169 | * end of their data transfers. Such packets show up as 0-length | 1213 | * end of their data transfers. Such packets show up as 0-length |
1170 | * CSWs. If we encounter such a thing, try to read the CSW again. | 1214 | * CSWs. If we encounter such a thing, try to read the CSW again. |
1171 | */ | 1215 | */ |
@@ -1201,7 +1245,8 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1201 | return USB_STOR_TRANSPORT_ERROR; | 1245 | return USB_STOR_TRANSPORT_ERROR; |
1202 | } | 1246 | } |
1203 | 1247 | ||
1204 | /* Some broken devices report odd signatures, so we do not check them | 1248 | /* |
1249 | * Some broken devices report odd signatures, so we do not check them | ||
1205 | * for validity against the spec. We store the first one we see, | 1250 | * for validity against the spec. We store the first one we see, |
1206 | * and check subsequent transfers for validity against this signature. | 1251 | * and check subsequent transfers for validity against this signature. |
1207 | */ | 1252 | */ |
@@ -1217,11 +1262,14 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1217 | return USB_STOR_TRANSPORT_ERROR; | 1262 | return USB_STOR_TRANSPORT_ERROR; |
1218 | } | 1263 | } |
1219 | 1264 | ||
1220 | /* try to compute the actual residue, based on how much data | 1265 | /* |
1221 | * was really transferred and what the device tells us */ | 1266 | * try to compute the actual residue, based on how much data |
1267 | * was really transferred and what the device tells us | ||
1268 | */ | ||
1222 | if (residue && !(us->fflags & US_FL_IGNORE_RESIDUE)) { | 1269 | if (residue && !(us->fflags & US_FL_IGNORE_RESIDUE)) { |
1223 | 1270 | ||
1224 | /* Heuristically detect devices that generate bogus residues | 1271 | /* |
1272 | * Heuristically detect devices that generate bogus residues | ||
1225 | * by seeing what happens with INQUIRY and READ CAPACITY | 1273 | * by seeing what happens with INQUIRY and READ CAPACITY |
1226 | * commands. | 1274 | * commands. |
1227 | */ | 1275 | */ |
@@ -1259,7 +1307,8 @@ int usb_stor_Bulk_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
1259 | return USB_STOR_TRANSPORT_FAILED; | 1307 | return USB_STOR_TRANSPORT_FAILED; |
1260 | 1308 | ||
1261 | case US_BULK_STAT_PHASE: | 1309 | case US_BULK_STAT_PHASE: |
1262 | /* phase error -- note that a transport reset will be | 1310 | /* |
1311 | * phase error -- note that a transport reset will be | ||
1263 | * invoked by the invoke_transport() function | 1312 | * invoked by the invoke_transport() function |
1264 | */ | 1313 | */ |
1265 | return USB_STOR_TRANSPORT_ERROR; | 1314 | return USB_STOR_TRANSPORT_ERROR; |
@@ -1274,7 +1323,8 @@ EXPORT_SYMBOL_GPL(usb_stor_Bulk_transport); | |||
1274 | * Reset routines | 1323 | * Reset routines |
1275 | ***********************************************************************/ | 1324 | ***********************************************************************/ |
1276 | 1325 | ||
1277 | /* This is the common part of the device reset code. | 1326 | /* |
1327 | * This is the common part of the device reset code. | ||
1278 | * | 1328 | * |
1279 | * It's handy that every transport mechanism uses the control endpoint for | 1329 | * It's handy that every transport mechanism uses the control endpoint for |
1280 | * resets. | 1330 | * resets. |
@@ -1302,8 +1352,10 @@ static int usb_stor_reset_common(struct us_data *us, | |||
1302 | return result; | 1352 | return result; |
1303 | } | 1353 | } |
1304 | 1354 | ||
1305 | /* Give the device some time to recover from the reset, | 1355 | /* |
1306 | * but don't delay disconnect processing. */ | 1356 | * Give the device some time to recover from the reset, |
1357 | * but don't delay disconnect processing. | ||
1358 | */ | ||
1307 | wait_event_interruptible_timeout(us->delay_wait, | 1359 | wait_event_interruptible_timeout(us->delay_wait, |
1308 | test_bit(US_FLIDX_DISCONNECTING, &us->dflags), | 1360 | test_bit(US_FLIDX_DISCONNECTING, &us->dflags), |
1309 | HZ*6); | 1361 | HZ*6); |
@@ -1328,8 +1380,7 @@ static int usb_stor_reset_common(struct us_data *us, | |||
1328 | return result; | 1380 | return result; |
1329 | } | 1381 | } |
1330 | 1382 | ||
1331 | /* This issues a CB[I] Reset to the device in question | 1383 | /* This issues a CB[I] Reset to the device in question */ |
1332 | */ | ||
1333 | #define CB_RESET_CMD_SIZE 12 | 1384 | #define CB_RESET_CMD_SIZE 12 |
1334 | 1385 | ||
1335 | int usb_stor_CB_reset(struct us_data *us) | 1386 | int usb_stor_CB_reset(struct us_data *us) |
@@ -1343,7 +1394,8 @@ int usb_stor_CB_reset(struct us_data *us) | |||
1343 | } | 1394 | } |
1344 | EXPORT_SYMBOL_GPL(usb_stor_CB_reset); | 1395 | EXPORT_SYMBOL_GPL(usb_stor_CB_reset); |
1345 | 1396 | ||
1346 | /* This issues a Bulk-only Reset to the device in question, including | 1397 | /* |
1398 | * This issues a Bulk-only Reset to the device in question, including | ||
1347 | * clearing the subsequent endpoint halts that may occur. | 1399 | * clearing the subsequent endpoint halts that may occur. |
1348 | */ | 1400 | */ |
1349 | int usb_stor_Bulk_reset(struct us_data *us) | 1401 | int usb_stor_Bulk_reset(struct us_data *us) |
@@ -1354,7 +1406,8 @@ int usb_stor_Bulk_reset(struct us_data *us) | |||
1354 | } | 1406 | } |
1355 | EXPORT_SYMBOL_GPL(usb_stor_Bulk_reset); | 1407 | EXPORT_SYMBOL_GPL(usb_stor_Bulk_reset); |
1356 | 1408 | ||
1357 | /* Issue a USB port reset to the device. The caller must not hold | 1409 | /* |
1410 | * Issue a USB port reset to the device. The caller must not hold | ||
1358 | * us->dev_mutex. | 1411 | * us->dev_mutex. |
1359 | */ | 1412 | */ |
1360 | int usb_stor_port_reset(struct us_data *us) | 1413 | int usb_stor_port_reset(struct us_data *us) |
diff --git a/drivers/usb/storage/transport.h b/drivers/usb/storage/transport.h index 9369d752d419..dae3ecd2e6cf 100644 --- a/drivers/usb/storage/transport.h +++ b/drivers/usb/storage/transport.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * Transport Functions Header File | 3 | * Transport Functions Header File |
3 | * | 4 | * |
4 | * Current development and maintenance by: | 5 | * Current development and maintenance by: |
diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 16bc679dc2fc..4d49fce406e1 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c | |||
@@ -799,7 +799,8 @@ static int uas_slave_alloc(struct scsi_device *sdev) | |||
799 | 799 | ||
800 | sdev->hostdata = devinfo; | 800 | sdev->hostdata = devinfo; |
801 | 801 | ||
802 | /* USB has unusual DMA-alignment requirements: Although the | 802 | /* |
803 | * USB has unusual DMA-alignment requirements: Although the | ||
803 | * starting address of each scatter-gather element doesn't matter, | 804 | * starting address of each scatter-gather element doesn't matter, |
804 | * the length of each element except the last must be divisible | 805 | * the length of each element except the last must be divisible |
805 | * by the Bulk maxpacket value. There's currently no way to | 806 | * by the Bulk maxpacket value. There's currently no way to |
diff --git a/drivers/usb/storage/unusual_alauda.h b/drivers/usb/storage/unusual_alauda.h index fa3e9edaa2cf..763bc03032a1 100644 --- a/drivers/usb/storage/unusual_alauda.h +++ b/drivers/usb/storage/unusual_alauda.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for the Alauda-based card readers | 1 | /* |
2 | * Unusual Devices File for the Alauda-based card readers | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/usb/storage/unusual_cypress.h b/drivers/usb/storage/unusual_cypress.h index 82e8ed0324e3..e9a2eb88869a 100644 --- a/drivers/usb/storage/unusual_cypress.h +++ b/drivers/usb/storage/unusual_cypress.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for devices based on the Cypress USB/ATA bridge | 1 | /* |
2 | * Unusual Devices File for devices based on the Cypress USB/ATA bridge | ||
2 | * with support for ATACB | 3 | * with support for ATACB |
3 | * | 4 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 5 | * This program is free software; you can redistribute it and/or modify it |
diff --git a/drivers/usb/storage/unusual_datafab.h b/drivers/usb/storage/unusual_datafab.h index 582a603c78be..5049b6bbe5d5 100644 --- a/drivers/usb/storage/unusual_datafab.h +++ b/drivers/usb/storage/unusual_datafab.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for the Datafab USB Compact Flash reader | 1 | /* |
2 | * Unusual Devices File for the Datafab USB Compact Flash reader | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
@@ -79,7 +80,8 @@ UNUSUAL_DEV( 0x07c4, 0xa109, 0x0000, 0xffff, | |||
79 | USB_SC_SCSI, USB_PR_DATAFAB, NULL, | 80 | USB_SC_SCSI, USB_PR_DATAFAB, NULL, |
80 | 0), | 81 | 0), |
81 | 82 | ||
82 | /* Reported by Felix Moeller <felix@derklecks.de> | 83 | /* |
84 | * Reported by Felix Moeller <felix@derklecks.de> | ||
83 | * in Germany this is sold by Hama with the productnumber 46952 | 85 | * in Germany this is sold by Hama with the productnumber 46952 |
84 | * as "DualSlot CompactFlash(TM) & MStick Drive USB" | 86 | * as "DualSlot CompactFlash(TM) & MStick Drive USB" |
85 | */ | 87 | */ |
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h index 7ffe4209067b..aa3539238848 100644 --- a/drivers/usb/storage/unusual_devs.h +++ b/drivers/usb/storage/unusual_devs.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * Unusual Devices File | 3 | * Unusual Devices File |
3 | * | 4 | * |
4 | * Current development and maintenance by: | 5 | * Current development and maintenance by: |
@@ -25,13 +26,15 @@ | |||
25 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 26 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | */ | 27 | */ |
27 | 28 | ||
28 | /* IMPORTANT NOTE: This file must be included in another file which does | 29 | /* |
30 | * IMPORTANT NOTE: This file must be included in another file which does | ||
29 | * the following thing for it to work: | 31 | * the following thing for it to work: |
30 | * The UNUSUAL_DEV, COMPLIANT_DEV, and USUAL_DEV macros must be defined | 32 | * The UNUSUAL_DEV, COMPLIANT_DEV, and USUAL_DEV macros must be defined |
31 | * before this file is included. | 33 | * before this file is included. |
32 | */ | 34 | */ |
33 | 35 | ||
34 | /* If you edit this file, please try to keep it sorted first by VendorID, | 36 | /* |
37 | * If you edit this file, please try to keep it sorted first by VendorID, | ||
35 | * then by ProductID. | 38 | * then by ProductID. |
36 | * | 39 | * |
37 | * If you want to add an entry for this file, be sure to include the | 40 | * If you want to add an entry for this file, be sure to include the |
@@ -47,13 +50,15 @@ | |||
47 | * <usb-storage@lists.one-eyed-alien.net> | 50 | * <usb-storage@lists.one-eyed-alien.net> |
48 | */ | 51 | */ |
49 | 52 | ||
50 | /* Note: If you add an entry only in order to set the CAPACITY_OK flag, | 53 | /* |
54 | * Note: If you add an entry only in order to set the CAPACITY_OK flag, | ||
51 | * use the COMPLIANT_DEV macro instead of UNUSUAL_DEV. This is | 55 | * use the COMPLIANT_DEV macro instead of UNUSUAL_DEV. This is |
52 | * because such entries mark devices which actually work correctly, | 56 | * because such entries mark devices which actually work correctly, |
53 | * as opposed to devices that do something strangely or wrongly. | 57 | * as opposed to devices that do something strangely or wrongly. |
54 | */ | 58 | */ |
55 | 59 | ||
56 | /* In-kernel mode switching is deprecated. Do not add new devices to | 60 | /* |
61 | * In-kernel mode switching is deprecated. Do not add new devices to | ||
57 | * this list for the sole purpose of switching them to a different | 62 | * this list for the sole purpose of switching them to a different |
58 | * mode. Existing userspace solutions are superior. | 63 | * mode. Existing userspace solutions are superior. |
59 | * | 64 | * |
@@ -66,8 +71,7 @@ | |||
66 | #define NO_SDDR09 | 71 | #define NO_SDDR09 |
67 | #endif | 72 | #endif |
68 | 73 | ||
69 | /* patch submitted by Vivian Bregier <Vivian.Bregier@imag.fr> | 74 | /* patch submitted by Vivian Bregier <Vivian.Bregier@imag.fr> */ |
70 | */ | ||
71 | UNUSUAL_DEV( 0x03eb, 0x2002, 0x0100, 0x0100, | 75 | UNUSUAL_DEV( 0x03eb, 0x2002, 0x0100, 0x0100, |
72 | "ATMEL", | 76 | "ATMEL", |
73 | "SND1 Storage", | 77 | "SND1 Storage", |
@@ -93,7 +97,8 @@ UNUSUAL_DEV( 0x03f0, 0x070c, 0x0000, 0x0000, | |||
93 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 97 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
94 | US_FL_SANE_SENSE ), | 98 | US_FL_SANE_SENSE ), |
95 | 99 | ||
96 | /* Reported by Grant Grundler <grundler@parisc-linux.org> | 100 | /* |
101 | * Reported by Grant Grundler <grundler@parisc-linux.org> | ||
97 | * HP r707 camera in "Disk" mode with 2.00.23 or 2.00.24 firmware. | 102 | * HP r707 camera in "Disk" mode with 2.00.23 or 2.00.24 firmware. |
98 | */ | 103 | */ |
99 | UNUSUAL_DEV( 0x03f0, 0x4002, 0x0001, 0x0001, | 104 | UNUSUAL_DEV( 0x03f0, 0x4002, 0x0001, 0x0001, |
@@ -107,7 +112,8 @@ UNUSUAL_DEV( 0x03f3, 0x0001, 0x0000, 0x9999, | |||
107 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, | 112 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, |
108 | US_FL_SCM_MULT_TARG ), | 113 | US_FL_SCM_MULT_TARG ), |
109 | 114 | ||
110 | /* Reported by Sebastian Kapfer <sebastian_kapfer@gmx.net> | 115 | /* |
116 | * Reported by Sebastian Kapfer <sebastian_kapfer@gmx.net> | ||
111 | * and Olaf Hering <olh@suse.de> (different bcd's, same vendor/product) | 117 | * and Olaf Hering <olh@suse.de> (different bcd's, same vendor/product) |
112 | * for USB floppies that need the SINGLE_LUN enforcement. | 118 | * for USB floppies that need the SINGLE_LUN enforcement. |
113 | */ | 119 | */ |
@@ -124,7 +130,8 @@ UNUSUAL_DEV( 0x040d, 0x6205, 0x0003, 0x0003, | |||
124 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 130 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
125 | US_FL_IGNORE_RESIDUE ), | 131 | US_FL_IGNORE_RESIDUE ), |
126 | 132 | ||
127 | /* Deduced by Jonathan Woithe <jwoithe@just42.net> | 133 | /* |
134 | * Deduced by Jonathan Woithe <jwoithe@just42.net> | ||
128 | * Entry needed for flags: US_FL_FIX_INQUIRY because initial inquiry message | 135 | * Entry needed for flags: US_FL_FIX_INQUIRY because initial inquiry message |
129 | * always fails and confuses drive. | 136 | * always fails and confuses drive. |
130 | */ | 137 | */ |
@@ -167,8 +174,10 @@ UNUSUAL_DEV( 0x0420, 0x0001, 0x0100, 0x0100, | |||
167 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 174 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
168 | US_FL_IGNORE_RESIDUE ), | 175 | US_FL_IGNORE_RESIDUE ), |
169 | 176 | ||
170 | /* Reported by Andrew Nayenko <relan@bk.ru> | 177 | /* |
171 | * Updated for new firmware by Phillip Potter <phillipinda@hotmail.com> */ | 178 | * Reported by Andrew Nayenko <relan@bk.ru> |
179 | * Updated for new firmware by Phillip Potter <phillipinda@hotmail.com> | ||
180 | */ | ||
172 | UNUSUAL_DEV( 0x0421, 0x0019, 0x0592, 0x0610, | 181 | UNUSUAL_DEV( 0x0421, 0x0019, 0x0592, 0x0610, |
173 | "Nokia", | 182 | "Nokia", |
174 | "Nokia 6288", | 183 | "Nokia 6288", |
@@ -196,16 +205,20 @@ UNUSUAL_DEV( 0x0421, 0x0434, 0x0100, 0x0100, | |||
196 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 205 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
197 | US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), | 206 | US_FL_FIX_CAPACITY | US_FL_IGNORE_RESIDUE ), |
198 | 207 | ||
199 | /* Reported by Sumedha Swamy <sumedhaswamy@gmail.com> and | 208 | /* |
200 | * Einar Th. Einarsson <einarthered@gmail.com> */ | 209 | * Reported by Sumedha Swamy <sumedhaswamy@gmail.com> and |
210 | * Einar Th. Einarsson <einarthered@gmail.com> | ||
211 | */ | ||
201 | UNUSUAL_DEV( 0x0421, 0x0444, 0x0100, 0x0100, | 212 | UNUSUAL_DEV( 0x0421, 0x0444, 0x0100, 0x0100, |
202 | "Nokia", | 213 | "Nokia", |
203 | "N91", | 214 | "N91", |
204 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 215 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
205 | US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), | 216 | US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ), |
206 | 217 | ||
207 | /* Reported by Jiri Slaby <jirislaby@gmail.com> and | 218 | /* |
208 | * Rene C. Castberg <Rene@Castberg.org> */ | 219 | * Reported by Jiri Slaby <jirislaby@gmail.com> and |
220 | * Rene C. Castberg <Rene@Castberg.org> | ||
221 | */ | ||
209 | UNUSUAL_DEV( 0x0421, 0x0446, 0x0100, 0x0100, | 222 | UNUSUAL_DEV( 0x0421, 0x0446, 0x0100, 0x0100, |
210 | "Nokia", | 223 | "Nokia", |
211 | "N80", | 224 | "N80", |
@@ -269,8 +282,10 @@ UNUSUAL_DEV( 0x0436, 0x0005, 0x0100, 0x0100, | |||
269 | US_FL_SINGLE_LUN ), | 282 | US_FL_SINGLE_LUN ), |
270 | #endif | 283 | #endif |
271 | 284 | ||
272 | /* Patch submitted by Daniel Drake <dsd@gentoo.org> | 285 | /* |
273 | * Device reports nonsense bInterfaceProtocol 6 when connected over USB2 */ | 286 | * Patch submitted by Daniel Drake <dsd@gentoo.org> |
287 | * Device reports nonsense bInterfaceProtocol 6 when connected over USB2 | ||
288 | */ | ||
274 | UNUSUAL_DEV( 0x0451, 0x5416, 0x0100, 0x0100, | 289 | UNUSUAL_DEV( 0x0451, 0x5416, 0x0100, 0x0100, |
275 | "Neuros Audio", | 290 | "Neuros Audio", |
276 | "USB 2.0 HD 2.5", | 291 | "USB 2.0 HD 2.5", |
@@ -288,17 +303,18 @@ UNUSUAL_DEV( 0x0457, 0x0150, 0x0100, 0x0100, | |||
288 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), | 303 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_NOT_LOCKABLE ), |
289 | 304 | ||
290 | /* | 305 | /* |
291 | * Bohdan Linda <bohdan.linda@gmail.com> | 306 | * Bohdan Linda <bohdan.linda@gmail.com> |
292 | * 1GB USB sticks MyFlash High Speed. I have restricted | 307 | * 1GB USB sticks MyFlash High Speed. I have restricted |
293 | * the revision to my model only | 308 | * the revision to my model only |
294 | */ | 309 | */ |
295 | UNUSUAL_DEV( 0x0457, 0x0151, 0x0100, 0x0100, | 310 | UNUSUAL_DEV( 0x0457, 0x0151, 0x0100, 0x0100, |
296 | "USB 2.0", | 311 | "USB 2.0", |
297 | "Flash Disk", | 312 | "Flash Disk", |
298 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 313 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
299 | US_FL_NOT_LOCKABLE ), | 314 | US_FL_NOT_LOCKABLE ), |
300 | 315 | ||
301 | /* Reported by Tamas Kerecsen <kerecsen@bigfoot.com> | 316 | /* |
317 | * Reported by Tamas Kerecsen <kerecsen@bigfoot.com> | ||
302 | * Obviously the PROM has not been customized by the VAR; | 318 | * Obviously the PROM has not been customized by the VAR; |
303 | * the Vendor and Product string descriptors are: | 319 | * the Vendor and Product string descriptors are: |
304 | * Generic Mass Storage (PROTOTYPE--Remember to change idVendor) | 320 | * Generic Mass Storage (PROTOTYPE--Remember to change idVendor) |
@@ -347,24 +363,30 @@ UNUSUAL_DEV( 0x0482, 0x0107, 0x0100, 0x0100, | |||
347 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 363 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
348 | US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE), | 364 | US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE), |
349 | 365 | ||
350 | /* Reported by Paul Stewart <stewart@wetlogic.net> | 366 | /* |
351 | * This entry is needed because the device reports Sub=ff */ | 367 | * Reported by Paul Stewart <stewart@wetlogic.net> |
368 | * This entry is needed because the device reports Sub=ff | ||
369 | */ | ||
352 | UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, | 370 | UNUSUAL_DEV( 0x04a4, 0x0004, 0x0001, 0x0001, |
353 | "Hitachi", | 371 | "Hitachi", |
354 | "DVD-CAM DZ-MV100A Camcorder", | 372 | "DVD-CAM DZ-MV100A Camcorder", |
355 | USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), | 373 | USB_SC_SCSI, USB_PR_CB, NULL, US_FL_SINGLE_LUN), |
356 | 374 | ||
357 | /* BENQ DC5330 | 375 | /* |
376 | * BENQ DC5330 | ||
358 | * Reported by Manuel Fombuena <mfombuena@ya.com> and | 377 | * Reported by Manuel Fombuena <mfombuena@ya.com> and |
359 | * Frank Copeland <fjc@thingy.apana.org.au> */ | 378 | * Frank Copeland <fjc@thingy.apana.org.au> |
379 | */ | ||
360 | UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100, | 380 | UNUSUAL_DEV( 0x04a5, 0x3010, 0x0100, 0x0100, |
361 | "Tekom Technologies, Inc", | 381 | "Tekom Technologies, Inc", |
362 | "300_CAMERA", | 382 | "300_CAMERA", |
363 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 383 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
364 | US_FL_IGNORE_RESIDUE ), | 384 | US_FL_IGNORE_RESIDUE ), |
365 | 385 | ||
366 | /* Patch for Nikon coolpix 2000 | 386 | /* |
367 | * Submitted by Fabien Cosse <fabien.cosse@wanadoo.fr>*/ | 387 | * Patch for Nikon coolpix 2000 |
388 | * Submitted by Fabien Cosse <fabien.cosse@wanadoo.fr> | ||
389 | */ | ||
368 | UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010, | 390 | UNUSUAL_DEV( 0x04b0, 0x0301, 0x0010, 0x0010, |
369 | "NIKON", | 391 | "NIKON", |
370 | "NIKON DSC E2000", | 392 | "NIKON DSC E2000", |
@@ -378,21 +400,26 @@ UNUSUAL_DEV( 0x04b3, 0x4001, 0x0110, 0x0110, | |||
378 | USB_SC_DEVICE, USB_PR_CB, NULL, | 400 | USB_SC_DEVICE, USB_PR_CB, NULL, |
379 | US_FL_MAX_SECTORS_MIN), | 401 | US_FL_MAX_SECTORS_MIN), |
380 | 402 | ||
381 | /* Reported by Simon Levitt <simon@whattf.com> | 403 | /* |
382 | * This entry needs Sub and Proto fields */ | 404 | * Reported by Simon Levitt <simon@whattf.com> |
405 | * This entry needs Sub and Proto fields | ||
406 | */ | ||
383 | UNUSUAL_DEV( 0x04b8, 0x0601, 0x0100, 0x0100, | 407 | UNUSUAL_DEV( 0x04b8, 0x0601, 0x0100, 0x0100, |
384 | "Epson", | 408 | "Epson", |
385 | "875DC Storage", | 409 | "875DC Storage", |
386 | USB_SC_SCSI, USB_PR_CB, NULL, US_FL_FIX_INQUIRY), | 410 | USB_SC_SCSI, USB_PR_CB, NULL, US_FL_FIX_INQUIRY), |
387 | 411 | ||
388 | /* Reported by Khalid Aziz <khalid@gonehiking.org> | 412 | /* |
389 | * This entry is needed because the device reports Sub=ff */ | 413 | * Reported by Khalid Aziz <khalid@gonehiking.org> |
414 | * This entry is needed because the device reports Sub=ff | ||
415 | */ | ||
390 | UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110, | 416 | UNUSUAL_DEV( 0x04b8, 0x0602, 0x0110, 0x0110, |
391 | "Epson", | 417 | "Epson", |
392 | "785EPX Storage", | 418 | "785EPX Storage", |
393 | USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_SINGLE_LUN), | 419 | USB_SC_SCSI, USB_PR_BULK, NULL, US_FL_SINGLE_LUN), |
394 | 420 | ||
395 | /* Not sure who reported this originally but | 421 | /* |
422 | * Not sure who reported this originally but | ||
396 | * Pavel Machek <pavel@ucw.cz> reported that the extra US_FL_SINGLE_LUN | 423 | * Pavel Machek <pavel@ucw.cz> reported that the extra US_FL_SINGLE_LUN |
397 | * flag be added */ | 424 | * flag be added */ |
398 | UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210, | 425 | UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210, |
@@ -400,7 +427,8 @@ UNUSUAL_DEV( 0x04cb, 0x0100, 0x0000, 0x2210, | |||
400 | "FinePix 1400Zoom", | 427 | "FinePix 1400Zoom", |
401 | USB_SC_UFI, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN), | 428 | USB_SC_UFI, USB_PR_DEVICE, NULL, US_FL_FIX_INQUIRY | US_FL_SINGLE_LUN), |
402 | 429 | ||
403 | /* Reported by Ondrej Zary <linux@rainbow-software.org> | 430 | /* |
431 | * Reported by Ondrej Zary <linux@rainbow-software.org> | ||
404 | * The device reports one sector more and breaks when that sector is accessed | 432 | * The device reports one sector more and breaks when that sector is accessed |
405 | */ | 433 | */ |
406 | UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c, | 434 | UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c, |
@@ -409,7 +437,8 @@ UNUSUAL_DEV( 0x04ce, 0x0002, 0x026c, 0x026c, | |||
409 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 437 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
410 | US_FL_FIX_CAPACITY), | 438 | US_FL_FIX_CAPACITY), |
411 | 439 | ||
412 | /* Reported by Kriston Fincher <kriston@airmail.net> | 440 | /* |
441 | * Reported by Kriston Fincher <kriston@airmail.net> | ||
413 | * Patch submitted by Sean Millichamp <sean@bruenor.org> | 442 | * Patch submitted by Sean Millichamp <sean@bruenor.org> |
414 | * This is to support the Panasonic PalmCam PV-SD4090 | 443 | * This is to support the Panasonic PalmCam PV-SD4090 |
415 | * This entry is needed because the device reports Sub=ff | 444 | * This entry is needed because the device reports Sub=ff |
@@ -419,8 +448,10 @@ UNUSUAL_DEV( 0x04da, 0x0901, 0x0100, 0x0200, | |||
419 | "LS-120 Camera", | 448 | "LS-120 Camera", |
420 | USB_SC_UFI, USB_PR_DEVICE, NULL, 0), | 449 | USB_SC_UFI, USB_PR_DEVICE, NULL, 0), |
421 | 450 | ||
422 | /* From Yukihiro Nakai, via zaitcev@yahoo.com. | 451 | /* |
423 | * This is needed for CB instead of CBI */ | 452 | * From Yukihiro Nakai, via zaitcev@yahoo.com. |
453 | * This is needed for CB instead of CBI | ||
454 | */ | ||
424 | UNUSUAL_DEV( 0x04da, 0x0d05, 0x0000, 0x0000, | 455 | UNUSUAL_DEV( 0x04da, 0x0d05, 0x0000, 0x0000, |
425 | "Sharp CE-CW05", | 456 | "Sharp CE-CW05", |
426 | "CD-R/RW Drive", | 457 | "CD-R/RW Drive", |
@@ -440,7 +471,8 @@ UNUSUAL_DEV( 0x04da, 0x2373, 0x0000, 0x9999, | |||
440 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 471 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
441 | US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ), | 472 | US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE ), |
442 | 473 | ||
443 | /* Most of the following entries were developed with the help of | 474 | /* |
475 | * Most of the following entries were developed with the help of | ||
444 | * Shuttle/SCM directly. | 476 | * Shuttle/SCM directly. |
445 | */ | 477 | */ |
446 | UNUSUAL_DEV( 0x04e6, 0x0001, 0x0200, 0x0200, | 478 | UNUSUAL_DEV( 0x04e6, 0x0001, 0x0200, 0x0200, |
@@ -536,7 +568,8 @@ UNUSUAL_DEV( 0x04e8, 0x5136, 0x0000, 0x9999, | |||
536 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 568 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
537 | US_FL_MAX_SECTORS_64), | 569 | US_FL_MAX_SECTORS_64), |
538 | 570 | ||
539 | /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. | 571 | /* |
572 | * Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. | ||
540 | * Device uses standards-violating 32-byte Bulk Command Block Wrappers and | 573 | * Device uses standards-violating 32-byte Bulk Command Block Wrappers and |
541 | * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011. | 574 | * reports itself as "Proprietary SCSI Bulk." Cf. device entry 0x084d:0x0011. |
542 | */ | 575 | */ |
@@ -553,7 +586,8 @@ UNUSUAL_DEV( 0x050d, 0x0115, 0x0133, 0x0133, | |||
553 | USB_SC_SCSI, USB_PR_BULK, usb_stor_euscsi_init, | 586 | USB_SC_SCSI, USB_PR_BULK, usb_stor_euscsi_init, |
554 | US_FL_SCM_MULT_TARG ), | 587 | US_FL_SCM_MULT_TARG ), |
555 | 588 | ||
556 | /* Iomega Clik! Drive | 589 | /* |
590 | * Iomega Clik! Drive | ||
557 | * Reported by David Chatenay <dchatenay@hotmail.com> | 591 | * Reported by David Chatenay <dchatenay@hotmail.com> |
558 | * The reason this is needed is not fully known. | 592 | * The reason this is needed is not fully known. |
559 | */ | 593 | */ |
@@ -570,7 +604,8 @@ COMPLIANT_DEV(0x0525, 0xa4a5, 0x0000, 0x9999, | |||
570 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 604 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
571 | US_FL_CAPACITY_OK ), | 605 | US_FL_CAPACITY_OK ), |
572 | 606 | ||
573 | /* Yakumo Mega Image 37 | 607 | /* |
608 | * Yakumo Mega Image 37 | ||
574 | * Submitted by Stephan Fuhrmann <atomenergie@t-online.de> */ | 609 | * Submitted by Stephan Fuhrmann <atomenergie@t-online.de> */ |
575 | UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100, | 610 | UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100, |
576 | "Tekom Technologies, Inc", | 611 | "Tekom Technologies, Inc", |
@@ -578,8 +613,10 @@ UNUSUAL_DEV( 0x052b, 0x1801, 0x0100, 0x0100, | |||
578 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 613 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
579 | US_FL_IGNORE_RESIDUE ), | 614 | US_FL_IGNORE_RESIDUE ), |
580 | 615 | ||
581 | /* Another Yakumo camera. | 616 | /* |
582 | * Reported by Michele Alzetta <michele.alzetta@aliceposta.it> */ | 617 | * Another Yakumo camera. |
618 | * Reported by Michele Alzetta <michele.alzetta@aliceposta.it> | ||
619 | */ | ||
583 | UNUSUAL_DEV( 0x052b, 0x1804, 0x0100, 0x0100, | 620 | UNUSUAL_DEV( 0x052b, 0x1804, 0x0100, 0x0100, |
584 | "Tekom Technologies, Inc", | 621 | "Tekom Technologies, Inc", |
585 | "300_CAMERA", | 622 | "300_CAMERA", |
@@ -593,16 +630,20 @@ UNUSUAL_DEV( 0x052b, 0x1807, 0x0100, 0x0100, | |||
593 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 630 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
594 | US_FL_IGNORE_RESIDUE ), | 631 | US_FL_IGNORE_RESIDUE ), |
595 | 632 | ||
596 | /* Yakumo Mega Image 47 | 633 | /* |
597 | * Reported by Bjoern Paetzel <kolrabi@kolrabi.de> */ | 634 | * Yakumo Mega Image 47 |
635 | * Reported by Bjoern Paetzel <kolrabi@kolrabi.de> | ||
636 | */ | ||
598 | UNUSUAL_DEV( 0x052b, 0x1905, 0x0100, 0x0100, | 637 | UNUSUAL_DEV( 0x052b, 0x1905, 0x0100, 0x0100, |
599 | "Tekom Technologies, Inc", | 638 | "Tekom Technologies, Inc", |
600 | "400_CAMERA", | 639 | "400_CAMERA", |
601 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 640 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
602 | US_FL_IGNORE_RESIDUE ), | 641 | US_FL_IGNORE_RESIDUE ), |
603 | 642 | ||
604 | /* Reported by Paul Ortyl <ortylp@3miasto.net> | 643 | /* |
605 | * Note that it's similar to the device above, only different prodID */ | 644 | * Reported by Paul Ortyl <ortylp@3miasto.net> |
645 | * Note that it's similar to the device above, only different prodID | ||
646 | */ | ||
606 | UNUSUAL_DEV( 0x052b, 0x1911, 0x0100, 0x0100, | 647 | UNUSUAL_DEV( 0x052b, 0x1911, 0x0100, 0x0100, |
607 | "Tekom Technologies, Inc", | 648 | "Tekom Technologies, Inc", |
608 | "400_CAMERA", | 649 | "400_CAMERA", |
@@ -615,8 +656,10 @@ UNUSUAL_DEV( 0x054c, 0x0010, 0x0106, 0x0450, | |||
615 | USB_SC_SCSI, USB_PR_DEVICE, NULL, | 656 | USB_SC_SCSI, USB_PR_DEVICE, NULL, |
616 | US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | US_FL_NO_WP_DETECT ), | 657 | US_FL_SINGLE_LUN | US_FL_NOT_LOCKABLE | US_FL_NO_WP_DETECT ), |
617 | 658 | ||
618 | /* Submitted by Lars Jacob <jacob.lars@googlemail.com> | 659 | /* |
619 | * This entry is needed because the device reports Sub=ff */ | 660 | * Submitted by Lars Jacob <jacob.lars@googlemail.com> |
661 | * This entry is needed because the device reports Sub=ff | ||
662 | */ | ||
620 | UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0610, | 663 | UNUSUAL_DEV( 0x054c, 0x0010, 0x0500, 0x0610, |
621 | "Sony", | 664 | "Sony", |
622 | "DSC-T1/T5/H5", | 665 | "DSC-T1/T5/H5", |
@@ -719,7 +762,8 @@ UNUSUAL_DEV( 0x057b, 0x0000, 0x0000, 0x0299, | |||
719 | USB_SC_DEVICE, USB_PR_CB, NULL, | 762 | USB_SC_DEVICE, USB_PR_CB, NULL, |
720 | US_FL_SINGLE_LUN), | 763 | US_FL_SINGLE_LUN), |
721 | 764 | ||
722 | /* Reported by Johann Cardon <johann.cardon@free.fr> | 765 | /* |
766 | * Reported by Johann Cardon <johann.cardon@free.fr> | ||
723 | * This entry is needed only because the device reports | 767 | * This entry is needed only because the device reports |
724 | * bInterfaceClass = 0xff (vendor-specific) | 768 | * bInterfaceClass = 0xff (vendor-specific) |
725 | */ | 769 | */ |
@@ -741,7 +785,8 @@ UNUSUAL_DEV( 0x0595, 0x4343, 0x0000, 0x2210, | |||
741 | "Digital Camera EX-20 DSC", | 785 | "Digital Camera EX-20 DSC", |
742 | USB_SC_8070, USB_PR_DEVICE, NULL, 0 ), | 786 | USB_SC_8070, USB_PR_DEVICE, NULL, 0 ), |
743 | 787 | ||
744 | /* Reported by Andre Welter <a.r.welter@gmx.de> | 788 | /* |
789 | * Reported by Andre Welter <a.r.welter@gmx.de> | ||
745 | * This antique device predates the release of the Bulk-only Transport | 790 | * This antique device predates the release of the Bulk-only Transport |
746 | * spec, and if it gets a Get-Max-LUN then it requires the host to do a | 791 | * spec, and if it gets a Get-Max-LUN then it requires the host to do a |
747 | * Clear-Halt on the bulk endpoints. The SINGLE_LUN flag will prevent | 792 | * Clear-Halt on the bulk endpoints. The SINGLE_LUN flag will prevent |
@@ -773,7 +818,8 @@ UNUSUAL_DEV( 0x059f, 0x0651, 0x0000, 0x0000, | |||
773 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 818 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
774 | US_FL_NO_WP_DETECT ), | 819 | US_FL_NO_WP_DETECT ), |
775 | 820 | ||
776 | /* Submitted by Joel Bourquard <numlock@freesurf.ch> | 821 | /* |
822 | * Submitted by Joel Bourquard <numlock@freesurf.ch> | ||
777 | * Some versions of this device need the SubClass and Protocol overrides | 823 | * Some versions of this device need the SubClass and Protocol overrides |
778 | * while others don't. | 824 | * while others don't. |
779 | */ | 825 | */ |
@@ -783,7 +829,8 @@ UNUSUAL_DEV( 0x05ab, 0x0060, 0x1104, 0x1110, | |||
783 | USB_SC_SCSI, USB_PR_BULK, NULL, | 829 | USB_SC_SCSI, USB_PR_BULK, NULL, |
784 | US_FL_NEED_OVERRIDE ), | 830 | US_FL_NEED_OVERRIDE ), |
785 | 831 | ||
786 | /* Submitted by Sven Anderson <sven-linux@anderson.de> | 832 | /* |
833 | * Submitted by Sven Anderson <sven-linux@anderson.de> | ||
787 | * There are at least four ProductIDs used for iPods, so I added 0x1202 and | 834 | * There are at least four ProductIDs used for iPods, so I added 0x1202 and |
788 | * 0x1204. They just need the US_FL_FIX_CAPACITY. As the bcdDevice appears | 835 | * 0x1204. They just need the US_FL_FIX_CAPACITY. As the bcdDevice appears |
789 | * to change with firmware updates, I changed the range to maximum for all | 836 | * to change with firmware updates, I changed the range to maximum for all |
@@ -824,7 +871,8 @@ UNUSUAL_DEV( 0x05ac, 0x120a, 0x0000, 0x9999, | |||
824 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 871 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
825 | US_FL_FIX_CAPACITY ), | 872 | US_FL_FIX_CAPACITY ), |
826 | 873 | ||
827 | /* Reported by Dan Williams <dcbw@redhat.com> | 874 | /* |
875 | * Reported by Dan Williams <dcbw@redhat.com> | ||
828 | * Option N.V. mobile broadband modems | 876 | * Option N.V. mobile broadband modems |
829 | * Ignore driver CD mode and force into modem mode by default. | 877 | * Ignore driver CD mode and force into modem mode by default. |
830 | */ | 878 | */ |
@@ -843,7 +891,8 @@ UNUSUAL_DEV( 0x05dc, 0xb002, 0x0000, 0x0113, | |||
843 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 891 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
844 | US_FL_FIX_INQUIRY ), | 892 | US_FL_FIX_INQUIRY ), |
845 | 893 | ||
846 | /* The following two entries are for a Genesys USB to IDE | 894 | /* |
895 | * The following two entries are for a Genesys USB to IDE | ||
847 | * converter chip, but it changes its ProductId depending | 896 | * converter chip, but it changes its ProductId depending |
848 | * on whether or not a disk or an optical device is enclosed | 897 | * on whether or not a disk or an optical device is enclosed |
849 | * They were originally reported by Alexander Oltu | 898 | * They were originally reported by Alexander Oltu |
@@ -873,8 +922,10 @@ UNUSUAL_DEV( 0x05e3, 0x0723, 0x9451, 0x9451, | |||
873 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 922 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
874 | US_FL_SANE_SENSE ), | 923 | US_FL_SANE_SENSE ), |
875 | 924 | ||
876 | /* Reported by Hanno Boeck <hanno@gmx.de> | 925 | /* |
877 | * Taken from the Lycoris Kernel */ | 926 | * Reported by Hanno Boeck <hanno@gmx.de> |
927 | * Taken from the Lycoris Kernel | ||
928 | */ | ||
878 | UNUSUAL_DEV( 0x0636, 0x0003, 0x0000, 0x9999, | 929 | UNUSUAL_DEV( 0x0636, 0x0003, 0x0000, 0x9999, |
879 | "Vivitar", | 930 | "Vivitar", |
880 | "Vivicam 35Xx", | 931 | "Vivicam 35Xx", |
@@ -908,8 +959,10 @@ UNUSUAL_DEV( 0x067b, 0x2317, 0x0001, 0x001, | |||
908 | US_FL_NOT_LOCKABLE ), | 959 | US_FL_NOT_LOCKABLE ), |
909 | 960 | ||
910 | /* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */ | 961 | /* Reported by Richard -=[]=- <micro_flyer@hotmail.com> */ |
911 | /* Change to bcdDeviceMin (0x0100 to 0x0001) reported by | 962 | /* |
912 | * Thomas Bartosik <tbartdev@gmx-topmail.de> */ | 963 | * Change to bcdDeviceMin (0x0100 to 0x0001) reported by |
964 | * Thomas Bartosik <tbartdev@gmx-topmail.de> | ||
965 | */ | ||
913 | UNUSUAL_DEV( 0x067b, 0x2507, 0x0001, 0x0100, | 966 | UNUSUAL_DEV( 0x067b, 0x2507, 0x0001, 0x0100, |
914 | "Prolific Technology Inc.", | 967 | "Prolific Technology Inc.", |
915 | "Mass Storage Device", | 968 | "Mass Storage Device", |
@@ -961,7 +1014,8 @@ UNUSUAL_DEV( 0x071b, 0x3203, 0x0000, 0x0000, | |||
961 | US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64 | | 1014 | US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64 | |
962 | US_FL_NO_READ_CAPACITY_16), | 1015 | US_FL_NO_READ_CAPACITY_16), |
963 | 1016 | ||
964 | /* Reported by Jean-Baptiste Onofre <jb@nanthrax.net> | 1017 | /* |
1018 | * Reported by Jean-Baptiste Onofre <jb@nanthrax.net> | ||
965 | * Support the following product : | 1019 | * Support the following product : |
966 | * "Dane-Elec MediaTouch" | 1020 | * "Dane-Elec MediaTouch" |
967 | */ | 1021 | */ |
@@ -971,7 +1025,8 @@ UNUSUAL_DEV( 0x071b, 0x32bb, 0x0000, 0x0000, | |||
971 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1025 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
972 | US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64), | 1026 | US_FL_NO_WP_DETECT | US_FL_MAX_SECTORS_64), |
973 | 1027 | ||
974 | /* Reported by Massimiliano Ghilardi <massimiliano.ghilardi@gmail.com> | 1028 | /* |
1029 | * Reported by Massimiliano Ghilardi <massimiliano.ghilardi@gmail.com> | ||
975 | * This USB MP3/AVI player device fails and disconnects if more than 128 | 1030 | * This USB MP3/AVI player device fails and disconnects if more than 128 |
976 | * sectors (64kB) are read/written in a single command, and may be present | 1031 | * sectors (64kB) are read/written in a single command, and may be present |
977 | * at least in the following products: | 1032 | * at least in the following products: |
@@ -1040,7 +1095,8 @@ UNUSUAL_DEV( 0x07af, 0x0006, 0x0100, 0x0100, | |||
1040 | US_FL_SINGLE_LUN ), | 1095 | US_FL_SINGLE_LUN ), |
1041 | #endif | 1096 | #endif |
1042 | 1097 | ||
1043 | /* Datafab KECF-USB / Sagatek DCS-CF / Simpletech Flashlink UCF-100 | 1098 | /* |
1099 | * Datafab KECF-USB / Sagatek DCS-CF / Simpletech Flashlink UCF-100 | ||
1044 | * Only revision 1.13 tested (same for all of the above devices, | 1100 | * Only revision 1.13 tested (same for all of the above devices, |
1045 | * based on the Datafab DF-UG-07 chip). Needed for US_FL_FIX_INQUIRY. | 1101 | * based on the Datafab DF-UG-07 chip). Needed for US_FL_FIX_INQUIRY. |
1046 | * Submitted by Marek Michalkiewicz <marekm@amelek.gda.pl>. | 1102 | * Submitted by Marek Michalkiewicz <marekm@amelek.gda.pl>. |
@@ -1052,7 +1108,8 @@ UNUSUAL_DEV( 0x07c4, 0xa400, 0x0000, 0xffff, | |||
1052 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1108 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1053 | US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY ), | 1109 | US_FL_FIX_INQUIRY | US_FL_FIX_CAPACITY ), |
1054 | 1110 | ||
1055 | /* Reported by Rauch Wolke <rauchwolke@gmx.net> | 1111 | /* |
1112 | * Reported by Rauch Wolke <rauchwolke@gmx.net> | ||
1056 | * and augmented by binbin <binbinsh@gmail.com> (Bugzilla #12882) | 1113 | * and augmented by binbin <binbinsh@gmail.com> (Bugzilla #12882) |
1057 | */ | 1114 | */ |
1058 | UNUSUAL_DEV( 0x07c4, 0xa4a5, 0x0000, 0xffff, | 1115 | UNUSUAL_DEV( 0x07c4, 0xa4a5, 0x0000, 0xffff, |
@@ -1061,7 +1118,8 @@ UNUSUAL_DEV( 0x07c4, 0xa4a5, 0x0000, 0xffff, | |||
1061 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1118 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1062 | US_FL_IGNORE_RESIDUE | US_FL_MAX_SECTORS_64 ), | 1119 | US_FL_IGNORE_RESIDUE | US_FL_MAX_SECTORS_64 ), |
1063 | 1120 | ||
1064 | /* Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant | 1121 | /* |
1122 | * Casio QV 2x00/3x00/4000/8000 digital still cameras are not conformant | ||
1065 | * to the USB storage specification in two ways: | 1123 | * to the USB storage specification in two ways: |
1066 | * - They tell us they are using transport protocol CBI. In reality they | 1124 | * - They tell us they are using transport protocol CBI. In reality they |
1067 | * are using transport protocol CB. | 1125 | * are using transport protocol CB. |
@@ -1119,7 +1177,8 @@ UNUSUAL_DEV( 0x084b, 0xa001, 0x0000, 0x9999, | |||
1119 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, | 1177 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, |
1120 | US_FL_SCM_MULT_TARG ), | 1178 | US_FL_SCM_MULT_TARG ), |
1121 | 1179 | ||
1122 | /* Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. | 1180 | /* |
1181 | * Entry and supporting patch by Theodore Kilgore <kilgota@auburn.edu>. | ||
1123 | * Flag will support Bulk devices which use a standards-violating 32-byte | 1182 | * Flag will support Bulk devices which use a standards-violating 32-byte |
1124 | * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with | 1183 | * Command Block Wrapper. Here, the "DC2MEGA" cameras (several brands) with |
1125 | * Grandtech GT892x chip, which request "Proprietary SCSI Bulk" support. | 1184 | * Grandtech GT892x chip, which request "Proprietary SCSI Bulk" support. |
@@ -1131,7 +1190,8 @@ UNUSUAL_DEV( 0x084d, 0x0011, 0x0110, 0x0110, | |||
1131 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1190 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1132 | US_FL_BULK32), | 1191 | US_FL_BULK32), |
1133 | 1192 | ||
1134 | /* Reported by <ttkspam@free.fr> | 1193 | /* |
1194 | * Reported by <ttkspam@free.fr> | ||
1135 | * The device reports a vendor-specific device class, requiring an | 1195 | * The device reports a vendor-specific device class, requiring an |
1136 | * explicit vendor/product match. | 1196 | * explicit vendor/product match. |
1137 | */ | 1197 | */ |
@@ -1140,11 +1200,12 @@ UNUSUAL_DEV( 0x0851, 0x1542, 0x0002, 0x0002, | |||
1140 | "FW_Omega2", | 1200 | "FW_Omega2", |
1141 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0), | 1201 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, 0), |
1142 | 1202 | ||
1143 | /* Andrew Lunn <andrew@lunn.ch> | 1203 | /* |
1204 | * Andrew Lunn <andrew@lunn.ch> | ||
1144 | * PanDigital Digital Picture Frame. Does not like ALLOW_MEDIUM_REMOVAL | 1205 | * PanDigital Digital Picture Frame. Does not like ALLOW_MEDIUM_REMOVAL |
1145 | * on LUN 4. | 1206 | * on LUN 4. |
1146 | * Note: Vend:Prod clash with "Ltd Maxell WS30 Slim Digital Camera" | 1207 | * Note: Vend:Prod clash with "Ltd Maxell WS30 Slim Digital Camera" |
1147 | */ | 1208 | */ |
1148 | UNUSUAL_DEV( 0x0851, 0x1543, 0x0200, 0x0200, | 1209 | UNUSUAL_DEV( 0x0851, 0x1543, 0x0200, 0x0200, |
1149 | "PanDigital", | 1210 | "PanDigital", |
1150 | "Photo Frame", | 1211 | "Photo Frame", |
@@ -1170,7 +1231,8 @@ UNUSUAL_DEV( 0x08bd, 0x1100, 0x0000, 0x0000, | |||
1170 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1231 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1171 | US_FL_SINGLE_LUN), | 1232 | US_FL_SINGLE_LUN), |
1172 | 1233 | ||
1173 | /* Submitted by Dylan Taft <d13f00l@gmail.com> | 1234 | /* |
1235 | * Submitted by Dylan Taft <d13f00l@gmail.com> | ||
1174 | * US_FL_IGNORE_RESIDUE Needed | 1236 | * US_FL_IGNORE_RESIDUE Needed |
1175 | */ | 1237 | */ |
1176 | UNUSUAL_DEV( 0x08ca, 0x3103, 0x0100, 0x0100, | 1238 | UNUSUAL_DEV( 0x08ca, 0x3103, 0x0100, 0x0100, |
@@ -1179,7 +1241,8 @@ UNUSUAL_DEV( 0x08ca, 0x3103, 0x0100, 0x0100, | |||
1179 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1241 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1180 | US_FL_IGNORE_RESIDUE), | 1242 | US_FL_IGNORE_RESIDUE), |
1181 | 1243 | ||
1182 | /* Entry needed for flags. Moreover, all devices with this ID use | 1244 | /* |
1245 | * Entry needed for flags. Moreover, all devices with this ID use | ||
1183 | * bulk-only transport, but _some_ falsely report Control/Bulk instead. | 1246 | * bulk-only transport, but _some_ falsely report Control/Bulk instead. |
1184 | * One example is "Trumpion Digital Research MYMP3". | 1247 | * One example is "Trumpion Digital Research MYMP3". |
1185 | * Submitted by Bjoern Brill <brill(at)fs.math.uni-frankfurt.de> | 1248 | * Submitted by Bjoern Brill <brill(at)fs.math.uni-frankfurt.de> |
@@ -1190,7 +1253,8 @@ UNUSUAL_DEV( 0x090a, 0x1001, 0x0100, 0x0100, | |||
1190 | USB_SC_DEVICE, USB_PR_BULK, NULL, | 1253 | USB_SC_DEVICE, USB_PR_BULK, NULL, |
1191 | US_FL_NEED_OVERRIDE ), | 1254 | US_FL_NEED_OVERRIDE ), |
1192 | 1255 | ||
1193 | /* Reported by Filippo Bardelli <filibard@libero.it> | 1256 | /* |
1257 | * Reported by Filippo Bardelli <filibard@libero.it> | ||
1194 | * The device reports a subclass of RBC, which is wrong. | 1258 | * The device reports a subclass of RBC, which is wrong. |
1195 | */ | 1259 | */ |
1196 | UNUSUAL_DEV( 0x090a, 0x1050, 0x0100, 0x0100, | 1260 | UNUSUAL_DEV( 0x090a, 0x1050, 0x0100, 0x0100, |
@@ -1213,7 +1277,8 @@ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff, | |||
1213 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1277 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1214 | US_FL_FIX_CAPACITY ), | 1278 | US_FL_FIX_CAPACITY ), |
1215 | 1279 | ||
1216 | /* Reported by Paul Hartman <paul.hartman+linux@gmail.com> | 1280 | /* |
1281 | * Reported by Paul Hartman <paul.hartman+linux@gmail.com> | ||
1217 | * This card reader returns "Illegal Request, Logical Block Address | 1282 | * This card reader returns "Illegal Request, Logical Block Address |
1218 | * Out of Range" for the first READ(10) after a new card is inserted. | 1283 | * Out of Range" for the first READ(10) after a new card is inserted. |
1219 | */ | 1284 | */ |
@@ -1223,7 +1288,8 @@ UNUSUAL_DEV( 0x090c, 0x6000, 0x0100, 0x0100, | |||
1223 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1288 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1224 | US_FL_INITIAL_READ10 ), | 1289 | US_FL_INITIAL_READ10 ), |
1225 | 1290 | ||
1226 | /* This Pentax still camera is not conformant | 1291 | /* |
1292 | * This Pentax still camera is not conformant | ||
1227 | * to the USB storage specification: - | 1293 | * to the USB storage specification: - |
1228 | * - It does not like the INQUIRY command. So we must handle this command | 1294 | * - It does not like the INQUIRY command. So we must handle this command |
1229 | * of the SCSI layer ourselves. | 1295 | * of the SCSI layer ourselves. |
@@ -1236,8 +1302,10 @@ UNUSUAL_DEV( 0x0a17, 0x0004, 0x1000, 0x1000, | |||
1236 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1302 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1237 | US_FL_FIX_INQUIRY ), | 1303 | US_FL_FIX_INQUIRY ), |
1238 | 1304 | ||
1239 | /* These are virtual windows driver CDs, which the zd1211rw driver | 1305 | /* |
1240 | * automatically converts into WLAN devices. */ | 1306 | * These are virtual windows driver CDs, which the zd1211rw driver |
1307 | * automatically converts into WLAN devices. | ||
1308 | */ | ||
1241 | UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101, | 1309 | UNUSUAL_DEV( 0x0ace, 0x2011, 0x0101, 0x0101, |
1242 | "ZyXEL", | 1310 | "ZyXEL", |
1243 | "G-220F USB-WLAN Install", | 1311 | "G-220F USB-WLAN Install", |
@@ -1250,7 +1318,8 @@ UNUSUAL_DEV( 0x0ace, 0x20ff, 0x0101, 0x0101, | |||
1250 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1318 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1251 | US_FL_IGNORE_DEVICE ), | 1319 | US_FL_IGNORE_DEVICE ), |
1252 | 1320 | ||
1253 | /* Reported by Dan Williams <dcbw@redhat.com> | 1321 | /* |
1322 | * Reported by Dan Williams <dcbw@redhat.com> | ||
1254 | * Option N.V. mobile broadband modems | 1323 | * Option N.V. mobile broadband modems |
1255 | * Ignore driver CD mode and force into modem mode by default. | 1324 | * Ignore driver CD mode and force into modem mode by default. |
1256 | */ | 1325 | */ |
@@ -1262,20 +1331,24 @@ UNUSUAL_DEV( 0x0af0, 0x6971, 0x0000, 0x9999, | |||
1262 | USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, | 1331 | USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, |
1263 | 0), | 1332 | 0), |
1264 | 1333 | ||
1265 | /* Reported by F. Aben <f.aben@option.com> | 1334 | /* |
1335 | * Reported by F. Aben <f.aben@option.com> | ||
1266 | * This device (wrongly) has a vendor-specific device descriptor. | 1336 | * This device (wrongly) has a vendor-specific device descriptor. |
1267 | * The entry is needed so usb-storage can bind to it's mass-storage | 1337 | * The entry is needed so usb-storage can bind to it's mass-storage |
1268 | * interface as an interface driver */ | 1338 | * interface as an interface driver |
1339 | */ | ||
1269 | UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0000, | 1340 | UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0000, |
1270 | "Option", | 1341 | "Option", |
1271 | "GI 0401 SD-Card", | 1342 | "GI 0401 SD-Card", |
1272 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1343 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1273 | 0 ), | 1344 | 0 ), |
1274 | 1345 | ||
1275 | /* Reported by Jan Dumon <j.dumon@option.com> | 1346 | /* |
1347 | * Reported by Jan Dumon <j.dumon@option.com> | ||
1276 | * These devices (wrongly) have a vendor-specific device descriptor. | 1348 | * These devices (wrongly) have a vendor-specific device descriptor. |
1277 | * These entries are needed so usb-storage can bind to their mass-storage | 1349 | * These entries are needed so usb-storage can bind to their mass-storage |
1278 | * interface as an interface driver */ | 1350 | * interface as an interface driver |
1351 | */ | ||
1279 | UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0000, | 1352 | UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0000, |
1280 | "Option", | 1353 | "Option", |
1281 | "GI 0431 SD-Card", | 1354 | "GI 0431 SD-Card", |
@@ -1419,7 +1492,8 @@ UNUSUAL_DEV( 0x0dc4, 0x0073, 0x0000, 0x0000, | |||
1419 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1492 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1420 | US_FL_FIX_CAPACITY), | 1493 | US_FL_FIX_CAPACITY), |
1421 | 1494 | ||
1422 | /* Reported by Lubomir Blaha <tritol@trilogic.cz> | 1495 | /* |
1496 | * Reported by Lubomir Blaha <tritol@trilogic.cz> | ||
1423 | * I _REALLY_ don't know what 3rd, 4th number and all defines mean, but this | 1497 | * I _REALLY_ don't know what 3rd, 4th number and all defines mean, but this |
1424 | * works for me. Can anybody correct these values? (I able to test corrected | 1498 | * works for me. Can anybody correct these values? (I able to test corrected |
1425 | * version.) | 1499 | * version.) |
@@ -1430,8 +1504,10 @@ UNUSUAL_DEV( 0x0dd8, 0x1060, 0x0000, 0xffff, | |||
1430 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1504 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1431 | US_FL_FIX_INQUIRY ), | 1505 | US_FL_FIX_INQUIRY ), |
1432 | 1506 | ||
1433 | /* Reported by Edward Chapman (taken from linux-usb mailing list) | 1507 | /* |
1434 | Netac OnlyDisk Mini U2CV2 512MB USB 2.0 Flash Drive */ | 1508 | * Reported by Edward Chapman (taken from linux-usb mailing list) |
1509 | * Netac OnlyDisk Mini U2CV2 512MB USB 2.0 Flash Drive | ||
1510 | */ | ||
1435 | UNUSUAL_DEV( 0x0dd8, 0xd202, 0x0000, 0x9999, | 1511 | UNUSUAL_DEV( 0x0dd8, 0xd202, 0x0000, 0x9999, |
1436 | "Netac", | 1512 | "Netac", |
1437 | "USB Flash Disk", | 1513 | "USB Flash Disk", |
@@ -1439,8 +1515,10 @@ UNUSUAL_DEV( 0x0dd8, 0xd202, 0x0000, 0x9999, | |||
1439 | US_FL_IGNORE_RESIDUE ), | 1515 | US_FL_IGNORE_RESIDUE ), |
1440 | 1516 | ||
1441 | 1517 | ||
1442 | /* Patch by Stephan Walter <stephan.walter@epfl.ch> | 1518 | /* |
1443 | * I don't know why, but it works... */ | 1519 | * Patch by Stephan Walter <stephan.walter@epfl.ch> |
1520 | * I don't know why, but it works... | ||
1521 | */ | ||
1444 | UNUSUAL_DEV( 0x0dda, 0x0001, 0x0012, 0x0012, | 1522 | UNUSUAL_DEV( 0x0dda, 0x0001, 0x0012, 0x0012, |
1445 | "WINWARD", | 1523 | "WINWARD", |
1446 | "Music Disk", | 1524 | "Music Disk", |
@@ -1468,8 +1546,10 @@ UNUSUAL_DEV( 0x0ed1, 0x6660, 0x0100, 0x0300, | |||
1468 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1546 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1469 | US_FL_FIX_INQUIRY ), | 1547 | US_FL_FIX_INQUIRY ), |
1470 | 1548 | ||
1471 | /* Submitted by Daniel Drake <dsd@gentoo.org> | 1549 | /* |
1472 | * Reported by dayul on the Gentoo Forums */ | 1550 | * Submitted by Daniel Drake <dsd@gentoo.org> |
1551 | * Reported by dayul on the Gentoo Forums | ||
1552 | */ | ||
1473 | UNUSUAL_DEV( 0x0ea0, 0x2168, 0x0110, 0x0110, | 1553 | UNUSUAL_DEV( 0x0ea0, 0x2168, 0x0110, 0x0110, |
1474 | "Ours Technology", | 1554 | "Ours Technology", |
1475 | "Flash Disk", | 1555 | "Flash Disk", |
@@ -1483,15 +1563,18 @@ UNUSUAL_DEV( 0x0ea0, 0x6828, 0x0110, 0x0110, | |||
1483 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1563 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1484 | US_FL_IGNORE_RESIDUE ), | 1564 | US_FL_IGNORE_RESIDUE ), |
1485 | 1565 | ||
1486 | /* Reported by Benjamin Schiller <sbenni@gmx.de> | 1566 | /* |
1487 | * It is also sold by Easylite as DJ 20 */ | 1567 | * Reported by Benjamin Schiller <sbenni@gmx.de> |
1568 | * It is also sold by Easylite as DJ 20 | ||
1569 | */ | ||
1488 | UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103, | 1570 | UNUSUAL_DEV( 0x0ed1, 0x7636, 0x0103, 0x0103, |
1489 | "Typhoon", | 1571 | "Typhoon", |
1490 | "My DJ 1820", | 1572 | "My DJ 1820", |
1491 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1573 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1492 | US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), | 1574 | US_FL_IGNORE_RESIDUE | US_FL_GO_SLOW | US_FL_MAX_SECTORS_64), |
1493 | 1575 | ||
1494 | /* Patch by Leonid Petrov mail at lpetrov.net | 1576 | /* |
1577 | * Patch by Leonid Petrov mail at lpetrov.net | ||
1495 | * Reported by Robert Spitzenpfeil <robert@spitzenpfeil.org> | 1578 | * Reported by Robert Spitzenpfeil <robert@spitzenpfeil.org> |
1496 | * http://www.qbik.ch/usb/devices/showdev.php?id=1705 | 1579 | * http://www.qbik.ch/usb/devices/showdev.php?id=1705 |
1497 | * Updated to 103 device by MJ Ray mjr at phonecoop.coop | 1580 | * Updated to 103 device by MJ Ray mjr at phonecoop.coop |
@@ -1502,7 +1585,8 @@ UNUSUAL_DEV( 0x0f19, 0x0103, 0x0100, 0x0100, | |||
1502 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1585 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1503 | US_FL_IGNORE_RESIDUE ), | 1586 | US_FL_IGNORE_RESIDUE ), |
1504 | 1587 | ||
1505 | /* David Kuehling <dvdkhlng@gmx.de>: | 1588 | /* |
1589 | * David Kuehling <dvdkhlng@gmx.de>: | ||
1506 | * for MP3-Player AVOX WSX-300ER (bought in Japan). Reports lots of SCSI | 1590 | * for MP3-Player AVOX WSX-300ER (bought in Japan). Reports lots of SCSI |
1507 | * errors when trying to write. | 1591 | * errors when trying to write. |
1508 | */ | 1592 | */ |
@@ -1540,8 +1624,10 @@ UNUSUAL_DEV( 0x0fce, 0xd0e1, 0x0000, 0x0000, | |||
1540 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1624 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1541 | US_FL_IGNORE_DEVICE), | 1625 | US_FL_IGNORE_DEVICE), |
1542 | 1626 | ||
1543 | /* Reported by Jan Mate <mate@fiit.stuba.sk> | 1627 | /* |
1544 | * and by Soeren Sonnenburg <kernel@nn7.de> */ | 1628 | * Reported by Jan Mate <mate@fiit.stuba.sk> |
1629 | * and by Soeren Sonnenburg <kernel@nn7.de> | ||
1630 | */ | ||
1545 | UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x0000, | 1631 | UNUSUAL_DEV( 0x0fce, 0xe030, 0x0000, 0x0000, |
1546 | "Sony Ericsson", | 1632 | "Sony Ericsson", |
1547 | "P990i", | 1633 | "P990i", |
@@ -1562,7 +1648,8 @@ UNUSUAL_DEV( 0x0fce, 0xe092, 0x0000, 0x0000, | |||
1562 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1648 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1563 | US_FL_IGNORE_RESIDUE ), | 1649 | US_FL_IGNORE_RESIDUE ), |
1564 | 1650 | ||
1565 | /* Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> | 1651 | /* |
1652 | * Reported by Kevin Cernekee <kpc-usbdev@gelato.uiuc.edu> | ||
1566 | * Tested on hardware version 1.10. | 1653 | * Tested on hardware version 1.10. |
1567 | * Entry is needed only for the initializer function override. | 1654 | * Entry is needed only for the initializer function override. |
1568 | * Devices with bcd > 110 seem to not need it while those | 1655 | * Devices with bcd > 110 seem to not need it while those |
@@ -1586,7 +1673,8 @@ UNUSUAL_DEV(0x1058, 0x070a, 0x0000, 0x9999, | |||
1586 | "My Passport HDD", | 1673 | "My Passport HDD", |
1587 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE), | 1674 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, US_FL_WRITE_CACHE), |
1588 | 1675 | ||
1589 | /* Reported by Fabio Venturi <f.venturi@tdnet.it> | 1676 | /* |
1677 | * Reported by Fabio Venturi <f.venturi@tdnet.it> | ||
1590 | * The device reports a vendor-specific bDeviceClass. | 1678 | * The device reports a vendor-specific bDeviceClass. |
1591 | */ | 1679 | */ |
1592 | UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100, | 1680 | UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100, |
@@ -1595,7 +1683,8 @@ UNUSUAL_DEV( 0x10d6, 0x2200, 0x0100, 0x0100, | |||
1595 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1683 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1596 | 0), | 1684 | 0), |
1597 | 1685 | ||
1598 | /* Reported by Pascal Terjan <pterjan@mandriva.com> | 1686 | /* |
1687 | * Reported by Pascal Terjan <pterjan@mandriva.com> | ||
1599 | * Ignore driver CD mode and force into modem mode by default. | 1688 | * Ignore driver CD mode and force into modem mode by default. |
1600 | */ | 1689 | */ |
1601 | UNUSUAL_DEV( 0x1186, 0x3e04, 0x0000, 0x0000, | 1690 | UNUSUAL_DEV( 0x1186, 0x3e04, 0x0000, 0x0000, |
@@ -1603,7 +1692,8 @@ UNUSUAL_DEV( 0x1186, 0x3e04, 0x0000, 0x0000, | |||
1603 | "USB Mass Storage", | 1692 | "USB Mass Storage", |
1604 | USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, US_FL_IGNORE_DEVICE), | 1693 | USB_SC_DEVICE, USB_PR_DEVICE, option_ms_init, US_FL_IGNORE_DEVICE), |
1605 | 1694 | ||
1606 | /* Reported by Kevin Lloyd <linux@sierrawireless.com> | 1695 | /* |
1696 | * Reported by Kevin Lloyd <linux@sierrawireless.com> | ||
1607 | * Entry is needed for the initializer function override, | 1697 | * Entry is needed for the initializer function override, |
1608 | * which instructs the device to load as a modem | 1698 | * which instructs the device to load as a modem |
1609 | * device. | 1699 | * device. |
@@ -1614,7 +1704,8 @@ UNUSUAL_DEV( 0x1199, 0x0fff, 0x0000, 0x9999, | |||
1614 | USB_SC_DEVICE, USB_PR_DEVICE, sierra_ms_init, | 1704 | USB_SC_DEVICE, USB_PR_DEVICE, sierra_ms_init, |
1615 | 0), | 1705 | 0), |
1616 | 1706 | ||
1617 | /* Reported by Jaco Kroon <jaco@kroon.co.za> | 1707 | /* |
1708 | * Reported by Jaco Kroon <jaco@kroon.co.za> | ||
1618 | * The usb-storage module found on the Digitech GNX4 (and supposedly other | 1709 | * The usb-storage module found on the Digitech GNX4 (and supposedly other |
1619 | * devices) misbehaves and causes a bunch of invalid I/O errors. | 1710 | * devices) misbehaves and causes a bunch of invalid I/O errors. |
1620 | */ | 1711 | */ |
@@ -1624,7 +1715,8 @@ UNUSUAL_DEV( 0x1210, 0x0003, 0x0100, 0x0100, | |||
1624 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 1715 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1625 | US_FL_IGNORE_RESIDUE ), | 1716 | US_FL_IGNORE_RESIDUE ), |
1626 | 1717 | ||
1627 | /* Reported by fangxiaozhi <huananhu@huawei.com> | 1718 | /* |
1719 | * Reported by fangxiaozhi <huananhu@huawei.com> | ||
1628 | * This brings the HUAWEI data card devices into multi-port mode | 1720 | * This brings the HUAWEI data card devices into multi-port mode |
1629 | */ | 1721 | */ |
1630 | UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000, | 1722 | UNUSUAL_DEV( 0x12d1, 0x1001, 0x0000, 0x0000, |
@@ -1993,7 +2085,8 @@ UNUSUAL_DEV( 0x152d, 0x0567, 0x0114, 0x0116, | |||
1993 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 2085 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
1994 | US_FL_BROKEN_FUA ), | 2086 | US_FL_BROKEN_FUA ), |
1995 | 2087 | ||
1996 | /* Reported by Alexandre Oliva <oliva@lsd.ic.unicamp.br> | 2088 | /* |
2089 | * Reported by Alexandre Oliva <oliva@lsd.ic.unicamp.br> | ||
1997 | * JMicron responds to USN and several other SCSI ioctls with a | 2090 | * JMicron responds to USN and several other SCSI ioctls with a |
1998 | * residue that causes subsequent I/O requests to fail. */ | 2091 | * residue that causes subsequent I/O requests to fail. */ |
1999 | UNUSUAL_DEV( 0x152d, 0x2329, 0x0100, 0x0100, | 2092 | UNUSUAL_DEV( 0x152d, 0x2329, 0x0100, 0x0100, |
@@ -2009,7 +2102,8 @@ UNUSUAL_DEV( 0x152d, 0x2566, 0x0114, 0x0114, | |||
2009 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 2102 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
2010 | US_FL_BROKEN_FUA ), | 2103 | US_FL_BROKEN_FUA ), |
2011 | 2104 | ||
2012 | /* Entrega Technologies U1-SC25 (later Xircom PortGear PGSCSI) | 2105 | /* |
2106 | * Entrega Technologies U1-SC25 (later Xircom PortGear PGSCSI) | ||
2013 | * and Mac USB Dock USB-SCSI */ | 2107 | * and Mac USB Dock USB-SCSI */ |
2014 | UNUSUAL_DEV( 0x1645, 0x0007, 0x0100, 0x0133, | 2108 | UNUSUAL_DEV( 0x1645, 0x0007, 0x0100, 0x0133, |
2015 | "Entrega Technologies", | 2109 | "Entrega Technologies", |
@@ -2017,8 +2111,10 @@ UNUSUAL_DEV( 0x1645, 0x0007, 0x0100, 0x0133, | |||
2017 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, | 2111 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, |
2018 | US_FL_SCM_MULT_TARG ), | 2112 | US_FL_SCM_MULT_TARG ), |
2019 | 2113 | ||
2020 | /* Reported by Robert Schedel <r.schedel@yahoo.de> | 2114 | /* |
2021 | * Note: this is a 'super top' device like the above 14cd/6600 device */ | 2115 | * Reported by Robert Schedel <r.schedel@yahoo.de> |
2116 | * Note: this is a 'super top' device like the above 14cd/6600 device | ||
2117 | */ | ||
2022 | UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201, | 2118 | UNUSUAL_DEV( 0x1652, 0x6600, 0x0201, 0x0201, |
2023 | "Teac", | 2119 | "Teac", |
2024 | "HD-35PUK-B", | 2120 | "HD-35PUK-B", |
@@ -2045,10 +2141,12 @@ UNUSUAL_DEV( 0x1822, 0x0001, 0x0000, 0x9999, | |||
2045 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, | 2141 | USB_SC_DEVICE, USB_PR_DEVICE, usb_stor_euscsi_init, |
2046 | US_FL_SCM_MULT_TARG ), | 2142 | US_FL_SCM_MULT_TARG ), |
2047 | 2143 | ||
2048 | /* Reported by Hans de Goede <hdegoede@redhat.com> | 2144 | /* |
2145 | * Reported by Hans de Goede <hdegoede@redhat.com> | ||
2049 | * These Appotech controllers are found in Picture Frames, they provide a | 2146 | * These Appotech controllers are found in Picture Frames, they provide a |
2050 | * (buggy) emulation of a cdrom drive which contains the windows software | 2147 | * (buggy) emulation of a cdrom drive which contains the windows software |
2051 | * Uploading of pictures happens over the corresponding /dev/sg device. */ | 2148 | * Uploading of pictures happens over the corresponding /dev/sg device. |
2149 | */ | ||
2052 | UNUSUAL_DEV( 0x1908, 0x1315, 0x0000, 0x0000, | 2150 | UNUSUAL_DEV( 0x1908, 0x1315, 0x0000, 0x0000, |
2053 | "BUILDWIN", | 2151 | "BUILDWIN", |
2054 | "Photo Frame", | 2152 | "Photo Frame", |
@@ -2065,19 +2163,22 @@ UNUSUAL_DEV( 0x1908, 0x3335, 0x0200, 0x0200, | |||
2065 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 2163 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
2066 | US_FL_NO_READ_DISC_INFO ), | 2164 | US_FL_NO_READ_DISC_INFO ), |
2067 | 2165 | ||
2068 | /* Reported by Oliver Neukum <oneukum@suse.com> | 2166 | /* |
2167 | * Reported by Oliver Neukum <oneukum@suse.com> | ||
2069 | * This device morphes spontaneously into another device if the access | 2168 | * This device morphes spontaneously into another device if the access |
2070 | * pattern of Windows isn't followed. Thus writable media would be dirty | 2169 | * pattern of Windows isn't followed. Thus writable media would be dirty |
2071 | * if the initial instance is used. So the device is limited to its | 2170 | * if the initial instance is used. So the device is limited to its |
2072 | * virtual CD. | 2171 | * virtual CD. |
2073 | * And yes, the concept that BCD goes up to 9 is not heeded */ | 2172 | * And yes, the concept that BCD goes up to 9 is not heeded |
2173 | */ | ||
2074 | UNUSUAL_DEV( 0x19d2, 0x1225, 0x0000, 0xffff, | 2174 | UNUSUAL_DEV( 0x19d2, 0x1225, 0x0000, 0xffff, |
2075 | "ZTE,Incorporated", | 2175 | "ZTE,Incorporated", |
2076 | "ZTE WCDMA Technologies MSM", | 2176 | "ZTE WCDMA Technologies MSM", |
2077 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 2177 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
2078 | US_FL_SINGLE_LUN ), | 2178 | US_FL_SINGLE_LUN ), |
2079 | 2179 | ||
2080 | /* Reported by Sven Geggus <sven-usbst@geggus.net> | 2180 | /* |
2181 | * Reported by Sven Geggus <sven-usbst@geggus.net> | ||
2081 | * This encrypted pen drive returns bogus data for the initial READ(10). | 2182 | * This encrypted pen drive returns bogus data for the initial READ(10). |
2082 | */ | 2183 | */ |
2083 | UNUSUAL_DEV( 0x1b1c, 0x1ab5, 0x0200, 0x0200, | 2184 | UNUSUAL_DEV( 0x1b1c, 0x1ab5, 0x0200, 0x0200, |
@@ -2086,7 +2187,8 @@ UNUSUAL_DEV( 0x1b1c, 0x1ab5, 0x0200, 0x0200, | |||
2086 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 2187 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
2087 | US_FL_INITIAL_READ10 ), | 2188 | US_FL_INITIAL_READ10 ), |
2088 | 2189 | ||
2089 | /* Reported by Hans de Goede <hdegoede@redhat.com> | 2190 | /* |
2191 | * Reported by Hans de Goede <hdegoede@redhat.com> | ||
2090 | * These are mini projectors using USB for both power and video data transport | 2192 | * These are mini projectors using USB for both power and video data transport |
2091 | * The usb-storage interface is a virtual windows driver CD, which the gm12u320 | 2193 | * The usb-storage interface is a virtual windows driver CD, which the gm12u320 |
2092 | * driver automatically converts into framebuffer & kms dri device nodes. | 2194 | * driver automatically converts into framebuffer & kms dri device nodes. |
@@ -2097,9 +2199,11 @@ UNUSUAL_DEV( 0x1de1, 0xc102, 0x0000, 0xffff, | |||
2097 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 2199 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
2098 | US_FL_IGNORE_DEVICE ), | 2200 | US_FL_IGNORE_DEVICE ), |
2099 | 2201 | ||
2100 | /* Patch by Richard Schütz <r.schtz@t-online.de> | 2202 | /* |
2203 | * Patch by Richard Schütz <r.schtz@t-online.de> | ||
2101 | * This external hard drive enclosure uses a JMicron chip which | 2204 | * This external hard drive enclosure uses a JMicron chip which |
2102 | * needs the US_FL_IGNORE_RESIDUE flag to work properly. */ | 2205 | * needs the US_FL_IGNORE_RESIDUE flag to work properly. |
2206 | */ | ||
2103 | UNUSUAL_DEV( 0x1e68, 0x001b, 0x0000, 0x0000, | 2207 | UNUSUAL_DEV( 0x1e68, 0x001b, 0x0000, 0x0000, |
2104 | "TrekStor GmbH & Co. KG", | 2208 | "TrekStor GmbH & Co. KG", |
2105 | "DataStation maxi g.u", | 2209 | "DataStation maxi g.u", |
@@ -2126,7 +2230,8 @@ UNUSUAL_DEV( 0x2116, 0x0320, 0x0001, 0x0001, | |||
2126 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 2230 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
2127 | US_FL_FIX_CAPACITY), | 2231 | US_FL_FIX_CAPACITY), |
2128 | 2232 | ||
2129 | /* patch submitted by Davide Perini <perini.davide@dpsoftware.org> | 2233 | /* |
2234 | * patch submitted by Davide Perini <perini.davide@dpsoftware.org> | ||
2130 | * and Renato Perini <rperini@email.it> | 2235 | * and Renato Perini <rperini@email.it> |
2131 | */ | 2236 | */ |
2132 | UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, | 2237 | UNUSUAL_DEV( 0x22b8, 0x3010, 0x0001, 0x0001, |
@@ -2153,7 +2258,8 @@ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x9999, | |||
2153 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, | 2258 | USB_SC_DEVICE, USB_PR_DEVICE, NULL, |
2154 | US_FL_GO_SLOW ), | 2259 | US_FL_GO_SLOW ), |
2155 | 2260 | ||
2156 | /* Reported by Frederic Marchal <frederic.marchal@wowcompany.com> | 2261 | /* |
2262 | * Reported by Frederic Marchal <frederic.marchal@wowcompany.com> | ||
2157 | * Mio Moov 330 | 2263 | * Mio Moov 330 |
2158 | */ | 2264 | */ |
2159 | UNUSUAL_DEV( 0x3340, 0xffff, 0x0000, 0x0000, | 2265 | UNUSUAL_DEV( 0x3340, 0xffff, 0x0000, 0x0000, |
diff --git a/drivers/usb/storage/unusual_freecom.h b/drivers/usb/storage/unusual_freecom.h index 59a261155b98..1f5aab42ece2 100644 --- a/drivers/usb/storage/unusual_freecom.h +++ b/drivers/usb/storage/unusual_freecom.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for the Freecom USB/IDE adaptor | 1 | /* |
2 | * Unusual Devices File for the Freecom USB/IDE adaptor | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/usb/storage/unusual_isd200.h b/drivers/usb/storage/unusual_isd200.h index 14cca0c48302..9b6862ec3d4f 100644 --- a/drivers/usb/storage/unusual_isd200.h +++ b/drivers/usb/storage/unusual_isd200.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for In-System Design, Inc. ISD200 ASIC | 1 | /* |
2 | * Unusual Devices File for In-System Design, Inc. ISD200 ASIC | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/usb/storage/unusual_jumpshot.h b/drivers/usb/storage/unusual_jumpshot.h index 54be78b5d643..413e64fa6b95 100644 --- a/drivers/usb/storage/unusual_jumpshot.h +++ b/drivers/usb/storage/unusual_jumpshot.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for the Lexar "Jumpshot" Compact Flash reader | 1 | /* |
2 | * Unusual Devices File for the Lexar "Jumpshot" Compact Flash reader | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/usb/storage/unusual_karma.h b/drivers/usb/storage/unusual_karma.h index 6df03972a22c..e6fad3aeae20 100644 --- a/drivers/usb/storage/unusual_karma.h +++ b/drivers/usb/storage/unusual_karma.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for the Rio Karma | 1 | /* |
2 | * Unusual Devices File for the Rio Karma | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/usb/storage/unusual_onetouch.h b/drivers/usb/storage/unusual_onetouch.h index 0abb819c7405..425dc22f345a 100644 --- a/drivers/usb/storage/unusual_onetouch.h +++ b/drivers/usb/storage/unusual_onetouch.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for the Maxtor OneTouch USB hard drive's button | 1 | /* |
2 | * Unusual Devices File for the Maxtor OneTouch USB hard drive's button | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
@@ -18,7 +19,8 @@ | |||
18 | #if defined(CONFIG_USB_STORAGE_ONETOUCH) || \ | 19 | #if defined(CONFIG_USB_STORAGE_ONETOUCH) || \ |
19 | defined(CONFIG_USB_STORAGE_ONETOUCH_MODULE) | 20 | defined(CONFIG_USB_STORAGE_ONETOUCH_MODULE) |
20 | 21 | ||
21 | /* Submitted by: Nick Sillik <n.sillik@temple.edu> | 22 | /* |
23 | * Submitted by: Nick Sillik <n.sillik@temple.edu> | ||
22 | * Needed for OneTouch extension to usb-storage | 24 | * Needed for OneTouch extension to usb-storage |
23 | */ | 25 | */ |
24 | UNUSUAL_DEV( 0x0d49, 0x7000, 0x0000, 0x9999, | 26 | UNUSUAL_DEV( 0x0d49, 0x7000, 0x0000, 0x9999, |
diff --git a/drivers/usb/storage/unusual_realtek.h b/drivers/usb/storage/unusual_realtek.h index e41f50c95ed4..8fe624ad302a 100644 --- a/drivers/usb/storage/unusual_realtek.h +++ b/drivers/usb/storage/unusual_realtek.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for Realtek RTS51xx USB card reader | 1 | /* |
2 | * Driver for Realtek RTS51xx USB card reader | ||
2 | * | 3 | * |
3 | * Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved. | 4 | * Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved. |
4 | * | 5 | * |
diff --git a/drivers/usb/storage/unusual_sddr09.h b/drivers/usb/storage/unusual_sddr09.h index 59a7e37b6c11..d9d38ac4abf9 100644 --- a/drivers/usb/storage/unusual_sddr09.h +++ b/drivers/usb/storage/unusual_sddr09.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for SanDisk SDDR-09 SmartMedia reader | 1 | /* |
2 | * Unusual Devices File for SanDisk SDDR-09 SmartMedia reader | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/usb/storage/unusual_sddr55.h b/drivers/usb/storage/unusual_sddr55.h index fcb7e12c598f..ebb1d1c6c467 100644 --- a/drivers/usb/storage/unusual_sddr55.h +++ b/drivers/usb/storage/unusual_sddr55.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for SanDisk SDDR-55 SmartMedia reader | 1 | /* |
2 | * Unusual Devices File for SanDisk SDDR-55 SmartMedia reader | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h index 53341a77d89f..cbea9f329e71 100644 --- a/drivers/usb/storage/unusual_uas.h +++ b/drivers/usb/storage/unusual_uas.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Attached SCSI devices - Unusual Devices File | 1 | /* |
2 | * Driver for USB Attached SCSI devices - Unusual Devices File | ||
2 | * | 3 | * |
3 | * (c) 2013 Hans de Goede <hdegoede@redhat.com> | 4 | * (c) 2013 Hans de Goede <hdegoede@redhat.com> |
4 | * | 5 | * |
diff --git a/drivers/usb/storage/unusual_usbat.h b/drivers/usb/storage/unusual_usbat.h index 38e79c4e6d6a..2044ad5ef5e4 100644 --- a/drivers/usb/storage/unusual_usbat.h +++ b/drivers/usb/storage/unusual_usbat.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Unusual Devices File for SCM Microsystems (a.k.a. Shuttle) USB-ATAPI cable | 1 | /* |
2 | * Unusual Devices File for SCM Microsystems (a.k.a. Shuttle) USB-ATAPI cable | ||
2 | * | 3 | * |
3 | * This program is free software; you can redistribute it and/or modify it | 4 | * This program is free software; you can redistribute it and/or modify it |
4 | * under the terms of the GNU General Public License as published by the | 5 | * under the terms of the GNU General Public License as published by the |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 9de988a0f856..ef2d8cde6ef7 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * | 3 | * |
3 | * Current development and maintenance by: | 4 | * Current development and maintenance by: |
4 | * (c) 1999-2003 Matthew Dharm (mdharm-usb@one-eyed-alien.net) | 5 | * (c) 1999-2003 Matthew Dharm (mdharm-usb@one-eyed-alien.net) |
@@ -97,7 +98,8 @@ MODULE_PARM_DESC(quirks, "supplemental list of device IDs and their quirks"); | |||
97 | * with the entries in usb_storage_usb_ids[], defined in usual-tables.c. | 98 | * with the entries in usb_storage_usb_ids[], defined in usual-tables.c. |
98 | */ | 99 | */ |
99 | 100 | ||
100 | /* The vendor name should be kept at eight characters or less, and | 101 | /* |
102 | *The vendor name should be kept at eight characters or less, and | ||
101 | * the product name should be kept at 16 characters or less. If a device | 103 | * the product name should be kept at 16 characters or less. If a device |
102 | * has the US_FL_FIX_INQUIRY flag, then the vendor and product names | 104 | * has the US_FL_FIX_INQUIRY flag, then the vendor and product names |
103 | * normally generated by a device through the INQUIRY response will be | 105 | * normally generated by a device through the INQUIRY response will be |
@@ -191,8 +193,10 @@ int usb_stor_suspend(struct usb_interface *iface, pm_message_t message) | |||
191 | if (us->suspend_resume_hook) | 193 | if (us->suspend_resume_hook) |
192 | (us->suspend_resume_hook)(us, US_SUSPEND); | 194 | (us->suspend_resume_hook)(us, US_SUSPEND); |
193 | 195 | ||
194 | /* When runtime PM is working, we'll set a flag to indicate | 196 | /* |
195 | * whether we should autoresume when a SCSI request arrives. */ | 197 | * When runtime PM is working, we'll set a flag to indicate |
198 | * whether we should autoresume when a SCSI request arrives. | ||
199 | */ | ||
196 | 200 | ||
197 | mutex_unlock(&us->dev_mutex); | 201 | mutex_unlock(&us->dev_mutex); |
198 | return 0; | 202 | return 0; |
@@ -220,8 +224,10 @@ int usb_stor_reset_resume(struct usb_interface *iface) | |||
220 | /* Report the reset to the SCSI core */ | 224 | /* Report the reset to the SCSI core */ |
221 | usb_stor_report_bus_reset(us); | 225 | usb_stor_report_bus_reset(us); |
222 | 226 | ||
223 | /* FIXME: Notify the subdrivers that they need to reinitialize | 227 | /* |
224 | * the device */ | 228 | * FIXME: Notify the subdrivers that they need to reinitialize |
229 | * the device | ||
230 | */ | ||
225 | return 0; | 231 | return 0; |
226 | } | 232 | } |
227 | EXPORT_SYMBOL_GPL(usb_stor_reset_resume); | 233 | EXPORT_SYMBOL_GPL(usb_stor_reset_resume); |
@@ -250,8 +256,10 @@ int usb_stor_post_reset(struct usb_interface *iface) | |||
250 | /* Report the reset to the SCSI core */ | 256 | /* Report the reset to the SCSI core */ |
251 | usb_stor_report_bus_reset(us); | 257 | usb_stor_report_bus_reset(us); |
252 | 258 | ||
253 | /* FIXME: Notify the subdrivers that they need to reinitialize | 259 | /* |
254 | * the device */ | 260 | * FIXME: Notify the subdrivers that they need to reinitialize |
261 | * the device | ||
262 | */ | ||
255 | 263 | ||
256 | mutex_unlock(&us->dev_mutex); | 264 | mutex_unlock(&us->dev_mutex); |
257 | return 0; | 265 | return 0; |
@@ -274,15 +282,17 @@ void fill_inquiry_response(struct us_data *us, unsigned char *data, | |||
274 | return; | 282 | return; |
275 | 283 | ||
276 | memset(data+8, ' ', 28); | 284 | memset(data+8, ' ', 28); |
277 | if (data[0]&0x20) { /* USB device currently not connected. Return | 285 | if (data[0]&0x20) { /* |
278 | peripheral qualifier 001b ("...however, the | 286 | * USB device currently not connected. Return |
279 | physical device is not currently connected | 287 | * peripheral qualifier 001b ("...however, the |
280 | to this logical unit") and leave vendor and | 288 | * physical device is not currently connected |
281 | product identification empty. ("If the target | 289 | * to this logical unit") and leave vendor and |
282 | does store some of the INQUIRY data on the | 290 | * product identification empty. ("If the target |
283 | device, it may return zeros or ASCII spaces | 291 | * does store some of the INQUIRY data on the |
284 | (20h) in those fields until the data is | 292 | * device, it may return zeros or ASCII spaces |
285 | available from the device."). */ | 293 | * (20h) in those fields until the data is |
294 | * available from the device."). | ||
295 | */ | ||
286 | } else { | 296 | } else { |
287 | u16 bcdDevice = le16_to_cpu(us->pusb_dev->descriptor.bcdDevice); | 297 | u16 bcdDevice = le16_to_cpu(us->pusb_dev->descriptor.bcdDevice); |
288 | int n; | 298 | int n; |
@@ -336,7 +346,8 @@ static int usb_stor_control_thread(void * __us) | |||
336 | 346 | ||
337 | scsi_unlock(host); | 347 | scsi_unlock(host); |
338 | 348 | ||
339 | /* reject the command if the direction indicator | 349 | /* |
350 | * reject the command if the direction indicator | ||
340 | * is UNKNOWN | 351 | * is UNKNOWN |
341 | */ | 352 | */ |
342 | if (us->srb->sc_data_direction == DMA_BIDIRECTIONAL) { | 353 | if (us->srb->sc_data_direction == DMA_BIDIRECTIONAL) { |
@@ -344,7 +355,8 @@ static int usb_stor_control_thread(void * __us) | |||
344 | us->srb->result = DID_ERROR << 16; | 355 | us->srb->result = DID_ERROR << 16; |
345 | } | 356 | } |
346 | 357 | ||
347 | /* reject if target != 0 or if LUN is higher than | 358 | /* |
359 | * reject if target != 0 or if LUN is higher than | ||
348 | * the maximum known LUN | 360 | * the maximum known LUN |
349 | */ | 361 | */ |
350 | else if (us->srb->device->id && | 362 | else if (us->srb->device->id && |
@@ -362,8 +374,10 @@ static int usb_stor_control_thread(void * __us) | |||
362 | us->srb->result = DID_BAD_TARGET << 16; | 374 | us->srb->result = DID_BAD_TARGET << 16; |
363 | } | 375 | } |
364 | 376 | ||
365 | /* Handle those devices which need us to fake | 377 | /* |
366 | * their inquiry data */ | 378 | * Handle those devices which need us to fake |
379 | * their inquiry data | ||
380 | */ | ||
367 | else if ((us->srb->cmnd[0] == INQUIRY) && | 381 | else if ((us->srb->cmnd[0] == INQUIRY) && |
368 | (us->fflags & US_FL_FIX_INQUIRY)) { | 382 | (us->fflags & US_FL_FIX_INQUIRY)) { |
369 | unsigned char data_ptr[36] = { | 383 | unsigned char data_ptr[36] = { |
@@ -395,11 +409,13 @@ SkipForAbort: | |||
395 | usb_stor_dbg(us, "scsi command aborted\n"); | 409 | usb_stor_dbg(us, "scsi command aborted\n"); |
396 | } | 410 | } |
397 | 411 | ||
398 | /* If an abort request was received we need to signal that | 412 | /* |
413 | * If an abort request was received we need to signal that | ||
399 | * the abort has finished. The proper test for this is | 414 | * the abort has finished. The proper test for this is |
400 | * the TIMED_OUT flag, not srb->result == DID_ABORT, because | 415 | * the TIMED_OUT flag, not srb->result == DID_ABORT, because |
401 | * the timeout might have occurred after the command had | 416 | * the timeout might have occurred after the command had |
402 | * already completed with a different result code. */ | 417 | * already completed with a different result code. |
418 | */ | ||
403 | if (test_bit(US_FLIDX_TIMED_OUT, &us->dflags)) { | 419 | if (test_bit(US_FLIDX_TIMED_OUT, &us->dflags)) { |
404 | complete(&(us->notify)); | 420 | complete(&(us->notify)); |
405 | 421 | ||
@@ -610,7 +626,8 @@ static int get_device_info(struct us_data *us, const struct usb_device_id *id, | |||
610 | le16_to_cpu(dev->descriptor.idProduct), | 626 | le16_to_cpu(dev->descriptor.idProduct), |
611 | us->fflags); | 627 | us->fflags); |
612 | 628 | ||
613 | /* Log a message if a non-generic unusual_dev entry contains an | 629 | /* |
630 | * Log a message if a non-generic unusual_dev entry contains an | ||
614 | * unnecessary subclass or protocol override. This may stimulate | 631 | * unnecessary subclass or protocol override. This may stimulate |
615 | * reports from users that will help us remove unneeded entries | 632 | * reports from users that will help us remove unneeded entries |
616 | * from the unusual_devs.h table. | 633 | * from the unusual_devs.h table. |
@@ -782,8 +799,10 @@ static int usb_stor_acquire_resources(struct us_data *us) | |||
782 | return -ENOMEM; | 799 | return -ENOMEM; |
783 | } | 800 | } |
784 | 801 | ||
785 | /* Just before we start our control thread, initialize | 802 | /* |
786 | * the device if it needs initialization */ | 803 | * Just before we start our control thread, initialize |
804 | * the device if it needs initialization | ||
805 | */ | ||
787 | if (us->unusual_dev->initFunction) { | 806 | if (us->unusual_dev->initFunction) { |
788 | p = us->unusual_dev->initFunction(us); | 807 | p = us->unusual_dev->initFunction(us); |
789 | if (p) | 808 | if (p) |
@@ -805,7 +824,8 @@ static int usb_stor_acquire_resources(struct us_data *us) | |||
805 | /* Release all our dynamic resources */ | 824 | /* Release all our dynamic resources */ |
806 | static void usb_stor_release_resources(struct us_data *us) | 825 | static void usb_stor_release_resources(struct us_data *us) |
807 | { | 826 | { |
808 | /* Tell the control thread to exit. The SCSI host must | 827 | /* |
828 | * Tell the control thread to exit. The SCSI host must | ||
809 | * already have been removed and the DISCONNECTING flag set | 829 | * already have been removed and the DISCONNECTING flag set |
810 | * so that we won't accept any more commands. | 830 | * so that we won't accept any more commands. |
811 | */ | 831 | */ |
@@ -836,7 +856,8 @@ static void dissociate_dev(struct us_data *us) | |||
836 | usb_set_intfdata(us->pusb_intf, NULL); | 856 | usb_set_intfdata(us->pusb_intf, NULL); |
837 | } | 857 | } |
838 | 858 | ||
839 | /* First stage of disconnect processing: stop SCSI scanning, | 859 | /* |
860 | * First stage of disconnect processing: stop SCSI scanning, | ||
840 | * remove the host, and stop accepting new commands | 861 | * remove the host, and stop accepting new commands |
841 | */ | 862 | */ |
842 | static void quiesce_and_remove_host(struct us_data *us) | 863 | static void quiesce_and_remove_host(struct us_data *us) |
@@ -849,7 +870,8 @@ static void quiesce_and_remove_host(struct us_data *us) | |||
849 | wake_up(&us->delay_wait); | 870 | wake_up(&us->delay_wait); |
850 | } | 871 | } |
851 | 872 | ||
852 | /* Prevent SCSI scanning (if it hasn't started yet) | 873 | /* |
874 | * Prevent SCSI scanning (if it hasn't started yet) | ||
853 | * or wait for the SCSI-scanning routine to stop. | 875 | * or wait for the SCSI-scanning routine to stop. |
854 | */ | 876 | */ |
855 | cancel_delayed_work_sync(&us->scan_dwork); | 877 | cancel_delayed_work_sync(&us->scan_dwork); |
@@ -858,12 +880,14 @@ static void quiesce_and_remove_host(struct us_data *us) | |||
858 | if (test_bit(US_FLIDX_SCAN_PENDING, &us->dflags)) | 880 | if (test_bit(US_FLIDX_SCAN_PENDING, &us->dflags)) |
859 | usb_autopm_put_interface_no_suspend(us->pusb_intf); | 881 | usb_autopm_put_interface_no_suspend(us->pusb_intf); |
860 | 882 | ||
861 | /* Removing the host will perform an orderly shutdown: caches | 883 | /* |
884 | * Removing the host will perform an orderly shutdown: caches | ||
862 | * synchronized, disks spun down, etc. | 885 | * synchronized, disks spun down, etc. |
863 | */ | 886 | */ |
864 | scsi_remove_host(host); | 887 | scsi_remove_host(host); |
865 | 888 | ||
866 | /* Prevent any new commands from being accepted and cut short | 889 | /* |
890 | * Prevent any new commands from being accepted and cut short | ||
867 | * reset delays. | 891 | * reset delays. |
868 | */ | 892 | */ |
869 | scsi_lock(host); | 893 | scsi_lock(host); |
@@ -878,8 +902,10 @@ static void release_everything(struct us_data *us) | |||
878 | usb_stor_release_resources(us); | 902 | usb_stor_release_resources(us); |
879 | dissociate_dev(us); | 903 | dissociate_dev(us); |
880 | 904 | ||
881 | /* Drop our reference to the host; the SCSI core will free it | 905 | /* |
882 | * (and "us" along with it) when the refcount becomes 0. */ | 906 | * Drop our reference to the host; the SCSI core will free it |
907 | * (and "us" along with it) when the refcount becomes 0. | ||
908 | */ | ||
883 | scsi_host_put(us_to_host(us)); | 909 | scsi_host_put(us_to_host(us)); |
884 | } | 910 | } |
885 | 911 | ||
@@ -900,7 +926,8 @@ static void usb_stor_scan_dwork(struct work_struct *work) | |||
900 | us->max_lun = usb_stor_Bulk_max_lun(us); | 926 | us->max_lun = usb_stor_Bulk_max_lun(us); |
901 | /* | 927 | /* |
902 | * Allow proper scanning of devices that present more than 8 LUNs | 928 | * Allow proper scanning of devices that present more than 8 LUNs |
903 | * While not affecting other devices that may need the previous behavior | 929 | * While not affecting other devices that may need the previous |
930 | * behavior | ||
904 | */ | 931 | */ |
905 | if (us->max_lun >= 8) | 932 | if (us->max_lun >= 8) |
906 | us_to_host(us)->max_lun = us->max_lun+1; | 933 | us_to_host(us)->max_lun = us->max_lun+1; |
@@ -975,7 +1002,8 @@ int usb_stor_probe1(struct us_data **pus, | |||
975 | get_transport(us); | 1002 | get_transport(us); |
976 | get_protocol(us); | 1003 | get_protocol(us); |
977 | 1004 | ||
978 | /* Give the caller a chance to fill in specialized transport | 1005 | /* |
1006 | * Give the caller a chance to fill in specialized transport | ||
979 | * or protocol settings. | 1007 | * or protocol settings. |
980 | */ | 1008 | */ |
981 | return 0; | 1009 | return 0; |
diff --git a/drivers/usb/storage/usb.h b/drivers/usb/storage/usb.h index da0ad3241728..8fae28b40bb4 100644 --- a/drivers/usb/storage/usb.h +++ b/drivers/usb/storage/usb.h | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage compliant devices | 1 | /* |
2 | * Driver for USB Mass Storage compliant devices | ||
2 | * Main Header File | 3 | * Main Header File |
3 | * | 4 | * |
4 | * Current development and maintenance by: | 5 | * Current development and maintenance by: |
@@ -100,7 +101,8 @@ typedef void (*pm_hook)(struct us_data *, int); /* power management hook */ | |||
100 | 101 | ||
101 | /* we allocate one of these for every device that we remember */ | 102 | /* we allocate one of these for every device that we remember */ |
102 | struct us_data { | 103 | struct us_data { |
103 | /* The device we're working with | 104 | /* |
105 | * The device we're working with | ||
104 | * It's important to note: | 106 | * It's important to note: |
105 | * (o) you must hold dev_mutex to change pusb_dev | 107 | * (o) you must hold dev_mutex to change pusb_dev |
106 | */ | 108 | */ |
@@ -125,7 +127,7 @@ struct us_data { | |||
125 | u8 max_lun; | 127 | u8 max_lun; |
126 | 128 | ||
127 | u8 ifnum; /* interface number */ | 129 | u8 ifnum; /* interface number */ |
128 | u8 ep_bInterval; /* interrupt interval */ | 130 | u8 ep_bInterval; /* interrupt interval */ |
129 | 131 | ||
130 | /* function pointers for this device */ | 132 | /* function pointers for this device */ |
131 | trans_cmnd transport; /* transport function */ | 133 | trans_cmnd transport; /* transport function */ |
@@ -175,8 +177,10 @@ static inline struct us_data *host_to_us(struct Scsi_Host *host) { | |||
175 | extern void fill_inquiry_response(struct us_data *us, | 177 | extern void fill_inquiry_response(struct us_data *us, |
176 | unsigned char *data, unsigned int data_len); | 178 | unsigned char *data, unsigned int data_len); |
177 | 179 | ||
178 | /* The scsi_lock() and scsi_unlock() macros protect the sm_state and the | 180 | /* |
179 | * single queue element srb for write access */ | 181 | * The scsi_lock() and scsi_unlock() macros protect the sm_state and the |
182 | * single queue element srb for write access | ||
183 | */ | ||
180 | #define scsi_unlock(host) spin_unlock_irq(host->host_lock) | 184 | #define scsi_unlock(host) spin_unlock_irq(host->host_lock) |
181 | #define scsi_lock(host) spin_lock_irq(host->host_lock) | 185 | #define scsi_lock(host) spin_lock_irq(host->host_lock) |
182 | 186 | ||
diff --git a/drivers/usb/storage/usual-tables.c b/drivers/usb/storage/usual-tables.c index 5ef8ce74aae4..499669bcf700 100644 --- a/drivers/usb/storage/usual-tables.c +++ b/drivers/usb/storage/usual-tables.c | |||
@@ -1,4 +1,5 @@ | |||
1 | /* Driver for USB Mass Storage devices | 1 | /* |
2 | * Driver for USB Mass Storage devices | ||
2 | * Usual Tables File for usb-storage and libusual | 3 | * Usual Tables File for usb-storage and libusual |
3 | * | 4 | * |
4 | * Copyright (C) 2009 Alan Stern (stern@rowland.harvard.edu) | 5 | * Copyright (C) 2009 Alan Stern (stern@rowland.harvard.edu) |