Add more logging

This commit is contained in:
Michal Moskal
2017-07-26 10:43:43 +01:00
parent 9a3eec7d4d
commit 52ef98e249
4 changed files with 9 additions and 3 deletions

View File

@ -38,7 +38,7 @@
// Keep Eclipse happy
#endif
#if 0
#if 1
#undef dev_vdbg
#undef dev_dbg
#define dev_vdbg(d, args...) printk(args)

View File

@ -733,6 +733,9 @@ static int do_read(struct fsg_common *common)
/* Carry out the file reads */
amount_left = common->data_size_from_cmnd;
LDBG(curlun, "Uread off=%d cnt=%d\n", (int)lba, amount_left);
if (unlikely(amount_left == 0))
return -EIO; /* No default reply */
@ -881,6 +884,8 @@ static int do_write(struct fsg_common *common)
amount_left_to_req = common->data_size_from_cmnd;
amount_left_to_write = common->data_size_from_cmnd;
LDBG(curlun, "Uwrite off=%d cnt=%d\n", (int)lba, amount_left_to_req);
while (amount_left_to_write > 0) {
/* Queue a request for more data from the host */