Fail to copy file into file system in usb storage, using C67300

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All:

I mount an Ext2 filesystem on the usb storage using c67300 , but after
I try to copy some file to
that usb storage,  the umount cmd hangs in function usb_stor_msg_common(...) .

Copying file from the usb storage (FLASH) works well.

kernel version is 2.6.20, ucLinux. Driver of c67x00 has been
backported to kernel 2.6.20 .

Any advise is helpful, thanks.

/* This is the common part of the URB message submission code
 *
 * All URBs from the usb-storage driver involved in handling a queued scsi
 * command _must_ pass through this function (or something like it) for the
 * abort mechanisms to work properly.
 */
static int usb_stor_msg_common(struct us_data *us, int timeout)
{
       ........................................................

       /* wait for the completion of the URB */
                /* Hangs here */
       timeleft = wait_for_completion_interruptible_timeout(
                       &urb_done, timeout ? : MAX_SCHEDULE_TIMEOUT);

       clear_bit(US_FLIDX_URB_ACTIVE, &us->flags);

       if (timeleft <= 0) {
               US_DEBUGP("%s -- cancelling URB\n",
                         timeleft == 0 ? "Timeout" : "Signal");
               usb_kill_urb(us->current_urb);
       }

       /* return the URB status */
       return us->current_urb->status;
}

Usb debug log like these:

# umount /mnt/

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command WRITE_10 (10 bytes)

usb-storage:  2a 00 00 00 44 6c 00 00 f0 00

usb-storage: Bulk Command S 0x43425355 T 0x4d L 122880 F 0 Trg 0 LUN 0 CL 10

usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes

usb-storage: usb_stor_bulk_transfer_buf: usb_fill_bulk_urb

usb-storage: usb_stor_msg_common: begin
       // I add some debug info in function usb_stor_msg_common(...)

usb-storage: usb_stor_msg_common: init_completion

usb-storage: usb_stor_msg_common: usb_submit_urb

usb-storage: usb_stor_msg_common: set_bit

usb-storage: usb_stor_msg_common: wait_for_completion_interruptible_timeout

usb-storage: usb_stor_msg_common: clear_bit

usb-storage: usb_stor_msg_common: before return

usb-storage: usb_stor_bulk_transfer_buf: usb_stor_msg_common, result 0

usb-storage: usb_stor_bulk_transfer_buf: act_len 0

usb-storage: Status code 0; transferred 31/31

usb-storage: -- transfer complete

usb-storage: usb_stor_bulk_transfer_buf: interpret_urb_result, result 0

usb-storage: Bulk command transfer result=0

usb-storage: usb_stor_bulk_transfer_sglist: xfer 122880 bytes, 6 entries

usb-storage: Status code 0; transferred 122880/122880

usb-storage: -- transfer complete

usb-storage: Bulk data transfer result 0x0

usb-storage: Attempting to get CSW...

usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes

usb-storage: usb_stor_bulk_transfer_buf: usb_fill_bulk_urb

usb-storage: usb_stor_msg_common: begin

usb-storage: usb_stor_msg_common: init_completion

usb-storage: usb_stor_msg_common: usb_submit_urb

usb-storage: usb_stor_msg_common: set_bit

usb-storage: usb_stor_msg_common: wait_for_completion_interruptible_timeout

usb-storage: usb_stor_msg_common: clear_bit

usb-storage: usb_stor_msg_common: before return

usb-storage: usb_stor_bulk_transfer_buf: usb_stor_msg_common, result 0

usb-storage: usb_stor_bulk_transfer_buf: act_len 2443615944

usb-storage: Status code 0; transferred 13/13

usb-storage: -- transfer complete

usb-storage: usb_stor_bulk_transfer_buf: interpret_urb_result, result 0

usb-storage: Bulk status result = 0

usb-storage: Bulk Status S 0x53425355 T 0x4d R 0 Stat 0x0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command WRITE_10 (10 bytes)

usb-storage:  2a 00 00 00 45 5c 00 00 f0 00

usb-storage: Bulk Command S 0x43425355 T 0x4e L 122880 F 0 Trg 0 LUN 0 CL 10

usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes

usb-storage: usb_stor_bulk_transfer_buf: usb_fill_bulk_urb

usb-storage: usb_stor_msg_common: begin

usb-storage: usb_stor_msg_common: init_completion

usb-storage: usb_stor_msg_common: usb_submit_urb

usb-storage: usb_stor_msg_common: set_bit

usb-storage: usb_stor_msg_common: wait_for_completion_interruptible_timeout

usb-storage: usb_stor_msg_common: clear_bit

usb-storage: usb_stor_msg_common: before return

usb-storage: usb_stor_bulk_transfer_buf: usb_stor_msg_common, result 0

usb-storage: usb_stor_bulk_transfer_buf: act_len 0

usb-storage: Status code 0; transferred 31/31

usb-storage: -- transfer complete

usb-storage: usb_stor_bulk_transfer_buf: interpret_urb_result, result 0

usb-storage: Bulk command transfer result=0

usb-storage: usb_stor_bulk_transfer_sglist: xfer 122880 bytes, 4 entries

usb-storage: Status code 0; transferred 122880/122880

usb-storage: -- transfer complete

usb-storage: Bulk data transfer result 0x0

usb-storage: Attempting to get CSW...

usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes

usb-storage: usb_stor_bulk_transfer_buf: usb_fill_bulk_urb

usb-storage: usb_stor_msg_common: begin

usb-storage: usb_stor_msg_common: init_completion

usb-storage: usb_stor_msg_common: usb_submit_urb

usb-storage: usb_stor_msg_common: set_bit

usb-storage: command_abort called

Stack:          // I add the dump_stack(..) calling in function
command_abort(...) for debugging, so it dump stack here

 91a57efc 00000000 9000b570 800000a4 900e7c48 900e8074 901a7fe0 901a8058

 91a64c88 000000a2 00000000 00000000 91a64c88 91a57f6c 9001ee34 9000c8a0

 91a57f40 90187e0c 91a5a400 90187cf8 91fcbc88 91a57f98 91a57f98 00000000

Call Trace:

[<9000b570>] release_task+0x2e4/0x320

[<900e7c48>] scsi_error_handler+0x0/0xb88

[<900e8074>] scsi_error_handler+0x42c/0xb88

[<9001ee34>] kthread+0x104/0x15c

[<9000c8a0>] do_exit+0x704/0x710

[<90187e0c>] schedule+0x200/0x770

[<90187cf8>] schedule+0xec/0x770

[<9001ee1c>] kthread+0xec/0x15c

[<900e7c48>] scsi_error_handler+0x0/0xb88

[<90001540>] kernel_thread_helper+0xc/0x20

[<90001534>] kernel_thread_helper+0x0/0x20



usb-storage: usb_stor_stop_transport called

usb-storage: -- cancelling URB

usb 1-1: hcd_unlink_urb 91a60d28 fail -16

// then shell hangs.


I also try to mount filesystem with option -o sync : mount -o sync
/dev/sda1 /mnt/
It hangs during  "  cp /bin/busybox /mnt/  " .

I try to print more debug info out, then the cp cmd works, but it is
very slow,
" cp /bin/busybox /mnt/ " cmd cost almost 8 minutes.

File busybox is 326088 bytes :
# ls -l /bin/busybox
-rwxr--r--    1 root     0          326088 Jan  1 00:00 /bin/busybox
#

Regards.
Childhood.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux