From f498dc2227c7edc88b3ba4fdfbbe30ec4205369a Mon Sep 17 00:00:00 2001 From: thompsa Date: Sun, 5 Apr 2009 18:20:38 +0000 Subject: MFp4 //depot/projects/usb@159909 - make usb2_power_mask_t 16-bit - remove "usb2_config_sub" structure from "usb2_config". To compensate for this "usb2_config" has a new field called "usb_mode" which select for which mode the current xfer entry is active. Options are: a) Device mode only b) Host mode only (default-by-zero) c) Both modes. This change was scripted using the following sed script: "s/\.mh\././g". - the standard packet size table in "usb_transfer.c" is now a function, hence the code for the function uses less memory than the table itself. Submitted by: Hans Petter Selasky --- sys/dev/usb/net/if_rue.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'sys/dev/usb/net/if_rue.c') diff --git a/sys/dev/usb/net/if_rue.c b/sys/dev/usb/net/if_rue.c index 73958d1..dc7a31f 100644 --- a/sys/dev/usb/net/if_rue.c +++ b/sys/dev/usb/net/if_rue.c @@ -141,29 +141,29 @@ static const struct usb2_config rue_config[RUE_N_TRANSFER] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .mh.bufsize = MCLBYTES, - .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,}, - .mh.callback = rue_bulk_write_callback, - .mh.timeout = 10000, /* 10 seconds */ + .bufsize = MCLBYTES, + .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .callback = rue_bulk_write_callback, + .timeout = 10000, /* 10 seconds */ }, [RUE_BULK_DT_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.bufsize = (MCLBYTES + 4), - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.callback = rue_bulk_read_callback, - .mh.timeout = 0, /* no timeout */ + .bufsize = (MCLBYTES + 4), + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .callback = rue_bulk_read_callback, + .timeout = 0, /* no timeout */ }, [RUE_INTR_DT_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, - .mh.bufsize = 0, /* use wMaxPacketSize */ - .mh.callback = rue_intr_callback, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = rue_intr_callback, }, }; -- cgit v1.1