diff options
Diffstat (limited to 'drivers/usb/storage')
| -rw-r--r-- | drivers/usb/storage/freecom.c | 23 | ||||
| -rw-r--r-- | drivers/usb/storage/isd200.c | 3 | ||||
| -rw-r--r-- | drivers/usb/storage/usb.c | 4 |
3 files changed, 16 insertions, 14 deletions
diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c index 54cc94277acb..6542ca40d505 100644 --- a/drivers/usb/storage/freecom.c +++ b/drivers/usb/storage/freecom.c | |||
| @@ -269,7 +269,7 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
| 269 | /* The firmware will time-out commands after 20 seconds. Some commands | 269 | /* The firmware will time-out commands after 20 seconds. Some commands |
| 270 | * can legitimately take longer than this, so we use a different | 270 | * can legitimately take longer than this, so we use a different |
| 271 | * command that only waits for the interrupt and then sends status, | 271 | * command that only waits for the interrupt and then sends status, |
| 272 | * without having to send a new ATAPI command to the device. | 272 | * without having to send a new ATAPI command to the device. |
| 273 | * | 273 | * |
| 274 | * NOTE: There is some indication that a data transfer after a timeout | 274 | * NOTE: There is some indication that a data transfer after a timeout |
| 275 | * may not work, but that is a condition that should never happen. | 275 | * may not work, but that is a condition that should never happen. |
| @@ -324,14 +324,14 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
| 324 | 324 | ||
| 325 | /* Find the length we desire to read. */ | 325 | /* Find the length we desire to read. */ |
| 326 | switch (srb->cmnd[0]) { | 326 | switch (srb->cmnd[0]) { |
| 327 | case INQUIRY: | 327 | case INQUIRY: |
| 328 | case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */ | 328 | case REQUEST_SENSE: /* 16 or 18 bytes? spec says 18, lots of devices only have 16 */ |
| 329 | case MODE_SENSE: | 329 | case MODE_SENSE: |
| 330 | case MODE_SENSE_10: | 330 | case MODE_SENSE_10: |
| 331 | length = le16_to_cpu(fst->Count); | 331 | length = le16_to_cpu(fst->Count); |
| 332 | break; | 332 | break; |
| 333 | default: | 333 | default: |
| 334 | length = scsi_bufflen(srb); | 334 | length = scsi_bufflen(srb); |
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | /* verify that this amount is legal */ | 337 | /* verify that this amount is legal */ |
| @@ -414,7 +414,7 @@ static int freecom_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
| 414 | /* should never hit here -- filtered in usb.c */ | 414 | /* should never hit here -- filtered in usb.c */ |
| 415 | US_DEBUGP ("freecom unimplemented direction: %d\n", | 415 | US_DEBUGP ("freecom unimplemented direction: %d\n", |
| 416 | us->srb->sc_data_direction); | 416 | us->srb->sc_data_direction); |
| 417 | // Return fail, SCSI seems to handle this better. | 417 | /* Return fail, SCSI seems to handle this better. */ |
| 418 | return USB_STOR_TRANSPORT_FAILED; | 418 | return USB_STOR_TRANSPORT_FAILED; |
| 419 | break; | 419 | break; |
| 420 | } | 420 | } |
| @@ -494,8 +494,7 @@ static void pdump (void *ibuffer, int length) | |||
| 494 | offset = 0; | 494 | offset = 0; |
| 495 | } | 495 | } |
| 496 | offset += sprintf (line+offset, "%08x:", i); | 496 | offset += sprintf (line+offset, "%08x:", i); |
| 497 | } | 497 | } else if ((i & 7) == 0) { |
| 498 | else if ((i & 7) == 0) { | ||
| 499 | offset += sprintf (line+offset, " -"); | 498 | offset += sprintf (line+offset, " -"); |
| 500 | } | 499 | } |
| 501 | offset += sprintf (line+offset, " %02x", buffer[i] & 0xff); | 500 | offset += sprintf (line+offset, " %02x", buffer[i] & 0xff); |
diff --git a/drivers/usb/storage/isd200.c b/drivers/usb/storage/isd200.c index e9cbc1467f76..6b9982cd5423 100644 --- a/drivers/usb/storage/isd200.c +++ b/drivers/usb/storage/isd200.c | |||
| @@ -1456,8 +1456,7 @@ static int isd200_init_info(struct us_data *us) | |||
| 1456 | int retStatus = ISD200_GOOD; | 1456 | int retStatus = ISD200_GOOD; |
| 1457 | struct isd200_info *info; | 1457 | struct isd200_info *info; |
| 1458 | 1458 | ||
| 1459 | info = (struct isd200_info *) | 1459 | info = kzalloc(sizeof(struct isd200_info), GFP_KERNEL); |
| 1460 | kzalloc(sizeof(struct isd200_info), GFP_KERNEL); | ||
| 1461 | if (!info) | 1460 | if (!info) |
| 1462 | retStatus = ISD200_ERROR; | 1461 | retStatus = ISD200_ERROR; |
| 1463 | else { | 1462 | else { |
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index a7d0bf9d92a7..90bb0175a152 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
| @@ -336,6 +336,7 @@ static int usb_stor_control_thread(void * __us) | |||
| 336 | else { | 336 | else { |
| 337 | US_DEBUG(usb_stor_show_command(us->srb)); | 337 | US_DEBUG(usb_stor_show_command(us->srb)); |
| 338 | us->proto_handler(us->srb, us); | 338 | us->proto_handler(us->srb, us); |
| 339 | usb_mark_last_busy(us->pusb_dev); | ||
| 339 | } | 340 | } |
| 340 | 341 | ||
| 341 | /* lock access to the state */ | 342 | /* lock access to the state */ |
| @@ -845,6 +846,7 @@ static int usb_stor_scan_thread(void * __us) | |||
| 845 | /* Should we unbind if no devices were detected? */ | 846 | /* Should we unbind if no devices were detected? */ |
| 846 | } | 847 | } |
| 847 | 848 | ||
| 849 | usb_autopm_put_interface(us->pusb_intf); | ||
| 848 | complete_and_exit(&us->scanning_done, 0); | 850 | complete_and_exit(&us->scanning_done, 0); |
| 849 | } | 851 | } |
| 850 | 852 | ||
| @@ -968,6 +970,7 @@ int usb_stor_probe2(struct us_data *us) | |||
| 968 | goto BadDevice; | 970 | goto BadDevice; |
| 969 | } | 971 | } |
| 970 | 972 | ||
| 973 | usb_autopm_get_interface_no_resume(us->pusb_intf); | ||
| 971 | wake_up_process(th); | 974 | wake_up_process(th); |
| 972 | 975 | ||
| 973 | return 0; | 976 | return 0; |
| @@ -1040,6 +1043,7 @@ static struct usb_driver usb_storage_driver = { | |||
| 1040 | .pre_reset = usb_stor_pre_reset, | 1043 | .pre_reset = usb_stor_pre_reset, |
| 1041 | .post_reset = usb_stor_post_reset, | 1044 | .post_reset = usb_stor_post_reset, |
| 1042 | .id_table = usb_storage_usb_ids, | 1045 | .id_table = usb_storage_usb_ids, |
| 1046 | .supports_autosuspend = 1, | ||
| 1043 | .soft_unbind = 1, | 1047 | .soft_unbind = 1, |
| 1044 | }; | 1048 | }; |
| 1045 | 1049 | ||
