NetBSD/sys/dev/ata
riastradh ffcf681ee3 New ioctl DIOCGSECTORALIGN returns sector alignment parameters.
struct disk_sectoralign {
	/* First aligned sector number.  */
	uint32_t dsa_firstaligned;

	/* Number of sectors per aligned unit.  */
	uint32_t dsa_alignment;
};

- Teach wd(4) to get it from ATA.
- Teach cgd(4) to pass it through from the underlying disk.
- Teach dk(4) to pass it through with adjustments.
- Teach zpool (zfs) to take advantage of it.
  => XXX zpool doesn't seem to understand when the vdev's starting
     sector is misaligned.

Missing:

- ccd(4) and raidframe(4) support -- these should support _using_
  DIOCGSECTORALIGN to decide where to start putting ccd or raid
  stripes on disk, and these should perhaps _implement_
  DIOCGSECTORALIGN by reporting the stripe/interleave factor.

- sd(4) support -- I don't know any obvious way to get it from SCSI,
  but if any SCSI wizards know better than I, please feel free to
  teach sd(4) about it!

- any ld(4) attachments -- might be worth teaching the ld drivers for
  nvme and various raid controllers to get the aligned sector size

There's some duplicate logic here for now.  I'm doing it this way,
rather than gathering the logic into a new disklabel_sectoralign
function or something, so that this change is limited to adding a new
ioctl, without any new kernel symbols, in order to make it easy to
pull up to netbsd-9 without worrying about the module ABI.
2020-03-02 16:01:56 +00:00
..
ata_raid_adaptec.c convert from malloc(9) to kmem(9) 2018-10-22 19:38:06 +00:00
ata_raid_intel.c use memmove() not memcpy() for overlapping regions. 2019-10-04 12:24:32 +00:00
ata_raid_jmicron.c convert from malloc(9) to kmem(9) 2018-10-22 19:38:06 +00:00
ata_raid_nvidia.c convert from malloc(9) to kmem(9) 2018-10-22 19:38:06 +00:00
ata_raid_promise.c convert from malloc(9) to kmem(9) 2018-10-22 19:38:06 +00:00
ata_raid_subr.c dumb instruction 2017-06-25 12:29:32 +00:00
ata_raid_via.c convert from malloc(9) to kmem(9) 2018-10-22 19:38:06 +00:00
ata_raid.c Some more empty-string --> NULL conversions for module dependencies 2019-04-26 11:51:56 +00:00
ata_raidreg.h
ata_raidvar.h
ata_recovery.c Merge jdolecek-ncqfixes branch 2018-10-22 20:13:47 +00:00
ata_subr.c don't touch the queue structure in ata_queue_active() if atabus is already 2018-11-07 17:05:54 +00:00
ata_wdc.c hold channel lock during whole ata_dmaerr()/ata_downgrade_mode() - 2018-11-12 18:51:01 +00:00
ata.c chuq does not like insomniac allocations so unlock-alloc-lock instead. 2019-10-21 18:58:57 +00:00
ataconf.h split off functions used by 'wd* at umass?' into separate file, unfortunately 2017-10-10 17:19:38 +00:00
atareg.h Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch 2017-10-07 16:05:31 +00:00
atavar.h drop AT_RST_NOCMD, it's a cut'n'paste side effect 2019-04-05 21:31:44 +00:00
files.ata only include umass_isdata.c if atabus present, and likewise ata_subr.c 2018-10-24 07:42:12 +00:00
ld_ataraid.c Acquire kernel_lock in the bp->b_iodone callback. 2020-01-17 19:30:51 +00:00
Makefile
sata_subr.c split the port status reporting to new function sata_interpret_det() 2018-06-21 21:52:15 +00:00
satafis_subr.c Set the ATAPI "BYTE COUNT LIMIT" field in the SATA case like we 2019-08-15 09:00:23 +00:00
satafisreg.h
satafisvar.h Merge support for SATA NCQ (Native Command Queueing) from jdolecek-ncq branch 2017-10-07 16:05:31 +00:00
satapmp_subr.c Merge jdolecek-ncqfixes branch 2018-10-22 20:13:47 +00:00
satapmpreg.h
satapmpvar.h mark satapmp_rescan() static, it's not to be used outside satapmp_subr.c 2018-07-29 14:11:30 +00:00
satareg.h
satavar.h split the port status reporting to new function sata_interpret_det() 2018-06-21 21:52:15 +00:00
wd.c New ioctl DIOCGSECTORALIGN returns sector alignment parameters. 2020-03-02 16:01:56 +00:00
wdvar.h New ioctl DIOCGSECTORALIGN returns sector alignment parameters. 2020-03-02 16:01:56 +00:00