LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-05-2011, 07:04 PM   #1
dbrazeau
Member
 
Registered: Aug 2009
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184

Rep: Reputation: 28
How to stop scsi_eh_#


I have a driver that adds a scsi host via scsi_add_host(). When my driver is calls removes the scsi host via scsi_remove_host I check the current running process, and the scsi_eh_# (the scsi error handler) is still running for the removed scsi host. When I try unloading the LSI SAS driver all of the associated scs_eh_# with it are stopped/killed. How do I get it to do this when my driver removes its scsi?

Last edited by dbrazeau; 10-05-2011 at 07:12 PM.
 
Old 10-06-2011, 02:13 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
SCSI host and SCSI error handler are in the different context. That means that SCSI host isn't relative to SCSI error handler. It isn't necessary when your driver is removed.
 
Old 10-07-2011, 11:03 AM   #3
dbrazeau
Member
 
Registered: Aug 2009
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by nini09 View Post
SCSI host and SCSI error handler are in the different context. That means that SCSI host isn't relative to SCSI error handler. It isn't necessary when your driver is removed.
Then do you know what function call starts and stops the error handler process? My system is going to need to load and unload this SCSI driver a bunch of times, so I don't want to end up with hundreds of these error handlers running for SCSI hosts that don't exits any more.
 
Old 10-07-2011, 02:38 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Normally SCSI error handler should be stoped when SCSI host is removed.
 
Old 10-10-2011, 12:09 PM   #5
dbrazeau
Member
 
Registered: Aug 2009
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by nini09 View Post
Normally SCSI error handler should be stoped when SCSI host is removed.
Ummm... well for some reason it doesn't appear to be, even though the SCSI host is gone from '/sys/class/scsi_host/host[n]'.
 
Old 10-10-2011, 02:52 PM   #6
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
SCSI subsystem is very complex. It invokes multi layer. No only one function can take care of everything. What's your initialization model?
 
Old 10-10-2011, 05:20 PM   #7
dbrazeau
Member
 
Registered: Aug 2009
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184

Original Poster
Rep: Reputation: 28
Quote:
Originally Posted by nini09 View Post
SCSI subsystem is very complex. It invokes multi layer. No only one function can take care of everything. What's your initialization model?
I do a scsi_host_alloc(), then setup my SCSI host parameters, then call scsi_add_host(), and finally call scsi_scan_host().
 
Old 10-11-2011, 02:19 PM   #8
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,850

Rep: Reputation: 161Reputation: 161
Based on SCSI document, when an HBA is being removed it could be as part of an orderly shutdown associated with the LLD module being unloaded.
 
  


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
Informix start/stop along with redhat start/stop gxgtudor Red Hat 2 03-06-2009 02:13 AM
AWK- processing data inside start/stop pairs but ignoring start/stop lines cliffoij Programming 2 10-15-2008 06:17 AM
scsi_eh_[0-7] processes jhwilliams Linux - Hardware 5 08-22-2007 09:33 PM
Stop X? bendeco13 Linux - General 2 04-07-2006 03:27 AM
How do I stop services from restarting after I stop them? M$ISBS Linux - Software 3 10-27-2005 08:13 PM

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

All times are GMT -5. The time now is 08:15 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