25 Nov, 2014

1 commit


12 Nov, 2014

1 commit

  • Currently scsi piggy backs on the block layer to define the concept
    of a tagged command. But we want to be able to have block-level host-wide
    tags assigned even for untagged commands like the initial INQUIRY, so add
    a new SCSI-level flag for commands that are tagged at the scsi level, so
    that even commands without that set can have tags assigned to them. Note
    that this alredy is the case for the blk-mq code path, and this just lets
    the old path catch up with it.

    We also set this flag based upon sdev->simple_tags instead of the block
    queue flag, so that it is entirely independent of the block layer tagging,
    and thus always correct even if a driver doesn't use block level tagging
    yet.

    Also remove the old blk_rq_tagged; it was only used by SCSI drivers, and
    removing it forces them to look for the proper replacement.

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

    Christoph Hellwig
     

01 Oct, 2014

1 commit

  • A set of flags introduced in the block layer enable better control over
    how protection information is handled. These flags are useful for both
    error injection and data recovery purposes. Checking can be enabled and
    disabled for controller and disk, and the guard tag format is now a
    per-I/O property.

    Update sd_protect_op to communicate the relevant information to the
    low-level device driver via a set of flags in scsi_cmnd.

    Signed-off-by: Martin K. Petersen
    Reviewed-by: Sagi Grimberg
    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Martin K. Petersen
     

18 Jul, 2014

1 commit


04 Jul, 2014

1 commit

  • Commit 8846bab180fa introduced a helper that can be used to query the
    wire transfer size for a SCSI command taking protection information into
    account.

    However, some commands do not have a 1:1 mapping between the block range
    they work on and the payload size (discard, write same). After the
    scatterlist has been set up these requests use __data_len to store the
    number of bytes to report completion on. This means that callers of
    scsi_transfer_length() would get the wrong byte count for these types of
    requests.

    To overcome this we make scsi_transfer_length() use the scatterlist
    length in the scsi_data_buffer as basis for the wire transfer
    calculation instead of __data_len.

    Reported-by: Christoph Hellwig
    Debugged-by: Mike Christie
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Christoph Hellwig
    Reviewed-by: Sagi Grimberg
    Fixes: d77e65350f2d82dfa0557707d505711f5a43c8fd
    Cc: stable@vger.kernel.org
    Signed-off-by: James Bottomley

    Martin K. Petersen
     

13 Jun, 2014

1 commit

  • Pull SCSI target updates from Nicholas Bellinger:
    "The highlights this round include:

    - Add support for T10 PI pass-through between vhost-scsi +
    virtio-scsi (MST + Paolo + MKP + nab)
    - Add support for T10 PI in qla2xxx target mode (Quinn + MKP + hch +
    nab, merged through scsi.git)
    - Add support for percpu-ida pre-allocation in qla2xxx target code
    (Quinn + nab)
    - A number of iser-target fixes related to hardening the network
    portal shutdown path (Sagi + Slava)
    - Fix response length residual handling for a number of control CDBs
    (Roland + Christophe V.)
    - Various iscsi RFC conformance fixes in the CHAP authentication path
    (Tejas and Calsoft folks + nab)
    - Return TASK_SET_FULL status for tcm_fc(FCoE) DataIn + Response
    failures (Vasu + Jun + nab)
    - Fix long-standing ABORT_TASK + session reset hang (nab)
    - Convert iser-initiator + iser-target to include T10 bytes into EDTL
    (Sagi + Or + MKP + Mike Christie)
    - Fix NULL pointer dereference regression related to XCOPY introduced
    in v3.15 + CC'ed to v3.12.y (nab)"

    * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (34 commits)
    target: Fix NULL pointer dereference for XCOPY in target_put_sess_cmd
    vhost-scsi: Include prot_bytes into expected data transfer length
    TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire
    libiscsi, iser: Adjust data_length to include protection information
    scsi_cmnd: Introduce scsi_transfer_length helper
    target: Report correct response length for some commands
    target/sbc: Check that the LBA and number of blocks are correct in VERIFY
    target/sbc: Remove sbc_check_valid_sectors()
    Target/iscsi: Fix sendtargets response pdu for iser transport
    Target/iser: Fix a wrong dereference in case discovery session is over iser
    iscsi-target: Fix ABORT_TASK + connection reset iscsi_queue_req memory leak
    target: Use complete_all for se_cmd->t_transport_stop_comp
    target: Set CMD_T_ACTIVE bit for Task Management Requests
    target: cleanup some boolean tests
    target/spc: Simplify INQUIRY EVPD=0x80
    tcm_fc: Generate TASK_SET_FULL status for response failures
    tcm_fc: Generate TASK_SET_FULL status for DataIN failures
    iscsi-target: Reject mutual authentication with reflected CHAP_C
    iscsi-target: Remove no-op from iscsit_tpg_del_portal_group
    iscsi-target: Fix CHAP_A parameter list handling
    ...

    Linus Torvalds
     

