Sony-Ericsson K850i Support - Slackware

This is a discussion on Sony-Ericsson K850i Support - Slackware ; Irritating one, Ubuntu (Gutsy) is beating Slackware (12.0): When I plug in my K850 I should have two drives show up, an internal memory and a memory card, and in Ubuntu this is what happens, but in Slackware I just ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Sony-Ericsson K850i Support

  1. Sony-Ericsson K850i Support

    Irritating one, Ubuntu (Gutsy) is beating Slackware (12.0):

    When I plug in my K850 I should have two drives show up, an internal
    memory and a memory card, and in Ubuntu this is what happens, but in
    Slackware I just get the internal drive.

    Looking at the dmesg output it seems like it's trying to register the
    two drives to the same place, is that a kernel/driver issue or a system
    setting at fault?

    Some possible relevant data:

    Kernel:
    slack: 2.6.21.5
    ubuntu: 2.6.22.16

    dmesg:
    slack (that kobject line looks interesting):

    usb 1-6: new high speed USB device using ehci_hcd and address 7
    usb 1-6: configuration #2 chosen from 1 choice
    scsi8 : SCSI emulation for USB Mass Storage devices
    usb-storage: device found at 7
    usb-storage: waiting for device to settle before scanning
    kobject_add failed for usb_storage with -EEXIST, don't try to register
    things with the same name in the same directory.
    [] kobject_shadow_add+0x117/0x1a0
    [] mod_sysfs_setup+0x24/0xb0
    [] sys_init_module+0x1648/0x1940
    [] syscall_call+0x7/0xb
    =======================
    scsi 8:0:0:0: Direct-Access Sony Eri Memory Stick 0 PQ: 0 ANSI: 0
    sd 8:0:0:0: Attached scsi removable disk sdb
    sd 8:0:0:0: Attached scsi generic sg1 type 0
    usb-storage: device scan complete
    SCSI device sdb: 78997 512-byte hdwr sectors (40 MB)
    sdb: test WP failed, assume Write Enabled
    sdb: assuming drive cache: write through
    SCSI device sdb: 78997 512-byte hdwr sectors (40 MB)
    sdb: test WP failed, assume Write Enabled
    sdb: assuming drive cache: write through
    sdb: sdb1

    ubuntu:

    [13642.620000] usb 7-1: new high speed USB device using ehci_hcd and
    address 5
    [13642.756000] usb 7-1: configuration #2 chosen from 1 choice
    [13642.760000] scsi6 : SCSI emulation for USB Mass Storage devices
    [13642.760000] usb-storage: device found at 5
    [13642.760000] usb-storage: waiting for device to settle before scanning
    [13647.760000] usb-storage: device scan complete
    [13647.760000] scsi 6:0:0:0: Direct-Access Sony Eri Memory Stick
    0 PQ: 0 ANSI: 0
    [13647.760000] scsi 6:0:0:1: Direct-Access Sony Eri Memory Stick
    0 PQ: 0 ANSI: 0
    [13647.764000] sd 6:0:0:0: [sdc] Attached SCSI removable disk
    [13647.764000] sd 6:0:0:0: Attached scsi generic sg3 type 0
    [13647.764000] sd 6:0:0:1: [sdd] Attached SCSI removable disk
    [13647.764000] sd 6:0:0:1: Attached scsi generic sg4 type 0
    [13651.932000] sd 6:0:0:1: [sdd] 960512 512-byte hardware sectors (492 MB)
    [13651.936000] sd 6:0:0:1: [sdd] Test WP failed, assume Write Enabled
    [13651.936000] sd 6:0:0:1: [sdd] Assuming drive cache: write through
    [13651.936000] sd 6:0:0:1: [sdd] 960512 512-byte hardware sectors (492 MB)
    [13651.936000] sd 6:0:0:1: [sdd] Test WP failed, assume Write Enabled
    [13651.936000] sd 6:0:0:1: [sdd] Assuming drive cache: write through
    [13651.936000] sdd: sdd1
    [13651.964000] sd 6:0:0:0: [sdc] 78997 512-byte hardware sectors (40 MB)
    [13651.976000] sd 6:0:0:0: [sdc] Test WP failed, assume Write Enabled
    [13651.976000] sd 6:0:0:0: [sdc] Assuming drive cache: write through
    [13651.976000] sd 6:0:0:0: [sdc] 78997 512-byte hardware sectors (40 MB)
    [13651.976000] sd 6:0:0:0: [sdc] Test WP failed, assume Write Enabled
    [13651.976000] sd 6:0:0:0: [sdc] Assuming drive cache: write through
    [13651.976000] sdc: sdc1

    blkid:
    slack:

    /dev/sdb1: SEC_TYPE="msdos" LABEL="PHONE" UUID="489A-0044" TYPE="vfat"

    ubuntu:

    /dev/sdc1: SEC_TYPE="msdos" LABEL="PHONE" UUID="489A-08E1" TYPE="vfat"
    /dev/sdd1: SEC_TYPE="msdos" LABEL="PHONE CARD" UUID="489A-08D0" TYPE="vfat"

    Blumf

  2. Re: Sony-Ericsson K850i Support

    Blumf wrote:
    > When I plug in my K850 I should have two drives show up, an internal
    > memory and a memory card, and in Ubuntu this is what happens, but in
    > Slackware I just get the internal drive.


    Could it be that the two drives share the same SCSI ID but are on
    different LUNs? If so it might help to run /etc/rc.d/rc.scanluns to find
    both drives. If this helps and you don't want to manually run this script
    every time you plug in your phone you can choose between writing an udev
    rule which runs the script when the phone is plugged in or recompile your
    kernel to scan all luns from the beginning.

    regards Henrik
    --
    The address in the header is only to prevent spam. My real address is:
    hc3(at)poolhem.se Examples of addresses which go to spammers:
    root@localhost postmaster@localhost


  3. Re: Sony-Ericsson K850i Support

    Henrik Carlqvist wrote:
    > Blumf wrote:
    >> When I plug in my K850 I should have two drives show up, an internal
    >> memory and a memory card, and in Ubuntu this is what happens, but in
    >> Slackware I just get the internal drive.

    >
    > Could it be that the two drives share the same SCSI ID but are on
    > different LUNs? If so it might help to run /etc/rc.d/rc.scanluns to find
    > both drives. If this helps and you don't want to manually run this script
    > every time you plug in your phone you can choose between writing an udev
    > rule which runs the script when the phone is plugged in or recompile your
    > kernel to scan all luns from the beginning.


    That indeed fixes the issue, thanks. Can you give me any pointers on how
    to write a udev rule for this?

    Blumf

  4. Re: Sony-Ericsson K850i Support

    Blumf wrote:
    > That indeed fixes the issue, thanks. Can you give me any pointers on how
    > to write a udev rule for this?


    I have no experience from your phone, but I can give you a pointer which
    describes how I wrote an udev rule to automatically connect to internet
    when an USB 3G modem is connected to the computer:

    http://www.poolhem.se/E220/

    regards Henrik
    --
    The address in the header is only to prevent spam. My real address is:
    hc3(at)poolhem.se Examples of addresses which go to spammers:
    root@localhost postmaster@localhost


  5. Re: Sony-Ericsson K850i Support

    Henrik Carlqvist wrote:
    > Blumf wrote:
    >> That indeed fixes the issue, thanks. Can you give me any pointers on how
    >> to write a udev rule for this?

    >
    > I have no experience from your phone, but I can give you a pointer which
    > describes how I wrote an udev rule to automatically connect to internet
    > when an USB 3G modem is connected to the computer:


    I've done some proper digging, it is the kernel setting for scanning all
    LUNs that is not set in Slack's kernel (grep /proc/config.gz for
    'CONFIG_SCSI_MULTI_LUN'), so that would seem to be the proper way to fix
    this. (Anybody know if there are any issues with having this set? Would
    it be worth asking Pat to turn it on as standard in future Slack releases?)

    However I couldn't be bothered to rebuild the kernel at the moment, so I
    did a little reading on udev and put the following in a new file:
    /etc/udev/rules.d/10-sony_ericsson.rules

    SYSFS{idVendor}=="0fce", SYSFS{idProduct}=="e075",
    RUN+="/etc/rc.d/rc.scanluns"

    (all one line)

    Could probably improve on that a lot (e.g. rc.scanluns just runs
    rescan-scsi-bus with only the '-l' argument, which scans all buses), but
    it's simple and it works.

    Blumf

  6. Re: Sony-Ericsson K850i Support

    Blumf wrote:
    > I've done some proper digging, it is the kernel setting for scanning all
    > LUNs that is not set in Slack's kernel (grep /proc/config.gz for
    > 'CONFIG_SCSI_MULTI_LUN'), so that would seem to be the proper way to fix
    > this. (Anybody know if there are any issues with having this set? Would
    > it be worth asking Pat to turn it on as standard in future Slack releases?)


    Then you're not running on 12.1 yet!
    From the 12.1 ChangeLog.txt file:

    a/kernel-generic-2.6.24.3-i486-2.tgz: After much debate, the kernels
    have been recompiled with the CONFIG_SCSI_MULTI_LUN option enabled.
    This was tried once and caused problems for real SCSI systems, but
    that really was many years ago and it's so handy to have this feature
    for multi-LUN card readers that we're going to try enabling this again.
    Please report any problems.

    and also:

    a/sysvinit-scripts-1.2-noarch-18.tgz: Removed /etc/rc.d/rc.scanluns.


    So your solutions HAS already been implemented in Slackware 12.1.
    Haven't tested it with "real SCSI systems" yet (I haven't got any with
    multiple luns, it works fine with single-lun devices).

    > Could probably improve on that a lot (e.g. rc.scanluns just runs
    > rescan-scsi-bus with only the '-l' argument, which scans all buses),


    Not all buses (it alreay does that), but all LUN's - even devices
    with "more than one LUN" (like Memory sticks with multiple disks
    and multi-card readers).

    See the comments in the beginning of the rescan-scsi-bus script.

    PS: it seems that the CONFIG_SCSI_MULTI_LUN kernel option also
    revealed an error IN this script.
    --
    ************************************************** *****************
    ** Eef Hartman, Delft University of Technology, dept. SSC/ICT **
    ** e-mail: E.J.M.Hartman@tudelft.nl, fax: +31-15-278 7295 **
    ** snail-mail: P.O. Box 5031, 2600 GA Delft, The Netherlands **
    ************************************************** *****************

  7. Re: Sony-Ericsson K850i Support

    Eef Hartman wrote:
    > Blumf wrote:
    >> I've done some proper digging, it is the kernel setting for scanning all
    >> LUNs that is not set in Slack's kernel (grep /proc/config.gz for
    >> 'CONFIG_SCSI_MULTI_LUN'), so that would seem to be the proper way to fix
    >> this. (Anybody know if there are any issues with having this set? Would
    >> it be worth asking Pat to turn it on as standard in future Slack releases?)

    >
    > Then you're not running on 12.1 yet!
    > From the 12.1 ChangeLog.txt file:

    [snip]

    Well, so much for me not bothering to upgrade when 12.1 came out.
    "There's nothing I particularly need in it" I thought

    >> Could probably improve on that a lot (e.g. rc.scanluns just runs
    >> rescan-scsi-bus with only the '-l' argument, which scans all buses),

    >
    > Not all buses (it alreay does that), but all LUN's - even devices
    > with "more than one LUN" (like Memory sticks with multiple disks
    > and multi-card readers).


    I know, but it does scan all buses, hence I get various messages like:

    ata1: exception Emask 0x52 SAct 0x0 SErr 0xffffffff action 0x6
    ata1: hard resetting port
    ata1: SATA link down (SStatus 0 SControl 3F0)
    ATA: abnormal status 0x7F on port 0x0001ec07
    ata1: EH complete
    ....etc

    As well as it taking longer than it needs too.

    Blumf

  8. Re: Sony-Ericsson K850i Support

    I've a similar problem on Ubuntu with Sony Ericsson G502 (a similar A200 v1 / db3150 phone).

    However, Ubuntu doesn't have /etc/rc.d/rc.scanluns and I can't find any equivalent

    Note that my Ubuntu behaves a bit randomly.
    * It sometimes detects sdb and does not detect sdc.
    * It sometimes does not detect anything.
    * It sometimes works OK.

    Note that I don't use Gnome. I use Openbox. I don't know if Gnome launches any related daemon.

+ Reply to Thread