Page MenuHomeFreeBSD

cam/scsi, ufshci: Add Well-known LUN Probing
Needs ReviewPublic

Authored by jaeyoon on Mon, Oct 27, 6:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 16, 11:51 AM
Unknown Object (File)
Thu, Nov 13, 6:08 PM
Unknown Object (File)
Mon, Nov 3, 11:44 AM
Unknown Object (File)
Mon, Nov 3, 11:43 AM
Unknown Object (File)
Mon, Nov 3, 11:41 AM
Unknown Object (File)
Mon, Nov 3, 11:41 AM
Unknown Object (File)
Mon, Nov 3, 11:39 AM
Unknown Object (File)
Mon, Nov 3, 11:37 AM
Subscribers

Details

Reviewers
slm
imp
Group Reviewers
cam
Summary

Add well-known lun probing to CAM and register it as a
pass-through peripheral device. The ufshci driver finds
the “UFS device” wlun and registers it.

This patch contains 5 commits.

Sponsored by: Samsung Electronic

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 68136
Build 65019: arc lint + arc unit

Event Timeline

jaeyoon added a reviewer: imp.

I will request a review for each commit individually to make reviewing easier.

This patch is ready for the review!

Just a few questions. I started this review a few weeks ago then it slipped my mind...

sys/cam/cam_xpt_internal.h
174

Is there a reason you can't reuse luns_mtx to protect both of these lists?

sys/cam/scsi/scsi_all.c
9004

You can likely always |= this in w/o the if. The other boolean request different specific bits, but this specifies them.

sys/cam/scsi/scsi_xpt.c
1260

this looks like it might have a formatting issue

1421

you have is_wlun defined above, but then expand it here. Maybe it would be better to use that here too. Unless I'm missing something.

2037

formatting not (copied from the original): we usually don't have a space after sizeof in this construct.

2239

this looks like a formatting mistake. The '*' here should line up with the '*' on the line above.

2245

same.

2248

the old formatting was correct. This seems odd to my eye, though CAM's formatting is a lot less consistent than other parts of the kernel.

sys/dev/ufshci/ufshci_private.h
275

Doesn't qemu report there's no WLUNs? Or does it say it does and then implement it badly.

sys/dev/ufshci/ufshci_sim.c
449

I'm not sure I like the busy-wait here. Is there no way to make this interrupt driven?

467

I don't understand how this works or what it's supposed to accomplish. Can you explain?

Oh, you left a review here. I'll reopen it.