1. 10 Sep, 2013 22 commits
  2. 02 Aug, 2013 18 commits
    • Ben Hutchings's avatar
      Linux 3.2.50 · 401390fb
      Ben Hutchings authored
      401390fb
    • William Gulland's avatar
      usb: Clear both buffers when clearing a control transfer TT buffer. · 7a444fe1
      William Gulland authored
      commit 2c7b871b upstream.
      
      Control transfers have both IN and OUT (or SETUP) packets, so when
      clearing TT buffers for a control transfer it's necessary to send
      two HUB_CLEAR_TT_BUFFER requests to the hub.
      Signed-off-by: default avatarWilliam Gulland <wgulland@google.com>
      Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      7a444fe1
    • Johan Hovold's avatar
      USB: mos7840: fix memory leak in open · 3c574b06
      Johan Hovold authored
      commit 5f8a2e68 upstream.
      
      Allocated urbs and buffers were never freed on errors in open.
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      3c574b06
    • Enrico Mioso's avatar
      usb: serial: option.c: remove ONDA MT825UP product ID fromdriver · 07d41dce
      Enrico Mioso authored
      commit 878c69aa upstream.
      
      Some (very few) early devices like mine, where not exposting a proper CDC
      descriptor. This was fixed with an immediate firmware update from the vendor,
      and pre-installed on newer devices.
      So actual devices can be driven by cdc_acm.c + cdc_ether.c.
      Signed-off-by: default avatarEnrico Mioso <mrkiko.rs@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      07d41dce
    • Dan Williams's avatar
      usb: serial: option: add Olivetti Olicard 200 · afbdf5cb
      Dan Williams authored
      commit 4cf76df0 upstream.
      
      Speaks AT on interfaces 5 (command & PPP) and 3 (secondary), other
      interface protocols are unknown.
      Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      afbdf5cb
    • Enrico Mioso's avatar
      usb: serial: option: blacklist ONDA MT689DC QMI interface · fd31a3db
      Enrico Mioso authored
      commit 3d1a69e7 upstream.
      
      Prevent the option driver from binding itself to the QMI/WWAN interface, making
      it unusable by the proper driver.
      Signed-off-by: default avatarenrico Mioso <mrkiko.rs@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      fd31a3db
    • Oleksij Rempel's avatar
      xhci: fix null pointer dereference on ring_doorbell_for_active_rings · 68a127fb
      Oleksij Rempel authored
      commit d66eaf9f upstream.
      
      in some cases where device is attched to xhci port and do not responding,
      for example ath9k_htc with stalled firmware, kernel will
      crash on ring_doorbell_for_active_rings.
      This patch check if pointer exist before it is used.
      
      This patch should be backported to kernels as old as 2.6.35, that
      contain the commit e9df17eb "USB: xhci:
      Correct assumptions about number of rings per endpoint"
      Signed-off-by: default avatarOleksij Rempel <linux@rempel-privat.de>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      68a127fb
    • George Cherian's avatar
      usb: host: xhci: Enable XHCI_SPURIOUS_SUCCESS for all controllers with xhci 1.0 · 5829ddf0
      George Cherian authored
      commit 07f3cb7c upstream.
      
      Xhci controllers with hci_version > 0.96 gives spurious success
      events on short packet completion. During webcam capture the
      "ERROR Transfer event TRB DMA ptr not part of current TD" was observed.
      The same application works fine with synopsis controllers hci_version 0.96.
      The same issue is seen with Intel Pantherpoint xhci controller. So enabling
      this quirk in xhci_gen_setup if controller verion is greater than 0.96.
      For xhci-pci move the quirk to much generic place xhci_gen_setup.
      
      Note from Sarah:
      
      The xHCI 1.0 spec changed how hardware handles short packets.  The HW
      will notify SW of the TRB where the short packet occurred, and it will
      also give a successful status for the last TRB in a TD (the one with the
      IOC flag set).  On the second successful status, that warning will be
      triggered in the driver.
      
      Software is now supposed to not assume the TD is not completed until it
      gets that last successful status.  That means we have a slight race
      condition, although it should have little practical impact.  This patch
      papers over that issue.
      
      It's on my long-term to-do list to fix this race condition, but it is a
      much more involved patch that will probably be too big for stable.  This
      patch is needed for stable to avoid serious log spam.
      
      This patch should be backported to kernels as old as 3.0, that
      contain the commit ad808333 "Intel xhci:
      Ignore spurious successful event."
      
      The patch will have to be modified for kernels older than 3.2, since
      that kernel added the xhci_gen_setup function for xhci platform devices.
      The correct conflict resolution for kernels older than 3.2 is to set
      XHCI_SPURIOUS_SUCCESS in xhci_pci_quirks for all xHCI 1.0 hosts.
      Signed-off-by: default avatarGeorge Cherian <george.cherian@ti.com>
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      5829ddf0
    • Sarah Sharp's avatar
      xhci: Avoid NULL pointer deref when host dies. · 6f536ab9
      Sarah Sharp authored
      commit 203a8661 upstream.
      
      When the host controller fails to respond to an Enable Slot command, and
      the host fails to respond to the register write to abort the command
      ring, the xHCI driver will assume the host is dead, and call
      usb_hc_died().
      
      The USB device's slot_id is still set to zero, and the pointer stored at
      xhci->devs[0] will always be NULL.  The call to xhci_check_args in
      xhci_free_dev should have caught the NULL virt_dev pointer.
      
      However, xhci_free_dev is designed to free the xhci_virt_device
      structures, even if the host is dead, so that we don't leak kernel
      memory.  xhci_free_dev checks the return value from the generic
      xhci_check_args function.  If the return value is -ENODEV, it carries on
      trying to free the virtual device.
      
      The issue is that xhci_check_args looks at the host controller state
      before it looks at the xhci_virt_device pointer.  It will return -ENIVAL
      because the host is dead, and xhci_free_dev will ignore the return
      value, and happily dereference the NULL xhci_virt_device pointer.
      
      The fix is to make sure that xhci_check_args checks the xhci_virt_device
      pointer before it checks the host state.
      
      See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1203453 for
      further details.  This patch doesn't solve the underlying issue, but
      will ensure we don't see any more NULL pointer dereferences because of
      the issue.
      
      This patch should be backported to kernels as old as 3.1, that
      contain the commit 7bd89b40 "xhci: Don't
      submit commands or URBs to halted hosts."
      Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
      Reported-by: default avatarVincent Thiele <vincentthiele@gmail.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      6f536ab9
    • Enrico Mioso's avatar
      usb: serial: option: Add ONYX 3G device support · dcef899c
      Enrico Mioso authored
      commit 63b5df96 upstream.
      
      This patch adds support for the ONYX 3G device (version 1) from ALFA
      NETWORK.
      Signed-off-by: default avatarEnrico Mioso <mrkiko.rs@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      dcef899c
    • Johan Hovold's avatar
      USB: ti_usb_3410_5052: fix dynamic-id matching · 9e91b416
      Johan Hovold authored
      commit 1fad5642 upstream.
      
      The driver failed to take the dynamic ids into account when determining
      the device type and therefore all devices were detected as 2-port
      devices when using the dynamic-id interface.
      
      Match on the usb-serial-driver field instead of doing redundant id-table
      searches.
      Reported-by: default avatarAnders Hammarquist <iko@iko.pp.se>
      Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      9e91b416
    • Anton Blanchard's avatar
      powerpc/modules: Module CRC relocation fix causes perf issues · bbacf542
      Anton Blanchard authored
      commit 0e0ed640 upstream.
      
      Module CRCs are implemented as absolute symbols that get resolved by
      a linker script. We build an intermediate .o that contains an
      unresolved symbol for each CRC. genksysms parses this .o, calculates
      the CRCs and writes a linker script that "resolves" the symbols to
      the calculated CRC.
      
      Unfortunately the ppc64 relocatable kernel sees these CRCs as symbols
      that need relocating and relocates them at boot. Commit d4703aef
      (module: handle ppc64 relocating kcrctabs when CONFIG_RELOCATABLE=y)
      added a hook to reverse the bogus relocations. Part of this patch
      created a symbol at 0x0:
      
      # head -2 /proc/kallsyms
      0000000000000000 T reloc_start
      c000000000000000 T .__start
      
      This reloc_start symbol is causing lots of confusion to perf. It
      thinks reloc_start is a massive function that stretches from 0x0 to
      0xc000000000000000 and we get various cryptic errors out of perf,
      including:
      
      problem incrementing symbol count, skipping event
      
      This patch removes the  reloc_start linker script label and instead
      defines it as PHYSICAL_START. We also need to wrap it with
      CONFIG_PPC64 because the ppc32 kernel can set a non zero
      PHYSICAL_START at compile time and we wouldn't want to subtract
      it from the CRCs in that case.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      bbacf542
    • Bjørn Mork's avatar
      usb: option: add TP-LINK MA260 · 9c0abcdc
      Bjørn Mork authored
      commit 94190301 upstream.
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      9c0abcdc
    • Ian Abbott's avatar
      staging: comedi: fix a race between do_cmd_ioctl() and read/write · 1f8adde0
      Ian Abbott authored
      commit 4b18f08b upstream.
      
      `do_cmd_ioctl()` is called with the comedi device's mutex locked to
      process the `COMEDI_CMD` ioctl to set up comedi's asynchronous command
      handling on a comedi subdevice.  `comedi_read()` and `comedi_write()`
      are the `read` and `write` handlers for the comedi device, but do not
      lock the mutex (for performance reasons, as some things can hold the
      mutex for quite a long time).
      
      There is a race condition if `comedi_read()` or `comedi_write()` is
      running at the same time and for the same file object and comedi
      subdevice as `do_cmd_ioctl()`.  `do_cmd_ioctl()` sets the subdevice's
      `busy` pointer to the file object way before it sets the `SRF_RUNNING` flag
      in the subdevice's `runflags` member.  `comedi_read() and
      `comedi_write()` check the subdevice's `busy` pointer is pointing to the
      current file object, then if the `SRF_RUNNING` flag is not set, will call
      `do_become_nonbusy()` to shut down the asyncronous command.  Bad things
      can happen if the asynchronous command is being shutdown and set up at
      the same time.
      
      To prevent the race, don't set the `busy` pointer until
      after the `SRF_RUNNING` flag has been set.  Also, make sure the mutex is
      held in `comedi_read()` and `comedi_write()` while calling
      `do_become_nonbusy()` in order to avoid moving the race condition to a
      point within that function.
      
      Change some error handling `goto cleanup` statements in `do_cmd_ioctl()`
      to simple `return -ERRFOO` statements as a result of changing when the
      `busy` pointer is set.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      1f8adde0
    • Ian Abbott's avatar
      staging: comedi: COMEDI_CANCEL ioctl should wake up read/write · f6c4c6bd
      Ian Abbott authored
      commit 69acbaac upstream.
      
      Comedi devices can do blocking read() or write() (or poll()) if an
      asynchronous command has been set up, blocking for data (for read()) or
      buffer space (for write()).  Various events associated with the
      asynchronous command will wake up the blocked reader or writer (or
      poller).  It is also possible to force the asynchronous command to
      terminate by issuing a `COMEDI_CANCEL` ioctl.  That shuts down the
      asynchronous command, but does not currently wake up the blocked reader
      or writer (or poller).  If the blocked task could be woken up, it would
      see that the command is no longer active and return.  The caller of the
      `COMEDI_CANCEL` ioctl could attempt to wake up the blocked task by
      sending a signal, but that's a nasty workaround.
      
      Change `do_cancel_ioctl()` to wake up the wait queue after it returns
      from `do_cancel()`.  `do_cancel()` can propagate an error return value
      from the low-level comedi driver's cancel routine, but it always shuts
      the command down regardless, so `do_cancel_ioctl()` can wake up he wait
      queue regardless of the return value from `do_cancel()`.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      f6c4c6bd
    • Alexandr \\\"Sky\\\" Ivanov's avatar
      USB: option: add D-Link DWM-152/C1 and DWM-156/C1 · 281e4f20
      Alexandr \\\"Sky\\\" Ivanov authored
      commit ca247635 upstream.
      
      Adding support for D-Link DWM-152/C1 and DWM-156/C1 devices.
      
      DWM-152/C1:
      T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  6 Spd=480 MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=07d1 ProdID=3e01 Rev= 0.00
      S:  Product=USB Configuration
      S:  SerialNumber=1234567890ABCDEF
      C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      
      DWM-156/C1:
      T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  8 Spd=480 MxCh= 0
      D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
      P:  Vendor=07d1 ProdID=3e02 Rev= 0.00
      S:  Product=DataCard Device
      S:  SerialNumber=1234567890ABCDEF
      C:* #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
      E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
      E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
      I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
      E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
      Signed-off-by: default avatarAlexandr Ivanov <alexandr.sky@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      281e4f20
    • Harshula Jayasuriya's avatar
      nfsd: nfsd_open: when dentry_open returns an error do not propagate as struct file · 6fa3efc2
      Harshula Jayasuriya authored
      commit e4daf1ff upstream.
      
      The following call chain:
      ------------------------------------------------------------
      nfs4_get_vfs_file
      - nfsd_open
        - dentry_open
          - do_dentry_open
            - __get_file_write_access
              - get_write_access
                - return atomic_inc_unless_negative(&inode->i_writecount) ? 0 : -ETXTBSY;
      ------------------------------------------------------------
      
      can result in the following state:
      ------------------------------------------------------------
      struct nfs4_file {
      ...
        fi_fds = {0xffff880c1fa65c80, 0xffffffffffffffe6, 0x0},
        fi_access = {{
            counter = 0x1
          }, {
            counter = 0x0
          }},
      ...
      ------------------------------------------------------------
      
      1) First time around, in nfs4_get_vfs_file() fp->fi_fds[O_WRONLY] is
      NULL, hence nfsd_open() is called where we get status set to an error
      and fp->fi_fds[O_WRONLY] to -ETXTBSY. Thus we do not reach
      nfs4_file_get_access() and fi_access[O_WRONLY] is not incremented.
      
      2) Second time around, in nfs4_get_vfs_file() fp->fi_fds[O_WRONLY] is
      NOT NULL (-ETXTBSY), so nfsd_open() is NOT called, but
      nfs4_file_get_access() IS called and fi_access[O_WRONLY] is incremented.
      Thus we leave a landmine in the form of the nfs4_file data structure in
      an incorrect state.
      
      3) Eventually, when __nfs4_file_put_access() is called it finds
      fi_access[O_WRONLY] being non-zero, it decrements it and calls
      nfs4_file_put_fd() which tries to fput -ETXTBSY.
      ------------------------------------------------------------
      ...
           [exception RIP: fput+0x9]
           RIP: ffffffff81177fa9  RSP: ffff88062e365c90  RFLAGS: 00010282
           RAX: ffff880c2b3d99cc  RBX: ffff880c2b3d9978  RCX: 0000000000000002
           RDX: dead000000100101  RSI: 0000000000000001  RDI: ffffffffffffffe6
           RBP: ffff88062e365c90   R8: ffff88041fe797d8   R9: ffff88062e365d58
           R10: 0000000000000008  R11: 0000000000000000  R12: 0000000000000001
           R13: 0000000000000007  R14: 0000000000000000  R15: 0000000000000000
           ORIG_RAX: ffffffffffffffff  CS: 0010  SS: 0018
        #9 [ffff88062e365c98] __nfs4_file_put_access at ffffffffa0562334 [nfsd]
       #10 [ffff88062e365cc8] nfs4_file_put_access at ffffffffa05623ab [nfsd]
       #11 [ffff88062e365ce8] free_generic_stateid at ffffffffa056634d [nfsd]
       #12 [ffff88062e365d18] release_open_stateid at ffffffffa0566e4b [nfsd]
       #13 [ffff88062e365d38] nfsd4_close at ffffffffa0567401 [nfsd]
       #14 [ffff88062e365d88] nfsd4_proc_compound at ffffffffa0557f28 [nfsd]
       #15 [ffff88062e365dd8] nfsd_dispatch at ffffffffa054543e [nfsd]
       #16 [ffff88062e365e18] svc_process_common at ffffffffa04ba5a4 [sunrpc]
       #17 [ffff88062e365e98] svc_process at ffffffffa04babe0 [sunrpc]
       #18 [ffff88062e365eb8] nfsd at ffffffffa0545b62 [nfsd]
       #19 [ffff88062e365ee8] kthread at ffffffff81090886
       #20 [ffff88062e365f48] kernel_thread at ffffffff8100c14a
      ------------------------------------------------------------
      Signed-off-by: default avatarHarshula Jayasuriya <harshula@redhat.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      [bwh: Backported to 3.2: adjust context]
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      6fa3efc2
    • Ewan D. Milne's avatar
      sd: fix crash when UA received on DIF enabled device · a84914b1
      Ewan D. Milne authored
      commit 085b513f upstream.
      
      sd_prep_fn will allocate a larger CDB for the command via mempool_alloc
      for devices using DIF type 2 protection.  This CDB was being freed
      in sd_done, which results in a kernel crash if the command is retried
      due to a UNIT ATTENTION.  This change moves the code to free the larger
      CDB into sd_unprep_fn instead, which is invoked after the request is
      complete.
      
      It is no longer necessary to call scsi_print_command separately for
      this case as the ->cmnd will no longer be NULL in the normal code path.
      
      Also removed conditional test for DIF type 2 when freeing the larger
      CDB because the protection_type could have been changed via sysfs while
      the command was executing.
      Signed-off-by: default avatarEwan D. Milne <emilne@redhat.com>
      Acked-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
      Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
      a84914b1