onboard device discovery - Linux

This is a discussion on onboard device discovery - Linux ; Hi All, I need to discover onboard disk controller and get the information about it. I tried looking at the lspci code however I don't want to go through all pci devices. I there a way by which I can ...

+ Reply to Thread
Results 1 to 13 of 13

Thread: onboard device discovery

  1. onboard device discovery

    Hi All,

    I need to discover onboard disk controller and get the information
    about it. I tried looking at the lspci code however I don't want to go
    through all pci devices. I there a way by which I can get the
    controller information without searching in ALL pci devices?

    Thanks,

    Ashish


  2. Re: onboard device discovery

    Try using "dmesg" output.
    or the best way... see manual of your machine.
    Ash wrote:

    > Hi All,
    >
    > I need to discover onboard disk controller and get the information
    > about it. I tried looking at the lspci code however I don't want to go
    > through all pci devices. I there a way by which I can get the
    > controller information without searching in ALL pci devices?
    >
    > Thanks,
    >
    > Ashish



  3. Re: onboard device discovery

    Try using "dmesg" output.
    or the best way... see manual of your machine.
    Ash wrote:

    > Hi All,
    >
    > I need to discover onboard disk controller and get the information
    > about it. I tried looking at the lspci code however I don't want to go
    > through all pci devices. I there a way by which I can get the
    > controller information without searching in ALL pci devices?
    >
    > Thanks,
    >
    > Ashish



  4. Re: onboard device discovery


    miline wrote:
    > Try using "dmesg" output.
    > or the best way... see manual of your machine.
    > Ash wrote:
    >
    > > Hi All,
    > >
    > > I need to discover onboard disk controller and get the information
    > > about it. I tried looking at the lspci code however I don't want to go
    > > through all pci devices. I there a way by which I can get the
    > > controller information without searching in ALL pci devices?
    > >
    > > Thanks,
    > >
    > > Ashish


    I need to do it from code not by some utilities.


  5. Re: onboard device discovery

    Ash wrote:
    > Hi All,
    >
    > I need to discover onboard disk controller and get the information
    > about it. I tried looking at the lspci code however I don't want to go
    > through all pci devices. I there a way by which I can get the
    > controller information without searching in ALL pci devices?


    How many PCI devices do you have, then, that it takes too much time to
    search all of them for mass storage controllers?

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


  6. Re: onboard device discovery


    Ash wrote:

    > miline wrote:
    > > Try using "dmesg" output.
    > > or the best way... see manual of your machine.
    > > Ash wrote:
    > >
    > > > Hi All,
    > > >
    > > > I need to discover onboard disk controller and get the information
    > > > about it. I tried looking at the lspci code however I don't want to go
    > > > through all pci devices. I there a way by which I can get the
    > > > controller information without searching in ALL pci devices?
    > > >
    > > > Thanks,
    > > >
    > > > Ashish

    >
    > I need to do it from code not by some utilities.


    Where have you mentioned that you want to do it on code?

    Why don't you write extra IOCTL for driver of that Disk controller
    which will give you all the info.


  7. Re: onboard device discovery


    miline wrote:
    >
    > Where have you mentioned that you want to do it on code?


    >>>> I tried looking at the lspci code

    I guess I said that.

    >
    > Why don't you write extra IOCTL for driver of that Disk controller
    > which will give you all the info.


    I need to know the "serial number of physical drives, unique ID for
    Logical Disks, and serial number for controllers" without any driver.

    I came through lshw though it doesn't support SATA disks.


  8. Re: onboard device discovery

    Ash wrote:
    > miline wrote:
    >
    >>Where have you mentioned that you want to do it on code?

    >
    >
    >>>>>I tried looking at the lspci code

    >
    > I guess I said that.
    >
    >
    >>Why don't you write extra IOCTL for driver of that Disk controller
    >>which will give you all the info.

    >
    >
    > I need to know the "serial number of physical drives, unique ID for
    > Logical Disks, and serial number for controllers" without any driver.
    >


    Would you like to tell what for?

    The Linux community is pretty allergic to any schemes
    that have even a faint whiff of copy protection or
    similar purposes.

    You may be attempting to break the GNU license conditions.

    --

    Tauno Voipio
    tauno voipio (at) iki fi

  9. Re: onboard device discovery

    Ash wrote:
    > miline wrote:
    >
    >>Where have you mentioned that you want to do it on code?

    >
    >
    >>>>>I tried looking at the lspci code

    >
    > I guess I said that.
    >
    >
    >>Why don't you write extra IOCTL for driver of that Disk controller
    >>which will give you all the info.

    >
    >
    > I need to know the "serial number of physical drives, unique ID for
    > Logical Disks, and serial number for controllers" without any driver.
    >
    > I came through lshw though it doesn't support SATA disks.
    >


    You may perhaps be able to get a serial number of the controller, if it
    is accessable through some PCI standard access method, but anything
    beyond that, anything pertaining to (physical or logical) drives behind
    the controller is impossible to obtain without a device driver.
    Sometimes some information is even impossible to obtain *with* a device
    driver as the driver writer thinks that it's not needed.

    --
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize
    -- T. Pratchett


  10. Re: onboard device discovery

    > You may be attempting to break the GNU license conditions.
    >
    > --
    >
    > Tauno Voipio
    > tauno voipio (at) iki fi


    I surely haven't read the GNU license completely, but I guess if I am
    not copying the code elsewhere but trying to know the function calls
    and whereabouts; it should be fine to read the code.

    Please correct me if I am wrong.


  11. Re: onboard device discovery

    --
    Ash wrote:
    > > You may be attempting to break the GNU license conditions.
    > >
    > > --
    > >
    > > Tauno Voipio
    > > tauno voipio (at) iki fi

    >
    > I surely haven't read the GNU license completely, but I guess if I am
    > not copying the code elsewhere but trying to know the function calls
    > and whereabouts; it should be fine to read the code.
    >
    > Please correct me if I am wrong.

    --

    Hi All,

    Before you send the cops, please note, that neither I had copy the
    code, nor I have tried to emulate it, nor I have nay plans to base my
    code on it; and guess what, had just read the GNU License completely
    and to my best comprehension ability; I hadn't broken it.

    Thanks
    Ashish


  12. Re: onboard device discovery

    Ash wrote:
    >>You may be attempting to break the GNU license conditions.
    >>

    >
    >
    > I surely haven't read the GNU license completely, but I guess if I am
    > not copying the code elsewhere but trying to know the function calls
    > and whereabouts; it should be fine to read the code.
    >
    > Please correct me if I am wrong.
    >


    That's right - as long as it's not a copy protection scheme.
    If you make a derived work from a GNU copyrighted work, you
    have to make the sources freely available, so a copy protection
    scheme is nonsensical.

    What are you intending to use the serail numbers for?

    --

    Tauno Voipio
    tauno voipio (at) iki fi


  13. Re: onboard device discovery


    Tauno Voipio wrote:

    > That's right - as long as it's not a copy protection scheme.
    > If you make a derived work from a GNU copyrighted work,


    That's a huge if.

    > you
    > have to make the sources freely available,


    Actually, you only have to make them available to someone who lawfully
    acquires a copy of the binary.

    > so a copy protection
    > scheme is nonsensical.


    I can't see how you can conclude that without knowing what he's doing.
    Perhaps he's developing a purely commercial product using only LGPL'd
    libraries, for example.

    And it's worth noting that the GPL specifically allows him to put
    whatever he wants in the code. This creates a conflict in the GPL. On
    the one hand, you are supposed to be able to modify it however you
    want. On the other hand, you may not impose further restrictions. The
    usual way this is resolved is to say that you can add any copy
    restriction or licensing *code* that you want, but you cannot prohibit
    people from modifying or removing that code if they wish to.

    For example, the EXPORT_SYMBOL_GPL stuff was added to the Linux kernel.
    In a sense, it does impose further restrictions on people's use of the
    Linux kernel beyond those found in the GPL -- the GPL does not require
    you to place a derivative work under the GPL if you do not distribute
    it. The generally accepted view of this is that anyone is free to
    remove EXPORT_SYMBOL_GPL code from the Linux kernel if they wish to.
    (However, they still have to comply with the GPL, and removing this
    code may make it easier for them to violate the GPL.)

    DS


+ Reply to Thread