Subject: kern/34544: iPod nano (2006 model) does not work
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <hira@po6.nsk.ne.jp>
List: netbsd-bugs
Date: 09/17/2006 16:50:00
>Number:         34544
>Category:       kern
>Synopsis:       iPod nano (2006 model) does not work
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 17 16:50:00 +0000 2006
>Originator:     hira@po6.nsk.ne.jp
>Release:        NetBSD 4.99.2
>Organization:
>Environment:
System: NetBSD firefly.localdomain 4.99.2 NetBSD 4.99.2 (X32) #66: Sat Sep 16 11:27:50 JST 2006 root@firefly.localdomain:/obj/usr/src/sys/arch/i386/compile/X32 i386
Architecture: i386
Machine: i386
>Description:
	With 2006 model of iPod nano, recognized capacity is incorrect.
	This is 4GB model, but it is recognized as 968MB.  And it does
	not work.

umass0 at uhub3 port 4 configuration 1 interface 0
umass0: Apple iPod, rev 2.00/0.01, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <Apple, iPod, 1.62> disk removable
sd0: fabricating a geometry
sd0: 968 MB, 968 cyl, 64 head, 32 sec, 512 bytes/sect x 1982464 sectors

% disklabel sd0
# /dev/rsd0d:
type: SCSI
disk: mydisk
label: fictitious
flags: removable
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 968
total sectors: 1982464
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:   1982464         0     4.2BSD      0     0     0  # (Cyl.      0 -    967)
 d:   1982464         0     unused      0     0        # (Cyl.      0 -    967)
disklabel: boot block size 0
disklabel: super block size 0

# mount -t msdos /dev/sd0a /mnt
mount_msdos: /dev/sd0a on /mnt: Input/output error

	   This is debug message when connecting it.

db> write umassdebug 0xffffffff

[connect]

