lkml.org 
[lkml]   [1999]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: New resources - pls, explain :-(
    Hello,

    > > This can be easily handled by having my pci_request_device() request
    > > all the regions the device has. This way usual PCI drivers won't need to
    > > bother with resource allocation and the other ones will be able to do
    > > their magic tricks directly. Okay?
    >
    > Why?
    >
    > We have IO regions, and that's really all the driver cares about. The
    > "struct pci_dev" is useful for device identification, but it is not the
    > device. The device is really the IO port accesses you make in the driver,
    > and as such it makes sense to just allocate those resources.
    >
    > Marking the actual "struct pci_dev" busy buys you nothing over marking the
    > IO range busy, and as has been shown it has problems.

    Please read the text I've written and you've quoted a bit more carefully.
    It says that I propose pci_request_device() allocating _the_resources_, so that
    the problems we were speaking about some mails ago will be solved and usual
    drivers still won't need to do any resource magic -- they'll just say
    "grab this device and anything that comes with it".

    > Oh, they are there. They just don't announce their PCI IO ranges, exactly
    > because they implement legacy stuff that doesn't expect them to be
    > announced.

    > For example, take the PIIX4 which exists in probably 90% of modern PCI
    > machines. It has _tons_ of devices on it, and some are announced as PCI IO
    > regions while others are not. Even when it announces that it has a IDE
    > subfunction, it doesn't actually announce the IO range it listens on (it
    > announces the extended IO range, but not the traditional one).

    > Now, imagine that you have a modularized system, and you by mistake load a
    > PIIX4-aware IDE module after you already loaded a "classical" IDE module.
    > The PIIX4-aware IDE module _should_ notice that the IO range is already in
    > use, and should abort.

    Well, in this case my old "just allocate the whole PCI device and
    don't care about resources" would still work since a driver for such a device
    would of course need to request the legacy ports explicitly as they are
    not a part of any PCI regions.

    But anyway, I feel that making pci_request_device() allocating all
    the resources is a better solution.

    Have a nice fortnight
    --
    Martin `MJ' Mares <mj@ucw.cz> http://atrey.karlin.mff.cuni.cz/~mj/
    Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
    "A LISP programmer knows value of everything, but cost of nothing."

    -
    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:53    [W:0.022 / U:3.740 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site