Page MenuHomeFreeBSD

Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the drivers I've touched, filter out CAM_CDB_PHYS.
ClosedPublic

Authored by imp on Mar 8 2016, 10:07 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 12 2024, 6:30 PM
Unknown Object (File)
Dec 22 2023, 9:09 PM
Unknown Object (File)
Dec 18 2023, 4:19 AM
Unknown Object (File)
Dec 18 2023, 4:19 AM
Unknown Object (File)
Nov 10 2023, 8:00 AM
Unknown Object (File)
Nov 8 2023, 8:00 AM
Unknown Object (File)
Nov 6 2023, 6:40 PM
Unknown Object (File)
Nov 6 2023, 4:10 PM
Subscribers
None

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp retitled this revision from to Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the drivers I've touched, filter out CAM_CDB_PHYS..
imp updated this object.
imp edited the test plan for this revision. (Show Details)
sys/dev/isci/isci_controller.c
748 ↗(On Diff #14176)

What do you think about this stylistic change:

if (ccb->ccb_h.flags & (CAM_CDB_POINTER | CAM_CDB_PHYS)) {

sys/dev/ppbus/vpo.c
195 ↗(On Diff #14176)

Does this block need to get moved up here? Was it moved accidentally?

sys/dev/isci/isci_controller.c
748 ↗(On Diff #14176)

that's subtly different.

However, in other places in the tree we just check CAM_CDB_PHYS, and I could do that here as well.

sys/dev/ncr/ncr.c
3866–3867 ↗(On Diff #14176)

I could just check CAM_CDB_PHYS here, as is done in other places in the tree.

sys/dev/ppbus/vpo.c
195 ↗(On Diff #14176)

No. It was done on purpose so we could compute ptr just once. And it doesn't change anything in terms of what is printed since we always call vpo_intr from the place it was moved from, and only from there.

sys/dev/isci/isci_controller.c
748 ↗(On Diff #14176)

I suppose that the driver can accidentally handle CAM_CCB_POINTER thanks to the magic of relaxed syntax of referencing pointers vs arrays, and it never tries to reference a single byte in the array directly.

CAM_CCB_PHYS has to imply CAM_CCB_POINTER. You could just remove the check for CAM_CCB_POINTER.

sys/dev/ppbus/vpo.c
195 ↗(On Diff #14176)

I don't understand. The existing design style was to print the various commands in vpo_action(). What you've changes is not technically incorrect, but it's now inconsistent.

Update per scott.

Updating D5585: Make sure we check for CAM_CDB_POINTER for all drivers. Also, for the

drivers I've touched, filter out CAM_CDB_PHYS.

sys/dev/ppbus/vpo.c
195 ↗(On Diff #14179)

Yes. I suppose now that I've created the convenience function, I could move it back.

This revision was automatically updated to reflect the committed changes.