12 Jun, 2014

1 commit

  • In case protection information exists on the wire
    scsi transports should include it in the transfer
    byte count (even if protection information does not
    exist in the host memory space). This helper will
    compute the total transfer length from the scsi
    command data length and protection attributes.

    Signed-off-by: Sagi Grimberg
    Signed-off-by: Martin K. Petersen
    Cc: stable@vger.kernel.org # 3.15+
    Signed-off-by: Nicholas Bellinger

    Sagi Grimberg
     

20 May, 2014

1 commit


27 Mar, 2014

1 commit

  • We don't use the passed in scsi command for anything, so just add a adapter-
    wide internal status to go along with the internal scb that is used unter
    int_mtx to pass back the return value and get rid of all the complexities
    and abuse of the scsi_cmnd structure.

    This gets rid of the only user of scsi_allocate_command/scsi_free_command,
    which can now be removed.

    [jejb: checkpatch fixes]
    Signed-off-by: Christoph Hellwig
    Acked-by: Adam Radford
    Signed-off-by: James Bottomley

    Christoph Hellwig
     

16 Mar, 2014

1 commit


19 Dec, 2013

1 commit

  • When a command runs into a timeout we need to send an 'ABORT TASK'
    TMF. This is typically done by the 'eh_abort_handler' LLDD callback.

    Conceptually, however, this function is a normal SCSI command, so
    there is no need to enter the error handler.

    This patch implements a new scsi_abort_command() function which
    invokes an asynchronous function scsi_eh_abort_handler() to
    abort the commands via the usual 'eh_abort_handler'.

    If abort succeeds the command is either retried or terminated,
    depending on the number of allowed retries. However, 'eh_eflags'
    records the abort, so if the retry would fail again the
    command is pushed onto the error handler without trying to
    abort it (again); it'll be cleared up from SCSI EH.

    [hare: smatch detected stray switch fixed]
    Signed-off-by: Hannes Reinecke
    Signed-off-by: James Bottomley

    Hannes Reinecke
     

09 Oct, 2012

1 commit

  • This patch tries to shorten the path length of scsi_cmd_to_driver(). As only
    REQ_TYPE_BLOCK_PC commands can be submitted without a driver, so we could
    avoid the related NULL checking, as long as we make sure we don't use it for
    REQ_TYPE_BLOCK_PC type commands. Plus, this fixes a bug where you get
    different behaviors from REQ_TYPE_BLOCK_PC commands when a driver is and isn't
    attached.

    Signed-off-by: Li Zhong
    Reviewed-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Li Zhong
     

08 Jul, 2012

