Make it work for HP Ultrium 3000 on FreeBSD #379
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IBM drives do not check PF bit in mode select (from what I see in the document SCSI Reference for IBM LTO Ultrium Tape Drive), but HP drives want it set (at least my HP Ultrium 3000 did not work when PF bit was 0).
The Linux driver is already setting the PF bit in sg_modeselect, but for some reason the CAM driver for FreeBSD noes not set it in camtape_modeselect.
Before this change, I was unable to format nor mount when using my HP drive on FreeBSD:
LTFS31213I Error on modeselect: (pass8:mps0:0:6:0): MODE SELECT(10). CDB: 55 00 00 00 00 00 00 00 30 00 (pass8:mps0:0:6:0): CAM status: SCSI Status Error (pass8:mps0:0:6:0): SCSI status: Check Condition (pass8:mps0:0:6:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB) (pass8:mps0:0:6:0): Command byte 1 bit 4 is invalid
After this change it works fine. At least when not using encryption (because there are some vendor-specific pages for IBM that do not work in HP drives), but this is a different issue.