# Sony USB camera and linux 2.6

## maKKus

I'm unable to get my Sony DSC-P5 digital camera to connect linux 2.6. I tried it with several build (test6-mm as latest) but it doesn't work. 

Here is what de message is telling me, does anybody has a clue?

hub 4-0:1.0: new USB device on port 2, assigned address 2

usb-storage: USB Mass Storage device detected

usb-storage: act_altsetting is 0, id_index is 23

usb-storage: -- associate_dev

usb-storage: Vendor: Sony

usb-storage: Product: DSC-S30/S70/S75/505V/F505/F707/F717/P8

usb-storage: Transport: Control/Bulk

usb-storage: Protocol: Transparent SCSI

usb-storage: Endpoints: In: 0xee272f14 Out: 0xee272f00 Int: 0xee272f28 (Period 2 55)

usb-storage: *** thread sleeping.

scsi1 : SCSI emulation for USB Mass Storage devices

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command INQUIRY (6 bytes)

usb-storage:  12 00 00 00 24 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code 0; transferred 6/6

usb-storage: -- transfer complete

usb-storage: Call to usb_stor_ctrl_transfer() returned 0

usb-storage: usb_stor_bulk_transfer_buf: xfer 36 bytes

usb-storage: Status code 0; transferred 36/36

usb-storage: -- transfer complete

usb-storage: CB data stage result is 0x0

usb-storage: -- CB transport device requiring auto-sense

usb-storage: Issuing auto-REQUEST_SENSE

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code 0; transferred 6/6

usb-storage: -- transfer complete

usb-storage: Call to usb_stor_ctrl_transfer() returned 0

usb-storage: usb_stor_bulk_transfer_buf: xfer 18 bytes

usb-storage: Status code 0; transferred 18/18

usb-storage: -- transfer complete

usb-storage: CB data stage result is 0x0

usb-storage: -- Result from auto-sense is 0

usb-storage: -- code: 0x70, key: 0x0, ASC: 0x0, ASCQ: 0x0

usb-storage: (Unknown Key): (unknown ASC/ASCQ)

usb-storage: Fixing INQUIRY data to show SCSI rev 2 - was 0

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

  Vendor: Sony      Model: Sony DSC          Rev: 3.28

  Type:   Direct-Access                      ANSI SCSI revision: 02

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command TEST_UNIT_READY (6 bytes)

usb-storage:  00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code 0; transferred 6/6

usb-storage: -- transfer complete

usb-storage: Call to usb_stor_ctrl_transfer() returned 0

usb-storage: -- CB transport device requiring auto-sense

usb-storage: Issuing auto-REQUEST_SENSE

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code 0; transferred 6/6

usb-storage: -- transfer complete

usb-storage: Call to usb_stor_ctrl_transfer() returned 0

usb-storage: usb_stor_bulk_transfer_buf: xfer 18 bytes

usb-storage: Status code 0; transferred 18/18

usb-storage: -- transfer complete

usb-storage: CB data stage result is 0x0

usb-storage: -- Result from auto-sense is 0

usb-storage: -- code: 0x70, key: 0x0, ASC: 0x0, ASCQ: 0x0

usb-storage: (Unknown Key): (unknown ASC/ASCQ)

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command READ_CAPACITY (10 bytes)

usb-storage:  25 00 00 00 00 00 00 00 00 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code 0; transferred 10/10

usb-storage: -- transfer complete

usb-storage: Call to usb_stor_ctrl_transfer() returned 0

usb-storage: usb_stor_bulk_transfer_buf: xfer 8 bytes

usb-storage: Status code 0; transferred 8/8

usb-storage: -- transfer complete

usb-storage: CB data stage result is 0x0

usb-storage: -- CB transport device requiring auto-sense

usb-storage: Issuing auto-REQUEST_SENSE

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=6

usb-storage: Status code 0; transferred 6/6

usb-storage: -- transfer complete

usb-storage: Call to usb_stor_ctrl_transfer() returned 0

usb-storage: usb_stor_bulk_transfer_buf: xfer 18 bytes

