Subject: kern/26622: SANYO IC Recorder ICR-S290RM(S) does not work
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <hira@po6.nsk.ne.jp>
List: netbsd-bugs
Date: 08/12/2004 23:21:46
>Number:         26622
>Category:       kern
>Synopsis:       SANYO IC Recorder ICR-S290RM(S) does not work
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 12 14:33:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Kouichirou Hiratsuka
>Release:        NetBSD 2.0G
>Organization:
>Environment:
System: NetBSD firefly.localdomain 2.0G NetBSD 2.0G (FIREFLY.MP) #55: Thu Aug 12 19:32:06 JST 2004 root@firefly.localdomain:/usr/src/sys/arch/i386/compile/FIREFLY.MP i386
Architecture: i386
Machine: i386
>Description:
	SANYO IC Recorder ICR-S290RM(S) does not work on -current and 2.0_BETA.

	It has 256MB memory and one mini-SD card slot.  It is attached to
	sd(4) driver, but capacity is incorrect.  And kernel does panic when
	accessing to it.  It works fine on 1.6.2.

	dmesg of -current and 2.0_BETA:

umass0 at uhub5 port 2 configuration 1 interface 0
umass0: SANYO SANYO IC Recorder, rev 1.10/1.00, addr 5
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 2 luns per target
sd0 at scsibus0 target 0 lun 0: <SANYO, IC Recorder, 0.01> disk removable
sd0: fabricating a geometry
sd0: 325 GB, 247 cyl, 64 head, 32 sec, 688144 bytes/sect x 507392 sectors
sd1 at scsibus0 target 0 lun 1: <SANYO, IC Recorder, 0.01> disk removable
sd1: drive offline

	dmesg of 1.6.2:

umass0 at uhub4 port 2 configuration 1 interface 0
umass0: SANYO SANYO IC Recorder, rev 1.10/1.00, addr 6
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 2 luns per target
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 1 lun 0: <SANYO, IC Recorder, 0.01> SCSI0 0/direct remova
ble
sd0: mode sense (4) returned nonsense; using fictitious geometry
sd0: 247 MB, 247 cyl, 64 head, 32 sec, 512 bytes/sect x 507392 sectors

	This is a debug message (add USB_DEBUG and UMASS_DEBUG to kernel
	config, set umassdebug to 0xffffffff and attach the device):

umass0 at uhub5 port 2 configuration 1 interface 0
umass0: SANYO SANYO IC Recorder, rev 1.10/1.00, addr 5
umass0: using SCSI over Bulk-Only
umass0: Get Max Lun
umass0: Max Lun 1
umass0: opening iface 0xc2022240 epaddr 2 for BULKOUT
umass0: opening iface 0xc2022240 epaddr 131 for BULKIN
umass0: umass_attach_bus: SCSI
scsibus0 at umass0: 2 targets, 2 luns per target
umass0: Attach finished
umass0: umass_scsi_cmd: at 1090844112.934580: 0:0 xs=0xc202f000 cmd=0x12 datalen=36 (quirks=0x8020, 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=0xc2019468 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcc835000 buflen=36 flags=0x5 timeout=15000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2023200, NORMAL_COMPLETION
umass0: BBB_DATA actlen=36
umass0: 0x 008000001f00000053414e594f202020 buffer=0xcc7dbe94, buflen=36
umass0: 0x 4943205265636f726465722020202020
umass0: 0x 302e3031
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 42: sig = 0x53425355 (valid), tag = 42, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1090844112.963724, delta=29144: xs=0xc202f000 residue=0 status=0
umass_scsipi_cb: at 1090844112.963724: return xs->error=0, xs->xs_status=0x0 xs->resid=0
sd0 at scsibus0 target 0 lun 0: <SANYO, IC Recorder, 0.01> disk removable
umass0: umass_scsi_cmd: at 1090844112.971416: 0:0 xs=0xc202f000 cmd=0x00 datalen=0 (quirks=0x8020, poll=0)
umass_scsi_cmd: async dir=0, cmdlen=6 datalen=0
umass0: umass_bbb_transfer cmd=0x00
umass0: CBW 43: cmdlen=6 (0x00000000000000000000), data = 0 bytes, dir = out
umass0: start xfer buffer=0xc2019468 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: no data phase
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 43: sig = 0x53425355 (valid), tag = 43, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1090844112.991310, delta=19894: xs=0xc202f000 residue=0 status=0
umass_scsipi_cb: at 1090844112.991310: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 1090844112.998874: 0:0 xs=0xc202f000 cmd=0x25 datalen=8 (quirks=0x8020, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=8
umass0: umass_bbb_transfer cmd=0x25
umass0: CBW 44: cmdlen=10 (0x25000000000000000000), data = 8 bytes, dir = in
umass0: start xfer buffer=0xc2019468 buflen=31 flags=0x0 timeout=25000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcc835000 buflen=8 flags=0x5 timeout=25000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2023200, NORMAL_COMPLETION
umass0: BBB_DATA actlen=8
umass0: 0x 0007bdff00000200 buffer=0xcc7dbc5c, buflen=8
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=25000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 44: sig = 0x53425355 (valid), tag = 44, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1090844113.025495, delta=26621: xs=0xc202f000 residue=0 status=0
umass_scsipi_cb: at 1090844113.025495: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 1090844113.033111: 0:0 xs=0xc202f000 cmd=0x5a datalen=16 (quirks=0x8020, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=16
umass0: umass_bbb_transfer cmd=0x5a
umass0: CBW 45: cmdlen=10 (0x5a000000000000001000), data = 16 bytes, dir = in
umass0: start xfer buffer=0xc2019468 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcc835000 buflen=16 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2023200, NORMAL_COMPLETION
umass0: BBB_DATA actlen=16
umass0: 0x 370000080007be0000000200010a8010 buffer=0xcc7dbcb4, buflen=16
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 45: sig = 0x53425355 (valid), tag = 45, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1090844113.060465, delta=27354: xs=0xc202f000 residue=0 status=0
umass_scsipi_cb: at 1090844113.060465: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 1090844113.068685: 0:0 xs=0xc202f000 cmd=0x5a datalen=40 (quirks=0x8020, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=40
umass0: umass_bbb_transfer cmd=0x5a
umass0: CBW 46: cmdlen=10 (0x5a000500000000002800), data = 40 bytes, dir = in
umass0: start xfer buffer=0xc2019468 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcc835000 buflen=40 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2023200, NORMAL_COMPLETION
umass0: BBB_DATA actlen=40
umass0: 0x 370000080007be0000000200010a8010 buffer=0xcc7dbcd4, buflen=40
umass0: 0x 0000000002000000051e002010200200
umass0: 0x 03df000000000000
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 46: sig = 0x53425355 (valid), tag = 46, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1090844113.097985, delta=29300: xs=0xc202f000 residue=0 status=0
umass_scsipi_cb: at 1090844113.097985: return xs->error=0, xs->xs_status=0x0 xs->resid=0
umass0: umass_scsi_cmd: at 1090844113.104057: 0:0 xs=0xc202f000 cmd=0x5a datalen=32 (quirks=0x8020, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=10 datalen=32
umass0: umass_bbb_transfer cmd=0x5a
umass0: CBW 47: cmdlen=10 (0x5a080400000000002000), data = 32 bytes, dir = in
umass0: start xfer buffer=0xc2019468 buflen=31 flags=0x0 timeout=11000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcc835000 buflen=32 flags=0x5 timeout=11000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2023200, NORMAL_COMPLETION
umass0: BBB_DATA actlen=32
umass0: 0x 370000080007be0000000200010a8010 buffer=0xcc7dbcd4, buflen=32
umass0: 0x 0000000002000000051e002010200200
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=11000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 47: sig = 0x53425355 (valid), tag = 47, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1090844113.132424, delta=28367: xs=0xc202f000 residue=0 status=0
umass_scsipi_cb: at 1090844113.132424: return xs->error=0, xs->xs_status=0x0 xs->resid=0
sd0: fabricating a geometry
sd0: 325 GB, 247 cyl, 64 head, 32 sec, 688144 bytes/sect x 507392 sectors
umass0: umass_scsi_cmd: at 1090844113.143100: 0:1 xs=0xc202f000 cmd=0x12 datalen=36 (quirks=0x8020, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=6 datalen=36
umass0: umass_bbb_transfer cmd=0x12
umass0: CBW 48: cmdlen=6 (0x12200000240000002000), data = 36 bytes, dir = in
umass0: start xfer buffer=0xc2019468 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcc835000 buflen=36 flags=0x5 timeout=15000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2023200, NORMAL_COMPLETION
umass0: BBB_DATA actlen=36
umass0: 0x 008000001f00000053414e594f202020 buffer=0xcc7dbe94, buflen=36
umass0: 0x 4943205265636f726465722020202020
umass0: 0x 302e3031
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 48: sig = 0x53425355 (valid), tag = 48, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1090844113.171929, delta=28829: xs=0xc202f000 residue=0 status=0
umass_scsipi_cb: at 1090844113.171929: return xs->error=0, xs->xs_status=0x0 xs->resid=0
sd1 at scsibus0 target 0 lun 1: <SANYO, IC Recorder, 0.01> disk removable
umass0: umass_scsi_cmd: at 1090844113.180293: 0:1 xs=0xc202f000 cmd=0x00 datalen=0 (quirks=0x8020, poll=0)
umass_scsi_cmd: async dir=0, cmdlen=6 datalen=0
umass0: umass_bbb_transfer cmd=0x00
umass0: CBW 49: cmdlen=6 (0x00200000000000002000), data = 0 bytes, dir = out
umass0: start xfer buffer=0xc2019468 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: no data phase
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 49: sig = 0x53425355 (valid), tag = 49, res = 0, status = 0x01 (failed)
umass0: Command Failed, res = 0
umass_scsipi_cb: at 1090844113.201274, delta=20981: xs=0xc202f000 residue=0 status=2
umass0: umass_bbb_transfer cmd=0x03
umass0: CBW 50: cmdlen=6 (0x03200000200000002000), data = 32 bytes, dir = in
umass0: start xfer buffer=0xc2019468 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: start xfer buffer=0xcc835000 buflen=32 flags=0x5 timeout=15000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc2023200, NORMAL_COMPLETION
umass0: BBB_DATA actlen=32
umass0: 0x f000020000000006000000003a000000 buffer=0xc202f05c, buflen=32
umass0: 0x 00000000000000000000000000000000
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 50: sig = 0x53425355 (valid), tag = 50, res = 0, status = 0x00 (good)
umass_scsipi_sense_cb: xs=0xc202f000 residue=0 status=0
umass_scsipi_sense_cb: return xs->error=1, xs->xs_status=0x1 xs->resid=0
sd1: drive offline
umass0: umass_scsi_cmd: at 1090844113.235580: 0:0 xs=0xc202f000 cmd=0x00 datalen=0 (quirks=0x8020, poll=0)
umass_scsi_cmd: async dir=0, cmdlen=6 datalen=0
umass0: umass_bbb_transfer cmd=0x00
umass0: CBW 51: cmdlen=6 (0x00000000000000002000), data = 0 bytes, dir = out
umass0: start xfer buffer=0xc2019468 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc1be9600, NORMAL_COMPLETION
umass0: no data phase
umass0: start xfer buffer=0xc2019487 buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc2023d00, NORMAL_COMPLETION
umass0: CSW 51: sig = 0x53425355 (valid), tag = 51, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1090844113.255474, delta=19894: xs=0xc202f000 residue=0 status=0
umass_scsipi_cb: at 1090844113.255474: return xs->error=0, xs->xs_status=0x0 xs->resid=0

>How-To-Repeat:
	use SANYO IC Recorder ICR-S290RM(S) on -current or 2.0_BETA

>Fix:
	Sorry, I don't know.
>Release-Note:
>Audit-Trail:
>Unformatted: