LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-01-2019, 04:54 PM   #1
midnight1111
LQ Newbie
 
Registered: Apr 2019
Posts: 1

Rep: Reputation: Disabled
SD Driver and multiple hardware instances


I have been asked to modify an existing SD driver to support more than one instance of the hardware. There are 3 slots on the evaluation board and 2 of the slots have the same hardware device in them. When I load the driver my spio_probe function gets called once (I expected twice). So I assume that is some address or bus pointer that I need to include when doing register reads and writes to distinguish which hardware I am talking to.

I would really appreciate some help knowing how to get two call backs to my spio_probe function, or how to register two devices on the SD bus.

Thanks,
M-
 
Old 04-02-2019, 05:17 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,153

Rep: Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265Reputation: 1265
Normally for any pluggable bus there is a bus driver which can walk the bus and find devices. It then calls the appropriate device driver for each device found. The device driver creates a device instance and configures the device. The PCI bus driver, for example, uses the vendor/device ID to select which device driver to call. For PCI, this is only done at boot time unless you have hotplug support, which requires leaving room in the device tables for devices found after boot.

I don't recognize spio (special-purpose I/O?) or your use of SD (sd is SCSI Disk). I assume these are your proprietary devices. Most likely you need to trigger the bus driver somehow to scan the bus for devices after you load your driver. A SCSI controller (bus) driver uses the obscure syntax "echo '- - -' > /sys/class/scsi_host/host0/scan" to trigger a scan for new disks attached to host adapter 0. This should be documented for your bus driver.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail-2: Wrong number of instances of process sendmail:, expected instances equal maxymaxymaxymaxymaxy Linux - Newbie 1 06-15-2011 10:51 AM
[SOLVED] Find and replace multiple instances gdavis2287 Programming 23 08-16-2010 12:40 PM
Single USB driver, multiple devices, how many driver instances? jadonovan Linux - Embedded & Single-board computer 1 01-23-2010 08:08 PM
kickstart; how-to info needed for multiple instances of RH OS's and multiple unique v Joe_Wulf Linux - Server 4 06-21-2007 11:18 PM
Mplayer and Multiple instances Spaz007 Linux - Software 0 09-16-2004 10:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration