diff options
Diffstat (limited to 'drivers/usb/storage/transport.c')
-rw-r--r-- | drivers/usb/storage/transport.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c index bdd4334bed5a..6610d2dd1e7f 100644 --- a/drivers/usb/storage/transport.c +++ b/drivers/usb/storage/transport.c | |||
@@ -110,7 +110,7 @@ | |||
110 | */ | 110 | */ |
111 | static void usb_stor_blocking_completion(struct urb *urb) | 111 | static void usb_stor_blocking_completion(struct urb *urb) |
112 | { | 112 | { |
113 | struct completion *urb_done_ptr = (struct completion *)urb->context; | 113 | struct completion *urb_done_ptr = urb->context; |
114 | 114 | ||
115 | complete(urb_done_ptr); | 115 | complete(urb_done_ptr); |
116 | } | 116 | } |
@@ -198,7 +198,7 @@ int usb_stor_control_msg(struct us_data *us, unsigned int pipe, | |||
198 | int status; | 198 | int status; |
199 | 199 | ||
200 | US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n", | 200 | US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n", |
201 | __FUNCTION__, request, requesttype, | 201 | __func__, request, requesttype, |
202 | value, index, size); | 202 | value, index, size); |
203 | 203 | ||
204 | /* fill in the devrequest structure */ | 204 | /* fill in the devrequest structure */ |
@@ -250,7 +250,7 @@ int usb_stor_clear_halt(struct us_data *us, unsigned int pipe) | |||
250 | usb_settoggle(us->pusb_dev, usb_pipeendpoint(pipe), | 250 | usb_settoggle(us->pusb_dev, usb_pipeendpoint(pipe), |
251 | usb_pipeout(pipe), 0); | 251 | usb_pipeout(pipe), 0); |
252 | 252 | ||
253 | US_DEBUGP("%s: result = %d\n", __FUNCTION__, result); | 253 | US_DEBUGP("%s: result = %d\n", __func__, result); |
254 | return result; | 254 | return result; |
255 | } | 255 | } |
256 | 256 | ||
@@ -332,7 +332,7 @@ int usb_stor_ctrl_transfer(struct us_data *us, unsigned int pipe, | |||
332 | int result; | 332 | int result; |
333 | 333 | ||
334 | US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n", | 334 | US_DEBUGP("%s: rq=%02x rqtype=%02x value=%04x index=%02x len=%u\n", |
335 | __FUNCTION__, request, requesttype, | 335 | __func__, request, requesttype, |
336 | value, index, size); | 336 | value, index, size); |
337 | 337 | ||
338 | /* fill in the devrequest structure */ | 338 | /* fill in the devrequest structure */ |
@@ -366,7 +366,7 @@ static int usb_stor_intr_transfer(struct us_data *us, void *buf, | |||
366 | unsigned int pipe = us->recv_intr_pipe; | 366 | unsigned int pipe = us->recv_intr_pipe; |
367 | unsigned int maxp; | 367 | unsigned int maxp; |
368 | 368 | ||
369 | US_DEBUGP("%s: xfer %u bytes\n", __FUNCTION__, length); | 369 | US_DEBUGP("%s: xfer %u bytes\n", __func__, length); |
370 | 370 | ||
371 | /* calculate the max packet size */ | 371 | /* calculate the max packet size */ |
372 | maxp = usb_maxpacket(us->pusb_dev, pipe, usb_pipeout(pipe)); | 372 | maxp = usb_maxpacket(us->pusb_dev, pipe, usb_pipeout(pipe)); |
@@ -393,7 +393,7 @@ int usb_stor_bulk_transfer_buf(struct us_data *us, unsigned int pipe, | |||
393 | { | 393 | { |
394 | int result; | 394 | int result; |
395 | 395 | ||
396 | US_DEBUGP("%s: xfer %u bytes\n", __FUNCTION__, length); | 396 | US_DEBUGP("%s: xfer %u bytes\n", __func__, length); |
397 | 397 | ||
398 | /* fill and submit the URB */ | 398 | /* fill and submit the URB */ |
399 | usb_fill_bulk_urb(us->current_urb, us->pusb_dev, pipe, buf, length, | 399 | usb_fill_bulk_urb(us->current_urb, us->pusb_dev, pipe, buf, length, |
@@ -424,7 +424,7 @@ static int usb_stor_bulk_transfer_sglist(struct us_data *us, unsigned int pipe, | |||
424 | return USB_STOR_XFER_ERROR; | 424 | return USB_STOR_XFER_ERROR; |
425 | 425 | ||
426 | /* initialize the scatter-gather request block */ | 426 | /* initialize the scatter-gather request block */ |
427 | US_DEBUGP("%s: xfer %u bytes, %d entries\n", __FUNCTION__, | 427 | US_DEBUGP("%s: xfer %u bytes, %d entries\n", __func__, |
428 | length, num_sg); | 428 | length, num_sg); |
429 | result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0, | 429 | result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0, |
430 | sg, num_sg, length, GFP_NOIO); | 430 | sg, num_sg, length, GFP_NOIO); |
@@ -603,7 +603,8 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
603 | scsi_eh_prep_cmnd(srb, &ses, NULL, 0, US_SENSE_SIZE); | 603 | scsi_eh_prep_cmnd(srb, &ses, NULL, 0, US_SENSE_SIZE); |
604 | 604 | ||
605 | /* FIXME: we must do the protocol translation here */ | 605 | /* FIXME: we must do the protocol translation here */ |
606 | if (us->subclass == US_SC_RBC || us->subclass == US_SC_SCSI) | 606 | if (us->subclass == US_SC_RBC || us->subclass == US_SC_SCSI || |
607 | us->subclass == US_SC_CYP_ATACB) | ||
607 | srb->cmd_len = 6; | 608 | srb->cmd_len = 6; |
608 | else | 609 | else |
609 | srb->cmd_len = 12; | 610 | srb->cmd_len = 12; |
@@ -700,7 +701,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) | |||
700 | /* Stop the current URB transfer */ | 701 | /* Stop the current URB transfer */ |
701 | void usb_stor_stop_transport(struct us_data *us) | 702 | void usb_stor_stop_transport(struct us_data *us) |
702 | { | 703 | { |
703 | US_DEBUGP("%s called\n", __FUNCTION__); | 704 | US_DEBUGP("%s called\n", __func__); |
704 | 705 | ||
705 | /* If the state machine is blocked waiting for an URB, | 706 | /* If the state machine is blocked waiting for an URB, |
706 | * let's wake it up. The test_and_clear_bit() call | 707 | * let's wake it up. The test_and_clear_bit() call |
@@ -1134,7 +1135,7 @@ static int usb_stor_reset_common(struct us_data *us, | |||
1134 | 1135 | ||
1135 | int usb_stor_CB_reset(struct us_data *us) | 1136 | int usb_stor_CB_reset(struct us_data *us) |
1136 | { | 1137 | { |
1137 | US_DEBUGP("%s called\n", __FUNCTION__); | 1138 | US_DEBUGP("%s called\n", __func__); |
1138 | 1139 | ||
1139 | memset(us->iobuf, 0xFF, CB_RESET_CMD_SIZE); | 1140 | memset(us->iobuf, 0xFF, CB_RESET_CMD_SIZE); |
1140 | us->iobuf[0] = SEND_DIAGNOSTIC; | 1141 | us->iobuf[0] = SEND_DIAGNOSTIC; |
@@ -1149,7 +1150,7 @@ int usb_stor_CB_reset(struct us_data *us) | |||
1149 | */ | 1150 | */ |
1150 | int usb_stor_Bulk_reset(struct us_data *us) | 1151 | int usb_stor_Bulk_reset(struct us_data *us) |
1151 | { | 1152 | { |
1152 | US_DEBUGP("%s called\n", __FUNCTION__); | 1153 | US_DEBUGP("%s called\n", __func__); |
1153 | 1154 | ||
1154 | return usb_stor_reset_common(us, US_BULK_RESET_REQUEST, | 1155 | return usb_stor_reset_common(us, US_BULK_RESET_REQUEST, |
1155 | USB_TYPE_CLASS | USB_RECIP_INTERFACE, | 1156 | USB_TYPE_CLASS | USB_RECIP_INTERFACE, |