Date: Wed, 9 Jan 2008 22:05:13 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 132921 for review Message-ID: <200801092205.m09M5DRl051821@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132921 Change 132921 by hselasky@hselasky_laptop001 on 2008/01/09 22:04:37 Follow up commit to - make "bufsize", "frames" and "interval" mode specific. CDCE needs special handling, hence it is dual mode, and we need to duplicate the entries for all dual mode endpoints. Affected files ... .. //depot/projects/usb/src/sys/dev/usb/if_cdce.c#48 edit Differences ... ==== //depot/projects/usb/src/sys/dev/usb/if_cdce.c#48 (text+ko) ==== @@ -115,14 +115,16 @@ .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, - .frames = CDCE_512X4_FRAGS_MAX + 1, - .bufsize = (CDCE_512X4_FRAMES_MAX * MCLBYTES) + sizeof(usb_cdc_mf_eth_512x4_header_t), .if_index = 0, /* Host Mode */ + .mh.frames = CDCE_512X4_FRAGS_MAX + 1, + .mh.bufsize = (CDCE_512X4_FRAMES_MAX * MCLBYTES) + sizeof(usb_cdc_mf_eth_512x4_header_t), .mh.flags = {.pipe_bof = 1,.force_short_xfer = 1,.ext_buffer = 1,}, .mh.callback = &cdce_bulk_write_callback, .mh.timeout = 10000, /* 10 seconds */ /* Device Mode */ + .md.frames = CDCE_512X4_FRAGS_MAX + 1, + .md.bufsize = (CDCE_512X4_FRAMES_MAX * MCLBYTES) + sizeof(usb_cdc_mf_eth_512x4_header_t), .md.flags = {.pipe_bof = 1,.short_xfer_ok = 1,.ext_buffer = 1,}, .md.callback = &cdce_bulk_read_callback, .md.timeout = 0, /* no timeout */ @@ -132,14 +134,16 @@ .type = UE_BULK, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .frames = CDCE_512X4_FRAGS_MAX + 1, - .bufsize = (CDCE_512X4_FRAMES_MAX * MCLBYTES) + sizeof(usb_cdc_mf_eth_512x4_header_t), .if_index = 0, /* Host Mode */ + .mh.frames = CDCE_512X4_FRAGS_MAX + 1, + .mh.bufsize = (CDCE_512X4_FRAMES_MAX * MCLBYTES) + sizeof(usb_cdc_mf_eth_512x4_header_t), .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,.ext_buffer = 1,}, .mh.callback = &cdce_bulk_read_callback, .mh.timeout = 0, /* no timeout */ /* Device Mode */ + .md.frames = CDCE_512X4_FRAGS_MAX + 1, + .md.bufsize = (CDCE_512X4_FRAMES_MAX * MCLBYTES) + sizeof(usb_cdc_mf_eth_512x4_header_t), .md.flags = {.pipe_bof = 1,.force_short_xfer = 1,.ext_buffer = 1,}, .md.callback = &cdce_bulk_write_callback, .md.timeout = 10000, /* 10 seconds */ @@ -149,10 +153,10 @@ .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .bufsize = sizeof(usb_device_request_t), - .interval = 50, /* 50ms */ .if_index = 0, /* Host Mode Only */ + .mh.bufsize = sizeof(usb_device_request_t), + .mh.interval = 50, /* 50ms */ .mh.flags = {}, .mh.callback = &cdce_bulk_write_clear_stall_callback, .mh.timeout = 1000, /* 1 second */ @@ -162,10 +166,10 @@ .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .bufsize = sizeof(usb_device_request_t), - .interval = 50, /* 50ms */ .if_index = 0, /* Host Mode Only */ + .mh.bufsize = sizeof(usb_device_request_t), + .mh.interval = 50, /* 50ms */ .mh.flags = {}, .mh.callback = &cdce_bulk_read_clear_stall_callback, .mh.timeout = 1000, /* 1 second */ @@ -175,13 +179,14 @@ .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, .direction = UE_DIR_IN, - .bufsize = CDCE_IND_SIZE_MAX, .if_index = 1, /* Host Mode */ + .mh.bufsize = CDCE_IND_SIZE_MAX, .mh.flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, .mh.callback = &cdce_intr_read_callback, .mh.timeout = 0, /* Device Mode */ + .md.bufsize = CDCE_IND_SIZE_MAX, .md.flags = {.pipe_bof = 1,.force_short_xfer = 1,.no_pipe_ok = 1,}, .md.callback = &cdce_intr_write_callback, .md.timeout = 10000, /* 10 seconds */ @@ -191,10 +196,10 @@ .type = UE_CONTROL, .endpoint = 0x00, /* Control pipe */ .direction = UE_DIR_ANY, - .bufsize = sizeof(usb_device_request_t), - .interval = 50, /* 50ms */ .if_index = 1, /* Host Mode Only */ + .mh.bufsize = sizeof(usb_device_request_t), + .mh.interval = 50, /* 50ms */ .mh.flags = {}, .mh.callback = &cdce_intr_read_clear_stall_callback, .mh.timeout = 1000, /* 1 second */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801092205.m09M5DRl051821>