aboutsummaryrefslogtreecommitdiff
path: root/linux/dev/drivers/block/ahci.c
Commit message (Collapse)AuthorAgeFilesLines
* ahci: Do not even try AHCI identify when device is ATAPIAndrea Monaco2021-09-121-3/+4
| | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_port): Avoid trying AHCI identify when PxCMD.ATAPI is set.
* ahci: Fix warning contentAndrea Monaco2021-09-121-1/+1
| | | | | * linux/dev/drivers/block/ahci.c (ahci_identify): Fix warning for the identify timeout.
* block: Look out for disk sector number overflowSamuel Thibault2021-08-171-4/+15
| | | | | | | | | | * linux/dev/drivers/block/ahci.c (ahci_do_port_request): Reject sectors beyond LBA48 or LBA28. * linux/dev/glue/block.c (check_rw_block): New function. (rdwr_partial, rdwr_full): Use check_rw_block to reject block number overflows. * linux/src/drivers/block/ide.c (do_rw_disk): Reject sectors beyond LBA28 or CHS.
* ahci: Fix variable nameAndrea G. Monaco2021-02-211-4/+4
| | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Rename spd to det.
* Fix printk formatSamuel Thibault2019-08-111-5/+5
| | | | | * linux/dev/drivers/block/ahci.c (ahci_identify, ahci_probe_port): Fix format.
* ahci: Ignore multifunction bit in PCI header typeSamuel Thibault2019-04-271-0/+2
| | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Clear bit 7 of hdrtype.
* Disable probing legacy IDE when AHCI driver worksSamuel Thibault2016-01-291-0/+15
| | | | | | | | * linux/src/drivers/block/ide.c (default_io_base): Do not qualify const. (ide_disable_base): New function. * linux/dev/include/linux/blk.h (ide_disable_base): New declaration. * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Call ide_disable_base with each I/O BAR of the AHCI PCI card.
* Use PCI macrosSamuel Thibault2016-01-291-2/+2
| | | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Use PCI_BASE_ADDRESS_SPACE_IO and PCI_BASE_ADDRESS_MEM_MASK macros instead of hardcoded values.
* ahci: print PCI bus/dev/fun in hexadecimalSamuel Thibault2016-01-291-14/+14
| | | | | * linux/dev/drivers/block/ahci.c: Print PCI bus/dev/fun number in hexadecimal
* Fix ahci unit MAX_PORTS checkSamuel Thibault2015-11-271-1/+1
| | | | | * linux/dev/drivers/block/ahci.c (ahci_do_request): Fix checking unit against MAX_PORTS.
* Fix missing format in printkSamuel Thibault2015-11-271-1/+1
| | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Add missing format.
* Fix restoring interrupts on timeoutSamuel Thibault2015-06-301-0/+1
| | | | | * linux/dev/drivers/block/ahci.c (ahci_identify): Restore flags before returning on timeout.
* Print about powered-down AHCI portsSamuel Thibault2015-06-291-6/+40
| | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Print messages when device is present but powered down.
* Show odd number of portsSamuel Thibault2015-03-051-1/+1
| | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Show odd number of ports.
* Increase possible number of AHCI devices to 8Samuel Thibault2014-03-171-2/+2
| | | | | | | by reducing possible number of partitions to 32. * linux/dev/drivers/block/ahci.c (MAX_PORTS): Set to 8. (PARTN_BITS): Set to 5.
* AHCI driver cleanupsSamuel Thibault2014-02-231-106/+154
| | | | | | | | | | | | | | | * linux/dev/drivers/block/ahci.c (struct port): Add id and is_cd fields. (ahci_end_request): Only print error if quiet flag of the request is not set. (ahci_do_port_request): Upgrade sector parameter to 64 bit. Include those bits in the LBA48 request. (ahci_do_request): Upgrade sector count to 64bit. Only print errors if quiet flag of the request is not set. (ahci_probe_port): Move identify code... (ahci_identify): ... to new function. Handle WIN_PIDENTIFY case to recognize ATAPI devices. (ahci_probe_port): Also try WIN_PIDENTIFY command. (ahci_geninit): Avoid checking partition table on empty devices.
* Add partitioning reload support to ahciSamuel Thibault2013-06-241-2/+33
| | | | | | | * linux/dev/drivers/block/ahci.c (port): Add `gd' field. (ahci_ioctl): New function. (ahci_fops): Fill `ioctl' field with `ahci_ioctl'. (ahci_probe_pci): Fill `gd' field with `gd'.
* Fix printing ahci PCI dev and funSamuel Thibault2013-06-241-2/+3
| | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Compute `dev' and `fun' earlier so they can be printed.
* Do not skip AHCI controller without HOST_CAP_ONLYSamuel Thibault2013-06-091-4/+0
| | | | | | | | We rather rely on the announced PCI type to determine whether to use IDE or AHCI. * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Do not skip AHCI controller without HOST_CAP_ONLY.
* Add timeout to ahci IDENTIFYSamuel Thibault2013-06-091-1/+15
| | | | | | * linux/dev/drivers/block/ahci.c (identify_timeout): New function. (identify_timer): New variable. (ahci_probe_port): Add timer to abandon identify command.
* Fix printf formatSamuel Thibault2013-06-091-3/+3
| | | | | | * linux/dev/drivers/block/ahci.c (ahci_do_request): Cast capacity into unsigned long and use %lu format. (ahci_probe_port): Cast size into unsigned and use %u format.
* Fix formatSamuel Thibault2013-06-091-3/+3
|
* Add LBA48 support to AHCI driverSamuel Thibault2013-05-301-7/+37
| | | | | | | | | | | | * linux/dev/drivers/block/ahci.c (port): Extend `capacity' field type to unsigned long long. Add `lba48' field. Make `identify' field unsigned. (ahci_do_port_request): When `lba48' is true, use WIN_READDMA_EXT and WIN_WRITEDMA_EXT commands. (ahci_probe_port): Test lba48 flag, read capacity and set `lba48' accordingly. Display size in GiB above 10GiB. * linux/src/include/linux/hdreg.h (WIN_READDMA_EXT, WIN_WRITEDMA_EXT): New macros (hd_driveid): Add `command_set_2' and lba_capacity_2' fields.
* Add missing parameters to printfSamuel Thibault2013-05-111-1/+1
| | | | | * linux/dev/drivers/block/ahci.c (ahci_probe_dev): Add missing parameters to printf.
* Add AHCI driverSamuel Thibault2013-05-101-0/+854
* linux/dev/glue/kmem.c (vmtophys): New function. * linux/dev/include/linux/mm.h (vmtophys): New prototype. * linux/src/include/linux/pci.h (PCI_CLASS_STORAGE_SATA, PCI_CLASS_STORAGE_SATA_AHCI): New macros. * linux/dev/drivers/block/ahci.c: New file. * linux/dev/include/ahci.h: New file. * linux/Makefrag.am (liblinux_a_SOURCES): Add linux/dev/drivers/block/ahci.c and linux/dev/drivers/block/ahci.h. * linux/src/drivers/block/ide.c: Include <ahci.h>. (probe_for_hwifs): Call ahci_probe_pci.