From owner-p4-projects@FreeBSD.ORG Wed Jan 9 22:05:13 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AF75616A41A; Wed, 9 Jan 2008 22:05:13 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7420F16A417 for ; Wed, 9 Jan 2008 22:05:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6A39C13C448 for ; Wed, 9 Jan 2008 22:05:13 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m09M5DtU051824 for ; Wed, 9 Jan 2008 22:05:13 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m09M5DRl051821 for perforce@freebsd.org; Wed, 9 Jan 2008 22:05:13 GMT (envelope-from hselasky@FreeBSD.org) Date: Wed, 9 Jan 2008 22:05:13 GMT Message-Id: <200801092205.m09M5DRl051821@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 132921 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2008 22:05:13 -0000 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 */