* developing PCI Device Drivers
@ 2000-12-18 6:43 timo
0 siblings, 0 replies; only message in thread
From: timo @ 2000-12-18 6:43 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5353 bytes --]
Greetings all,
I know this is off topic for this forum but I know of nowhere else to
post it.
I am writing a driver for Tru64 Unix for a solid-state drive that plugs
into the PCI bus. I am running Tru64 v5.0a on a DS-20 with 2 Alpha
CPUs. My firmware revision is 5.4-19.
The problem concerns inconsistencies with recognising my PCI card on
the PCI bus. Sometimes it works and the card is probed and other times
it doesn�t and the card is skipped. I have added the output from the
console at the end of this post. The first output shows when it has
worked and the second shows when it hasn�t. I have switched on
debugging for the PCI bus, in the Kernel tuner, so it shows all of the
calls made by the OS.
I know of no reason why these inconsistencies happen. I load the module
(driver) with
# sysconfig -v -c qikdrive
if it doesn't work I get
framework error: subsystem 'qikdrive' failure
subsystem error: No such device
and all I do is try to load again and normally within 5 attempts it
loads the driver with no problems. The only difference I can see is
that in the Console output the OS calls:
>PCID_CNFG_SLOT: PCI device qikdrive found in slot number 8.
>PCID_CNFG_SLOT: Calling pci_config_cont for slot 8
when it works and
>PCID_CNFG_SLOT: PCI device qikdrive found in slot number 8.
>PCID_INOUT: pci: create_pci_bus_entry
when it doesn't. But this doesn't give me any further idea of what is
happening. Why would a different function be called?
When it does work, as you can see in the console output, everything
works fine. The card is probed and attached. I am able to read the
memory on the card and switch LEDs on and off.
This call also occurs if I have a second card in the PCI bus. Rather
than calling my probe() function again it calls �create_pci_bus_entry�.
This may be related to how Tru64 handles multiple cards and I admit I
do not have a full understanding of how this works and can not find any
direct reference in any of the �Writing a Device Driver� series. But
this may be a separate problem and due to my device and controller
structures.
I have thoroughly tested both cards in other machines, under other
OS�s, and they work with no problems.
Any help or suggestions on this problem would be great.
Thanks in advance,
Tim
Platypus Technology
www.platypus.net
********************************************
Console Printout 1 � the pci device is probed and attached
********************************************
PCID_INOUT: Entered pci_driver_configure for PCI bus 0
PCID_CNFG_SLOT: Scanning in PCI_Option entries with subsys_name qikdrive
PCID_INOUT: Entered pci_create_single_option_list
PCID_MO_2: pcio_static_size + pcio_syscfgdb_size = 82
PCID_MO_2: ACTIVE flag set on PCI bus 0, slot 5
PCID_MO_2: ACTIVE flag set on PCI bus 0, slot 105
PCID_MO_2: ACTIVE flag set on PCI bus 0, slot 205
PCID_MO_2: ACTIVE flag set on PCI bus 0, slot 305
PCID_MO_2: ACTIVE flag set on PCI bus 0, slot 7
PCID_MO_2: - Calling pci_dev_drvr_match
PCID_MO_1: pop->vendor_id/device_id = 0x118b / 0x202
PCID_MO_2: Case 27 match found in PCI Option table entry 1.
List of possibly matching drivers for VID/DID/REV-ID/CLASS/SUBCLASS =
0x118b/0x202/0x0/0x1/0x0 is:
For entry_num = 1:
mo_case = 2
driver-name = qikdrive
module-list = <NULL>
class = 0x1
adpt_cnfg = 0x0
PCID_CNFG_SLOT: Attempting to configure pci slot 8 in pci bus 0 with
driver qikdrive
PCID_INOUT: Entering pci_common_configure
PCID_CNFG_SLOT: PCI device qikdrive found in slot number 8.
PCID_CNFG_SLOT: Calling pci_config_cont for slot 8
PCID_CNFG_SLOT: Value of pci_config_hdr addr is 0xfffffc007b8a7180
PCID_CNFG_SLOT: Value of controller struct addr is 0xfffffc0026aa6000
PCID_INOUT: Entered pci_config_cont
PCID_MO_2: Value of driver struct ptr = 0xffffffff80039280
PCID_PROBE: Calling qikdrive12 device driver's probe routine
qikdrive_probe: qikdrive 12
qikdrive_probe: sc->bar_0 = 0xfffffd0002241000, sc->bar_1 =
0xfffffd01fc001000
qikdrive_probe: sc->bar_2 = 0xfffffd0002000000, sc->bar_3 =
0xfffffd01fc001100
qikdrive_probe: num_qikdrive = 1.
qikdrive_probe: finished sucessfully.
PCID_PROBE: Probe passed. Performing config_fillin for qikdrive12
qikdrive12 at pci0 slot 8
PCID_ATTACH: Calling qikdrive12 device driver's attach routine
qikdrive_cattach: qikdrive 12
qikdrive_cattach: Finished successfully.
PCID_INOUT: Exiting pci_config_cont
PCID_CNFG_SLOT: Successful pci_config_cont; calling conn_ctlr
PCID_MO_2: Configured driver is qikdrive
********************************************
Console Printout 2 � the pci device is not probed
********************************************
PCID_MO_2: - Calling pci_dev_drvr_match
PCID_MO_1: pop->vendor_id/device_id = 0x118b / 0x202
PCID_MO_2: Case 27 match found in PCI Option table entry 1.
List of possibly matching drivers for VID/DID/REV-ID/CLASS/SUBCLASS =
0x118b/0x202/0x0/0x1/0x0 is:
For entry_num = 1:
mo_case = 2
driver-name = qikdrive
module-list = <NULL>
class = 0x1
adpt_cnfg = 0x0
PCID_CNFG_SLOT: Attempting to configure pci slot 9 in pci bus 0 with
driver qikdrive
PCID_INOUT: Entering pci_common_configure
PCID_CNFG_SLOT: PCI device qikdrive found in slot number 9.
PCID_INOUT: pci: create_pci_bus_entry
PCID_CNFG_SLOT: Try next matching entry...
PCID_INOUT: Exiting pci_common_configure
PCID_INOUT: Exiting pci_driver_configure
Sent via Deja.com
http://www.deja.com/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-18 6:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-18 6:43 developing PCI Device Drivers timo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox