Created attachment 209257 [details]
Patch solves problems
I am using Adaptec 6805e with 8 disks without arrays. In FreeBSD9, I used the driver from the Adaptec site. When migrating to FreeBSD10 or later, I switched to the system aacraid. All disks from the controller disappeared in the system and passX devices remained. Patch solves these problems, I use it on 12.1-STABLE for three months (I also tested it on 11-STABLE).
I believe that the code is self-consistent as it was designed.
You can question whether the design is sane, but that's a different story.
By default the driver exposes only logical disks.
If you want it to expose physical devices you need to set '8' (3rd bit) in its flags.
And, of course, a part of the problem is that this is not documented.
Sorry, I did not put it very clearly. The problem occurred when I switching vendor aacu64.ko (for FreeBSD9) to vendor aacraidu.ko (for FreeBSD10). The behavior of the vendor driver and the system driver are the same in FreeBSD10 and higher.
How can I add the 3rd bit to the disk flag?
Maybe something like
in /boot/device.hints ?
I looked again at the aacraid source.
In struct aac_softc:
#define AAC_FLAGS_PERC2QC (1 << 0)
#define AAC_FLAGS_ENABLE_CAM (1 << 1) / * No SCSI passthrough * /
#define AAC_FLAGS_CAM_NORESET (1 << 2) / * Fake SCSI resets * /
#define AAC_FLAGS_CAM_PASSONLY (1 << 3) / * Only create pass devices * /
#define AAC_FLAGS_SYNC_MODE (1 << 18) / * Sync. transfer mode * /
u_int32_t hint_flags; / * driver parameters * /
If the 3rd bit is set (AAC_FLAGS_CAM_PASSONLY), then there should only be a passX device.