hotplug II / mdev discussion and implementation

Yes, the idea is, that the mdec isn't in trunk yet.
 
A few findings:

- the file mdev_my_uuid.patch seems personal to you
- build fails with:
Code:
  setup mdev boot sequence
    applying patch file ./patches/cond/mdev_fstab.patch
    patching file etc/fstab
    Hunk #1 FAILED at 3.
    1 out of 1 hunk FAILED -- saving rejects to file etc/fstab.rej

contents of fstab.rej
Code:
***************
*** 3,7 ****
  # <file system> <mount point>   <type>  <options>               <dump>  <pass>
  proc            /proc           proc    nosuid,nodev,noexec     0       0
  tmpfs           /var            tmpfs   defaults                0       0
- sysfs           /sys            sysfs   nosuid,nodev,noexec     0       0
- none            /dev/shm        tmpfs   nosuid,nodev,noexec     0       0
--- 3,5 ----
  # <file system> <mount point>   <type>  <options>               <dump>  <pass>
  proc            /proc           proc    nosuid,nodev,noexec     0       0
  tmpfs           /var            tmpfs   defaults                0       0

Could you be a little more informative? Which freetz version are you using? This seems to work fine against 2524...
 
I can not find mdev in menuconfig.
Only starting with char 'm':
madplay
Matrixtunnel
microperl
module-init-tools

Any ideas ?
Got it: make/mdev/Config.in says only
depends on FREETZ_TYPE_FON_WLAN_7270

Is it not possible for 7141 ?

Did you apply all the patches in the very first posting? I think you forgot one...
 
Could you be a little more informative? Which freetz version are you using? This seems to work fine against 2524...

After looking at the freetz timeline, it's seems as if r2525 introduces a change to fstab that adversely effects the patches/cond/mdev_fstab.patch.

Will be fixed in the next mdev version...
 
The build was against r2525, for a 7170, with usbroot selected as well.
The source fstab file does not contain the line that mounts /dev/shm.

When the patch file is changed (re-diffed) the build fails a little later with:
Code:
  applying usb prepare fwupgrade patch
    applying patch file ./patches/cond/mdev_prepare_fwupgrade.patch
    patching file bin/prepare_fwupgrade
    Hunk #1 FAILED at 75.
    1 out of 1 hunk FAILED -- saving rejects to file bin/prepare_fwupgrade.rej
    ----------------------------------------------------------------------
ERROR: modpatch: Error in patch-file ./patches/cond/mdev_prepare_fwupgrade.patch
make: *** [firmware-nocompile] Fout 2
Analysis learned that the patch expects the context of the change to start at line 75, whereas this context actually starts at line 32 (both under build/orginal as under build/modified).

It seems you've diffed against another (older) revision.
 
The build was against r2525, for a 7170, with usbroot selected as well.
Analysis learned that the patch expects the context of the change to start at line 75, whereas this context actually starts at line 32 (both under build/orginal as under build/modified).

It seems you've diffed against another (older) revision.

As I have stated, the patches were generated against r2524. The second patching error may be solved by turning up the fuzz factor (-F) in patch (w/o guaranty).
 
As I have stated, the patches were generated against r2524. The second patching error may be solved by turning up the fuzz factor (-F) in patch (w/o guaranty).
Je sais, merci.
BTW. the indenting also differs. Of coarse these are all temporary deviations that will be resolved once the mdev stuff is added to the trunk. Hope that your excellent work will be accepted very soon.

Another thing. The mdev hotplug setup provides for running start and stop actions. Currently the trunk contain a patch that may be selected that accomplishes about the same functionality, though a bit less sophisticated. These two functions should be merged.
The late addition to the trunk called "external" also provides some functionality that borders on the hotplug mechanisms available; it seems logical that the mdev hotplug system will impact such functions. (I do not plan to make use of "external" though).
P
 
Version 0.6.2 released.

retracted

olistudent was kind enough to warn about a few discrepancies, to fast for my own good:-Ö
 
Zuletzt bearbeitet:
Code:
 1044 root      1212 S    -/bin/sh
 1107 root         0 SW<  [scsi_eh_0]
 1108 root         0 SW<  [usb-storage]
 1132 root      1192 S <  /sbin/mdev block
 1134 root      1192 S <  sh -c /lib/mdev/block/partition
 1135 root      1208 S <  /bin/sh /lib/mdev/block/partition
 1201 root      1208 S <  /bin/sh /lib/mdev/block/partition
 1203 root      1188 S <  logger -t partition[1135] -p local0.error
 1276 root      1192 R    ps
MfG Oliver
 
@oliver
I'm not sure about the meaning of your post.
Should those mdev related processes not wait with high priority, or does this (yours) ps listing imply that the processes do not complete whereas they should?
 