usb-storage: Status code 0; transferred 18/18

usb-storage: -- transfer complete

usb-storage: CB data stage result is 0x0

usb-storage: -- Result from auto-sense is 0

usb-storage: -- code: 0x70, key: 0x0, ASC: 0x0, ASCQ: 0x0

usb-storage: (Unknown Key): (unknown ASC/ASCQ)

usb-storage: scsi cmd done, result=0x0

usb-storage: *** thread sleeping.

SCSI device sda: 253696 512-byte hdwr sectors (130 MB)

usb-storage: queuecommand called

usb-storage: *** thread awakened.

usb-storage: Command MODE_SENSE_10 (10 bytes)

usb-storage:  5a 00 3f 00 00 00 00 00 08 00

usb-storage: usb_stor_ctrl_transfer: rq=00 rqtype=21 value=0000 index=00 len=10

usb-storage: Status code 0; transferred 10/10

usb-storage: -- transfer complete

usb-storage: Call to usb_stor_ctrl_transfer() returned 0

usb-storage: usb_stor_bulk_transfer_buf: xfer 8 bytes

usb-storage: Status code -75; transferred 8/8

usb-storage: -- babble

usb-storage: CB data stage result is 0x3

usb-storage: -- transport indicates error, resetting

usb-storage: usb_stor_CB_reset called

usb-storage: usb_stor_control_msg: rq=00 rqtype=21 value=0000 index=00 len=12

----------

## pjp

Moved from Installing Gentoo.

----------

## Beekster

Found a patch here that fixed it for me.  I finally have my sda1 back!!

----------

## dizzogg

beekster, you have made my freaking day!  I have been trying for so long to get my DSC-S75 camera to work in 2.6, and your patch did it!  It was the last thing I was having problems with in the new kernel!  I'm in heaven!

----------

## Beekster

Glad to be of service!  Not "my" patch as such,  :Smile:  (I wish I knew enough to write kernel patches) but glad to share my findings, and have them be of use to others.

----------

## Beekster

For easy access for others here is the patch:

```
diff -uprN -X /home/patman/dontdiff bl-25/drivers/usb/storage/scsiglue.c usb-ms-flags/drivers/usb/storage/scsiglue.c

--- bl-25/drivers/usb/storage/scsiglue.c   Mon Oct 27 14:28:18 2003

+++ usb-ms-flags/drivers/usb/storage/scsiglue.c   Fri Nov 14 09:15:20 2003

@@ -322,7 +322,8 @@ struct scsi_host_template usb_stor_host_

    .emulated =         TRUE,

 

    /* modify scsi_device bits on probe */

-   .flags = (BLIST_MS_SKIP_PAGE_08 | BLIST_USE_10_BYTE_MS),

+   .flags = (BLIST_MS_SKIP_PAGE_08 | BLIST_MS_SKIP_PAGE_3F |

+        BLIST_USE_10_BYTE_MS),

 

    /* module management */

    .module =         THIS_MODULE

```

----------

## hulk2nd

one question, is this for direct access to the camera or only for access to a memory stick card reader? i'm asking cause my vaio has an integrated memory stick reader and i'm thinking about buying one of these memory sticks but until now i've never tried to get that reader working so this would be quite interesting i for me if i need that patch to get the reader working with 2.6.

greets,

hulk

----------

## Beekster

For me it is to get /dev/sda1 access via USB to a Sony DSC-S70 camera, that uses Sony memory sticks.  I just mount it to /mnt/cam.

I'm not sure if this patch would be needed for your Vaio's reader.

Be sure to compare the prices of generic USB pen-drives (is that what they are called?) vs the Sony mem sticks.  I've been very happy with the camera, but had to pay quite a bit for a 128 Mb stick.

----------

## hulk2nd

no i'm just gonna buy a 16 mb stick for about 10¤ on ebay. because of the fact that i have an encrypted root partition, i want to use the memory stick as a keychain where the ramdisk is saved. so the notebook is only bootable with the stick connected. and in this case i prefer a memory stick instead of an usb stick cause i already have that reader and so it does really nice fit into it   :Very Happy: 

