lkml.org 
[lkml]   [1999]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Hot PCI bus plugging
    Date
    From

    bindrelee@sbs-cp.com said:
    > This doesn't handle the common case of adding another card of the
    > same type as already exist in the system. In that case if you don't
    > want to redesign the driver interface you have to remove the driver,
    > reconfigure, and then install the driver again.

    Perhaps, then, we need to redesign the driver interface - whether we like it or
    not is irrelevant.

    Currently, module loading is user-initated. Modules are loaded and hardware
    probed for when a userspace program attempts to use a device.

    I suggest that we should do this the other way round - hardware-initiated.
    Rather than waiting for a user to access the device, we scan the busses and
    load drivers for all the hardware we find attached.

    In the kernel, we keep a mapping for each bus type from vendor/device ID (or
    their equivalent) to the driver routine which can handle those devices -
    much like CardBus and PCMCIA already does.

    This only needs to be done for drivers which are actually loaded - then when
    we discover a device which isn't in this list, we can use kmod to request a
    driver for it - request_module("pci_device_102b_1100") etc.

    Adding MODULE_SUPPORTED_HARDWARE entries to signify which devices are handled
    by each driver module is a fairly simple task while will keep depmod/modprobe
    happy.

    The only drawback I see with this is that it doesn't allow you to save kernel
    memory by unloading drivers while they're not being used. I'm sure if I spent
    more than five minutes thinking about it, I'd be able to sort that out too,
    though.


    --
    dwmw2



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

    \
     
     \ /
      Last update: 2005-03-22 13:55    [W:2.347 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site