aboutsummaryrefslogtreecommitdiff
path: root/linux/src/drivers/scsi
Commit message (Collapse)AuthorAgeFilesLines
* linux: Fix building with C23Sergey Bugaev2024-12-101-1/+4
| | | | | | | | | | | 'true' and 'false' are keywords in C23. This will equally be an issue on older standards if something pulls in stdbool.h, which make these into macros. In either of these two cases, just typedef 'boolean' from 'bool' (avoiding the enum), and rely on 'true' and 'false' being valid values of the type. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Message-ID: <20241210115705.710555-2-bugaevc@gmail.com>
* Fix build with -fno-commonSamuel Thibault2020-03-311-1/+1
| | | | | | | | | | | | | | | | which will be the default in gcc-10. * device/io_req.h (io_inband_cache): Add extern qualifier. * device/tty.h (tthiwat, ttlowat): Likewise. * i386/i386/db_machdep.h (ddb_regs): Likewise. * kern/cpu_number.h (master_cpu): Likewise. * kern/time_stamp.h (ts_tick_count): Likewise. * linux/src/drivers/scsi/in2000.h (proc_scsi_in2000): Likewise. * device/ds_routines.c (io_inband_cache): New variable. * i386/i386/db_interface.c (ddb_regs): Likewise. * kern/processor.c (master_cpu): Likewise. * kern/time_stamp.c (ts_tick_count): Likewise. * linux/pcmcia-cs/modules/pci_fixup.c (pci_root): Remove variable.
* simplify interrupt handlingDamien Zammit2019-11-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have removed spl levels, now remove the machinery to manage different PIC masks according to levels. Only keep machinery to disable interrupts whatever the level. * i386/i386/pic.c (pic_mask): Remove array. (picinit): Do not form PIC mask. Set initial PIC mask to 0. (form_pic_mask): Remove function. * i386/i386/pic.h (form_pic_mask, pic_mask): Remove declarations. * i386/i386/spl.S (SETMASK): Remove macro. (XEN_SETMASK): Add macro, containing the Xen version of SETMASK. (spl0, splx_cli, spl) [MACH_XEN]: Call XEN_SETMASK instead of SETMASK. * i386/i386/pit.c (clkstart): Do not call form_pic_mask. * i386/i386at/autoconf.c (take_dev_irq, take_ctlr_irq): Likewise. * i386/i386at/kd_mouse.c (kd_mouse_open, kd_mouse_close): Likewise. * linux/dev/arch/i386/kernel/irq.c (mask_irq, unmask_irq): Directly update curr_pic_mask without using pic_mask array. (init_IRQ, restore_IRQ): do not call form_pic_mask. * linux/dev/include/asm-i386/system.h: Include <i386/ipl.h>. (__save_flags, __restore_flags): Use curr_ipl and splx instead of hardware flags. * linux/dev/init/main.c (linux_init): Do not call cli. * linux/dev/kernel/sched.c (linux_timer_intr): Do not use pic_mask. * linux/src/drivers/block/ide.c (try_to_identify): Disable irq probing. * linux/src/drivers/scsi/NCR53c406a.c (NCR53c406a_detect): Disable irq probing.
* Fix buffer size passed to scsi_do_cmdSamuel Thibault2016-05-264-6/+6
| | | | | | | | * linux/src/drivers/scsi/eata_dma_proc.c (eata_proc_info): Increase cmd size to 12. * linux/src/drivers/scsi/sd.c (do_sd_request, sd_init_done): Likewise. * linux/src/drivers/scsi/sr.c (do_sr_request, sr_init_done): Likewise. * linux/src/drivers/scsi/sr_ioctl.c (sr_ioctl): Likewise with sr_cmd.
* commit fce798016c4bd2be89b86b0d343ab54505409412Rik van Riel2015-09-071-1/+0
| | | | | | | | | [PATCH] advansys.c buffer overflow The Stanford checker found an error in advansys.c, the driver is accessing field 6 in an array[6]. Since this is the only place where this field is accessed it should be safe to simply remove this line.
* linux: fix bit testsJustus Winter2014-01-051-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* linux: fix bit testsJustus Winter2014-01-054-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix slow boot in virtualboxSamuel Thibault2012-12-272-1/+3
| | | | | | | | | | | 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.
* Fix compilation error with older versions of GCCMatthew Leach2012-11-191-1/+3
| | | | | | | | | | 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.
* Add missing phystokv/kvtophys callsSamuel Thibault2012-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * 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.
* Change types holding cpu flags from int to longGuillem Jover2012-03-205-22/+22
| | | | | | | | | | | | | | | | | | | 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.
* Fix format for string printSamuel Thibault2012-02-191-2/+2
| | | | | * linux/src/drivers/scsi/aha1542.c (aha1542_setup): Use %s format for printing a mere string, not the string.
* Fix format for string printSamuel Thibault2012-02-191-1/+1
| | | | | * linux/src/drivers/scsi/advansys.c (asc_prt_line): Use %s format for printing a mere string, not the string.
* Leave interrupts enabled in sym53c8xx driverSamuel Thibault2011-10-101-1/+2
| | | | | | | 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().
* Add sym53c8xx driver from linux 2.2Samuel Thibault2011-10-086-1/+19303
| | | | | | | | | | | | | 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.
* Change argument name to match function body usageGuillem Jover2011-09-021-1/+1
| | | | | | | Otherwise the function wrongly uses the global symbol. * linux/src/drivers/scsi/ppa.c (ppa_nibble_in): Rename `str_p' argument to `base'.
* Disable set but unused variableGuillem Jover2011-09-021-2/+3
| | | | | | * 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.
* Remove set but unused variablesGuillem Jover2011-09-021-2/+1
| | | | | | | * 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 undefined operation on assigning self pre-incremented variableGuillem Jover2011-08-311-1/+1
| | | | | | | | | * 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.
* Remove ident tags producing preprocessor warningsGuillem Jover2011-08-271-9/+6
| | | | * linux/src/drivers/scsi/FlashPoint.c: Remove #ident tags.
* Merge two asm constraintsSamuel Thibault2011-05-181-1/+1
| | | | | * linux/src/drivers/scsi/ultrastor.c (find_and_clear_bit_16): Use + modifier instead of using both a read and a write constraint.
* Use explicit type int when defining register variablesGuillem Jover2009-12-181-4/+4
| | | | | * linux/src/drivers/scsi/aha1542.c (WAIT, WAITd): Define variables with explicit type `register int' and not just `register'.
* Show EATA probing progressionSamuel Thibault2009-11-011-0/+2
| | | | | * linux/src/drivers/scsi/eata.c (port_detect): Print the port being probed.
* 2007-03-27 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-1813-148/+7
| | | | | | | | | | | | | | | | | | | * 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-09 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-2/+5
| | | | | * linux/src/drivers/scsi/in2000.c (in2000_proc_info) [PROC_INTERFACE]: Don't consider `__DATE__' and `__TIME__'.
* 2006-10-08 Thomas Schwinge <tschwinge@gnu.org>Thomas Schwinge2009-06-181-1/+19
| | | | | * 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-131/+55
| | | | | * 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-1/+28
| | | | | * 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-2/+11
| | | | | * 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-0/+9
| | | | | * 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-3/+59
| | | | | * linux/dev/drivers/scsi/sd.c: Move file... * linux/src/drivers/scsi/sd.c: ... here.
* 2006-02-02 Sergio Lopez <koro@sinrega.org>Thomas Schwinge2009-06-182-2/+2
| | | | | | | * 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.
* 2005-05-28 Alfred M. Szmidt <ams@gnu.org>Alfred M. Szmidt2009-06-184-33/+84
| | | | | | | | | | | | | | | | | | * linux/src/drivers/scsi/u14-34f.c (ihdlr): Silence gcc 4.x errors. * linux/src/drivers/scsi/qlogicisp.h: Likewise. * linux/src/drivers/scsi/advansys.c: Likewise. (advansys_reset, advansys_interrupt, asc_scsi_done_list, (asc_enqueue, asc_dequeue, asc_dequeue_list, asc_rmqueue, (asc_isqueued): Likewise. * linux/src/drivers/scsi/53c78xx.c (NCR53c7xx_queue_command): Likewise. * linux/src/drivers/net/ne2k-pci.c (ne_block_input) (ne_block_output): Likewise. * linux/src/drivers/net/hp100.c (__initfunc): Likewise. * linux/src/drivers/net/3c507.c (el16_interrupt): Likewise. * linux/dev/drivers/scsi/seagate.c (seagate_st0x_queue_command): Likewise.
* 2005-01-22 Guillem Jover <guillem@hadrons.org>Marcus Brinkmann2009-06-182-1309/+47
| | | | | | | | | * linux/src/drivers/scsi/qlogicisp_asm.c: Remove file with binary only firmware. * linux/src/drivers/scsi/qlogicisp.c: Do not include "qlogicisp_asm.c". (RELOAD_FIRMWARE): Set to 0. (risc_code_addr01): New variable from qlogicisp_asm.c. * linux/Files: Remove linux/src/drivers/scsi/qlogicisp_asm.c.
* 2004-01-15 Alfred M. Szmidt <ams@kemisten.nu>Roland McGrath2009-06-184-673/+763
| | | | | | | | * linux/src/drivers/scsi/aic7xxx.c: Updated from Linux 2.0.39 * linux/src/drivers/scsi/aic7xxx.h: Likewise. * linux/src/drivers/scsi/aic7xxx_proc.c: Likewise. * linux/src/drivers/scsi/scsicam.c: Likewise. * linux/src/include/linux/pci.h: Likewise.
* 2004-01-15 Alfred M. Szmidt <ams@kemisten.nu>Roland McGrath2009-06-181-2/+2
| | | | | * linux/src/drivers/scsi/53c7,8xx.h (patch_dsa_32): Don't use token paste operator (##).
* 2001-05-27 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2001-05-273-3323/+0
| | | | | | | | | | | | | | | | | | * debian/rules: Add --enable-ncr53c8xx to configure. 1999-10-06 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp> * linux/src/drivers/scsi/tmscsiw.c: Removed. * linux/src/drivers/scsi/tmscsiw.h: Likewise. * linux/src/drivers/scsi/dc390w.h: Likewise. * i386/linux/device-drivers.h.in (CONFIG_SCSI_DC390W): Deleted. * i386/linux/Drivers.in: Remove linux_DRIVER(dc390w, ...). Now dc390w, dc390u, and dc390f are aliases to ncr53c8xx. * i386/linux/configure: Regenerated. * linux/Files: Likewise. * i386/linux/Makefile.in (linux-scsi-files): Delete tmscsiw.c. * linux/dev/drivers/scsi/hosts.c: Do not include dc390w.h. Reported by Andreas Voegele <andreas.voegele@nikocity.de>.
* 2000-07-04 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2000-07-232-116/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * debian/changelog: Add entry for new Debian upload. * linux/dev/drivers/scsi/seagate.c (WRITE_CONTROL, WRITE_DATA): Added from linux 2.2.15. (__asm__ constructs): Replace with equivalent C code from linux 2.2.15 to support gcc-2.95. * linux/src/drivers/scsi/in2000.h: Update asm code to linux 2.2.15. * linux/src/drivers/scsi/ppa.c: Replace asm code with equivalent C code from linux 2.2.15. 2000-02-06 Stefan Weil <stefan.weil@de.heidelberg.com> * device/subrs.c: Fixed compiler warning. * ddb/db_output.c, kern/bootstrap.c, kern/debug.c, kern/printf.c: Replaced varargs.h by stdarg.h. Fixed prototypes (const char *fmt). * ddb/db_output.h: Use prototype for db_printf. * i386/Files: removed varargs.h. * i386/i386/pit.h: Fixed compiler warning. * i386/i386at/model_dep.c: Tried to fix compiler warning. * i386/include/mach/sa/sys/varargs.h: Removed. * i386/linux/Makefile.in: Removed delay.S, added delay.c. * linux/dev/include/asm-i386/segment.h: Support gcc-2.95. * linux/dev/include/asm-i386/string.h, linux/src/include/asm-i386/string.h: Update from linux-2.2.14. * linux/dev/lib/vsprintf.c: Fixed compiler warning. * linux/src/include/asm-i386/delay.h: Update from linux-2.2.14. * linux/src/arch/i386/lib/delay.c: Copy from linux-2.2.14. * linux/src/include/asm-i386/string.h: Update from linux-2.2.14.
* 1998-11-30 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>Thomas Bushnell1999-04-2696-0/+137575
Clean up linux emulation code to make it architecture-independent as much as possible. * linux: Renamed from linuxdev. * Makefile.in (objfiles): Add linux.o instead of linuxdev.o. (MAKE): New variable. Used for the linux.o target. * configure.in: Add AC_CHECK_TOOL(MAKE, make). * i386/i386/spl.h: Include <i386/ipl.h>, for compatibility with OSF Mach 3.0. Suggested by Elgin Lee <ehl@funghi.com>. * linux/src: Renamed from linux/linux. * linux/dev: Renamed from linux/mach. * linux/Drivers.in (AC_INIT): Use dev/include/linux/autoconf.h, instead of mach/include/linux/autoconf.h. * Makefile.in (all): Target ../linux.o instead of ../linuxdev.o. * linux/dev/drivers/block/genhd.c: Include <machine/spl.h> instead of <i386/ipl.h>. * linux/dev/drivers/net/auto_irq.c: Remove unneeded header files, <i386/ipl.h> and <i386/pic.h>. * linux/dev/init/main.c: Many i386-dependent codes moved to ... * linux/dev/arch/i386/irq.c: ... here. * linux/dev/arch/i386/setup.c: New file. * linux/dev/arch/i386/linux_emul.h: Likewise. * linux/dev/arch/i386/glue/timer.c: Merged into sched.c. * linux/dev/arch/i386/glue/sched.c: Include <machine/spl.h> instead of <i386/ipl.h>, and moved to ... * linux/dev/kernel/sched.c: ... here. * linux/dev/arch/i386/glue/block.c: Include <machine/spl.h> and <linux_emul.h>, instead of i386-dependent header files, and moved to ... * linux/dev/glue/blocl.c: ... here. * linux/dev/arch/i386/glue/net.c: Include <machine/spl.h> and <linux_emul.h>, instead of i386-dependent header files, and moved to ... * linux/dev/glue/net.c: ... here. * linux/dev/arch/i386/glue/misc.c: Remove `x86' and moved to ... * linux/dev/glue/misc.c: ... here. * linux/dev/arch/i386/glue/kmem.c: Moved to ... * linux/dev/glue/kmem.c: ... here.