Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25749
b: refs/heads/master
c: 8b52490
h: refs/heads/master
i:
  25747: e5c6f82
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Apr 14, 2006
1 parent 48d08e2 commit 5c9622f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 68ba61b89c10b3412c7ee05cd649303ba5a588d1
refs/heads/master: 8b5249019352eecd49fb00004d583904e891e7b1
13 changes: 13 additions & 0 deletions trunk/drivers/usb/misc/usbtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ alloc_sglist (int nents, int max, int vary)

for (i = 0; i < nents; i++) {
char *buf;
unsigned j;

buf = kzalloc (size, SLAB_KERNEL);
if (!buf) {
Expand All @@ -391,6 +392,16 @@ alloc_sglist (int nents, int max, int vary)
/* kmalloc pages are always physically contiguous! */
sg_init_one(&sg[i], buf, size);

switch (pattern) {
case 0:
/* already zeroed */
break;
case 1:
for (j = 0; j < size; j++)
*buf++ = (u8) (j % 63);
break;
}

if (vary) {
size += vary;
size %= max;
Expand Down Expand Up @@ -425,6 +436,8 @@ static int perform_sglist (
usb_sg_wait (req);
retval = req->status;

/* FIXME check resulting data pattern */

/* FIXME if endpoint halted, clear halt (and log) */
}

Expand Down

0 comments on commit 5c9622f

Please sign in to comment.