aboutsummaryrefslogtreecommitdiff
path: root/linux/dev/drivers
Commit message (Collapse)AuthorAgeFilesLines
* linux: Add missing includeSamuel Thibault2024-03-041-0/+2
| | | | Otherwise the types in linux/dev/include/linux/skbuff.h are unknown.
* 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.
* genhd: Fix building without IDE driversSamuel Thibault2020-11-151-2/+5
| | | | | * linux/dev/drivers/block/genhd.c [!CONFIG_BLK_DEV_IDE] (device_setup): Do not call ide_setup.
* Support GPT disklabels and build them by defaultнаб2020-06-011-0/+251
| | | | Based on UEFI 2.8A spec
* spl: Remove intpri arraySamuel Thibault2019-11-101-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And simplify prtnull vs intnull vs linux_bad_intr. * i386/i386/ipl.h (intpri): Remove declaration * i386/i386/pic.c (prtnull_count): Remove variable. (prtnull): Remove function. * i386/i386/pic.h (prtnull): Remove declaration. * i386/i386at/autoconf.c (take_dev_irq, take_ctlr_irq): Use ivect instead of intpri to determine irq availability. Do not set intpri. * i386/i386at/pic_isa.c (ivect): Replace prtnull with intnull. (intpri): Remove array. * linux/dev/arch/i386/kernel/irq.c (linux_intr_pri): Remove variable. (linux_bad_intr): Remove function. (setup_x86_irq): Do not check intpri coherency. Do not set intpri. Set default ivect to intnull instead of linux_bad_intr. (probe_irq_on): Check ivect against intnull instead of linux_bad_intr. Do not set intpri. (probe_irq_off): Likewise. (reserve_mach_irqs): Do not check against prtnull. (old_clock_pri): Remove variable. (init_IRQ): Do not set intpri. Do not set ivect to linux_bad_intr. (restore_IRQ): Do not set ivect. * i386/i386/pit.c (clkstart): Do not set intpri. * i386/i386at/kd_mouse.c (kd_mouse_open, kd_mouse_close): Likewise. * linux/dev/drivers/block/genhd.c (device_setup): Do not set linux_intr_pri. * linux/dev/glue/block.c (init_partition, device_open): Likewise. * linux/dev/glue/net.c (device_open): Likewise. * linux/dev/glue/glue.h (linux_intr_pri, linux_bad_intr): Remove declarations.
* 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.
* Pass ide and hd kernel options to ide driverSamuel Thibault2014-11-121-0/+26
| | | | | | | | | * linux/dev/drivers/block/genhd.c: Include <linux/hdreg.h> and <alloca.h> (device_setup): Look for ide and hd options, and call ide_setup with them. * linux/src/drivers/block/ide.c (ide_setup) [MACH]: Parse hd[0-7] instead of hd[a-h].
* 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 quiet flag to block I/OSamuel Thibault2014-02-101-1/+1
| | | | | | | | | | | | | | This avoids grub & such making Mach print flurries of floppy errors. * linux/dev/include/linux/blkdev.h (request): Add `quiet' field. * linux/dev/include/linux/blk.h (end_request): Print I/O error only if the `quiet' field of the request is 0. * linux/dev/include/linux/fs.h (ll_rw_block): Add `quiet' parameter. * linux/dev/glue/block.c (ll_rw_block): Add `quiet' parameter, copied into the request. (bread, rdwr_partial, rdwr_full): Pass 0 to `ll_rw_block''s `quiet' parameter. * linux/dev/drivers/block/floppy.c (floppy_revalidate): Pass 1 to `ll_rw_block''s `quiet' parameter.
* 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.
* Fix spurious error on accessing fd1Samuel Thibault2012-12-271-0/+2
| | | | | | | Cherry picked from Linux kernel commit 76c25284e0d845bff4ee1031721556148af4db1c * linux/dev/drivers/block/floppy.c (config_types): Clear from `allowed_drive_mask' floppy drives whose cmos type is 0.
* Raise block device interrupt level to SPL6Samuel Thibault2011-10-101-1/+1
| | | | | | * linux/dev/drivers/block/genhd.c (device_setup): Set linux_intr_pri to SPL6. * linux/dev/glue/block.c (init_partition, device_open): Likewise.
* Remove set but unused variablesGuillem Jover2011-09-021-4/+2
| | | | | | | * linux/dev/drivers/block/floppy.c (setup_rw_floppy): Remove `dflags'. (floppy_eject): Remove `dummy'. * linux/src/drivers/net/8390.c (ethdev_init): Remove `ei_local'. * linux/src/drivers/scsi/ppa.c (ppa_detect): Remove `ppb'.
* Fix declarationsSamuel Thibault2011-08-312-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * device/ds_routines.h (io_done_list): Add variable declaration. (device_io_map): Keep variable declaration and move definition to... * device/ds_routines.c: ... here. * i386/i386/fpu.c: Include <i386/pic.h> (curr_ipl): Remove declaration. (fpintr): Add int unit parameter. * linux/dev/glue/glue.h: New header. * i386/i386/fpu.h (fpintr): Add function prototype. * i386/i386/hardclock.c (clock_interrupt, linux_timer_intr): Remove prototypes. [LINUX_DEV]: Include <linux/dev/glue/glue.h> * i386/i386/ipl.h (curr_ipl): Add declaration. * i386/i386/pic.h (curr_pic_mask, pic_mask, prtnull, intnull): Add declarations. * i386/i386at/kd.h (kdintr): Add declaration. * i386/i386at/pic_isa.c: Include <i386/fpu.h> and <i386at/kd.h> (intnull, fpintr, hardclock, kdintr, prtnull): Remove prototypes. * i386/xen/xen.c: Include <kern/mach_clock.h> (clock_interrupt): Remove prototype. * linux/dev/arch/i386/kernel/irq.c: Include <linux/dev/glue/glue.h> and <machine/machspl.h> (linux_timer_intr, splhigh, spl0, curr_ipl, curr_pic_mask, pic_mask, get_options): Remove declarations. * linux/dev/drivers/block/floppy.c: Include <linux/dev/glue/glue.h> (issig, get_options): Remove declarations. * linux/dev/drivers/block/genhd.c: Include <linux/dev/glue/glue.h> (linux_intr_pri): Remove declaration. * linux/dev/glue/block.c: Include <devices/ds_routines.h> and <linux/dev/glue/glue.h>. (device_io_map, blksize_size): Remove declarations. * linux/dev/glue/kmem.c: Include <kern/printf.h> and <linux/dev/glue/glue.h> (alloc_contig_mem, printf): Remove declarations. * linux/dev/glue/misc.c: Include <printf.h> and <linux/dev/glue/glue.h> (vm_map_lookup_entry, printf): Remove prototypes. * linux/dev/glue/net.c: Include <kern/printf.h>, <device/ds_routines.h> and <linux/dev/glue/glue.h>. (linux_intr_pri, io_done_list): Remove declarations. * linux/dev/init/main.c: Include <machine/model_dep.h> and <linux/dev/glue/glue.h>. (phys_last_addr, alloc_contig_mem, free_contig_mem, init_IRQ, restore_IRQ, startrtclock, linux_version_init, linux_kmem_init, pci_init, linux_net_emulation_init, device_setup, linux_printk, linux_timer_intr, spl0, splhigh, form_pic_mask, linux_bad_intr, prtnull, intnull, linux_sched_init, pcmcia_init): Remove declarations. * linux/dev/kernel/sched.c: Include <kern/printf.h>, <machine/machspl.h> and <linux/dev/glue/glue.h>. (alloc_contig_mem, free_contig_mem, splhigh, splx, linux_soft_intr, issig, printf, linux_auto_config): Remove prototypes. * linux/dev/kernel/softirq.c: Include <linux/dev/glue/glue.h>. * linux/src/drivers/block/floppy.c: Include <linux/dev/glue/glue.h>. (get_options): Remove prototype. * linux/src/init/main.c: Include <linux/dev/glue/glue.h> (init_IRQ): Remove prototype.
* Match signedness of char pointer comparisons and assignmentsGuillem Jover2011-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | * linux/dev/drivers/block/genhd.c (msdos_partition): Cast `data' assignment to `unsigned char *'. * linux/src/drivers/block/ide-cd.c (cdrom_queue_request_sense): Cast `buffer' assignment to `unsigned char *'. (cdrom_transfer_packet_command): Change `cmd_buf' argument type to `unsigned char *'. (cdrom_read_capacity): Cast `pc.buffer' assignments to `unsigned char *'. Use temporary `model' and `fw_rev' `const char *' variables to compare against literal strings and characters. * linux/src/drivers/block/ide.c (execute_drive_cmd): Cast `args' assignment to `byte *'. (ide_open): Cast `rq.buffer' assignment to `char *'. (ide_release): Likewise. (ide_ioctl): Likewise. (do_identify): Cast variables being compared against literal string to `char *'. (probe_for_drive): Likewise. * linux/src/drivers/block/ide.h (struct packet_command): Change `buffer' type to `unsigned char *'.
* Add sis900 driverSamuel Thibault2009-11-281-0/+4
| | | | | | | | | | | | 2005-05-01 Andreas B. Mundt <andi.mundt@web.de> * i386/README-Drivers: Likewise. * i386/linux/Makefile.in (linux-net-files): Added 'sis900'. * i386/linux/configure.ac (sis900): New driver. * linux/dev/drivers/net/Space.c: Add conditional probes 'sis900' driver. * linux/src/drivers/net/sis900.c: New file. * linux/src/drivers/net/sis900.h: Likewise.
* 2007-03-27 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-4/+0
| | | | | | | | | | | | | | | | | | | * kern/pcsample.h: Remove the automatic cvs log appending machinery. * linux/dev/drivers/scsi/g_NCR5380.c: Likewise. * linux/src/drivers/net/sk_g16.h: Likewise. * linux/src/drivers/scsi/AM53C974.c: Likewise. * linux/src/drivers/scsi/AM53C974.h: Likewise. * linux/src/drivers/scsi/NCR5380.c: Likewise. * linux/src/drivers/scsi/NCR5380.h: Likewise. * linux/src/drivers/scsi/aha152x.c: Likewise. * linux/src/drivers/scsi/aha1542.h: Likewise. * linux/src/drivers/scsi/g_NCR5380.c: Likewise. * linux/src/drivers/scsi/g_NCR5380.h: Likewise. * linux/src/drivers/scsi/gdth.c: Likewise. * linux/src/drivers/scsi/qlogicisp.c: Likewise. * linux/src/drivers/scsi/qlogicisp.h: Likewise. * linux/src/drivers/scsi/t128.c: Likewise. * linux/src/drivers/scsi/t128.h: Likewise.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-650/+0
| | | | | * linux/dev/drivers/scsi/scsi.h: Move file... * linux/src/drivers/scsi/scsi.h: ... here.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-1679/+0
| | | | | * linux/dev/drivers/scsi/seagate.c: Move file... * linux/src/drivers/scsi/seagate.c: ... here.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-3281/+0
| | | | | * linux/dev/drivers/scsi/aha152x.c: Move file... * linux/src/drivers/scsi/aha152x.c: ... here.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-1290/+0
| | | | | * linux/dev/drivers/scsi/sr.c: Move file... * linux/src/drivers/scsi/sr.c: ... here.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-128/+0
| | | | | * linux/dev/drivers/scsi/sd_ioctl.c: Move file... * linux/src/drivers/scsi/sd_ioctl.c: ... here.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-1691/+0
| | | | | * linux/dev/drivers/scsi/sd.c: Move file... * linux/src/drivers/scsi/sd.c: ... here.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-3585/+0
| | | | * linux/dev/drivers/scsi/scsi.c: Remove file.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-545/+0
| | | | * linux/dev/drivers/scsi/hosts.c: Remove file.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-3839/+0
| | | | | * linux/dev/drivers/block/ide.c: Move file... * linux/src/drivers/block/ide.c: ... here.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-2773/+0
| | | | | | * linux/dev/drivers/block/ide-cd.c: Remove file. * linux/src/drivers/block/ide-cd.c (cdrom_sleep): Don't define function `#ifndef MACH'.
* 2006-02-02 Sergio Lopez <koro@sinrega.org>Thomas Schwinge2009-06-181-1/+1
| | | | | | | * linux/src/drivers/scsi/eata_pio.c (eata_pio_detect): Fix a off-by-one error when probing. * linux/src/drivers/scsi/eata_dma.c (eata_detect): Likewise. * linux/dev/drivers/scsi/eata_dma.c (eata_detect): Likewise.
* 2006-02-01 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-1/+1
| | | | | | * linux/dev/drivers/block/genhd.c (add_bsd_partition): Only define if both MACH and CONFIG_BSD_DISKLABEL are defined. Reported by Matheus Morais <matheus.morais@gmail.com>.