Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work for HP Ultrium 3000 on FreeBSD #379

Merged

Conversation

micronn
Copy link
Contributor

@micronn micronn commented Dec 10, 2022

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.

IBM drives seem to ignore PF bit in mode select, but HP drives want it set.
@piste-jp piste-jp self-assigned this Dec 12, 2022
@piste-jp
Copy link
Member

Sorry, I totally forget this.

The code looks good to me.

@piste-jp piste-jp merged commit 82c8d9a into LinearTapeFileSystem:master Dec 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants