24 Aug, 2020

1 commit

  • Replace the existing /* fall through */ comments and its variants with
    the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
    fall-through markings when it is the case.

    [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

20 Dec, 2019

2 commits

  • The FSC (NCR53CF9x-2 / SYM53CF9x-2) has a different family code than QLogic
    or Emulex parts. This caused it to be detected as a FAS100A.

    Unforunately, this meant the configuration of the CONFIG3 register was
    incorrect. This causes data transfer issues with FAST-SCSI targets.

    The FSC also has the CONFIG4 register. It can be used to enable a feature
    called Active Negation which should always be enabled according to the data
    manual.

    Link: https://lore.kernel.org/r/20191119202021.28720-3-jongk@linux-m68k.org
    Reviewed-by: Finn Thain
    Signed-off-by: Kars de Jong
    Signed-off-by: Martin K. Petersen

    Kars de Jong
     
  • The order of the definitions in the esp_rev enum is important. The values
    are used in comparisons for chip features.

    Add a comment to the enum explaining this.

    Also, the actual values for the enum fields are irrelevant, so remove the
    explicit values (suggested by Geert Uytterhoeven). This makes adding a new
    field in the middle of the enum easier.

    Finally, move the PCSCSI definition to the right place in the enum. In its
    previous location, at the end of the enum, the wrong values are written to
    the CONFIG3 register when used with FAST-SCSI targets.

    Link: https://lore.kernel.org/r/20191119202021.28720-2-jongk@linux-m68k.org
    Signed-off-by: Kars de Jong
    Signed-off-by: Martin K. Petersen

    Kars de Jong
     

12 Jul, 2019

1 commit

  • Pull SCSI scatter-gather list updates from James Bottomley:
    "This topic branch covers a fundamental change in how our sg lists are
    allocated to make mq more efficient by reducing the size of the
    preallocated sg list.

    This necessitates a large number of driver changes because the
    previous guarantee that if a driver specified SG_ALL as the size of
    its scatter list, it would get a non-chained list and didn't need to
    bother with scatterlist iterators is now broken and every driver
    *must* use scatterlist iterators.

    This was broken out as a separate topic because we need to convert all
    the drivers before pulling the trigger and unconverted drivers kept
    being found, necessitating a rebase"

    * tag 'scsi-sg' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (21 commits)
    scsi: core: don't preallocate small SGL in case of NO_SG_CHAIN
    scsi: lib/sg_pool.c: clear 'first_chunk' in case of no preallocation
    scsi: core: avoid preallocating big SGL for data
    scsi: core: avoid preallocating big SGL for protection information
    scsi: lib/sg_pool.c: improve APIs for allocating sg pool
    scsi: esp: use sg helper to iterate over scatterlist
    scsi: NCR5380: use sg helper to iterate over scatterlist
    scsi: wd33c93: use sg helper to iterate over scatterlist
    scsi: ppa: use sg helper to iterate over scatterlist
    scsi: pcmcia: nsp_cs: use sg helper to iterate over scatterlist
    scsi: imm: use sg helper to iterate over scatterlist
    scsi: aha152x: use sg helper to iterate over scatterlist
    scsi: s390: zfcp_fc: use sg helper to iterate over scatterlist
    scsi: staging: unisys: visorhba: use sg helper to iterate over scatterlist
    scsi: usb: image: microtek: use sg helper to iterate over scatterlist
    scsi: pmcraid: use sg helper to iterate over scatterlist
    scsi: ipr: use sg helper to iterate over scatterlist
    scsi: mvumi: use sg helper to iterate over scatterlist
    scsi: lpfc: use sg helper to iterate over scatterlist
    scsi: advansys: use sg helper to iterate over scatterlist
    ...

    Linus Torvalds
     

21 Jun, 2019

1 commit

  • Unlike the legacy I/O path, scsi-mq preallocates a large array to hold
    the scatterlist for each request. This static allocation can consume
    substantial amounts of memory on modern controllers which support a
    large number of concurrently outstanding requests.

    To facilitate a switch to a smaller static allocation combined with a
    dynamic allocation for requests that need it, we need to make sure all
    SCSI drivers handle chained scatterlists correctly.

    Convert remaining drivers that directly dereference the scatterlist
    array to using the iterator functions.

    [mkp: clarified commit message]

    Cc: Christoph Hellwig
    Cc: Bart Van Assche
    Cc: Ewan D. Milne
    Cc: Hannes Reinecke
    Cc: Finn Thain
    Cc: Guenter Roeck
    Reported-by: Guenter Roeck
    Tested-by: Guenter Roeck
    Reviewed-by: Finn Thain
    Signed-off-by: Ming Lei
    Signed-off-by: Martin K. Petersen

    Ming Lei
     

21 May, 2019

1 commit

  • Add SPDX license identifiers to all files which:

    - Have no license information of any form

    - Have MODULE_LICENCE("GPL*") inside which was used in the initial
    scan/conversion to ignore the file

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0-only

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

09 Apr, 2019

1 commit

  • %pF and %pf are functionally equivalent to %pS and %ps conversion
    specifiers. The former are deprecated, therefore switch the current users
    to use the preferred variant.

    The changes have been produced by the following command:

    git grep -l '%p[fF]' | grep -v '^\(tools\|Documentation\)/' | \
    while read i; do perl -i -pe 's/%pf/%ps/g; s/%pF/%pS/g;' $i; done

    And verifying the result.

    Link: http://lkml.kernel.org/r/20190325193229.23390-1-sakari.ailus@linux.intel.com
    Cc: Andy Shevchenko
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: sparclinux@vger.kernel.org
    Cc: linux-um@lists.infradead.org
    Cc: xen-devel@lists.xenproject.org
    Cc: linux-acpi@vger.kernel.org
    Cc: linux-pm@vger.kernel.org
    Cc: drbd-dev@lists.linbit.com
    Cc: linux-block@vger.kernel.org
    Cc: linux-mmc@vger.kernel.org
    Cc: linux-nvdimm@lists.01.org
    Cc: linux-pci@vger.kernel.org
    Cc: linux-scsi@vger.kernel.org
    Cc: linux-btrfs@vger.kernel.org
    Cc: linux-f2fs-devel@lists.sourceforge.net
    Cc: linux-mm@kvack.org
    Cc: ceph-devel@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Signed-off-by: Sakari Ailus
    Acked-by: David Sterba (for btrfs)
    Acked-by: Mike Rapoport (for mm/memblock.c)
    Acked-by: Bjorn Helgaas (for drivers/pci)
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Petr Mladek

    Sakari Ailus
     

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
     

18 Oct, 2018

5 commits

  • Avoid function calls in the inner PIO loops. On a Centris 660av this
    improves throughput for sequential read transfers by about 40% and
    sequential write by about 10%.

    Unfortunately it is not possible to have methods like .esp_write8 placed
    inline so this is always going to be slow, even with LTO.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Tested-by: Michael Schmitz
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • As a temporary measure, the code to implement PIO transfers was
    duplicated in zorro_esp and mac_esp. Now that it has stabilized move the
    common code into the core driver but don't build it unless needed.

    This replaces the inline assembler with more portable writesb() calls.
    Optimizing the m68k writesb() implementation is a separate patch.

    [mkp: applied by hand]

    Signed-off-by: Finn Thain
    Tested-by: Stan Johnson
    Tested-by: Michael Schmitz
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • The concept of a 'slow command' as it appears in esp_scsi is confusing
    because it could refer to an ESP command or a SCSI command. It turns out
    that it refers to a particular ESP select command which the driver also
    tracks as 'ESP_SELECT_MSGOUT'. For readability, it is better to use the
    terminology from the datasheets.

    The global ESP_FLAG_DOING_SLOWCMD flag is redundant anyway, as it can be
    inferred from esp->select_state. Remove the ESP_FLAG_DOING_SLOWCMD cruft
    and just use a boolean local variable.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Tested-by: Michael Schmitz
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • A SCSI device is not granted disconnect privilege by an esp_scsi host
    unless that device has its simple_tags flag set. However, a device may
    support disconnect/reselect and not support command queueing. Allow such
    devices to disconnect and thereby improve bus utilization.

    Drop the redundant 'lp' check. The mid-layer invokes .slave_alloc and
    .slave_destroy in such a way that we may rely on scmd->device->hostdata
    for as long as scmd belongs to the low-level driver.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Tested-by: Michael Schmitz
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • If a target disconnects during a PIO data transfer the command may fail
    when the target reconnects:

    scsi host1: DMA length is zero!
    scsi host1: cur adr[04380000] len[00000000]

    The scsi bus is then reset. This happens because the residual reached
    zero before the transfer was completed.

    The usual residual calculation relies on the Transfer Count registers.
    That works for DMA transfers but not for PIO transfers. Fix the problem
    by storing the PIO transfer residual and using that to correctly
    calculate bytes_sent.

    Fixes: 6fe07aaffbf0 ("[SCSI] m68k: new mac_esp scsi driver")
    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Tested-by: Michael Schmitz
    Signed-off-by: Martin K. Petersen

    Finn Thain
     

16 Oct, 2018

3 commits


11 Aug, 2017

3 commits

  • After sending a message, always clear esp->msg_out_len. Otherwise,
    eh_abort_handler may subsequently fail to send an ABORT TASK SET
    message.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • If an LLD aborts a task set, it should complete the affected commands
    with the appropriate result code. In a couple of cases esp_scsi doesn't
    do so.

    When the initiator receives an unhandled message, just respond by sending
    a MESSAGE REJECT instead of ABORT TASK SET, and thus avoid the issue.

    OTOH, a MESSAGE REJECT sent by a target can be taken as an indication
    that the initiator messed up somehow. It isn't always possible to abort
    correctly, so just fall back on a SCSI bus reset, which will complete the
    affected commands with the appropriate result code.

    For example, certain Apple (Sony) CD-ROM drives, when the non-existent
    LUN 1 is scanned, can't handle the INQUIRY command. The problem is not
    detected until the initiator gets a MESSAGE REJECT. Whenever esp_scsi
    sees that message, it raises ATN and sends ABORT TASK SET -- but
    neglects to complete the failed scmd.

    The target then goes into DATA OUT phase (probably bogus), while the ESP
    device goes into disconnected mode (surprising, given the bus phase).
    The next Transfer Information command from esp_scsi then causes
    an Invalid Command interrupt because that command is not valid when in
    disconnected mode:

    mac_esp: using PDMA for controller 0
    mac_esp mac_esp.0: esp0: regs[50f10000:(null)] irq[19]
    mac_esp mac_esp.0: esp0: is a ESP236, 16 MHz (ccf=4), SCSI ID 7
    scsi host0: esp
    scsi 0:0:0:0: Direct-Access SEAGATE ST318416N 0010 PQ: 0 ANSI: 3
    scsi target0:0:0: Beginning Domain Validation
    scsi target0:0:0: asynchronous
    scsi target0:0:0: Domain Validation skipping write tests
    scsi target0:0:0: Ending Domain Validation
    scsi 0:0:3:0: CD-ROM SONY CD-ROM CDU-8003A 1.9a PQ: 0 ANSI: 2 CCS
    scsi target0:0:3: Beginning Domain Validation
    scsi target0:0:3: FAST-5 SCSI 2.0 MB/s ST (500 ns, offset 15)
    scsi target0:0:3: Domain Validation skipping write tests
    scsi target0:0:3: Ending Domain Validation
    scsi host0: unexpected IREG 40
    scsi host0: Dumping command log
    scsi host0: ent[2] CMD val[c2] sreg[90] seqreg[cc] sreg2[00] ireg[20] ss[01] event[0c]
    scsi host0: ent[3] CMD val[00] sreg[91] seqreg[04] sreg2[00] ireg[18] ss[00] event[0c]
    scsi host0: ent[4] EVENT val[0d] sreg[91] seqreg[04] sreg2[00] ireg[18] ss[00] event[0c]
    scsi host0: ent[5] EVENT val[03] sreg[91] seqreg[04] sreg2[00] ireg[18] ss[00] event[0d]
    scsi host0: ent[6] CMD val[90] sreg[91] seqreg[04] sreg2[00] ireg[18] ss[00] event[03]
    scsi host0: ent[7] EVENT val[05] sreg[91] seqreg[04] sreg2[00] ireg[18] ss[00] event[03]
    scsi host0: ent[8] EVENT val[0d] sreg[93] seqreg[cc] sreg2[00] ireg[10] ss[00] event[05]
    scsi host0: ent[9] CMD val[01] sreg[93] seqreg[cc] sreg2[00] ireg[10] ss[00] event[0d]
    scsi host0: ent[10] CMD val[11] sreg[93] seqreg[cc] sreg2[00] ireg[10] ss[00] event[0d]
    scsi host0: ent[11] EVENT val[0b] sreg[93] seqreg[cc] sreg2[00] ireg[10] ss[00] event[0d]
    scsi host0: ent[12] CMD val[12] sreg[97] seqreg[cc] sreg2[00] ireg[08] ss[00] event[0b]
    scsi host0: ent[13] EVENT val[0c] sreg[97] seqreg[cc] sreg2[00] ireg[08] ss[00] event[0b]
    scsi host0: ent[14] CMD val[44] sreg[90] seqreg[cc] sreg2[00] ireg[20] ss[00] event[0c]
    scsi host0: ent[15] CMD val[01] sreg[90] seqreg[cc] sreg2[00] ireg[20] ss[01] event[0c]
    scsi host0: ent[16] CMD val[c2] sreg[90] seqreg[cc] sreg2[00] ireg[20] ss[01] event[0c]
    scsi host0: ent[17] CMD val[00] sreg[87] seqreg[02] sreg2[00] ireg[18] ss[00] event[0c]
    scsi host0: ent[18] EVENT val[0d] sreg[87] seqreg[02] sreg2[00] ireg[18] ss[00] event[0c]
    scsi host0: ent[19] EVENT val[06] sreg[87] seqreg[02] sreg2[00] ireg[18] ss[00] event[0d]
    scsi host0: ent[20] CMD val[01] sreg[87] seqreg[02] sreg2[00] ireg[18] ss[00] event[06]
    scsi host0: ent[21] CMD val[10] sreg[87] seqreg[02] sreg2[00] ireg[18] ss[00] event[06]
    scsi host0: ent[22] CMD val[1a] sreg[87] seqreg[ca] sreg2[00] ireg[08] ss[00] event[06]
    scsi host0: ent[23] CMD val[12] sreg[87] seqreg[ca] sreg2[00] ireg[08] ss[00] event[06]
    scsi host0: ent[24] EVENT val[0d] sreg[87] seqreg[ca] sreg2[00] ireg[08] ss[00] event[06]
    scsi host0: ent[25] EVENT val[09] sreg[86] seqreg[ca] sreg2[00] ireg[10] ss[00] event[0d]
    scsi host0: ent[26] CMD val[01] sreg[86] seqreg[ca] sreg2[00] ireg[10] ss[00] event[09]
    scsi host0: ent[27] CMD val[10] sreg[86] seqreg[ca] sreg2[00] ireg[10] ss[00] event[09]
    scsi host0: ent[28] EVENT val[0a] sreg[86] seqreg[ca] sreg2[00] ireg[10] ss[00] event[09]
    scsi host0: ent[29] EVENT val[0d] sreg[80] seqreg[ca] sreg2[00] ireg[20] ss[00] event[0a]
    scsi host0: ent[30] EVENT val[04] sreg[80] seqreg[ca] sreg2[00] ireg[20] ss[00] event[0d]
    scsi host0: ent[31] CMD val[01] sreg[80] seqreg[ca] sreg2[00] ireg[20] ss[00] event[04]
    scsi host0: ent[0] CMD val[90] sreg[80] seqreg[ca] sreg2[00] ireg[20] ss[00] event[04]
    scsi host0: ent[1] EVENT val[05] sreg[80] seqreg[ca] sreg2[00] ireg[20] ss[00] event[04]
    scsi target0:0:3: FAST-5 SCSI 2.0 MB/s ST (500 ns, offset 15)
    scsi target0:0:0: asynchronous
    sr 0:0:3:0: [sr0] scsi-1 drive
    cdrom: Uniform CD-ROM driver Revision: 3.20
    sd 0:0:0:0: Attached scsi generic sg0 type 0
    sr 0:0:3:0: Attached scsi generic sg1 type 5

    This patch resolves this issue because the bus reset causes the INQUIRY
    command to fail earlier, and return the appropriate result code.

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Martin K. Petersen

    Finn Thain
     
  • This patch improves readability. There are no functional changes.

    Since this touches on a questionable ESP_INTR_DC conditional, add some
    commentary to help others who may (as I did) find themselves chasing an
    "Invalid Command" error after the device flags this condition.

    This cleanup also eliminates a warning from "make W=1":
    drivers/scsi/esp_scsi.c: In function 'esp_finish_select':
    drivers/scsi/esp_scsi.c:1233:5: warning: variable 'orig_select_state' set but not used [-Wunused-but-set-variable]
    u8 orig_select_state;

    Tested-by: Stan Johnson
    Signed-off-by: Finn Thain
    Signed-off-by: Martin K. Petersen

    Finn Thain
     

10 Nov, 2015

1 commit

  • This patch changes the !blk-mq path to the same defaults as the blk-mq
    I/O path by always enabling block tagging, and always using host wide
    tags. We've had blk-mq available for a few releases so bugs with
    this mode should have been ironed out, and this ensures we get better
    coverage of over tagging setup over different configs.

    Signed-off-by: Christoph Hellwig
    Acked-by: Jens Axboe
    Reviewed-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Christoph Hellwig
     

09 Jan, 2015

1 commit


24 Nov, 2014

10 commits

  • CONFIG2_FENAB ('feature enable') changed definition between chip
    revisions, from 'Latch SCSI Phase' to 'Latch SCSI Phase, display
    chip ID upon reset, and enable 24 bit addresses'.
    So only enable it for am53c974 where we know what it's doing.

    Acked-by: David S. Miller
    Reviewed-by: Paolo Bonzini
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • On PCscsi, the FENAB configuration also enables 24-bit DMA
    transfer lengths (and provides the chip id in TCHI after reset).
    We want to be able to enable this parameter from the DMA driver.

    Check if the caller of scsi_esp_register provided a value for esp->config2.
    If this is the case, assume this is not an ESP100, skip the detection
    phase and leave esp->config2 untouched. It will be used in esp_reset_esp.

    Reviewed-by: Hannes Reinecke
    Acked-by: David S. Miller
    Signed-off-by: Paolo Bonzini
    Signed-off-by: Christoph Hellwig

    Paolo Bonzini
     
  • The am53c974 returns the same ID as the FAS236, but implements
    things slightly differently. So detect the am53c974 by checking
    for ESP_CONFIG4 register.

    Reviewed-by: Paolo Bonzini
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • The am53c974 has an design issue where a single byte might be
    left in the SCSI FIFO after a DMA transfer.
    As the handling code is currently untested add a WARN_ON()
    statement here.

    Reviewed-by: Paolo Bonzini
    Acked-by: David S. Miller
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Using DMA for command submission has the drawback that it might
    generate additional DMA completion interrupts after the command
    has been submitted to the device.
    Additionally the am53c974 has a design flaw causing it
    to generate spurious interrupts even though DMA completion
    interrupts are not enabled.
    This can be avoided by using the FIFO for command submission.

    Reviewed-by: Paolo Bonzini
    Acked-by: David S. Miller
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • A read to ESP_INTRPT will clear ESP_STATUS and ESP_SSTEP. So read
    all status registers in one go to avoid losing information.

    Reviewed-by: Paolo Bonzini
    Acked-by: David S. Miller
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Add new debug definitions for event and command logging.

    Reviewed-by: Paolo Bonzini
    Acked-by: David S. Miller
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Use dev_printk functions for correct device annotations.

    Reviewed-by: Paolo Bonzini
    Acked-by: David S. Miller
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Add a field 'num_tags' to the esp structure to allow drivers
    to overwrite the number of avialable tags if required.
    Default is ESP_DEFAULT_TAGS.

    Reviewed-by: Paolo Bonzini
    Acked-by: David S. Miller
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Drop the now unused reason argument from the ->change_queue_depth method.
    Also add a return value to scsi_adjust_queue_depth, and rename it to
    scsi_change_queue_depth now that it can be used as the default
    ->change_queue_depth implementation.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     

12 Nov, 2014

3 commits

  • Remove the tagged argument from scsi_adjust_queue_depth, and just let it
    handle the queue depth. For most drivers those two are fairly separate,
    given that most modern drivers don't care about the SCSI "tagged" status
    of a command at all, and many old drivers allow queuing of multiple
    untagged commands in the driver.

    Instead we start out with the ->simple_tags flag set before calling
    ->slave_configure, which is how all drivers actually looking at
    ->simple_tags except for one worke anyway. The one other case looks
    broken, but I've kept the behavior as-is for now.

    Except for that we only change ->simple_tags from the ->change_queue_type,
    and when rejecting a tag message in a single driver, so keeping this
    churn out of scsi_adjust_queue_depth is a clear win.

    Now that the usage of scsi_adjust_queue_depth is more obvious we can
    also remove all the trivial instances in ->slave_alloc or ->slave_configure
    that just set it to the cmd_per_lun default.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Hannes Reinecke
    Reviewed-by: Martin K. Petersen

    Christoph Hellwig
     
  • Allow a driver to ask for block layer tags by setting .use_blk_tags in the
    host template, in which case it will always see a valid value in
    request->tag, similar to the behavior when using blk-mq. This means even
    SCSI "untagged" commands will now have a tag, which is especially useful
    when using a host-wide tag map.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Martin K. Petersen
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     
  • Unless we want to build a SPI tag message we should just check SCMD_TAGGED
    instead of reverse engineering a tag type through the use of
    scsi_populate_tag_msg.

    Also rename the function to spi_populate_tag_msg, make it behave like the
    other spi message helpers, and move it to the spi transport class.

    Signed-off-by: Christoph Hellwig
    Reviewed-by: Mike Christie
    Reviewed-by: Hannes Reinecke

    Christoph Hellwig
     

02 Aug, 2013

1 commit

  • Meelis Roos reports a crash in esp_free_lun_tag() in the presense
    of a disk which has died.

    The issue is that when we issue an autosense command, we do so by
    hijacking the original command that caused the check-condition.

    When we do so we clear out the ent->tag[] array when we issue it via
    find_and_prep_issuable_command(). This is so that the autosense
    command is forced to be issued non-tagged.

    That is problematic, because it is the value of ent->tag[] which
    determines whether we issued the original scsi command as tagged
    vs. non-tagged (see esp_alloc_lun_tag()).

    And that, in turn, is what trips up the sanity checks in
    esp_free_lun_tag(). That function needs the original ->tag[] values
    in order to free up the tag slot properly.

    Fix this by remembering the original command's tag values, and
    having esp_alloc_lun_tag() and esp_free_lun_tag() use them.

    Reported-by: Meelis Roos
    Tested-by: Meelis Roos
    Signed-off-by: David S. Miller

    David S. Miller
     

06 Apr, 2012

1 commit


24 May, 2011

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    b43: fix comment typo reqest -> request
    Haavard Skinnemoen has left Atmel
    cris: typo in mach-fs Makefile
    Kconfig: fix copy/paste-ism for dell-wmi-aio driver
    doc: timers-howto: fix a typo ("unsgined")
    perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c
    md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course').
    treewide: fix a few typos in comments
    regulator: change debug statement be consistent with the style of the rest
    Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations"
    audit: acquire creds selectively to reduce atomic op overhead
    rtlwifi: don't touch with treewide double semicolon removal
    treewide: cleanup continuations and remove logging message whitespace
    ath9k_hw: don't touch with treewide double semicolon removal
    include/linux/leds-regulator.h: fix syntax in example code
    tty: fix typo in descripton of tty_termios_encode_baud_rate
    xtensa: remove obsolete BKL kernel option from defconfig
    m68k: fix comment typo 'occcured'
    arch:Kconfig.locks Remove unused config option.
    treewide: remove extra semicolons
    ...

    Linus Torvalds
     

10 May, 2011

1 commit


01 May, 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