Package: hotplug
Version: 0.0.20040329-22
Severity: wishlist

I have a digital camera (nikon coolpix) that stores pictures on CF 
cards. The camera has an usb interface, with the usb-storage driver
I can mount the camera's CF card as my /dev/sda1 drive. This works fine
with hotplug.

There is one small issue when using multiple CF cards with different 
sizes though: if I power off the camera, change the CF card and power it 
back on, the kernel does not figure out that the /dev/sda drive size has
changed, and this leads to errors when trying to mount /dev/sda1 again.

As a workaround, I came up with the following script in 
/etc/hotplug/usb/usb-storage:
#! /bin/sh
# Local script - re-detect USB storage card capacity.
echo "scsi remove-single-device 0 0 0 0" >/proc/scsi/scsi
echo "scsi add-single-device 0 0 0 0" >/proc/scsi/scsi

This works fine for my setup - however, I'll agree that the 0 0 0 0 
parameters are really specific and should ideally be auto-detected in 
some way (this is probably doable by parsing some files in /proc).

Is there an architectural reason why such functionality should not be 
integrated in the default hotplug scripts ?

Cheers,

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.30
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages hotplug depends on:
ii  bash                         2.05b-26    The GNU Bourne Again SHell
ii  debconf                      1.4.30.13   Debian configuration management sy
ii  grep                         2.5.1.ds1-4 GNU grep, egrep and fgrep
ii  modutils                     2.4.26-1.2  Linux module utilities
ii  procps                       1:3.2.1-2   The /proc file system utilities
ii  sed                          4.1.2-8     The GNU sed stream editor

-- debconf information:
  hotplug/ignore_pci_class_display: true
  hotplug/net_agent_policy: hotplug
* hotplug/usb_keyboard:
  hotplug/static_module_list:
  hotplug/x11_usbmice_hack: false


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to