* scsi.agent trouble: load more than module per TYPE
@ 2006-01-18 17:25 Michele Barbiero
2006-01-18 19:16 ` Marco d'Itri
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Michele Barbiero @ 2006-01-18 17:25 UTC (permalink / raw)
To: linux-hotplug
I had necessity to load two modules for TYPEÍrom (in this case,
sr_mod and sg), but the original script can't do that. I found a Ubuntu
patch for that: it corrects this behaviour. My question: why don't You
merging Ubuntu patch (or only the workaround in discussion) in official
hotplug?
http://archive.ubuntu.com/ubuntu/pool/main/h/hotplug/hotplug_0.0.20040329-22ubuntu13.diff.gz
Thank's.
--
« Invento ergo sum »
[G]reedy[F]ly aka Shuren @ irc.azzurra.org
Powered by Slackware Linux
Linux User #283140
GPG: http://xoomer.virgilio.it/greedyfly/directory/michele.asc
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: scsi.agent trouble: load more than module per TYPE
2006-01-18 17:25 scsi.agent trouble: load more than module per TYPE Michele Barbiero
@ 2006-01-18 19:16 ` Marco d'Itri
2006-01-18 19:45 ` Michele Barbiero
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marco d'Itri @ 2006-01-18 19:16 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 519 bytes --]
On Jan 18, Michele Barbiero <michele.barbiero@gmail.com> wrote:
> I had necessity to load two modules for TYPE=cdrom (in this case,
> sr_mod and sg), but the original script can't do that. I found a Ubuntu
> patch for that: it corrects this behaviour. My question: why don't You
> merging Ubuntu patch (or only the workaround in discussion) in official
> hotplug?
Because the "official hotplug" package is dead and not actively
maintained anymore and sane distributions switched to udev.
--
ciao,
Marco
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: scsi.agent trouble: load more than module per TYPE
2006-01-18 17:25 scsi.agent trouble: load more than module per TYPE Michele Barbiero
2006-01-18 19:16 ` Marco d'Itri
@ 2006-01-18 19:45 ` Michele Barbiero
2006-01-18 19:49 ` Marco d'Itri
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Michele Barbiero @ 2006-01-18 19:45 UTC (permalink / raw)
To: linux-hotplug
On Wed, 18 Jan 2006 20:16:21 +0100
md@Linux.IT (Marco d'Itri) wrote:
[Cut]
> Because the "official hotplug" package is dead and not actively
> maintained anymore and sane distributions switched to udev.
It's a modules problem (hotplug), not device one (udev).
--
« Invento ergo sum »
[G]reedy[F]ly aka Shuren @ irc.azzurra.org
Powered by Slackware Linux
Linux User #283140
GPG: http://xoomer.virgilio.it/greedyfly/directory/michele.asc
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: scsi.agent trouble: load more than module per TYPE
2006-01-18 17:25 scsi.agent trouble: load more than module per TYPE Michele Barbiero
2006-01-18 19:16 ` Marco d'Itri
2006-01-18 19:45 ` Michele Barbiero
@ 2006-01-18 19:49 ` Marco d'Itri
2006-01-18 20:09 ` Patrick Mansfield
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Marco d'Itri @ 2006-01-18 19:49 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
On Jan 18, Michele Barbiero <michele.barbiero@gmail.com> wrote:
> > Because the "official hotplug" package is dead and not actively
> > maintained anymore and sane distributions switched to udev.
> It's a modules problem (hotplug), not device one (udev).
It's not.
--
ciao,
Marco
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: scsi.agent trouble: load more than module per TYPE
2006-01-18 17:25 scsi.agent trouble: load more than module per TYPE Michele Barbiero
` (2 preceding siblings ...)
2006-01-18 19:49 ` Marco d'Itri
@ 2006-01-18 20:09 ` Patrick Mansfield
2006-01-18 20:16 ` Marco d'Itri
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Patrick Mansfield @ 2006-01-18 20:09 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jan 18, 2006 at 08:45:23PM +0100, Michele Barbiero wrote:
> On Wed, 18 Jan 2006 20:16:21 +0100
> md@Linux.IT (Marco d'Itri) wrote:
>
> [Cut]
> > Because the "official hotplug" package is dead and not actively
> > maintained anymore and sane distributions switched to udev.
>
> It's a modules problem (hotplug), not device one (udev).
It is a module problem solved via udev rules.
IMHO, sg should still be loaded for all scsi devices, especially for
ones that have an odd (such as enclousre or raid) or unknown type. Looks
like only SUSE does it this way.
[Yeh ... you can use sr/st/sd for SG_IO.]
[kernel udev]$ grep "sg" etc/udev/*/* | grep modprobe
etc/udev/debian/hotplug.rules:SUBSYSTEM="scsi_device", SYSFS{type}="[235689]", RUN+="/sbin/modprobe sg"
etc/udev/redhat/udev.rules: RUN+="/sbin/modprobe sg"
etc/udev/suse/50-udev-default.rules:SUBSYSTEM="scsi_device", ACTION="add", RUN+="/sbin/modprobe sg"
The redhat line is only for SYSFS{type}="[23689]".
Types (per scsi.h) are:
#define TYPE_DISK 0x00
#define TYPE_TAPE 0x01
#define TYPE_PRINTER 0x02
#define TYPE_PROCESSOR 0x03 /* HP scanners use this */
#define TYPE_WORM 0x04 /* Treated as ROM by our system */
#define TYPE_ROM 0x05
#define TYPE_SCANNER 0x06
#define TYPE_MOD 0x07 /* Magneto-optical disk */
#define TYPE_MEDIUM_CHANGER 0x08
#define TYPE_COMM 0x09 /* Communications device */
#define TYPE_RAID 0x0c
#define TYPE_ENCLOSURE 0x0d /* Enclosure Services Device */
#define TYPE_RBC 0x0e
-- Patrick Mansfield
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: scsi.agent trouble: load more than module per TYPE
2006-01-18 17:25 scsi.agent trouble: load more than module per TYPE Michele Barbiero
` (3 preceding siblings ...)
2006-01-18 20:09 ` Patrick Mansfield
@ 2006-01-18 20:16 ` Marco d'Itri
2006-01-18 21:05 ` Patrick Mansfield
2006-01-19 3:58 ` Andrey Borzenkov
6 siblings, 0 replies; 8+ messages in thread
From: Marco d'Itri @ 2006-01-18 20:16 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 380 bytes --]
On Jan 18, Patrick Mansfield <patmans@us.ibm.com> wrote:
> IMHO, sg should still be loaded for all scsi devices, especially for
> ones that have an odd (such as enclousre or raid) or unknown type. Looks
> like only SUSE does it this way.
Nobody ever opened a bug suggesting to do it differently, so I did not
bother changing the rules used by Debian.
--
ciao,
Marco
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: scsi.agent trouble: load more than module per TYPE
2006-01-18 17:25 scsi.agent trouble: load more than module per TYPE Michele Barbiero
` (4 preceding siblings ...)
2006-01-18 20:16 ` Marco d'Itri
@ 2006-01-18 21:05 ` Patrick Mansfield
2006-01-19 3:58 ` Andrey Borzenkov
6 siblings, 0 replies; 8+ messages in thread
From: Patrick Mansfield @ 2006-01-18 21:05 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jan 18, 2006 at 09:16:50PM +0100, Marco d'Itri wrote:
> On Jan 18, Patrick Mansfield <patmans@us.ibm.com> wrote:
>
> > IMHO, sg should still be loaded for all scsi devices, especially for
> > ones that have an odd (such as enclousre or raid) or unknown type. Looks
> > like only SUSE does it this way.
> Nobody ever opened a bug suggesting to do it differently, so I did not
> bother changing the rules used by Debian.
If you don't want to always load sg, at least load sg if no other driver
is loaded for the scsi device. That might even be better than always
loading it (sort of force SG_IO users to use /dev/sd ...).
I don't know why sr_mod is loaded for type 3 (processor), unless you have
patched sr.c sr_probe(), sr only attaches to 5 (TYPE_ROM) and 4
(TYPE_WORM).
So use (for debian at least, not tested at all):
SUBSYSTEM="scsi_device", SYSFS{type}!="[0|1|4|5|7|14]", RUN+="/sbin/modprobe sg"
-- Patrick Mansfield
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: scsi.agent trouble: load more than module per TYPE
2006-01-18 17:25 scsi.agent trouble: load more than module per TYPE Michele Barbiero
` (5 preceding siblings ...)
2006-01-18 21:05 ` Patrick Mansfield
@ 2006-01-19 3:58 ` Andrey Borzenkov
6 siblings, 0 replies; 8+ messages in thread
From: Andrey Borzenkov @ 2006-01-19 3:58 UTC (permalink / raw)
To: linux-hotplug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 19 January 2006 00:05, Patrick Mansfield wrote:
> On Wed, Jan 18, 2006 at 09:16:50PM +0100, Marco d'Itri wrote:
> > On Jan 18, Patrick Mansfield <patmans@us.ibm.com> wrote:
> > > IMHO, sg should still be loaded for all scsi devices, especially for
> > > ones that have an odd (such as enclousre or raid) or unknown type.
> > > Looks like only SUSE does it this way.
> >
> > Nobody ever opened a bug suggesting to do it differently, so I did not
> > bother changing the rules used by Debian.
>
> If you don't want to always load sg, at least load sg if no other driver
> is loaded for the scsi device.
I guess it makes sense. We need handle to speak with SCSI device and sg looks
like the right one in this case.
- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFDzw5fR6LMutpd94wRAtR/AJ0aT8LZy7pzlU5pSWcaGJLjXst0JACfeFaV
d0YuQeg57ntXd5n4vzL1wsA=4hqD
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-01-19 3:58 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-18 17:25 scsi.agent trouble: load more than module per TYPE Michele Barbiero
2006-01-18 19:16 ` Marco d'Itri
2006-01-18 19:45 ` Michele Barbiero
2006-01-18 19:49 ` Marco d'Itri
2006-01-18 20:09 ` Patrick Mansfield
2006-01-18 20:16 ` Marco d'Itri
2006-01-18 21:05 ` Patrick Mansfield
2006-01-19 3:58 ` Andrey Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).