1 commit

  • Avoid crashing if the private_data pointer happens to be NULL. This has
    been seen sometimes when a host reset happens, notably when there are
    many LUNs:

    host3: Assigned Port ID 0c1601
    scsi host3: libfc: Host reset succeeded on port (0c1601)
    BUG: unable to handle kernel NULL pointer dereference at 0000000000000350
    IP: [] scsi_send_eh_cmnd+0x58/0x3a0

    Process scsi_eh_3 (pid: 4144, threadinfo ffff88030920c000, task ffff880326b160c0)
    Stack:
    000000010372e6ba 0000000000000282 000027100920dca0 ffffffffa0038ee0
    0000000000000000 0000000000030003 ffff88030920dc80 ffff88030920dc80
    00000002000e0000 0000000a00004000 ffff8803242f7760 ffff88031326ed80
    Call Trace:
    [] ? lock_timer_base+0x70/0x70
    [] scsi_eh_tur+0x3e/0xc0
    [] scsi_eh_test_devices+0x76/0x170
    [] scsi_eh_host_reset+0x85/0x160
    [] scsi_eh_ready_devs+0x91/0x110
    [] scsi_unjam_host+0xed/0x1f0
    [] scsi_error_handler+0x1a8/0x200
    [] ? scsi_unjam_host+0x1f0/0x1f0
    [] kthread+0x9e/0xb0
    [] kernel_thread_helper+0x4/0x10
    [] ? kthread_freezable_should_stop+0x70/0x70
    [] ? gs_change+0x13/0x13
    Code: 25 28 00 00 00 48 89 45 c8 31 c0 48 8b 87 80 00 00 00 48 8d b5 60 ff ff ff 89 d1 48 89 fb 41 89 d6 4c 89 fa 48 8b 80 b8 00 00 00
    8b 80 50 03 00 00 48 8b 00 48 89 85 38 ff ff ff 48 8b 07 4c
    RIP [] scsi_send_eh_cmnd+0x58/0x3a0
    RSP
    CR2: 0000000000000350

    Signed-off-by: Mark Rustad
    Tested-by: Marcus Dennis
    Cc:
    Signed-off-by: James Bottomley

    Mark Rustad
     

16 Apr, 2012

