08 Oct, 2020

1 commit


20 Dec, 2019

1 commit

  • Fix sparse warning:

    drivers/scsi/initio.c:1643:5: warning: symbol 'initio_state_7' was not declared. Should it be static?

    Link: https://lore.kernel.org/r/20191217134309.41649-1-chenzhou10@huawei.com
    Reported-by: Hulk Robot
    Signed-off-by: Chen Zhou
    Signed-off-by: Martin K. Petersen

    Chen Zhou
     

21 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 or at your option any
    later version this program is distributed in the hope that it will
    be useful but without any warranty without even the implied warranty
    of merchantability or fitness for a particular purpose see the gnu
    general public license for more details you should have received a
    copy of the gnu general public license along with this program see
    the file copying if not write to the free software foundation 675
    mass ave cambridge ma 02139 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 52 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Jilayne Lovejoy
    Reviewed-by: Steve Winslow
    Reviewed-by: Kate Stewart
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190519154042.342335923@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

19 Dec, 2018

1 commit

  • Most SCSI drivers want to enable "clustering", that is merging of
    segments so that they might span more than a single page. Remove the
    ENABLE_CLUSTERING define, and require drivers to explicitly set
    DISABLE_CLUSTERING to disable this feature.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Christoph Hellwig
     

16 Nov, 2018

1 commit


21 Nov, 2015

1 commit

  • The initio driver has for many years had two copies of the
    same module device table. One of them is also used for registering
    the other driver, the other one is entirely useless after the
    large scale cleanup that Alan Cox did back in 2007.

    The compiler warns about this whenever the driver is built-in:

    drivers/scsi/initio.c:131:29: warning: 'i91u_pci_devices' defined but not used [-Wunused-variable]

    This removes the extraneous table and the warning.

    Signed-off-by: Arnd Bergmann
    Fixes: 72d39fea901 ("[SCSI] initio: Convert into a real Linux driver and update to modern style")
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Martin K. Petersen

    Arnd Bergmann
     

01 Jun, 2015

1 commit


20 Mar, 2014

1 commit


04 Jan, 2013

1 commit

  • CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
    markings need to be removed.

    This change removes the use of __devinit, __devexit_p, __devinitdata,
    __devinitconst, and __devexit from these drivers.

    Based on patches originally written by Bill Pemberton, but redone by me
    in order to handle some of the coding style issues better, by hand.

    Cc: Bill Pemberton
    Cc: Adam Radford
    Cc: "James E.J. Bottomley"
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

31 Mar, 2011

1 commit


17 Nov, 2010

1 commit

  • Move the mid-layer's ->queuecommand() invocation from being locked
    with the host lock to being unlocked to facilitate speeding up the
    critical path for drivers who don't need this lock taken anyway.

    The patch below presents a simple SCSI host lock push-down as an
    equivalent transformation. No locking or other behavior should change
    with this patch. All existing bugs and locking orders are preserved.

    Additionally, add one parameter to queuecommand,
    struct Scsi_Host *
    and remove one parameter from queuecommand,
    void (*done)(struct scsi_cmnd *)

    Scsi_Host* is a convenient pointer that most host drivers need anyway,
    and 'done' is redundant to struct scsi_cmnd->scsi_done.

    Minimal code disturbance was attempted with this change. Most drivers
    needed only two one-line modifications for their host lock push-down.

    Signed-off-by: Jeff Garzik
    Acked-by: James Bottomley
    Signed-off-by: Linus Torvalds

    Jeff Garzik
     

11 Aug, 2010

1 commit

  • At the point where cmnd is initialized, it is tested for NULL, so it
    doesn't have to be tested again here.

    A simplified version of the semantic match that detects this problem is as
    follows (http://coccinelle.lip6.fr/):

    //
    @match exists@
    expression x, E;
    identifier fld;
    @@

    * x->fld
    ... when != \(x = E\|&x\)
    * x == NULL
    //

    Signed-off-by: Julia Lawall
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Julia Lawall
     

09 Feb, 2010

1 commit

  • In particular, several occurances of funny versions of 'success',
    'unknown', 'therefore', 'acknowledge', 'argument', 'achieve', 'address',
    'beginning', 'desirable', 'separate' and 'necessary' are fixed.

    Signed-off-by: Daniel Mack
    Cc: Joe Perches
    Cc: Junio C Hamano
    Signed-off-by: Jiri Kosina

    Daniel Mack
     

07 Apr, 2009

1 commit


30 Dec, 2008

1 commit


02 May, 2008

1 commit

  • - struct scsi_cmnd had a 16 bytes command buffer of its own.
    This is an unnecessary duplication and copy of request's
    cmd. It is probably left overs from the time that scsi_cmnd
    could function without a request attached. So clean that up.

    - Once above is done, few places, apart from scsi-ml, needed
    adjustments due to changing the data type of scsi_cmnd->cmnd.

    - Lots of drivers still use MAX_COMMAND_SIZE. So I have left
    that #define but equate it to BLK_MAX_CDB. The way I see it
    and is reflected in the patch below is.
    MAX_COMMAND_SIZE - means: The longest fixed-length (*) SCSI CDB
    as per the SCSI standard and is not related
    to the implementation.
    BLK_MAX_CDB. - The allocated space at the request level

    - I have audit all ISA drivers and made sure none use ->cmnd in a DMA
    Operation. Same audit was done by Andi Kleen.

    (*)fixed-length here means commands that their size can be determined
    by their opcode and the CDB does not carry a length specifier, (unlike
    the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly
    true and the SCSI standard also defines extended commands and
    vendor specific commands that can be bigger than 16 bytes. The kernel
    will support these using the same infrastructure used for VARLEN CDB's.
    So in effect MAX_COMMAND_SIZE means the maximum size command
    scsi-ml supports without specifying a cmd_len by ULD's

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     

12 Apr, 2008

1 commit


31 Jan, 2008

1 commit

  • With the sg table code, every SCSI driver is now either chain capable
    or broken (or has sg_tablesize set so chaining is never activated), so
    there's no need to have a check in the host template.

    Also tidy up the code by moving the scatterlist size defines into the
    SCSI includes and permit the last entry of the scatterlist pools not
    to be a power of two.
    Signed-off-by: James Bottomley

    James Bottomley
     

24 Jan, 2008

1 commit

  • I've verified (on my Initio 9100 with a DAT drive) that the
    2.6.24-rc8-git6 initio module still hangs on loading.

    These fixes (other than the printk) are needed to get the module to load
    ok (and work correctly) with my adapter & tape drive.

    a) printk cosmetic fix

    b) cblk->sglen needs setting for later DMA I/O routines to use

    c) host->bios_addr needs setting for debug output correctness

    d) semaph & semaph_lock initialisation had got lost since 2.6.22

    e) since 2.6.22 the bios data address was truncated to 16 bits (needs 20
    when shifted left)

    Signed-off-by: James Bottomley

    Stuart Swales
     