This processes keep hanging around and every time I put the stick on again I get some more...

MfG Oliver
 
This processes keep hanging around and every time I put the stick on again I get some more...

On top of a hotplug event handling call stack is always mdev itself (I assume). One wonders whether the program flow returns to mdev or blocks somewhere down on the stack. Stange is that the last command (in Olivers ps listing) that's in a suspended program state (i.e. blocked) is logger!

The flow of events and handlers is complex, but the mdev hotplug chain is pretty well coded. Inspection of the code, e.g. .../block/partition, does not reveal (to me) what what could cause the processes not to complete.
One may assume that mdev as a hotplug event handler is re-entrant. If so, a non-completing handling of an hotplug event has limited side effects. Still one does want event handling to complete nicely in order not to starve the system resources. Anyone has an idea?

Paul
(At the moment I cannot test the mdev stuff on my hardware, sorry).
 
Zuletzt bearbeitet:
Code:
 1044 root      1212 S    -/bin/sh
 1107 root         0 SW<  [scsi_eh_0]
 1108 root         0 SW<  [usb-storage]
 1132 root      1192 S <  /sbin/mdev block
 1134 root      1192 S <  sh -c /lib/mdev/block/partition
 1135 root      1208 S <  /bin/sh /lib/mdev/block/partition
 1201 root      1208 S <  /bin/sh /lib/mdev/block/partition
 1203 root      1188 S <  logger -t partition[1135] -p local0.error
 1276 root      1192 R    ps
MfG Oliver

olistudent had written these effects to me just after I released the last version (now unavailable). I had noticed the process groups always end with 'logger'. It would be interesting if olistudent could dispatch any logger command successfully on the command line.

@olistudent I wonder do you have syslogd running? And if the socket for /dev/log (?) is o.k.

I never had this problem.
 
One may assume that mdev as a hotplug event handler is re-entrant. If so, a non-completing handling of an hotplug event has limited side effects.

Yes, the complete mdev configuration is conceptually a re-entrant. There are, however two places where different process groups could converge:
1) handling of devmap (reporting to avm web pages, in /lib/mdev/interface)
2) sessions when more than one partition is linked with a concurrent service

During event triggering, mdev may be seen as a mapping dispatcher. At each event the kernel forks off a copy of mdev which discovers and eventually creates/deletes nodes. Depending upon configured node behavior a script/program will executed before/after (or both) node creation/deletion.
Each action may trigger further events. In this mode mdev works concurrently.

Scanning works a bit differently. The mdev offered here, scans /sys for dev (stock) and modalias (patched for ohio) files. At each edge, mdev performs the actions as described above. In this mode mdev works sequentially. After discovery and initial execution further events work as stated above.
 
I'm logging to syslog circular buffer.
 
problems with usb hub(s) recognizing usb stick/disk

Hi,

i have a 7270 with firmware 54.04.59freetz-devel-2723M and added mdev 0.6.2. No other modifications were made to the mdev files (did I miss something?).

I want to add a usb stick (3 partitions) and a 3,5'' usb 2.0 disk (1 vfat partition) to a usb hub.
A) Result für USB 1.1 hub:
1. usb-stick works. All 3 Partition (2 data, 1 swap) are recognized and mounted
2. usb-disk does not work
3. unmounting usb-stick, remove and re-insert does not work, because the old mountpoint-directory had not been removed -> no new mount.

B)Result für USB 2.0 hub:
1. usb-stick does not work
2. usb-disk does not work

C.) usb-disk directly in fbf works.

Any idea, what I can do?

Output A)1.
Code:
Nov 13 22:19:20 fritz local0.info usbcontrol[4305]: 1-1 usb hub device
Nov 13 22:19:45 fritz local0.info usbcontrol[4319]: add 1-1 ALCOR Generic USB Hub
Nov 13 22:19:45 fritz local0.info usbcontrol[4319]: 1-1 usb hub device
Nov 13 22:19:55 fritz local0.info usbcontrol[4353]: add 1-1.2 Generic Flash Disk
Nov 13 22:19:55 fritz local0.info usbcontrol[4353]: 1-1.2 transparent scsi mass storage device
Nov 13 22:19:56 fritz local0.info mdevmodule[4375]: add module chain sd_mod sg
Nov 13 22:20:01 fritz local0.info partition[4419]: swap activated on '/dev/sda3'
Nov 13 22:20:02 fritz local0.info partition[4408]: created mount point '/var/media/ftp/uStora1'
Nov 13 22:20:02 fritz local0.info partition[4408]: starting e2fsck on '/dev/sda1'
Nov 13 22:20:02 fritz local0.info partition[4413]: created mount point '/var/media/ftp/uStora2'
Nov 13 22:20:02 fritz local0.info partition[4413]: starting e2fsck on '/dev/sda2'
Nov 13 22:20:03 fritz local0.info partition[4413]: FREETZ_ADDON: clean, 1443/24192 files, 96386/96388 blocks
Nov 13 22:20:03 fritz local0.info partition[4408]: FREETZ: clean, 391/24096 files, 30561/96356 blocks
Nov 13 22:20:03 fritz local0.info partition[4413]: mounted '/dev/sda2' on '/var/media/ftp/uStora2' with 'noatime,nodiratime'
Nov 13 22:20:03 fritz local0.info partition[4408]: mounted '/dev/sda1' on '/var/media/ftp/uStora1' with 'noatime,nodiratime'
Nov 13 22:20:03 fritz local0.info partition[4413]: not starting any services on '/var/media/ftp/uStora2'
Nov 13 22:20:03 fritz local0.info partition[4408]: not starting any services on '/var/media/ftp/uStora1'