1 commit

  • Commit 18a4d0a22ed6 ("[SCSI] Handle disk devices which can not process
    medium access commands") introduced a bug in which we would attempt to
    dereference the scsi driver even when the device had no ULD attached.

    Ensure that a driver is registered and make the driver accessor function
    more resilient to errors during device discovery.

    Reported-by: Elric Fu
    Reported-by: Bart Van Assche
    Signed-off-by: Martin K. Petersen
    Signed-off-by: Linus Torvalds

    Martin K. Petersen
     

20 Feb, 2012

1 commit

  • We have experienced several devices which fail in a fashion we do not
    currently handle gracefully in SCSI. After a failure these devices will
    respond to the SCSI primary command set (INQUIRY, TEST UNIT READY, etc.)
    but any command accessing the storage medium will time out.

    The following patch adds an callback that can be used by upper level
    drivers to inspect the results of an error handling command. This in
    turn has been used to implement additional checking in the SCSI disk
    driver.

    If a medium access command fails twice but TEST UNIT READY succeeds both
    times in the subsequent error handling we will offline the device. The
    maximum number of failed commands required to take a device offline can
    be tweaked in sysfs.

    Also add a new error flag to scsi_debug which allows this scenario to be
    easily reproduced.

    [jejb: fix up integer parsing to use kstrtouint]
    Signed-off-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Martin K. Petersen
     

19 Feb, 2012

1 commit

  • Resubmitting as my previous post had format issues and did not go llinux-scsi.
    This patch changes the function to set_msg_byte, set_host_byte and
    set_driver_byte to correctly set the corresponding bytes appropriately.

    It will reset the original setting and correctly set it to the new value. The
    previous OR operation does not always set it back to new value. Look at patch
    2/2 for an example.

    Signed-off-by: Babu Moger
    Signed-off-by: James Bottomley

    Moger, Babu
     

02 Oct, 2009

1 commit

  • The checksum format is orthogonal to whether the protection information
    is being passed on beyond the HBA or not. It is perfectly valid to use
    a non-T10 CRC with WRITE_STRIP and READ_INSERT.

    Consequently it no longer makes sense to explicitly refer to the
    conversion in the protection operation. Update sd_dif and lpfc
    accordingly.

    Signed-off-by: Martin K. Petersen
    Acked-by: Ihab Hamadi
    Signed-off-by: James Bottomley

    Martin K. Petersen
     

11 May, 2009

1 commit

  • With recent cleanups, there is no place where low level driver
    directly manipulates request fields. This means that the 'hard'
    request fields always equal the !hard fields. Convert all
    rq->sectors, nr_sectors and current_nr_sectors references to
    accessors.

    While at it, drop superflous blk_rq_pos() < 0 test in swim.c.

    [ Impact: use pos and nr_sectors accessors ]

    Signed-off-by: Tejun Heo
    Acked-by: Geert Uytterhoeven
    Tested-by: Grant Likely
    Acked-by: Grant Likely
    Tested-by: Adrian McMenamin
    Acked-by: Adrian McMenamin
    Acked-by: Mike Miller
    Cc: James Bottomley
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Borislav Petkov
    Cc: Sergei Shtylyov
    Cc: Eric Moore
    Cc: Alan Stern
    Cc: FUJITA Tomonori
    Cc: Pete Zaitcev
    Cc: Stephen Rothwell
    Cc: Paul Clements
    Cc: Tim Waugh
    Cc: Jeff Garzik
    Cc: Jeremy Fitzhardinge
    Cc: Alex Dubov
    Cc: David Woodhouse
    Cc: Martin Schwidefsky
    Cc: Dario Ballabio
    Cc: David S. Miller
    Cc: Rusty Russell
    Cc: unsik Kim
    Cc: Laurent Vivier
    Signed-off-by: Jens Axboe

    Tejun Heo
     

13 Mar, 2009

1 commit


09 Oct, 2008

1 commit

  • Right now SCSI and others do their own command timeout handling.
    Move those bits to the block layer.

    Instead of having a timer per command, we try to be a bit more clever
    and simply have one per-queue. This avoids the overhead of having to
    tear down and setup a timer for each command, so it will result in a lot
    less timer fiddling.

    Signed-off-by: Mike Anderson
    Signed-off-by: Jens Axboe

    Jens Axboe
     

27 Jul, 2008

2 commits

  • Implement support for DMA of protection information for devices that
    are data integrity capable.

    - Add support for mapping an extra scatter-gather list containing
    the protection information.

    - Allocate protection scsi_data_buffer if host is DIX (integrity DMA)
    capable.

    - Accessor function for checking whether a device has protection
    enabled.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Martin K. Petersen
     
  • Controllers that support DMA of protection information must be told
    explicitly how to handle the I/O. The controller has no knowledge of
    the protection capabilities of the target device so this information
    must be passed in the scsi_cmnd.

    - The protection operation tells the HBA whether to generate, strip or
    verify protection information.

    - The protection type tells the HBA which layout the target is
    formatted with. This is necessary because the controller must be
    able to correctly interpret the included protection information in
    order to verify it.

    - When a scsi_cmnd is reused for error handling the protection
    operation must be cleared and saved while error handling is in
    progress.

    - prot_op and prot_type are placed in an existing hole in scsi_cmnd
    and don't cause the structure to grow.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: James Bottomley

    Martin K. Petersen
     

12 Jul, 2008

1 commit


03 May, 2008

1 commit

  • Add support for variable-length, extended, and vendor specific
    CDBs to scsi-ml. It is now possible for initiators and ULD's
    to issue these types of commands. LLDs need not change much.
    All they need is to raise the .max_cmd_len to the longest command
    they support (see iscsi patch).

    - clean-up some code paths that did not expect commands to be
    larger than 16, and change cmd_len members' type to short as
    char is not enough.

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

    Boaz Harrosh
     

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
     

08 Apr, 2008

2 commits


31 Jan, 2008

3 commits

  • At the block level bidi request uses req->next_rq pointer for a second
    bidi_read request.
    At Scsi-midlayer a second scsi_data_buffer structure is used for the
    bidi_read part. This bidi scsi_data_buffer is put on
    request->next_rq->special. Struct scsi_cmnd is not changed.

    - Define scsi_bidi_cmnd() to return true if it is a bidi request and a
    second sgtable was allocated.

    - Define scsi_in()/scsi_out() to return the in or out scsi_data_buffer
    from this command This API is to isolate users from the mechanics of
    bidi.

    - Define scsi_end_bidi_request() to do what scsi_end_request() does but
    for a bidi request. This is necessary because bidi commands are a bit
    tricky here. (See comments in body)

    - scsi_release_buffers() will also release the bidi_read scsi_data_buffer

    - scsi_io_completion() on bidi commands will now call
    scsi_end_bidi_request() and return.

    - The previous work done in scsi_init_io() is now done in a new
    scsi_init_sgtable() (which is 99% identical to old scsi_init_io())
    The new scsi_init_io() will call the above twice if needed also for
    the bidi_read command. Only at this point is a command bidi.

    - In scsi_error.c at scsi_eh_prep/restore_cmnd() make sure bidi-lld is not
    confused by a get-sense command that looks like bidi. This is done
    by puting NULL at request->next_rq, and restoring.

    [jejb: update to sg_table and resolve conflicts
    also update to blk-end-request and resolve conflicts]

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

    Boaz Harrosh
     
  • In preparation for bidi we abstract all IO members of scsi_cmnd,
    that will need to duplicate, into a substructure.

    - Group all IO members of scsi_cmnd into a scsi_data_buffer
    structure.
    - Adjust accessors to new members.
    - scsi_{alloc,free}_sgtable receive a scsi_data_buffer instead of
    scsi_cmnd. And work on it.
    - Adjust scsi_init_io() and scsi_release_buffers() for above
    change.
    - Fix other parts of scsi_lib/scsi.c to members migration. Use
    accessors where appropriate.

    - fix Documentation about scsi_cmnd in scsi_host.h

    - scsi_error.c
    * Changed needed members of struct scsi_eh_save.
    * Careful considerations in scsi_eh_prep/restore_cmnd.

    - sd.c and sr.c
    * sd and sr would adjust IO size to align on device's block
    size so code needs to change once we move to scsi_data_buff
    implementation.
    * Convert code to use scsi_for_each_sg
    * Use data accessors where appropriate.

    - tgt: convert libsrp to use scsi_data_buffer

    - isd200: This driver still bangs on scsi_cmnd IO members,
    so need changing

    [jejb: rebased on top of sg_table patches fixed up conflicts
    and used the synergy to eliminate use_sg and sg_count]

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

    Boaz Harrosh
     
  • If we export scsi_init_io()/scsi_release_buffers() instead of
    scsi_{alloc,free}_sgtable() from scsi_lib than tgt code is much more
    insulated from scsi_lib changes. As a bonus it will also gain bidi
    capability when it comes.

    [jejb: rebase on to sg_table and fix up rejections]

    Signed-off-by: Boaz Harrosh
    Acked-by: FUJITA Tomonori
    Signed-off-by: Andrew Morton
    Signed-off-by: James Bottomley

    Boaz Harrosh
     

28 Jan, 2008

1 commit


24 Jan, 2008

1 commit

  • This removes static array sense_buffer in scsi_cmnd and uses
    dynamically allocated sense_buffer (with GFP_DMA).

    The reason for doing this is that some architectures need cacheline
    aligned buffer for DMA:

    http://lkml.org/lkml/2007/11/19/2

    The problems are that scsi_eh_prep_cmnd puts scsi_cmnd::sense_buffer
    to sglist and some LLDs directly DMA to scsi_cmnd::sense_buffer. It's
    necessary to DMA to scsi_cmnd::sense_buffer safely. This patch solves
    these issues.

    __scsi_get_command allocates sense_buffer via kmem_cache_alloc and
    attaches it to a scsi_cmnd so everything just work as before.

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     

07 Jan, 2008

1 commit

  • This reverts commit ac40532ef0b8649e6f7f83859ea0de1c4ed08a19, which gets
    us back the original cleanup of 6f5391c283d7fdcf24bf40786ea79061919d1e1d.

    It turns out that the bug that was triggered by that commit was
    apparently not actually triggered by that commit at all, and just the
    testing conditions had changed enough to make it appear to be due to it.

    The real problem seems to have been found by Peter Osterlund:

    "pktcdvd sets it [block device size] when opening the /dev/pktcdvd
    device, but when the drive is later opened as /dev/scd0, there is
    nothing that sets it back. (Btw, 40944 is possible if the disk is a
    CDRW that was formatted with "cdrwtool -m 10236".)

    The problem is that pktcdvd opens the cd device in non-blocking mode
    when pktsetup is run, and doesn't close it again until pktsetup -d is
    run. The effect is that if you meanwhile open the cd device,
    blkdev.c:do_open() doesn't call bd_set_size() because
    bdev->bd_openers is non-zero."

    In particular, to repeat the bug (regardless of whether commit
    6f5391c283d7fdcf24bf40786ea79061919d1e1d is applied or not):

    " 1. Start with an empty drive.
    2. pktsetup 0 /dev/scd0
    3. Insert a CD containing an isofs filesystem.
    4. mount /dev/pktcdvd/0 /mnt/tmp
    5. umount /mnt/tmp
    6. Press the eject button.
    7. Insert a DVD containing a non-writable filesystem.
    8. mount /dev/scd0 /mnt/tmp
    9. find /mnt/tmp -type f -print0 | xargs -0 sha1sum >/dev/null
    10. If the DVD contains data beyond the physical size of a CD, you
    get I/O errors in the terminal, and dmesg reports lots of
    "attempt to access beyond end of device" errors."

    which in turn is because the nested open after the media change won't
    cause the size to be set properly (because the original open still holds
    the block device, and we only do the bd_set_size() when we don't have
    other people holding the device open).

    The proper fix for that is probably to just do something like

    bdev->bd_inode->i_size = (loff_t)get_capacity(disk)<
    Cc: James Bottomley
    Cc: Matthew Wilcox
    Cc: Ingo Molnar
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

03 Jan, 2008

1 commit

  • This reverts commit 6f5391c283d7fdcf24bf40786ea79061919d1e1d ("[SCSI]
    Get rid of scsi_cmnd->done") that was supposed to be a cleanup commit,
    but apparently it causes regressions:

    Bug 9370 - v2.6.24-rc2-409-g9418d5d: attempt to access beyond end of device
    http://bugzilla.kernel.org/show_bug.cgi?id=9370

    this patch should be reintroduced in a more split-up form to make
    testing of it easier.

    Signed-off-by: Ingo Molnar
    Acked-by: Matthew Wilcox
    Cc: James Bottomley
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

16 Oct, 2007

4 commits


13 Oct, 2007

2 commits

  • The ULD ->done callback moves into the scsi_driver. By moving the call
    to scsi_io_completion() from scsi_blk_pc_done() to scsi_finish_command(),
    we can eliminate the latter entirely. By returning 'good_bytes' from
    the ->done callback (rather than invoking scsi_io_completion()), we can
    stop exporting scsi_io_completion().

    Also move the prototypes from sd.h to sd.c as they're all internal anyway.
    Rename sd_rw_intr to sd_done and rw_intr to sr_done.

    Inspired-by: Christoph Hellwig
    Signed-off-by: Matthew Wilcox
    Signed-off-by: James Bottomley

    Matthew Wilcox
     
  • The pid field is a duplicate of the serial_number field and has been
    scheduled for removal for a long time. A few drivers were still using
    it, so just change them to use serial_number instead.

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

    Matthew Wilcox