setpci doesn't work due to an improper error message.

Solution Verified - Updated -

Issue

  • setpci aborts with the following error message, but the message is quite improper.

    # setpci -s 00:00.0 00
    setpci: Missing width.
    Try `setpci --help' for more information.
    
  • As you see, setpci says the "width" of the specified device doesn't know. According to setpci's man page, the "width" can be specified by .B, .W, or .L suffix. Here is a part of the man page.

    Each of the previous formats can be followed by +offset to add an
    offset (a hex number) to the address. This feature can be useful for
    addressing of registers living within a capability, or to modify parts
    of standard registers.
    Finally, you should append a width specifier .B, .W, or .L to choose
    how many bytes (1, 2, or 4) should be transferred. The width can be
    omit- ted if you are accessing a named register whose width is well
    known.
    
  • As you see, the above description says any of those suffixes should be specified for "+offset", but doesn't have to be specified for either "domain" or "name". However, the current setpci requires a suffix whenever it is run.

Environment

  • Red Hat Enterprise Linux 5.6
  • Architecture: x86_64
  • Related Package Version: pciutils-3.1.7-3.el5

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content