usbd_transfer_cb: short transfer 1<2
umass0 at uhub3 port 4 configuration 1 interface 0
umass0: Apple iPod, rev 2.00/0.01, addr 2
umass0: using SCSI over Bulk-Only
umass0: Get Max Lun
umass0: Max Lun 0
umass0: opening iface 0xc24980a0 epaddr 2 for BULKOUT
umass0: opening iface 0xc24980a0 epaddr 129 for BULKIN
umass0: umass_attach_bus: SCSI
scsibus0 at umass0: 2 targets, 1 lun per target
umass0: Attach finished
umass0: umass_scsi_cmd: at 1158501680.437061: 0:0 xs=0xc2ae3f08 cmd=0x12 datalen=36 (quirks=0x8000, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=6 datalen=36
umass0: umass_bbb_transfer cmd=0x12
umass0: CBW 42: cmdlen=6 (0x12000000240000000000), data = 36 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=36 flags=0x5 timeout=15000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, NORMAL_COMPLETION
umass0: BBB_DATA actlen=36
umass0: 0x 00800000330000004170706c65202020 buffer=0xcc96db8a, buflen=36
umass0: 0x 69506f64202020202020202020202020
umass0: 0x 312e3632
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 42: sig = 0x53425355 (valid), tag = 42, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1158501680.441047, delta=3986: xs=0xc2ae3f08 residue=0 status=0
umass_scsipi_cb: at 1158501680.441047: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 1158501680.441377: 0:0 xs=0xc2ae3f08 cmd=0x12 datalen=74 (quirks=0x8000, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=6 datalen=74
umass0: umass_bbb_transfer cmd=0x12
umass0: CBW 43: cmdlen=6 (0x120000004a0000000000), data = 74 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=74 flags=0x5 timeout=15000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, NORMAL_COMPLETION
umass0: BBB_DATA actlen=56
umass0: 0x 00800000330000004170706c65202020 buffer=0xcc96db8a, buflen=74
umass0: 0x 69506f64202020202020202020202020
umass0: 0x 312e3632020100000000000000100007 ...
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 43: sig = 0x53425355 (valid), tag = 43, res = 18, status = 0x00 (good)
umass_scsipi_cb: at 1158501680.448054, delta=6677: xs=0xc2ae3f08 residue=18 status=0
umass_scsipi_cb: at 1158501680.448054: return xs->error=0, xs->xs_status=0x0 xs->resid=18
sd0 at scsibus0 target 0 lun 0: <Apple, iPod, 1.62> disk removable
umass0: umass_scsi_cmd: at 1158501680.448529: 0:0 xs=0xc2ae3f08 cmd=0x00 datalen=0 (quirks=0x8010, poll=0)
umass_scsi_cmd: async dir=0, cmdlen=6 datalen=0
umass0: umass_bbb_transfer cmd=0x00
umass0: CBW 44: cmdlen=6 (0x00000000000000000000), data = 0 bytes, dir = out
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: no data phase
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 44: sig = 0x53425355 (valid), tag = 44, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1158501681.152081, delta=703552: xs=0xc2ae3f08 residue=0 status=0
umass_scsipi_cb: at 1158501681.152081: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 1158501681.152414: 0:0 xs=0xc2ae3f08 cmd=0x25 datalen=8 (quirks=0x8010, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=8
umass0: umass_bbb_transfer cmd=0x25
umass0: CBW 45: cmdlen=10 (0x25000000000000000000), data = 8 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=25000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=8 flags=0x5 timeout=25000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, NORMAL_COMPLETION
umass0: BBB_DATA actlen=8
umass0: 0x 001e3fff00000800 buffer=0xcc96d930, buflen=8
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=25000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 45: sig = 0x53425355 (valid), tag = 45, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1158501681.154330, delta=1916: xs=0xc2ae3f08 residue=0 status=0
umass_scsipi_cb: at 1158501681.154330: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 1158501681.154665: 0:0 xs=0xc2ae3f08 cmd=0x5a datalen=16 (quirks=0x8010, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=16
umass0: umass_bbb_transfer cmd=0x5a
umass0: CBW 46: cmdlen=10 (0x5a000000000000001000), data = 16 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=16 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, STALLED
umass0: BBB_DATA actlen=0
umass0: Data-in 16 failed, STALLED
umass0: Clear endpoint 0x81 stall
umass0: Handling BBB state 3 (BBB Data bulk-in/-out clear stall), xfer=0xc2904600, NORMAL_COMPLETION
umass0: 0x 00000000000000000000000000000000 buffer=0xcc96da2f, buflen=16
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 46: sig = 0x53425355 (valid), tag = 46, res = 16, status = 0x01 (failed)
umass0: Command Failed, res = 16
umass_scsipi_cb: at 1158501681.157146, delta=2481: xs=0xc2ae3f08 residue=16 status=2
umass0: umass_bbb_transfer cmd=0x03
umass0: CBW 47: cmdlen=6 (0x03000000200000001000), data = 32 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=32 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, NORMAL_COMPLETION
umass0: BBB_DATA actlen=18
umass0: 0x f00005000000000b0000000024000000 buffer=0xc2ae3f64, buflen=32
umass0: 0x 00000000000000000000000000000000
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 47: sig = 0x53425355 (valid), tag = 47, res = 14, status = 0x00 (good)
umass_scsipi_sense_cb: xs=0xc2ae3f08 residue=14 status=0
umass_scsipi_sense_cb: return xs->error=1, xs->xs_status=0x0 xs->resid=16
umass0: umass_scsi_cmd: at 1158501681.159328: 0:0 xs=0xc2ae3f08 cmd=0x5a datalen=40 (quirks=0x8010, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=40
umass0: umass_bbb_transfer cmd=0x5a
umass0: CBW 48: cmdlen=10 (0x5a000500000000002800), data = 40 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=40 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, NORMAL_COMPLETION
umass0: BBB_DATA actlen=40
umass0: 0x 0028000000000008001e400000000800 buffer=0xcc96d9ff, buflen=40
umass0: 0x 851e0000ff3f08000000000000000000
umass0: 0x 0000000000000000
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 48: sig = 0x53425355 (valid), tag = 48, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1158501681.161581, delta=2253: xs=0xc2ae3f08 residue=0 status=0
umass_scsipi_cb: at 1158501681.161581: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 1158501681.161908: 0:0 xs=0xc2ae3f08 cmd=0x5a datalen=32 (quirks=0x8010, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=32
umass0: umass_bbb_transfer cmd=0x5a
umass0: CBW 49: cmdlen=10 (0x5a080400000000002000), data = 32 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=32 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, STALLED
umass0: BBB_DATA actlen=0
umass0: Data-in 32 failed, STALLED
umass0: Clear endpoint 0x81 stall
umass0: Handling BBB state 3 (BBB Data bulk-in/-out clear stall), xfer=0xc2904600, NORMAL_COMPLETION
umass0: 0x 00000000000000000000000000000000 buffer=0xcc96d930, buflen=32
umass0: 0x 00000000000000000000000000000000
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 49: sig = 0x53425355 (valid), tag = 49, res = 32, status = 0x01 (failed)
umass0: Command Failed, res = 32
umass_scsipi_cb: at 1158501681.164427, delta=2519: xs=0xc2ae3f08 residue=32 status=2
umass0: umass_bbb_transfer cmd=0x03
umass0: CBW 50: cmdlen=6 (0x03000000200000002000), data = 32 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=32 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, NORMAL_COMPLETION
umass0: BBB_DATA actlen=18
umass0: 0x f00005000000000b0000000024000000 buffer=0xc2ae3f64, buflen=32
umass0: 0x 00000000000000000000000000000000
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 50: sig = 0x53425355 (valid), tag = 50, res = 14, status = 0x00 (good)
umass_scsipi_sense_cb: xs=0xc2ae3f08 residue=14 status=0
umass_scsipi_sense_cb: return xs->error=1, xs->xs_status=0x0 xs->resid=32
umass0: umass_scsi_cmd: at 1158501681.166817: 0:0 xs=0xc2ae3f08 cmd=0x5a datalen=40 (quirks=0x8010, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=40
umass0: umass_bbb_transfer cmd=0x5a
umass0: CBW 51: cmdlen=10 (0x5a000400000000002800), data = 40 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=40 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, STALLED
umass0: BBB_DATA actlen=0
umass0: Data-in 40 failed, STALLED
umass0: Clear endpoint 0x81 stall
umass0: Handling BBB state 3 (BBB Data bulk-in/-out clear stall), xfer=0xc2904600, NORMAL_COMPLETION
umass0: 0x 00000000000000000000000000000000 buffer=0xcc96d930, buflen=40
umass0: 0x 00000000000000000000000000000000
umass0: 0x 0000000000000000
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 51: sig = 0x53425355 (valid), tag = 51, res = 40, status = 0x01 (failed)
umass0: Command Failed, res = 40
umass_scsipi_cb: at 1158501681.169493, delta=2676: xs=0xc2ae3f08 residue=40 status=2
umass0: umass_bbb_transfer cmd=0x03
umass0: CBW 52: cmdlen=6 (0x03000000200000002800), data = 32 bytes, dir = in
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcdb50000 buflen=32 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2904300, NORMAL_COMPLETION
umass0: BBB_DATA actlen=18
umass0: 0x f00005000000000b0000000024000000 buffer=0xc2ae3f64, buflen=32
umass0: 0x 00000000000000000000000000000000
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 52: sig = 0x53425355 (valid), tag = 52, res = 14, status = 0x00 (good)
umass_scsipi_sense_cb: xs=0xc2ae3f08 residue=14 status=0
umass_scsipi_sense_cb: return xs->error=1, xs->xs_status=0x0 xs->resid=40
sd0: fabricating a geometry
sd0: 968 MB, 968 cyl, 64 head, 32 sec, 512 bytes/sect x 1982464 sectors
umass0: umass_scsi_cmd: at 1158501681.174516: 0:0 xs=0xc2ae3f08 cmd=0x00 datalen=0 (quirks=0x8010, poll=0)
umass_scsi_cmd: async dir=0, cmdlen=6 datalen=0
umass0: umass_bbb_transfer cmd=0x00
umass0: CBW 53: cmdlen=6 (0x00000000000000002800), data = 0 bytes, dir = out
umass0: start xfer buffer=0xc2aa0270 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc2413600, NORMAL_COMPLETION
umass0: no data phase
umass0: start xfer buffer=0xc2aa028f buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2904b00, NORMAL_COMPLETION
umass0: CSW 53: sig = 0x53425355 (valid), tag = 53, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1158501681.175828, delta=1312: xs=0xc2ae3f08 residue=0 status=0
umass_scsipi_cb: at 1158501681.175828: return xs->error=0, xs->xs_status=0x0 xs->resid=0
	
>How-To-Repeat:
	see above

>Fix:
	Sorry, I don't know.