greets,

hulk

----------

## asiobob

what options must I compile in the 2.6 kernel to get my sony DSC-p72 working? Is similar to the other cameras discussed in this thread, on windows it appears as a removal drive...

don't have access to my linux box atm but what kernel options do I need?

SCSI required?? (just asking since I see references in the OP message)

----------

## Beekster

Off the top of my head, you'll need (1) USB mass storage, (2) vfat, & (3) scsi disk, and you should be good to go.

If you get a /dev/sda, and no /dev/sda1, try the patch ealier in the thread.

Here's the relevant bits of my .config:

#

# SCSI device support

#

CONFIG_SCSI=y

CONFIG_SCSI_PROC_FS=y

#

# SCSI support type (disk, tape, CD-ROM)

#

CONFIG_BLK_DEV_SD=y

# CONFIG_CHR_DEV_ST is not set

# CONFIG_CHR_DEV_OSST is not set

# CONFIG_BLK_DEV_SR is not set

# CONFIG_CHR_DEV_SG is not set

#

# Some SCSI devices (e.g. CD jukebox) support multiple LUNs

#

# CONFIG_SCSI_MULTI_LUN is not set

# CONFIG_SCSI_REPORT_LUNS is not set

# CONFIG_SCSI_CONSTANTS is not set

# CONFIG_SCSI_LOGGING is not set

<snip>

#

# USB support

#

CONFIG_USB=y

# CONFIG_USB_DEBUG is not set

#

# Miscellaneous USB options

#

CONFIG_USB_DEVICEFS=y

# CONFIG_USB_BANDWIDTH is not set

# CONFIG_USB_DYNAMIC_MINORS is not set

#

# USB Host Controller Drivers

#

CONFIG_USB_EHCI_HCD=y

# CONFIG_USB_OHCI_HCD is not set

CONFIG_USB_UHCI_HCD=y

#

# USB Device Class drivers

#

# CONFIG_USB_AUDIO is not set

# CONFIG_USB_BLUETOOTH_TTY is not set

# CONFIG_USB_MIDI is not set

# CONFIG_USB_ACM is not set

# CONFIG_USB_PRINTER is not set

CONFIG_USB_STORAGE=y

# CONFIG_USB_STORAGE_DEBUG is not set

# CONFIG_USB_STORAGE_DATAFAB is not set

# CONFIG_USB_STORAGE_FREECOM is not set

# CONFIG_USB_STORAGE_ISD200 is not set

# CONFIG_USB_STORAGE_DPCM is not set

# CONFIG_USB_STORAGE_HP8200e is not set

# CONFIG_USB_STORAGE_SDDR09 is not set

# CONFIG_USB_STORAGE_SDDR55 is not set

# CONFIG_USB_STORAGE_JUMPSHOT is not set

The only other USB option I have set is for my scanner.

and

#

# DOS/FAT/NT Filesystems

#

CONFIG_FAT_FS=y

CONFIG_MSDOS_FS=y

CONFIG_VFAT_FS=y

CONFIG_NTFS_FS=y

# CONFIG_NTFS_DEBUG is not set

# CONFIG_NTFS_RW is not set

Good luck!!

----------

## asiobob

hello,

I have compiled the kernel using the options given here and plugged the camera and mounted it at /mnt/sonycam

The device is at /dev/sda1

I did not patch as sda1 appeared.

PROBLEMS:

I mount as root, (I can't mount as a normal user)

however unlike my cdroms I cannot even access the camera as a regulary user.

I use Gnome, 

when I visit /mnt/sonycam it shows the directories as files, when I click on the "file" which is really a directory it asks what prgram to use to open it... 

As root (su in a user in a console) I can at least go into the directories and copy the files, altho "write" permimssion is not avialbe to normal users.

How can I:

1. mount and give a regular user access to the memory stick?

2. whats with gnomes file manager seeing directories as files?

Please help..

----------