Output A) 2.
Code:
Nov 13 22:51:45 fritz local0.info usbcontrol[6617]: 1-1 usb hub device
Nov 13 22:51:47 fritz local0.info usbcontrol[6635]: add 1-1 ALCOR Generic USB Hub
Nov 13 22:51:47 fritz local0.info usbcontrol[6635]: 1-1 usb hub device

Output A) 3.
Code:
Nov 13 22:24:46 fritz local0.info usbcontrol[5513]: add 1-1 ALCOR Generic USB Hub
Nov 13 22:24:46 fritz local0.info usbcontrol[5513]: 1-1 usb hub device
Nov 13 22:24:46 fritz local0.info usbcontrol[5530]: add 1-1.2 Generic Flash Disk
Nov 13 22:24:46 fritz local0.info usbcontrol[5530]: 1-1.2 transparent scsi mass storage device
Nov 13 22:24:46 fritz local0.info mdevmodule[5552]: add module chain sd_mod sg
Nov 13 22:24:52 fritz local0.err partition[5603]: mount point '/var/media/ftp/uStora1' already exists
Nov 13 22:24:52 fritz local0.err partition[5608]: mount point '/var/media/ftp/uStora2' already exists
Nov 13 22:24:52 fritz local0.info partition[5613]: swap activated on '/dev/sda3'

Output B)1.
Code:
Nov 13 22:18:11 fritz local0.info usbcontrol[3719]: add 1-1 05e3 USB2.0 Hub
Nov 13 22:18:11 fritz local0.info usbcontrol[3719]: 1-1 usb hub device
Nov 13 22:18:12 fritz local0.info usbcontrol[3734]: add 1-1.4 Generic Flash Disk
Nov 13 22:18:12 fritz local0.info usbcontrol[3734]: 1-1.4 transparent scsi mass storage device
Nov 13 22:18:12 fritz local0.info mdevmodule[3757]: add module chain sd_mod sg
Nov 13 22:18:29 fritz user.warn kernel: printk: 4 messages suppressed.
Nov 13 22:18:37 fritz local0.info usbcontrol[4039]: remove 1-1.4  
Nov 13 22:18:37 fritz local0.info usbcontrol[4039]: 1-1.4 transparent scsi mass storage device
Nov 13 22:18:37 fritz local0.info mdevmodule[4029]: remove module chain sg sd_mod
Output B) 2.
Code:
Nov 13 22:18:55 fritz local0.info usbcontrol[4118]: add 1-1.4    
Nov 13 22:18:55 fritz local0.info usbcontrol[4118]: 1-1.4 transparent scsi mass storage device

Nov 13 22:18:55 fritz local0.info mdevmodule[4140]: add module chain sd_mod sg

Output C)
Code:
Nov 14 06:19:15 fritz local0.info usbcontrol[14743]: add 1-1
Nov 14 06:19:15 fritz local0.info usbcontrol[14743]: 1-1 transparent scsi mass storage device
Nov 14 06:19:20 fritz local0.info partition[14773]: created mount point '/var/media/ftp/uStorb1'
Nov 14 06:19:21 fritz local0.info partition[14773]: mounted '/dev/sdb1' on '/var/media/ftp/uStorb1' with 'rw,uid=1000,gid=0,fmask=0000,dmask=0000'
Nov 14 06:19:21 fritz local0.info partition[14773]: not starting any services on '/var/media/ftp/uStorb1'
 
Zuletzt bearbeitet:

Zurzeit aktive Besucher

Statistik des Forums

Themen
244,868
Beiträge
2,219,770
Mitglieder
371,584
Neuestes Mitglied
porcupine
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.