Re: [linux-usb-devel] Re: [PATCH] reorganize USB submenu's

From: David Brownell (david-b_at_pacbell.net)
Date: 07/31/03

  • Next message: crozierm_at_consumption.net: "Re: USB mouse "hang" with 2.5.75"
    Date:	Thu, 31 Jul 2003 14:07:35 -0700
    To: Stephen Hemminger <shemminger@osdl.org>
    
    

    Stephen Hemminger wrote:
    > --- linux-2.5/drivers/usb/gadget/Kconfig 2003-06-05 10:04:40.000000000 -0700
    > +++ usb/drivers/usb/gadget/Kconfig 2003-07-31 12:45:04.000000000 -0700
    > @@ -35,9 +35,6 @@
    > #
    > # USB Peripheral Controller Support
    > #
    > -choice
    > - prompt "USB Peripheral Controller Support"
    > - depends on USB_GADGET
    >
    > config USB_NET2280
    > tristate "NetChip 2280 USB Peripheral Controller"
    > @@ -54,21 +51,23 @@
    > dynamically linked module called "net2280" and force all
    > gadget drivers to also be dynamically linked.
    >
    > -endchoice

    Why do you want to remove that choice menu? By doing that,
    you've enabled illegal configurations.

    In this case: no more than one controller driver may be
    linked, since USB devices have exactly one upstream link.
    By detecting this at configuration time, the current menus
    prevent a link-time error.

    This choice could be improved (at this point I'd likely
    desupport "dummy plus real controller as modules", and
    the more troublesome cases it carries along with it), but
    that's not how I'd do it.

    > @@ -110,7 +109,7 @@
    >
    > config USB_ETH
    > tristate "Ethernet Gadget"
    > - depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA250 || USB_SA1100)
    > + depends on USB_GADGET_CONTROL

    This approach allows illegal configurations too. The config-time
    dependencies prevent compile-time errors, by only enabling the
    configurations that are known to compile and work.

    When an "au1x00_udc" controller is added, each gadget driver will
    need to be modified to know about its endpoints and config quirks,
    then tested. (And some gadget drivers won't be able to do that:
    maybe they need lots of endpoints, or rely on config change events
    that particular hardware disallows.) By allowing arbitrary driver
    stacking, you'd be causing at least compile errors.

    Likewise, when an "audio" gadget driver is added, it'll need testing
    on each controller. And since SA1100 can never support iso transfers,
    that configuration shouldn't even be allowed.

    Both your proposed changes share a common feature: reducing the degree
    to which illegal configurations are prevented. Is that intentional?

    - Dave

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: crozierm_at_consumption.net: "Re: USB mouse "hang" with 2.5.75"

    Relevant Pages

    • Re: stuck with 2.6.23.14 on x86_64
      ... the lastest that I can compile is 2.6.23.14; ... All .config are the same, ... SCSI controller: ... Right now, on AMD64 machines, I'm forced to patch by hand the kernel, ...
      (Linux-Kernel)
    • Re: PCMCIA on an Acer TravelMate 280 (RH9)
      ... 02:05.0 Ethernet controller: Realtek Semiconductor Co., ... 02:09.0 CardBus bridge: O2 Micro, ... Here's the USB section from my .config file just in case ...
      (comp.os.linux.portable)
    • Re: -mm merge plans for 2.6.26 (memcgroup)
      ... The config helptext does conclude ... sure you need the memory resource controller. ...
      (Linux-Kernel)
    • attaching an usb mp3-player to a device
      ... Controller /dev/usb0: ... addr 1: full speed, self powered, config 1, UHCI root hub, ...
      (freebsd-questions)
    • Re: Advansys SCSI driver and 2.6.16
      ... I noticed that upon trying to boot 2.6.16, my Advansys controller ... Is this a permanent change or is the Advansys driver just in need of some ... a faulty .config or a bug. ... 2.6.15 compiles the advansys driver. ...
      (Linux-Kernel)