16 Oct, 2007

1 commit

  • If the gdth module is loaded (or compiled in), the gdth_timeout function
    gets started even if no actual gdth controllers are found b the probing.

    That ends up not only being unnecessary, but also causes a crash due to
    the function blindly just trying to pick the first entry off the
    "gdth_instances" list, and accessing it - which obviously doesn't work
    if the list is empty!

    Noticed by Ingo Molnar.

    Tested-by: Ingo Molnar
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

15 Oct, 2007

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (207 commits)
    [SCSI] gdth: fix CONFIG_ISA build failure
    [SCSI] esp_scsi: remove __dev{init,exit}
    [SCSI] gdth: !use_sg cleanup and use of scsi accessors
    [SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2
    [SCSI] gdth: Setup proper per-command private data
    [SCSI] gdth: Remove gdth_ctr_tab[]
    [SCSI] gdth: switch to modern scsi host registration
    [SCSI] gdth: gdth_interrupt() gdth_get_status() & gdth_wait() fixes
    [SCSI] gdth: clean up host private data
    [SCSI] gdth: Remove virt hosts
    [SCSI] gdth: Reorder scsi_host_template intitializers
    [SCSI] gdth: kill gdth_{read,write}[bwl] wrappers
    [SCSI] gdth: Remove 2.4.x support, in-kernel changelog
    [SCSI] gdth: split out pci probing
    [SCSI] gdth: split out eisa probing
    [SCSI] gdth: split out isa probing
    gdth: Make one abuse of scsi_cmnd less obvious
    [SCSI] NCR5380: Use scsi_eh API for REQUEST_SENSE invocation
    [SCSI] usb storage: use scsi_eh API in REQUEST_SENSE execution
    [SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE
    ...

    Linus Torvalds
     

13 Oct, 2007

38 commits

  • * 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (119 commits)
    [libata] struct pci_dev related cleanups
    libata: use ata_exec_internal() for PMP register access
    libata: implement ATA_PFLAG_RESETTING
    libata: add @timeout to ata_exec_internal[_sg]()
    ahci: fix notification handling
    ahci: clean up PORT_IRQ_BAD_PMP enabling
    ahci: kill leftover from enabling NCQ over PMP
    libata: wrap schedule_timeout_uninterruptible() in loop
    libata: skip suppress reporting if ATA_EHI_QUIET
    libata: clear ehi description after initial host report
    pata_jmicron: match vendor and class code only
    libata: add ST9160821AS / 3.ALD to NCQ blacklist
    pata_acpi: ACPI driver support
    libata-core: Expose gtm methods for driver use
    libata: add HDT722516DLA380 to NCQ blacklist
    libata: blacklist NCQ on Seagate Barracuda ST380817AS
    [libata] Turn on ACPI by default
    libata_scsi: Fix ATAPI transfer lengths
    libata: correct handling of SRST reset sequences
    libata: Integrate ACPI-based PATA/SATA hotplug - version 5
    ...

    Linus Torvalds
     
  • This changes the uevent buffer functions to use a struct instead of a
    long list of parameters. It does no longer require the caller to do the
    proper buffer termination and size accounting, which is currently wrong
    in some places. It fixes a known bug where parts of the uevent
    environment are overwritten because of wrong index calculations.

    Many thanks to Mathieu Desnoyers for finding bugs and improving the
    error handling.

    Signed-off-by: Kay Sievers
    Cc: Mathieu Desnoyers
    Cc: Cornelia Huck
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • drivers/scsi/gdth.c: In function ‘gdth_search_dev’:
    drivers/scsi/gdth.c:646: warning: ‘pci_find_device’ is deprecated
    (declared at include/linux/pci.h:482)
    drivers/scsi/gdth.c: In function ‘gdth_init_isa’:
    drivers/scsi/gdth.c:857: error: ‘gdth_irq_tab’ undeclared (first use in
    this function)
    drivers/scsi/gdth.c:857: error: (Each undeclared identifier is reported
    only once
    drivers/scsi/gdth.c:857: error: for each function it appears in.)
    drivers/scsi/gdth.c: In function ‘gdth_copy_internal_data’:
    drivers/scsi/gdth.c:2362: warning: unused variable ‘sg’

    Looking into the code I notice that gdth_irq_tab is not declared with
    CONFIG_ISA=y and !CONFIG_EISA.

    The values seem to be same in 2.6.23 (I am not sure why it has been put
    with #ifdefs in -mm) so I have just modified the #ifdef to take care of
    CONFIG_ISA as well.

    Signed-off-by: Dhaval Giani
    Signed-off-by: James Bottomley

    Dhaval Giani
     
  • Since scsi_esp_{,un}register() are EXPORT_SYMBOL'ed, these functions
    (and the functions they use) can't be __dev{init,exit}.

    Based on a bug report by Rob Landley.

    Signed-off-by: Adrian Bunk
    Acked-by: David S. Miller
    Signed-off-by: James Bottomley

    Adrian Bunk
     
  • gdth_execute() will issue an internal, none scsi-standard commands
    onto __gdth_queuecommand(). Since it is not recommended to set
    struct scsi_cmnd IO members in llds, gdth now uses internal IO
    members for IO. In the case of gdth_execute() these members will be
    set properly. In case the command was issued from scsi-ml
    (by gdth_queuecommand) they will be set from scsi IO accessors.

    * define gdth IO accessors and use them throughout the driver.
    * use an sg-of-one in gdth_execute() and fix gdth_special_cmd()
    accordingly.
    * Clean the not use_sg code path and company

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

    Boaz Harrosh
     
  • - Cleanup the rest of the scsi_cmnd->SCp members and move them
    to gdth_cmndinfo:
    SCp.this_residual => priority
    SCp.buffers_residual => timeout
    SCp.Status => status and dma_dir
    SCp.Message => info
    SCp.have_data_in => volatile wait_for_completion
    SCp.sent_command => OpCode
    SCp.phase => phase

    - Two more members will be naturally removed in the !use_sg cleanup

    TODO: What is the meaning of gdth_cmndinfo.phase? (rhetorically)

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

    Boaz Harrosh
     
  • - scsi_cmnd and specifically ->SCp of, where heavily abused
    with internal meaning members and flags. So introduce a new
    struct gdth_cmndinfo, put it on ->host_scribble and define a
    gdth_cmnd_priv() accessor to retrieve it from a scsi_cmnd.

    - The structure now holds two members:
    internal_command - replaces the IS_GDTH_INTERNAL_CMD() croft.
    sense_paddr - which was a 64-bit spanning on 2 32-bit members of SCp.
    More overloaded members from SCp and scsi_cmnd will be moved in a later
    patch (For easy review).

    - Split up gdth_queuecommand to an additional internal_function. The later
    is the one called by gdth_execute(). This will be more evident later in
    the scsi accessors patch, but it also facilitates in the differentiation
    between internal_command and external. And the setup of gdth_cmndinfo of
    each command.

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

    Boaz Harrosh
     
  • - Places like Initialization and Reset that Just loop on all devices can
    use the link list with the list_for_each_entry macro.
    But the io_ctrl from user mode now suffers performance-wise because
    code has to do a sequential search for the requested host number.
    I have isolated this search in a gdth_find_ha(int hanum) member
    for future enhancement if needed.

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

    Boaz Harrosh
     
  • - Use scsi_add_host and friends and track instances ourselves. And
    generally modernize the driver's structure.

    - TODO: Next we can remove the controller table
    - TODO: Fix use of deprecated pci_find_device()

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

    Christoph Hellwig
     
  • - gdth_get_status() returns a single device interrupt IStatus
    - gdth_interrupt split to __gdth_interrupt() that receives
    flags if is called from gdth_wait().
    - Use dev_id passed from kernel and do not loop on all
    controllers.
    - gdth_wait(), get read of all global variables and call the new
    __gdth_interrupt with these variables on the stack

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

    Boaz Harrosh
     
  • - Based on same patch from Christoph Hellwig

    - Get rid of all the indirection in the Scsi_Host private data and always
    put the gdth_ha_str directly into it.

    - Change all internal functions prototype to recieve an "gdth_ha_str *ha"
    pointer directlly and kill all that redundent access to the "gdth_ctr_tab[]"
    controller-table.

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

    Boaz Harrosh
     
  • The virt_ctr option allows to register a new scsi_host for each bus
    on the raid controller. This non-default option makes no sense with
    the current scsi code and prevents cleaning up the host registration,
    so remove it.

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

    Christoph Hellwig
     
  • shuffle scsi_host_template members such that they appear in the
    order in which they are defined in the header. this makes is easier
    to verify when initializers are missing members.

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

    Jeff Garzik
     
  • It was always set to ata_port_disable(). Removed the hook, and replaced
    the very few ap->ops->port_disable() callsites with direct calls to
    ata_port_disable().

    Signed-off-by: Jeff Garzik

    Jeff Garzik
     
  • They are direct equivalents to {read,write}[bwl].

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

    Jeff Garzik
     
  • Make reset methods and related functions deal with ata_link instead of
    ata_port.

    * ata_do_reset()
    * ata_eh_reset()
    * all prereset/reset/postreset methods and related functions

    This patch introduces no behavior change.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Introduce ata_link. It abstracts PHY and sits between ata_port and
    ata_device. This new level of abstraction is necessary to support
    SATA Port Multiplier, which basically adds a bunch of links (PHYs) to
    a ATA host port. Fields related to command execution, spd_limit and
    EH are per-link and thus moved to ata_link.

    This patch only defines the host link. Multiple link handling will be
    added later. Also, a lot of ap->link derefences are added but many of
    them will be removed as each part is converted to deal directly with
    ata_link instead of ata_port.

    This patch introduces no behavior change.

    Signed-off-by: Tejun Heo
    Cc: James Bottomley
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • * Remove in-source changelog. It's archived permanently in git and
    various kernel archives, and changelogs should exist purely in git.

    * Remove 2.4.x kernel support. It is an active obstacle to
    modernizing this driver, at this point. This includes killing
    gdth_kcompat.h which is 100% redundant in modern kernels.

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

    Jeff Garzik
     
  • Split out per-device pci probing and put it under proper CONFIG_PCI.

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

    Christoph Hellwig
     
  • Split eisa probing into it's own helper, and do proper error unwinding.
    Protect EISA probind by the proper CONFIG_EISA symbol.

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

    Christoph Hellwig
     
  • (note: this is ontop of Jeff's pci cleanup patch)

    Split out isa probing into a helper of it's own. Error handling is
    cleaned up, but errors are not propagated yet. Also enclose the isa
    probe under the proper CONFIG_ISA symbol instead of the !IA64 hack.

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

    Christoph Hellwig
     
  • Rather than having internal commands abuse scsi_done to call
    gdth_scsi_done, have all the places that use to call scsi_done directly
    call gdth_scsi_done, which now checks whether the command was internal,
    and calls scsi_done if not.

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

    Matthew Wilcox
     
  • - Use new scsi_eh_prep/restor_cmnd() for synchronous
    REQUEST_SENSE invocation.

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

    Boaz Harrosh
     
  • - Drivers/transports that want to send a synchronous REQUEST_SENSE command
    as part of their .queuecommand sequence, have 2 new API's that facilitate
    in doing so and abstract them from scsi-ml internals.

    void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd,
    struct scsi_eh_save *sesci, unsigned char *cmnd,
    int cmnd_size, int sense_bytes)

    Will hijack a command and prepare it for request sense if needed.
    And will save any later needed info into a scsi_eh_save structure.

    void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd,
    struct scsi_eh_save *sesci);

    Will undo any changes done to a command by above function. Making
    it ready for completion.

    - Re-factor scsi_send_eh_cmnd() to use above APIs

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

    Boaz Harrosh
     
  • - regrouped variables for easier reviewing of next patch
    - Support of cmnd==NULL in call to scsi_send_eh_cmnd()
    - In the @sense_bytes case set transfer size to the minimum
    size of sense_buffer and passed @sense_bytes. cmnd[4] is
    set accordingly.
    - REQUEST_SENSE is set into cmnd[0] so if @sense_bytes is
    not Zero passed @cmnd should be NULL.
    - Also save/restore resid of failed command.
    - Adjust caller

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

    Boaz Harrosh
     
  • I get this warnings on current git when CONFIG_PCI is not set :

    drivers/scsi/fdomain.c:390: warning: 'PCI_dev' defined but not used
    drivers/scsi/fdomain.c:1768: warning: 'fdomain_pci_tbl' defined but not used

    Signed-off-by: Gabriel Craciunescu
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Gabriel C
     
  • Fix section mismatch in the Adaptec DPT SCSI Raid driver.

    WARNING: vmlinux.o(.init.text+0x1fcd2): Section mismatch:
    reference to .exit.text:adpt_exit (between 'adpt_init' and 'ahc_linux_init')

    This warning is due to adaptec device detection calling the exit routine on
    failure to properly register the adaptec device.

    The exit routine + call was added on July 30 by

    Commit: 55d9fcf57ba5ec427544fca7abc335cf3da78160
    Author: Matthew Wilcox
    Subject: [SCSI] dpt_i2o: convert to SCSI hotplug model.

    Mathew: isn't a module exit routine a little too strong to be calling on the
    failure of a single device? Module exit implies that other, non-failing
    adaptec raid devices will also get shut down.

    Signed-off-by: Joe Korty
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Joe Korty
     
  • The Coverity checker spotted that we have already oops'ed if "cmd"
    was NULL.

    Since "cmd" being NULL doesn't seem to be possible at this point this
    patch removes the NULL check.

    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Adrian Bunk
     
  • drivers/scsi/arcmsr/arcmsr_hba.c:129: error: 'arcmsr_pci_error_detected' undeclared here (not in a function)
    drivers/scsi/arcmsr/arcmsr_hba.c:130: error: 'arcmsr_pci_slot_reset' undeclared here (not in a function)

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

    Andrew Morton
     
  • Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Adrian Bunk
     
  • Remove the useless references to the obsolete MODULE_PARM macro.

    Signed-off-by: Robert P. J. Day
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Robert P. J. Day
     
  • Change PortAddr to be an unsigned int instead of an unsigned short (IO
    Port address are 24 bit on parisc). Fix a couple of printk argument
    warnings. Remove the Kconfig marking as 'BROKEN'.

    I haven't removed the #warning yet because virt_to_bus/bus_to_virt are
    only eliminated for narrow boards. Wide boards need more work.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox
     
  • Convert the call to virt_to_bus() into a call to dma_map_single(). Some
    architectures may require different DMA addresses for different devices,
    so allocate one overrun buffer per host rather than one for all cards.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox
     
  • Replace ASC_VADDR_TO_U32 and ASC_U32_TO_VADDR with an auto-expanding
    array that maps pointers to 32-bit IDs and back. One of the uses of
    ASC_VADDR_TO_U32 was in error; it should have been using ADV_VADDR_TO_U32.

    Also replace the use of virt_to_bus when setting the sense_address with
    a call to dma_map_single() followed by dma_cache_sync. This part cribbed
    from the 53c700 driver.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox
     
  • - remove the unnecessary map_single path.
    - convert to use the new accessors for the sg lists and the parameters.

    Signed-off-by: FUJITA Tomonori

    - convert the statistics to not distinguish between single and sg xfers
    - replace ASC_CEILING with DIV_ROUND_UP
    - remove an obsolete comment

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox
     
  • This rather complex function boiled down to calling virt_to_bus().
    Also get rid of some obsolete defines and variables that could never vary.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox
     
  • board->carrp is a duplicate of asc_dvc->carrier_buf, so cut out the
    middle-man and assign directly to carrier_buf. Move orig_reqp to adv_dvc
    too, since it's wide-board specific. Also eliminate an unnecessary BUG_ON
    (we'll never get there with a NULL carrier_buf, and will crash if we do).
    The bulk of this patch is rearranging structures so everything's declared
    in the right order.

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox
     
  • It's somewhat neater to make this a pointer to one of two tables
    than initialising an array in the driver. Also delete the unused
    AscSynIndexToPeriod and rename host_init_sdtr_index to min_sdtr_index

    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox