Bug 247727 - umass(4) fails when the DropCam device is connected
Summary: umass(4) fails when the DropCam device is connected
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 12.1-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-02 23:13 UTC by Yuri Victorovich
Modified: 2020-07-09 02:22 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2020-07-02 23:13:50 UTC
The log gets these lines when the camera is connected:
> Jul  2 14:47:06 yv kernel: ugen8.2: <Linux 2.6.38.8 with ambarellaudc Nest Cam Setup> at usbus8
> Jul  2 14:47:06 yv kernel: umass1 on uhub8
> Jul  2 14:47:06 yv kernel: umass1: <Mass Storage> on usbus8
> Jul  2 14:47:06 yv kernel: umass1:  SCSI over Bulk-Only; quirks = 0x4000
> Jul  2 14:47:06 yv kernel: umass1:7:1: Attached to scbus7
> Jul  2 14:47:06 yv kernel: da4 at umass-sim1 bus 1 scbus7 target 0 lun 0
> Jul  2 14:47:06 yv kernel: da4: <Nest Cam Setup 0001> Removable Direct Access SCSI-2 device
> Jul  2 14:47:06 yv kernel: da4: 40.000MB/s transfers
> Jul  2 14:47:06 yv kernel: da4: 1MB (2688 512 byte sectors)
> Jul  2 14:47:06 yv kernel: da4: quirks=0x2<NO_6_BYTE>
> Jul  2 14:47:06 yv kernel: ugen8.2: <Linux 2.6.38.8 with ambarellaudc Nest Cam Setup> at usbus8 (disconnected)
> Jul  2 14:47:06 yv kernel: (da4:umass-sim1:1:0:0): READ(10). CDB: 28 00 00 00 0a 7f 00 00 01 00
> Jul  2 14:47:06 yv kernel: (da4:umass-sim1:1:0:0): CAM status: CCB request completed with an error
> Jul  2 14:47:06 yv kernel: (da4:umass-sim1:1:0:0): Retrying command, 3 more tries remain
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): READ(10). CDB: 28 00 00 00 0a 7f 00 00 01 00
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): CAM status: CCB request completed with an error
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): Retrying command, 2 more tries remain
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): READ(10). CDB: 28 00 00 00 0a 7f 00 00 01 00
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): CAM status: CCB request completed with an error
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): Retrying command, 1 more tries remain
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): READ(10). CDB: 28 00 00 00 0a 7f 00 00 01 00
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): CAM status: CCB request completed with an error
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): Retrying command, 0 more tries remain
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): READ(10). CDB: 28 00 00 00 0a 7f 00 00 01 00
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): CAM status: CCB request completed with an error
> Jul  2 14:47:07 yv kernel: (da4:umass-sim1:1:0:0): Error 5, Retries exhausted
> ...skipped...
> Jul  2 15:57:27 yv kernel: (da4:umass-sim1:1:0:0): Retrying command, 0 more tries remain
> Jul  2 15:57:27 yv kernel: (da4:umass-sim1:1:0:0): READ(10). CDB: 28 00 00 00 0a 7e 00 00 01 00 
> Jul  2 15:57:27 yv kernel: (da4:umass-sim1:1:0:0): CAM status: CCB request completed with an error
> Jul  2 15:57:27 yv kernel: (da4:umass-sim1:1:0:0): Error 5, Retries exhausted
> Jul  2 15:57:27 yv kernel: (da4:umass-sim1:1:0:0): got CAM status 0x44
> Jul  2 15:57:27 yv kernel: (da4:umass-sim1:1:0:0): fatal error, failed to attach to device
> Jul  2 15:57:27 yv kernel: da4 at umass-sim1 bus 1 scbus7 target 0 lun 0
> Jul  2 15:57:27 yv kernel: da4: <Nest Cam Setup 0001>  detached
> Jul  2 15:57:27 yv kernel: g_access(961): provider da4 has error 6 set
> Jul  2 15:57:27 yv syslogd: last message repeated 2 times
> Jul  2 15:57:27 yv kernel: (da4:umass-sim1:1:0:0): Periph destroyed
> Jul  2 15:57:27 yv kernel: umass1: detached

12.1-STABLE #0 r359625

> usbconfig dump_curr_config_desc
doesn't contain the record for this device.


Interestingly, 12.0-STABLE #0 r344209 doesn't fail with this problem.

VendorID=0x0525
ProductID=0xa4a5
Comment 1 Hans Petter Selasky freebsd_committer 2020-07-03 08:03:18 UTC
This device appears to be quirked:

% grep -r 0xa4a5 sys/dev/usb/
sys/dev/usb/usbdevs:product NETCHIP POCKETBOOK	0xa4a5	PocketBook
% grep -r POCKETBOOK sys/dev/usb/
sys/dev/usb/quirk/usb_quirk.c:	USB_QUIRK(NETCHIP, POCKETBOOK, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE),

Maybe that's the reason its failing?

Else you can try running:

usbdump -i usbusX -f Y -s 65536 -vvv

To capture all the USB traffic. It will make it more clear when the error happens!

--HPS