(grub_scsi_read_capacity10): ... this.
(grub_scsi_read_capacity16): New function.
(grub_scsi_open): Use read_capacity16 if read_capacity10 returned
0xffffffff.
Fix off-by-one error.
* include/grub/scsi.h (grub_scsi): Rename size to last_block and make it
64-bit unsigned.
* include/grub/scsicmd.h (grub_scsi_read_capacity): Rename to ...
(grub_scsi_read_capacity10): ... this.
(grub_scsi_read_capacity_data): Rename to ...
(grub_scsi_read_capacity10_data): ... this. Rename size to last_block.
(grub_scsi_read_capacity16): New struct.
(grub_scsi_read_capacity16_data): Likewise.
(grub_scsi_cmd_t): Rename grub_scsi_cmd_read_capacity to
grub_scsi_cmd_read_capacity10.
New command grub_scsi_cmd_read_capacity16.
* grub-core/disk/scsi.c (grub_scsi_write10): Uncomment. Make buffer
a const pointer.
(grub_scsi_write): Implement.
* include/grub/scsi.h (grub_scsi_dev): Make write buffer a const pointer
* grub-core/Makefile.core.def (ata_pthru): Removed.
(ahci): New module.
(pata): Likewise.
* grub-core/bus/usb/ohci.c (GRUB_MOD_FINI): Unregister preboot hook
on unload.
* grub-core/commands/hdparm.c (grub_hdparm_do_ata_cmd): Use ATA
readwrite.
(grub_hdparm_do_check_powermode_cmd): Likewise.
(grub_hdparm_do_smart_cmd): Likewise.
(grub_hdparm_set_val_cmd): Likewise.
(grub_cmd_hdparm): Likewise. Check thta we have an ATA device.
* grub-core/disk/ahci.c: New file.
* grub-core/disk/ata.c: Factor out the low-level part into ...
* grub-core/disk/pata.c: ... here.
* grub-core/disk/ata_pthru.c: Contents moved to ...
* grub-core/disk/pata.c: ... here.
* grub-core/disk/scsi.c (grub_scsi_names): New array.
(grub_scsi_iterate): Use grub_scsi_names.
(grub_scsi_open): Likewise.
* grub-core/kern/disk.c (grub_disk_ata_pass_through): Removed.
* include/grub/ata.h (grub_ata_commands): Add DMA commands.
(grub_ata_regs_t): New struct.
(grub_disk_ata_pass_through_parms): Likewise.
(grub_ata_device): Renamed to ...
(grub_ata): ... this.
(grub_ata_dev): New struct.
Removed all low-level inline functions.
* include/grub/scsi.h: Add PATA and AHCI subsystems.
(grub_scsi_dev): Removed 'name' and 'id'. Added 'id' parameter to
iterate hooks and open. All users updated.
* util/grub-install.in: Handle AHCI disk module.
* grub-core/kern/misc.c (grub_divmod64_full): Renamed to ...
(grub_divmod64): ... this.
* include/grub/misc.h (grub_divmod64): Removed. All users switch to full
version.
All users updated.
* disk/loopback.c (grub_loopback): Remove has_partitions.
All users updated.
(options): Remove partitions. All users updated.
* util/grub-fstest.c (fstest): Don't pass "-p" to loopback.
* util/i386/pc/grub-setup.c (setup): copy partition table only when
actual partition table is found.