summaryrefslogtreecommitdiff
path: root/linux/src/drivers
AgeCommit message (Collapse)Author
2015-07-18linux/net: fix build with -O0Justus Winter
* linux/src/drivers/net/pci-scan.c: Avoid #erroring out.
2014-11-21Correct GCC's -Wformat-security issuesDavid Michael
* linux/pcmcia-cs/clients/axnet_cs.c (axdev_init): Add a format string literal where printk only has a single variable argument. * linux/src/drivers/net/3c507.c (el16_probe1): Likewise. * linux/src/drivers/net/3c509.c (el3_probe): Likewise. * linux/src/drivers/net/3c515.c (init_module): Likewise. (tc515_probe): Likewise. * linux/src/drivers/net/ac3200.c (ac_probe1): Likewise. * linux/src/drivers/net/apricot.c (apricot_probe): Likewise. * linux/src/drivers/net/at1700.c (at1700_probe1): Likewise. * linux/src/drivers/net/de4x5.c (de4x5_hw_init): Likewise. * linux/src/drivers/net/de600.c (de600_probe): Likewise. * linux/src/drivers/net/de620.c (de620_probe): Likewise. * linux/src/drivers/net/depca.c (depca_hw_init): Likewise. * linux/src/drivers/net/e2100.c (e21_probe1): Likewise. * linux/src/drivers/net/eepro.c (eepro_probe1): Likewise. * linux/src/drivers/net/eepro100.c (speedo_found1): Likewise. * linux/src/drivers/net/eexpress.c (eexp_hw_probe): Likewise. * linux/src/drivers/net/ewrk3.c (ewrk3_hw_init): Likewise. * linux/src/drivers/net/fmv18x.c (fmv18x_probe1): Likewise. * linux/src/drivers/net/hp-plus.c (hpp_probe1): Likewise. * linux/src/drivers/net/hp.c (hp_probe1): Likewise. * linux/src/drivers/net/lance.c (lance_probe1): Likewise. * linux/src/drivers/net/ne.c (ne_probe1): Likewise. * linux/src/drivers/net/pcnet32.c (pcnet32_probe1): Likewise. * linux/src/drivers/net/seeq8005.c (seeq8005_probe1): Likewise. * linux/src/drivers/net/smc-ultra.c (ultra_probe1): Likewise. * linux/src/drivers/net/smc-ultra32.c (ultra32_probe1): Likewise. * linux/src/drivers/net/wd.c (wd_probe1): Likewise.
2014-11-13Add nodma optionsSamuel Thibault
Some very slow qemu instances would eventually trigger DMA timeouts, let's give a way to disable DMA there, it does not actually slow down operations anyway. * linux/src/drivers/block/ide.h (ide_drive_s): Add nodma field. * linux/src/drivers/block/ide.c (do_identify): Do not call dmaproc(ide_dma_check) when nodma is 1. (ide_setup): Add nodma option.
2014-11-12Pass ide and hd kernel options to ide driverSamuel Thibault
* 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].
2014-09-01Fix printf warningPietro Braione
linux/src/drivers/net/sundance.c (start_tx): Fix format string according to parameter.
2014-02-10Make open return ENXIO on missing CD-ROMSamuel Thibault
* linux/src/drivers/block/ide-cd.c (ide_cdrom_open): Return -ENXIO when CD sense failed.
2014-02-10Add quiet flag to CD I/OSamuel Thibault
* linux/src/drivers/block/ide-cd.c (cdrom_queue_packet_command): Add `quiet' parameter, copied into the request. (cdrom_decode_status): Do not print I/O error when `quiet' field of request is non-zero. (cdrom_end_request): Do not print sense results when `quiet' field of request is non-zero. (cdrom_check_status, cdrom_read_capacity, cdrom_read_tocentry): Pass 1 to `cdrom_queue_packet_command''s `quiet' parameter. (cdrom_lockdoor, cdrom_eject, cdrom_pause, cdrom_startstop, cdrom_read_subchannel, cdrom_mode_sense, cdrom_mode_select, cdrom_play_lba_range_1, cdrom_read_block, cdrom_load_unload, ide_cdrom_ioctl): Pass 0 to `cdrom_queue_packet_command''s `quiet' parameter.
2014-02-10Add missing initializationSamuel Thibault
* linux/src/drivers/block/ide.c (ide_init_drive_cmd): Initialize `quiet' field of request to 0;
2014-01-05linux: fix bit testsJustus Winter
The pattern is !x&y. An expression of this form is almost always meaningless, because it combines a boolean operator with a bit operator. In particular, if the rightmost bit of y is 0, the result will always be 0. Fixed using coccinelle. // !x&y combines boolean negation with bitwise and // // Confidence: High // Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU. GPLv2. // URL: http://www.emn.fr/x-info/coccinelle/rules/notand.html // Options: @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) * linux/src/drivers/scsi/FlashPoint.c: Fix bit tests.
2014-01-05linux: fix bit testsJustus Winter
The pattern is !x&y. An expression of this form is almost always meaningless, because it combines a boolean operator with a bit operator. In particular, if the rightmost bit of y is 0, the result will always be 0. Fixed using coccinelle. // !x&y combines boolean negation with bitwise and // // Confidence: High // Copyright: (C) Gilles Muller, Julia Lawall, EMN, DIKU. GPLv2. // URL: http://www.emn.fr/x-info/coccinelle/rules/notand.html // Options: @@ expression E; constant C; @@ ( !E & !C | - !E & C + !(E & C) ) * linux/src/drivers/net/tlan.c: Fix bit tests. * linux/src/drivers/scsi/AM53C974.c: Likewise. * linux/src/drivers/scsi/FlashPoint.c: Likewise. * linux/src/drivers/scsi/NCR5380.c: Likewise. * linux/src/drivers/scsi/t128.c: Likewise.
2013-05-10Add AHCI driverSamuel Thibault
* 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.
2012-12-27Fix slow boot in virtualboxSamuel Thibault
By disabling some of the most slow drivers by default, and giving progress feedback to the user. * linux/configfrag.ac (CONFIG_SCSI_NCR53C7xx, CONFIG_SCSI_AIC7XXX, CONFIG_SCSI_GDTH): Disable by default * linux/src/drivers/scsi/eata.c (__initfunc): Don't feed line in probe message. * linux/src/drivers/scsi/hosts.c (scsi_init): Print SCSI probe progress.
2012-12-21ide: Increase WAIT_DRQ to accomodate some CF cards and SSD drives.David S. Miller
Based upon a patch by Philippe De Muyter, and feedback from Mark Lord and Robert Hancock. As noted by Mark Lord, the outdated ATA1 spec specifies a 20msec timeout for setting DRQ but lots of common devices overshoot this. Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from Linux kernel commit 602da297e293eb2cbd28dcdbbe247593a46a853a) * linux/src/drivers/block/ide.h (WAIT_DRQ): Increase to 1 s.
2012-12-21IDE disk drives with unusual C/H/S.Thomas Schwinge
* linux/src/drivers/block/ide.c: Partially update to Linux 2.0.40 code.
2012-11-19Fix compilation error with older versions of GCCMatthew Leach
Some versions of GCC will error if you define a type twice (even if the definition is the same). The NCR53C8XX SCSI driver defines 'vm_offset_t', this is also defined in vm_types.h and will therefore cause a compilation error depending on the GCC version. * linux/src/drivers/scsi/ncr53c8xx.c [!MACH] (vm_offset_t, vm_size_t): Don't define types.
2012-09-23Fix panic on irq >= 16Gianluca Guida
* linux/src/drivers/net/pci-scan.c (pci_drv_register): Skip device if we are getting an invalid IRQ >= 16 and different from 255 (it happens in some motherboard).
2012-09-23Update DMA auto-enabling, make forcing DMA an optionSergio Lopez
* linux/configfrag.ac (--enable-ide-forcedma): Add option. * linux/src/drivers/block/ide.c (ide_probe_promise_20246): Do not call ide_init_promise. (probe_for_hwifs): Add SI, VIA, AL PCI probing. * linux/src/drivers/block/ide.h (hwif_chipset_t): Add hpt343, udma and ultra66 chipsets. * linux/src/drivers/block/triton.c: Update to upstream 1.14 version. * linux/src/include/linux/hdreg.h (HDIO_GET_IDENTITY): Rename to ... (HDIO_OBSOLETE_IDENTITY): ... new macro. (HDIO_GET_IDENTITY): New macro. (hd_driveid): Add fields for extended identification.
2012-03-24Add missing phystokv/kvtophys callsSamuel Thibault
* i386/i386/vm_param.h [!MACH_XEN]: Do not include <xen/public/xen.h>. * i386/i386at/model_dep.c (init_alloc_aligned): Use phystokv to compare physical memory addresses with kernel start, end, and symbol table. * i386/intel/pmap.c (pmap_enter): Use kvtophys to convert ptp pointer to pte entry. * linux/dev/init/main.c (alloc_contig_mem, linux_init): Use phystokv to convert allocated pages to virtual pointer. * linux/src/include/asm-i386/io.h: Include <machine/vm_param.h>. (virt_to_phys): Call _kvtophys. (phys_to_virt): Call phystokv. * linux/src/include/linux/compatmac.h: Include <asm/io.h>. (ioremap): Use phys_to_virt to convert physical address to virtual pointer. (my_iounmap): Likewise. * linux/dev/include/asm-i386/page.h: Include <mach/vm_param.h>. (PAGE_SHIFT, PAGE_SIZE, PAGE_MASK): Remove macros. * linux/src/drivers/scsi/ncr53c8xx.c (vm_size_t): Remove type. * linux/dev/glue/net.c: Include <machine/vm_param.h> (device_write): Call phystokv to convert from physical page address to virtual pointer. * linux/dev/glue/block.c (alloc_buffer, free_buffer, rdwr_full): Likewise.
2012-03-20Change types holding cpu flags from int to longGuillem Jover
On amd64 the cpu flags is a 64-bit word, and long on 32-bit systems is 32-bit wide anyway. * linux/dev/glue/kmem.c (linux_kmalloc, linux_kfree, __get_free_pages, free_pages): Use unsigned long instead of unsigned. * linux/dev/include/asm-i386/system.h (__save_flags, __restore_flags): Likewise. * linux/dev/kernel/printk.c (printk): Likewise. * linux/src/drivers/scsi/advansys.c (DvcEnterCritical, DvcLeaveCritical, advansys_queuecommand, advansys_abort, advansys_reset, advansys_interrupt, interrupts_enabled, AdvISR): Likewise. * linux/src/drivers/scsi/aha152x.c (aha152x_intr): Likewise. * linux/src/drivers/scsi/aha1542.c (aha1542_intr_handle): Likewise. * linux/src/drivers/scsi/aic7xxx.c (aic7xxx_done_cmds_complete): Likewise. * linux/src/drivers/scsi/ultrastor.c (log_ultrastor_abort, ultrastor_queuecommand, ultrastor_abort): Likewise.
2012-02-19Fix format for string printSamuel Thibault
* linux/src/drivers/net/3c505.c (elp_sense): Use %s format for printing a mere string, not the string.
2012-02-19Fix format for string printSamuel Thibault
* linux/src/drivers/net/8390.c: Use %s format for printing a mere string, not the string.
2012-02-19Fix format for string printSamuel Thibault
* linux/src/drivers/net/3c503.c (el2_probe1): Use %s format for printing a mere string, not the string.
2012-02-19Fix format for string printSamuel Thibault
* linux/src/drivers/scsi/aha1542.c (aha1542_setup): Use %s format for printing a mere string, not the string.
2012-02-19Fix format for string printSamuel Thibault
* linux/src/drivers/scsi/advansys.c (asc_prt_line): Use %s format for printing a mere string, not the string.
2011-10-10Leave interrupts enabled in sym53c8xx driverSamuel Thibault
The driver can work with them, and request_irq works fine with them. * linux/src/drivers/scsi/sym53c8xx.c (ncr_attach): Do not pass SA_INTERRUPT to request_irq().
2011-10-08Add sym53c8xx driver from linux 2.2Samuel Thibault
This driver supports qemu's SCSI host device. Unfortunately it seems to be breaking the network device, so test with care. * linux/Makefrag.am (liblinux_a_SOURCES): Add linux/src/drivers/scsi/sym53c8xx{.c,_comm.h,.h,_defs.h} * linux/configfrag.ac: Add AC_Linux_DRIVER([sym53c8xx] to enable CONFIG_SCSI_SYM53C8XX. * linux/dev/glue/kmem.c (MEM_CHUNKS): Increase to 16. * linux/src/drivers/scsi/hosts.c [CONFIG_SCSI_SYM53C8XX]: Include "sym53c8xx.h". (builtin_scsi_hosts): include SYM53C8XX.
2011-09-02Change argument name to match function body usageGuillem Jover
Otherwise the function wrongly uses the global symbol. * linux/src/drivers/scsi/ppa.c (ppa_nibble_in): Rename `str_p' argument to `base'.
2011-09-02Disable set but unused variableGuillem Jover
* linux/src/drivers/scsi/gdth.c (gdth_detect): Conditionalize `b' on [LINUX_VERSION_CODE < 0x020000]. Do not preset it to 0, it's initialized later on when needed.
2011-09-02Remove set but unused variablesGuillem Jover
* 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'.
2011-08-31Fix undefined operation on assigning self pre-incremented variableGuillem Jover
* linux/src/drivers/scsi/wd7000.c (mail_out): Add `1' instead of pre-incrementing self assigned variable. * linux/src/drivers/net/de4x5.c (de4x5_sw_reset, de4x5_queue_pkt, de4x5_rx) (de4x5_tx, de4x5_rx_ovfc, set_multicast_list, ping_media, mii_get_phy) (de4x5_ioctl): Likewise. * linux/src/drivers/net/depca.c (depca_rx, depca_tx, load_packet): Likewise.
2011-08-31Fix declarationsSamuel Thibault
* 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.
2011-08-30Move cdrom_sleep() definition to its original source fileGuillem Jover
* linux/dev/kernel/sched.c (cdrom_sleep): Move to ... * linux/src/drivers/block/ide-cd.c [MACH]: ... here, make it static. Include <kern/sched_prim.h>.
2011-08-27Match signedness of char pointer comparisons and assignmentsGuillem Jover
* 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 *'.
2011-08-27Disable unused variablesGuillem Jover
* i386/i386at/com.c (comstart): Disable `i' variable. * linux/src/drivers/net/at1700.c (net_close): Disable `lp' variable. * linux/dev/include/linux/blk.h (end_request): Disable `nsect' variable on MACH.
2011-08-27Remove ident tags producing preprocessor warningsGuillem Jover
* linux/src/drivers/scsi/FlashPoint.c: Remove #ident tags.
2011-07-21Whitelist QEMU Hard-Drive for DMA.Samuel Thibault
PIO has become very slow in Linux 2.6.35+, so we do not really have the choice any more. * linux/src/drivers/block/triton.c (good_dma_drives): Re-whitelist QEMU hard drive.
2011-05-18Merge two asm constraintsSamuel Thibault
* linux/src/drivers/scsi/ultrastor.c (find_and_clear_bit_16): Use + modifier instead of using both a read and a write constraint.
2010-09-08Fix non-contiguous PCI functionsSamuel Thibault
* linux/src/drivers/pci/pci.c (scan_bus): Do not set `is_multi' to 0 when a hole is encountered. Detect 0000:ffff and ffff:0000 vendor ID as holes too.
2010-08-01Fix unexpected irq + irq timeout on writeSamuel Thibault
* linux/src/drivers/block/ide.c (do_rw_disk): Set IRQ handler before issuing write command.
2010-07-31Un-whitelist the QEMU harddisk for DMA supportSamuel Thibault
* linux/src/drivers/block/triton.c (good_dma_drives): Remove "QEMU HARDDISK".
2010-03-02whitelist the QEMU harddisk for DMA supportSamuel Thibault
* linux/src/drivers/block/triton.c (good_dma_drives): Add "QEMU HARDDISK".
2010-01-04ignore bogus FDPT information from BIOSSamuel Thibault
2009-12-18Use `unsigned char *' for byte buffersGuillem Jover
* linux/src/drivers/net/apricot.c (struct i596_tbd): Change `data' member type to `unsigned char *'. (struct i596_rfd): Change `data' member type to `unsigned char'. (print_eth): Change argument type to `unsigned char'. Remove unneeded casts. (set_multicast_list): Change cast for print_eth to `unsigned char *'.
2009-12-18Use explicit type int when defining register variablesGuillem Jover
* linux/src/drivers/scsi/aha1542.c (WAIT, WAITd): Define variables with explicit type `register int' and not just `register'.
2009-11-28Add sis900 driverSamuel Thibault
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.
2009-11-01Show EATA probing progressionSamuel Thibault
* linux/src/drivers/scsi/eata.c (port_detect): Print the port being probed.
2009-10-14Update constants to nowadays standardsSamuel Thibault
kern/zalloc.c (zone_map_size): Increase to 64MiB. i386/i386at/model_dep.c (mem_size_init): Reduce cap to 1/6 of memory space to save room for zalloc area. linux/src/drivers/block/ide.h (INITIAL_MULT_COUNT): Set to 16. vm/vm_map.h (VM_MAP_COPY_PAGE_LIST_MAX): Set to 64. vm/vm_object.c (vm_object_cached_max): Set to 4000.
2009-06-182008-07-15 Barry deFreese <bddebian@comcast.net>Samuel Thibault
* device/dev_pager.c (device_pager_data_request, device_pager_data_request_done, device_pager_init_pager): Fix printf formats. * i386/i386/debug_i386.c (dump_ss): Likewise. * i386/i386/trap.c (user_trap): Likewise. * i386/i386at/com.c (comtimer): Likewise. * ipc/ipc_notify (ipc_notify_port_deleted, ipc_notify_msg_accepted, ipc_notify_port_destroyed, ipc_notify_no_senders, ipc_notify_send_once, ipc_notify_dead_name): Likewise. * kern/ipc_kobject.c (ipc_kobject_destroy): Likewise. * kern/sched_prim.c (do_runq_scan): Likewise. * linux/pcmcia-cs/clients/smc91c92_cs.c (smc_start_xmit): Likewise. * linux/src/drivers/net/sundance.c (start_tx): Likewise. * vm/vm_fault.c (vm_fault_page): Likewise. * vm/vm_map.c (vm_map_pmap_enter): Likewise. * vm/vm_object.c (vm_object_collapse): Likewise.
2009-06-18 * linux/src/drivers/net/rtl8139.c (rtl8129_open): Move IRQSamuel Thibault
initialization after ring initialization.
2009-06-18 * linux/src/drivers/block/triton.c (ide_init_triton): Enable BusSamuel Thibault
Mastering if not enabled by BIOS.