19 Dec, 2007

2 commits

  • patch: [SCSI] initio: convert to use the data buffer accessors had a
    small but fatal bug in that it didn't increment the pointer into the
    initio scatterlist descriptors as it looped over the block generated
    ones. Fixed here.

    Signed-off-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Boaz Harrosh
     
  • > I have a scanner connected to a Initio INI-950 SCSI card and I recently
    > upgraded from SuSE 10.2 to 10.3. The new kernel doesn't see any of my
    > devices. I get the following in /var/log/messages:
    >
    > ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 16
    > initio: I/O port range 0x0 is busy.
    > ACPI: PCI interrupt for device 0000:00:0a.0 disabled

    Humm not a collision - thats a bug in the driver updating. Looks like the
    changes I made and combined with Christoph's lost a line somewhere when I
    was merging it all.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Alan Cox
     

18 Oct, 2007

1 commit

  • Fix IRQ reporting - just assign the ->pci_dev pointer earlier and use the
    pci_dev irq field rather than keeping a private one

    Init the spinlock as it works better on SMP that way

    Signed-off-by: Alan Cox
    Signed-off-by: James Bottomley

    Alan Cox
     

16 Oct, 2007

1 commit


27 May, 2007

1 commit


23 May, 2007

1 commit

  • This is a mix of a grand clean up I did and a reworking of the hotplug
    support by Christoph. In testing it works as well as the previous code
    did (that is -quite badly-) but we can now read it and as it settles in
    actually debug the long standing problems it shares with the old driver.

    Signed-off-by: Alan Cox

    From Christoph:

    removal of the BSD license is also fine with me, but should really
    get a mention in the changelog aswell.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: James Bottomley

    Alan Cox
     

15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

14 Dec, 2006

1 commit

  • Run this:

    #!/bin/sh
    for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
    echo "De-casting $f..."
    perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
    done

    And then go through and reinstate those cases where code is casting pointers
    to non-pointers.

    And then drop a few hunks which conflicted with outstanding work.

    Cc: Russell King , Ian Molton
    Cc: Mikael Starvik
    Cc: Yoshinori Sato
    Cc: Roman Zippel
    Cc: Geert Uytterhoeven
    Cc: Ralf Baechle
    Cc: Paul Mackerras
    Cc: Kyle McMartin
    Cc: Benjamin Herrenschmidt
    Cc: Martin Schwidefsky
    Cc: "David S. Miller"
    Cc: Jeff Dike
    Cc: Greg KH
    Cc: Jens Axboe
    Cc: Paul Fulghum
    Cc: Alan Cox
    Cc: Karsten Keil
    Cc: Mauro Carvalho Chehab
    Cc: Jeff Garzik
    Cc: James Bottomley
    Cc: Ian Kent
    Cc: Steven French
    Cc: David Woodhouse
    Cc: Neil Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     

25 Nov, 2006

1 commit

  • WARNING: drivers/scsi/initio.o - Section mismatch: reference to .init.data: from .text between 'i91u_detect' (at offset 0x26e8) and 'i91uSCBPost'
    WARNING: drivers/scsi/initio.o - Section mismatch: reference to .init.data:i91u_pci_devices from .text between 'i91u_detect' (at offset 0x26ef) and 'i91uSCBPost'

    Signed-off-by: Randy Dunlap
    Signed-off-by: James Bottomley

    Randy Dunlap
     

18 Oct, 2006

1 commit


05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

03 Jul, 2006

1 commit


01 Jul, 2006

1 commit


10 Jun, 2006

1 commit


29 Mar, 2006

1 commit


28 Jul, 2005

1 commit


26 Jun, 2005

1 commit

  • This patch contains the following cleanups:
    - make needlessly global code static
    - remove or #if 0 the following unused functions:
    - tul_pop_pend_scb
    - tul_device_reset
    - tul_reset_scsi_bus

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

18 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds