Opened 10 years ago

Closed 10 years ago

#16 closed enhancement (fixed)

add support for FreeBSD 'ada' disks

Reported by: agapon Owned by: Alex Samorukov
Priority: minor Milestone:
Component: all Version:
Keywords: FreeBSD Cc:

Description

Latest FreeBSD has new ahci(4) driver for AHCI SATA controllers.
SATA disks on these controllers are represented as 'ada' disks.
These are "normal" SATA disks that support usual ATA/SATA commands.
The difference from traditional 'ad' disks is that 'ada' disks do not support ata(4) ioctls, instead commands can be sent using cam(3).
Proposed patch adds initial support for such disks.
To achieve this freebsd_ata_device is subclassed to reuse the code for building ATA commands. Then cam(3) transport is used to send commands to disks (this is somewhat similar to scsi disks code).

Currently auto-discovery of ada disks is not implemented.

Attachments (1)

ada.diff (6.7 KB) - added by agapon 10 years ago.
initial diff

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by agapon

Attachment: ada.diff added

initial diff

comment:1 Changed 10 years ago by Alex Samorukov

Keywords: FreeBSD added
Owner: changed from somebody to Alex Samorukov
Status: newaccepted

comment:2 Changed 10 years ago by Alex Samorukov

Ill test your patch soon and if it will work fine ill apply it. Do you know any way to get device type without name guess? Something like protocol field in cam? I want to avoid name based guessing also because there are passX devices.

comment:3 Changed 10 years ago by Alex Samorukov

Resolution: fixed
Status: acceptedclosed

I have no ada devices around to test, so committing your patch as is. Also i changed SCSI code to use con->camdev instead of cam_close/cam_open on every request. If you know how to detect such devices automatically please, do the patch.

Note: See TracTickets for help on using tickets.