Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB mass storage support für SE P990i [solved]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Sat Sep 16, 2006 1:56 pm    Post subject: USB mass storage support für SE P990i [solved] Reply with quote

Hallo,

kann mir bitte jemand helfen diesen Patch:
http://comments.gmane.org/gmane.linux.kernel/441570

einzubringen?
Mein Kernel ist 2.6.17-gentoo-r8.


Diesen Abschnitt könnte ich sicher vor Zeile 1247 in der /usr/src/linux/drivers/usb/storage/unusual_devs.h einfügen.

Code:
+UNUSUAL_DEV(  0x0fce, 0xe031, 0x0000, 0xffff,
+      "Sony Ericsson Mobile Communications",
+      "M600i",
+      US_SC_DEVICE, US_PR_DEVICE, NULL,
+      US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),


Aber wo gehört das hin:
Code:
 <at>  <at>  -1257,6 +1257,13  <at>  <at>
       US_SC_DEVICE, US_PR_DEVICE, NULL,
       US_FL_NO_WP_DETECT ),


Ich habe zwar das P990i aber ich bin mir sicher dass es funktionieren wird wenn ich 0xe031 auf 0xe030 ändere (Vendor ID des P990i) und "M600i" auf "P990i" ändere.

Ganz super wäre es wenn mir jemand die diff-Dateien für meine Kernel ändern könnte (der aktuelle aus gentoo-sources - x86), ich bin mir sicher wenn man eine Ahnung davon hat dann ist es nur eine Kleinigkeit.


Last edited by tuxian on Mon Sep 18, 2006 8:37 am; edited 3 times in total
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2970
Location: Germany

PostPosted: Sat Sep 16, 2006 3:40 pm    Post subject: Re: Patch anpassen Reply with quote

tuxian wrote:
Aber wo gehört das hin:
Code:
 <at>  <at>  -1257,6 +1257,13  <at>  <at>
       US_SC_DEVICE, US_PR_DEVICE, NULL,
       US_FL_NO_WP_DETECT ),



Dieser Abschnitt sollte direkt vor dem Teil kommen in dem der neue Code einzufügen ist. Bedeutet das du diese Zeilen bereits im Kernel finden solltest.

Damit das diff korrekt wird musst du auf jedenfall noch was ändern. Alle (at) musst du durch @ ersetzen.

Der korrekte Patch sollte so aussehen:

Code:
--- git/drivers/usb/storage/unusual_devs.h.vanilla      2006-08-29 09:02:39.000000000 +0200
+++ git/drivers/usb/storage/unusual_devs.h      2006-08-29 09:03:22.000000000 +0200
@@ -1257,6 +1257,13 @@
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_NO_WP_DETECT ),

+/* Reported by Rene Rebe <rene <at> exactcode.de> */
+UNUSUAL_DEV(  0x0fce, 0xe031, 0x0000, 0xffff,
+               "Sony Ericsson Mobile Communications",
+               "M600i",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
+
 /* Reported by Kevin Cernekee <kpc-usbdev <at> gelato.uiuc.edu>
  * Tested on hardware version 1.10.
  * Entry is needed only for the initializer function override.


Da kannst du jetzt die entsprechenden Werte ersetzen.
_________________
...it's only Rock'n'Roll, but I like it!
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Sat Sep 16, 2006 4:03 pm    Post subject: Re: Patch anpassen Reply with quote

Anarcho wrote:

Code:
 <at>  <at>  -1257,6 +1257,13  <at>  <at>
       US_SC_DEVICE, US_PR_DEVICE, NULL,
       US_FL_NO_WP_DETECT ),



Dieser Abschnitt sollte direkt vor dem Teil kommen in dem der neue Code einzufügen ist. Bedeutet das du diese Zeilen bereits im Kernel finden solltest.


Leider steht bei mir in Zeile 1257 aber was anderes.

Anarcho wrote:

Damit das diff korrekt wird musst du auf jedenfall noch was ändern. Alle (at) musst du durch @ ersetzen.


Okay danke dachte schon was das heißen sollte.


Anarcho wrote:

Der korrekte Patch sollte so aussehen:

Code:
--- git/drivers/usb/storage/unusual_devs.h.vanilla      2006-08-29 09:02:39.000000000 +0200
+++ git/drivers/usb/storage/unusual_devs.h      2006-08-29 09:03:22.000000000 +0200
@@ -1257,6 +1257,13 @@
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_NO_WP_DETECT ),

+/* Reported by Rene Rebe <rene <at> exactcode.de> */
+UNUSUAL_DEV(  0x0fce, 0xe031, 0x0000, 0xffff,
+               "Sony Ericsson Mobile Communications",
+               "M600i",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
+
 /* Reported by Kevin Cernekee <kpc-usbdev <at> gelato.uiuc.edu>
  * Tested on hardware version 1.10.
  * Entry is needed only for the initializer function override.


Da kannst du jetzt die entsprechenden Werte ersetzen.


Code:
--- git/drivers/usb/storage/unusual_devs.h.vanilla      2006-08-29 09:02:39.000000000 +0200
+++ git/drivers/usb/storage/unusual_devs.h      2006-08-29 09:03:22.000000000 +0200


das hab ich mal auf

Code:
--- drivers/usb/storage/unusual_devs.h      2006-08-29 09:02:39.000000000 +0200
+++ drivers/usb/storage/unusual_devs.h      2006-08-29 09:03:22.000000000 +0200



geändert da ich ja nicht die Dateien git/drivers/usb/storage/unusual_devs.h.vanilla und git/drivers/usb/storage/unusual_devs.h habe.

Aber da kommt:

Code:
/usr/src/linux
root@laptop: pts/1: 29 files 18Mb -> patch -p1 < ../test.diff
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- drivers/usb/storage/unusual_devs.h      2006-08-29 09:02:39.000000000 +0200
|+++ drivers/usb/storage/unusual_devs.h      2006-08-29 09:03:22.000000000 +0200
--------------------------
File to patch:
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2970
Location: Germany

PostPosted: Sat Sep 16, 2006 4:26 pm    Post subject: Reply with quote

Probier mal den Patch den ich gepostet habe so wie er ist und dann mit "-p1".

Dabei steht die 1 für eine Ebene "abschneiden", also wird das "git/" abgeschnitten.

Auch kannst du das .vanilla lassen, es muss ja nur eine Datei gepatcht werden (die ohne .vanilla).
_________________
...it's only Rock'n'Roll, but I like it!
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Sat Sep 16, 2006 5:40 pm    Post subject: Reply with quote

Das habe ich auch schon probiert da kommt aber irgendwas mit Hunk failed.

Das Problem wird sein dass bei mir in Zeile 1257 etwas anderes steht.


Ich habe auch schon probiert ziemlich am Ende (hinter dem letzten UNUSUAL_DEV-Abschnitt) den Block

Code:
/* Reported by Rene Rebe <rene <at> exactcode.de> */
UNUSUAL_DEV(  0x0fce, 0xe030, 0x0000, 0xffff,
               "Sony Ericsson Mobile Communications",
               "P990i",
               US_SC_DEVICE, US_PR_DEVICE, NULL,
               US_FL_IGNORE_RESIDUE | US_FL_FIX_CAPACITY ),
 
 /* Reported by Kevin Cernekee <kpc-usbdev <at> gelato.uiuc.edu>
  * Tested on hardware version 1.10.
  * Entry is needed only for the initializer function override.


einzufügen aber dann wird nach wie vor keine Partition auf /dev/sda gefunden.
Back to top
View user's profile Send private message
fuchur
Guru
Guru


Joined: 12 Aug 2003
Posts: 578

PostPosted: Sat Sep 16, 2006 6:56 pm    Post subject: Reply with quote

Hi

Ich hoffe ich habe alles richtig verstanden aber wieso baust du dir nicht einen eigenen Patch? z.B.
Code:

cp /usr/src/linux/drivers/usb/storage/unusual_devs.h /usr/src/linux/drivers/usb/storage/unusual_devs.h-orgi

Dann kannst du mit
Code:
nano /usr/src/linux//drivers/usb/storage/unusual_devs.h
die zeilen die
mit + anfangen doch in /usr/src/linux//drivers/usb/storage/unusual_devs.h einfügen da wo du meinst
wo sie hingehören (aber ohne "+" Zeichen). Als nächste erstellst du dir deine Patch mit
Code:
diff -urN /usr/src/linux/drivers/usb/storage/unusual_devs.h-orgi /usr/src/linux/drivers/usb/storage/unusual_devs.h >/tmp/unusual_devs.h-patch
Danach ein
Code:
mv /usr/src/linux/drivers/usb/storage/unusual_devs.h-orgi /usr/src/linux//drivers/usb/storage/unusual_devs.h
um die orginale Datei unusual_devs.h wieder herzustellen.
Denn patch den du erstellt hast "/tmp/unusual_devs.h-patch" kannst du nun mit
Code:

cd /usr/src/linux
patch -p4 < /tmp/unusual_devs.h-patch
einspielen. Mit
Code:

cd /usr/src/linux
patch -p4 -R < /tmp/unusual_devs.h-patch

wider entfernen.

MfG
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Sat Sep 16, 2006 8:04 pm    Post subject: Reply with quote

Ich habe schon probiert die Zeilen die mit "+" anfangen in die Datei einzufügen.

Aber da werden dann leider nach wie vor die Partitionen auf /dev/sda nicht erkannt.
Ich habe zwar das P990i und er Patch ist fürs M600i aber ich bin mir sicher dass es funktionieren sollte wenn ich 0xe031 auf 0xe030 ändere (Vendor ID des P990i) und "M600i" auf "P990i" ändere.
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Sun Sep 17, 2006 2:24 am    Post subject: Reply with quote

Der Maintainer von unusual_devs.h hat mich auf den richtigen Patch fürs P990i aufmerksam gemacht:

http://marc.theaimsgroup.com/?l=linux-usb-devel&m=115795969320592&w=2

@fuchur:

Danke für deine Anleitung, wollte ich schon immer wissen.

Habe nun diese Zeilen manuell eingefügt und mir selbst einen Patch erstellt.

Leider sehe ich die Partitionen immer noch nicht, ich nehme an dass dafür Kernel 2.6.18 (RC) notwendig ist.

Er schrieb:

Quote:
It applies against my tree which has all pending 2.6.18 stuff in it
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Sun Sep 17, 2006 12:06 pm    Post subject: Reply with quote

Es funktioniert jetzt mit:

Code:
mount -t vfat /dev/sda /mnt/flash/


Es ist einfach keine Partition zu sehen, keine Ahnung wie das überhaupt möglich ist, Hauptsache es funktioniert.
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Sun Sep 17, 2006 1:32 pm    Post subject: Reply with quote

Es funktioniert auch ohne Patch.

Ich dachte mit dem Patch würde ich die Partition sehen aber da man das Gerät direkt über /dev/sda anspricht welches ich auch vorher ohne Patch gesehen habe ich den Patch wieder entfernt.
Back to top
View user's profile Send private message
firefly
Watchman
Watchman


Joined: 31 Oct 2002
Posts: 5205

PostPosted: Sun Sep 17, 2006 1:35 pm    Post subject: Reply with quote

manche multimedia geräte, die als mass-storage device funktionieren, haben keine partitions-tabelle auf ihrem speichermedium sondern haben das FS(wenn sie überhaupt eins verwenden und im UMS-mode wird ein FS simuliert) direkt auf die platte geschrieben.
_________________
Ein Ring, sie zu knechten, sie alle zu finden,
Ins Dunkel zu treiben und ewig zu binden
Im Lande Mordor, wo die Schatten drohn.
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Sun Sep 17, 2006 1:45 pm    Post subject: Reply with quote

Danke für die Info.

Wenn ich die Karte in einen Cardreader stecke dann wird anscheinend schon eine Partition gefunden, fdisk findet aber keine:

mount:
Code:
/dev/memcard_ms1 on /mnt/memcard_ms type vfat (rw,nosuid,nodev,user=markus)



dmesg:
Code:
usb 1-1: new high speed USB device using ehci_hcd and address 5
usb 1-1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
  Vendor: ICSI      Model: IC1210        CF  Rev: 1.6E
  Type:   Direct-Access                      ANSI SCSI revision: 00
sd 1:0:0:0: Attached scsi removable disk sda
sd 1:0:0:0: Attached scsi generic sg0 type 0
  Vendor: ICSI      Model: IC1210        MS  Rev: 1.6E
  Type:   Direct-Access                      ANSI SCSI revision: 00
sd 1:0:0:1: Attached scsi removable disk sdb
sd 1:0:0:1: Attached scsi generic sg1 type 0
  Vendor: ICSI      Model: IC1210    MMC/SD  Rev: 1.6E
  Type:   Direct-Access                      ANSI SCSI revision: 00
sd 1:0:0:2: Attached scsi removable disk sdc
sd 1:0:0:2: Attached scsi generic sg2 type 0
  Vendor: ICSI      Model: IC1210        SM  Rev: 1.6E
  Type:   Direct-Access                      ANSI SCSI revision: 00
sd 1:0:0:3: Attached scsi removable disk sdd
sd 1:0:0:3: Attached scsi generic sg3 type 0
usb-storage: device scan complete
SCSI device sdb: 124416 512-byte hdwr sectors (64 MB)
sdb: Write Protect is off
sdb: Mode Sense: 43 00 00 08
sdb: assuming drive cache: write through
SCSI device sdb: 124416 512-byte hdwr sectors (64 MB)
sdb: Write Protect is off
sdb: Mode Sense: 43 00 00 08
sdb: assuming drive cache: write through
 sdb: sdb1


fdisk:
Code:
root@laptop: pts/3: 48 files 2,4Mb -> fdisk -l /dev/memcard_ms

Platte /dev/memcard_ms: 63 MByte, 63681024 Byte
8 Köpfe, 16 Sektoren/Spuren, 971 Zylinder
Einheiten = Zylinder von 128 × 512 = 65536 Bytes

           Gerät  boot.     Anfang        Ende     Blöcke   Id  System


Egal, Hauptsache es funktioniert.
Ich hätte gleich zu Beginn probieren sollen /dev/sda zu mounten dann hätte ich mir die Zeit die Patcherei erspart.
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Sun Sep 17, 2006 2:27 pm    Post subject: Reply with quote

Hier:

http://layr.at/linux/p990i/index.php

gibt es nun u.a. eine kurze Anleitung dafür!
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Mon Sep 18, 2006 1:17 am    Post subject: Reply with quote

Der Maintainer hat mir folgendes geschrieben:

Code:
The patch only tells the kernel that it lies about it's size and is one sector smaller than
it claims.. it doesn't have anything to do with mounting or otherwise accessing the device.


Also ist er doch nicht ganz unnütz wenn auch der Unterschied "nur" 512 Bytes ist, d.h. mit Patch ist die Disk /dev/sda um 512 Bytes kleiner was auch der richtige Wert sein soll!

Ohne Patch:
Code:
SCSI device sda: 124378 512-byte hdwr sectors (64 MB)
Disk /dev/sda: 63 MB, 63681536 bytes


Mit Patch:
Code:
SCSI device sda: 124377 512-byte hdwr sectors (64 MB)
Disk /dev/sda: 63 MB, 63681024 bytes
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum