]> Git Repo - linux.git/commitdiff
Merge tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb...
authorLinus Torvalds <[email protected]>
Tue, 10 Jun 2014 01:54:06 +0000 (18:54 -0700)
committerLinus Torvalds <[email protected]>
Tue, 10 Jun 2014 01:54:06 +0000 (18:54 -0700)
Pull SCSI updates from James Bottomley:
 "This patch consists of the usual driver updates (qla2xxx, qla4xxx,
  lpfc, be2iscsi, fnic, ufs, NCR5380) The NCR5380 is the addition to
  maintained status of a long neglected driver for older hardware.  In
  addition there are a lot of minor fixes and cleanups and some more
  updates to make scsi mq ready"

* tag 'scsi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (130 commits)
  include/scsi/osd_protocol.h: remove unnecessary __constant
  mvsas: Recognise device/subsystem 9485/9485 as 88SE9485
  Revert "be2iscsi: Fix processing cqe for cxn whose endpoint is freed"
  mptfusion: fix msgContext in mptctl_hp_hostinfo
  acornscsi: remove linked command support
  scsi/NCR5380: dprintk macro
  fusion: Remove use of DEF_SCSI_QCMD
  fusion: Add free msg frames to the head, not tail of list
  mpt2sas: Add free smids to the head, not tail of list
  mpt2sas: Remove use of DEF_SCSI_QCMD
  mpt2sas: Remove uses of serial_number
  mpt3sas: Remove use of DEF_SCSI_QCMD
  mpt3sas: Remove uses of serial_number
  qla2xxx: Use kmemdup instead of kmalloc + memcpy
  qla4xxx: Use kmemdup instead of kmalloc + memcpy
  qla2xxx: fix incorrect debug printk
  be2iscsi: Bump the driver version
  be2iscsi: Fix processing cqe for cxn whose endpoint is freed
  be2iscsi: Fix destroy MCC-CQ before MCC-EQ is destroyed
  be2iscsi: Fix memory corruption in MBX path
  ...

1  2 
MAINTAINERS
drivers/scsi/atari_scsi.c
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/scsi_lib.c
drivers/scsi/sd.c

diff --combined MAINTAINERS
index 77556fc91cdd0892d845e620e612b61e644c4ce1,ccd242bfbf159893f888e41357e01739e64e6c7a..a1f4b576628a5193c3dc5a73fe6fffc8b14a32e4
@@@ -210,13 -210,6 +210,13 @@@ S:       Supporte
  F:    Documentation/scsi/aacraid.txt
  F:    drivers/scsi/aacraid/
  
 +ABI/API
 +L:    [email protected]
 +F:    Documentation/ABI/
 +F:    include/linux/syscalls.h
 +F:    include/uapi/
 +F:    kernel/sys_ni.c
 +
  ABIT UGURU 1,2 HARDWARE MONITOR DRIVER
  M:    Hans de Goede <[email protected]>
  L:    [email protected]
@@@ -362,7 -355,7 +362,7 @@@ F: Documentation/hwmon/adm102
  F:    drivers/hwmon/adm1025.c
  
  ADM1029 HARDWARE MONITOR DRIVER
 -M:    Corentin Labbe <c[email protected]>
 +M:    Corentin Labbe <c[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/hwmon/adm1029.c
  F:    arch/alpha/
  
  ALTERA TRIPLE SPEED ETHERNET DRIVER
 -M:    Vince Bridgers <[email protected]
 +M:    Vince Bridgers <[email protected]>
  L:    [email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
@@@ -654,7 -647,7 +654,7 @@@ F: sound/soc/codecs/ssm
  F:    sound/soc/codecs/sigmadsp.*
  
  ANALOG DEVICES INC ASOC DRIVERS
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  L:    [email protected] (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org/
  S:    Supported
@@@ -815,11 -808,6 +815,11 @@@ F:       arch/arm/boot/dts/at91*.dts
  F:    arch/arm/boot/dts/sama*.dts
  F:    arch/arm/boot/dts/sama*.dtsi
  
 +ARM/ATMEL AT91 Clock Support
 +M:    Boris Brezillon <[email protected]>
 +S:    Maintained
 +F:    drivers/clk/at91
 +
  ARM/CALXEDA HIGHBANK ARCHITECTURE
  M:    Rob Herring <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -1629,6 -1617,12 +1629,6 @@@ S:     Supporte
  F:    drivers/misc/atmel_tclib.c
  F:    drivers/clocksource/tcb_clksrc.c
  
 -ATMEL TSADCC DRIVER
 -M:    Josh Wu <[email protected]>
 -L:    [email protected]
 -S:    Supported
 -F:    drivers/input/touchscreen/atmel_tsadcc.c
 -
  ATMEL USBA UDC DRIVER
  M:    Nicolas Ferre <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -1770,54 -1764,54 +1770,54 @@@ F:   include/uapi/linux/bfs_fs.
  
  BLACKFIN ARCHITECTURE
  M:    Steven Miao <[email protected]>
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  T:    git git://git.code.sf.net/p/adi-linux/code
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    arch/blackfin/
  
  BLACKFIN EMAC DRIVER
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/net/ethernet/adi/
  
  BLACKFIN RTC DRIVER
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/rtc/rtc-bfin.c
  
  BLACKFIN SDH DRIVER
  M:    Sonic Zhang <[email protected]>
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/mmc/host/bfin_sdh.c
  
  BLACKFIN SERIAL DRIVER
  M:    Sonic Zhang <[email protected]>
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/tty/serial/bfin_uart.c
  
  BLACKFIN WATCHDOG DRIVER
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org
  S:    Supported
  F:    drivers/watchdog/bfin_wdt.c
  
  BLACKFIN I2C TWI DRIVER
  M:    Sonic Zhang <[email protected]>
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org/
  S:    Supported
  F:    drivers/i2c/busses/i2c-bfin-twi.c
  
  BLACKFIN MEDIA DRIVER
  M:    Scott Jiang <[email protected]>
 -L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
  W:    http://blackfin.uclinux.org/
  S:    Supported
  F:    drivers/media/platform/blackfin/
  S:    Supported
  F:    drivers/net/ethernet/broadcom/bnx2x/
  
 -BROADCOM BCM281XX/BCM11XXX ARM ARCHITECTURE
 +BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE
  M:    Christian Daudt <[email protected]>
  M:    Matt Porter <[email protected]>
  L:    [email protected]
 -T:    git git://git.github.com/broadcom/bcm11351
 +T:    git git://github.com/broadcom/mach-bcm
  S:    Maintained
  F:    arch/arm/mach-bcm/
  F:    arch/arm/boot/dts/bcm113*
 +F:    arch/arm/boot/dts/bcm216*
  F:    arch/arm/boot/dts/bcm281*
  F:    arch/arm/configs/bcm_defconfig
  F:    drivers/mmc/host/sdhci_bcm_kona.c
@@@ -2200,7 -2193,6 +2200,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    drivers/char/*
  F:    drivers/misc/*
 +F:    include/linux/miscdevice.h
  
  CHECKPATCH
  M:    Andy Whitcroft <[email protected]>
  S:    Maintained
  F:    drivers/usb/host/ohci-ep93xx.c
  
 -CIRRUS LOGIC CS4270 SOUND DRIVER
 -M:    Timur Tabi <[email protected]>
 -L:    [email protected] (moderated for non-subscribers)
 -S:    Odd Fixes
 -F:    sound/soc/codecs/cs4270*
 -
  CIRRUS LOGIC AUDIO CODEC DRIVERS
  M:    Brian Austin <[email protected]>
  M:    Paul Handrigan <[email protected]>
  S:    Maintained
  F:    drivers/connector/
  
 -CONTROL GROUPS (CGROUPS)
 +CONTROL GROUP (CGROUP)
  M:    Tejun Heo <[email protected]>
  M:    Li Zefan <[email protected]>
 -L:    [email protected]
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
  S:    Maintained
 +F:    Documentation/cgroups/
  F:    include/linux/cgroup*
  F:    kernel/cgroup*
 -F:    mm/*cgroup*
 +
 +CONTROL GROUP - CPUSET
 +M:    Li Zefan <[email protected]>
 +L:    [email protected]
 +W:    http://www.bullopensource.org/cpuset/
 +W:    http://oss.sgi.com/projects/cpusets/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
 +S:    Maintained
 +F:    Documentation/cgroups/cpusets.txt
 +F:    include/linux/cpuset.h
 +F:    kernel/cpuset.c
 +
 +CONTROL GROUP - MEMORY RESOURCE CONTROLLER (MEMCG)
 +M:    Johannes Weiner <[email protected]>
 +M:    Michal Hocko <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +S:    Maintained
 +F:    mm/memcontrol.c
 +F:    mm/page_cgroup.c
  
  CORETEMP HARDWARE MONITORING DRIVER
  M:    Fenghua Yu <[email protected]>
@@@ -2436,6 -2415,7 +2436,6 @@@ F:      drivers/net/ethernet/ti/cpmac.
  CPU FREQUENCY DRIVERS
  M:    Rafael J. Wysocki <[email protected]>
  M:    Viresh Kumar <[email protected]>
 -L:    [email protected]
  L:    [email protected]
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git
@@@ -2446,6 -2426,7 +2446,6 @@@ F:      include/linux/cpufreq.
  CPU FREQUENCY DRIVERS - ARM BIG LITTLE
  M:    Viresh Kumar <[email protected]>
  M:    Sudeep Holla <[email protected]>
 -L:    [email protected]
  L:    [email protected]
  W:    http://www.arm.com/products/processors/technologies/biglittleprocessing.php
  S:    Maintained
@@@ -2483,6 -2464,17 +2483,6 @@@ M:     Thomas Renninger <[email protected]
  S:    Maintained
  F:    tools/power/cpupower/
  
 -CPUSETS
 -M:    Li Zefan <[email protected]>
 -L:    [email protected]
 -W:    http://www.bullopensource.org/cpuset/
 -W:    http://oss.sgi.com/projects/cpusets/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
 -S:    Maintained
 -F:    Documentation/cgroups/cpusets.txt
 -F:    include/linux/cpuset.h
 -F:    kernel/cpuset.c
 -
  CRAMFS FILESYSTEM
  W:    http://sourceforge.net/projects/cramfs/
  S:    Orphan / Obsolete
@@@ -2700,15 -2692,6 +2700,15 @@@ S:    Orpha
  F:    Documentation/networking/decnet.txt
  F:    net/decnet/
  
 +DECSTATION PLATFORM SUPPORT
 +M:    "Maciej W. Rozycki" <[email protected]>
 +L:    [email protected]
 +W:    http://www.linux-mips.org/wiki/DECstation
 +S:    Maintained
 +F:    arch/mips/dec/
 +F:    arch/mips/include/asm/dec/
 +F:    arch/mips/include/asm/mach-dec/
 +
  DEFXX FDDI NETWORK DRIVER
  M:    "Maciej W. Rozycki" <[email protected]>
  S:    Maintained
@@@ -2806,14 -2789,12 +2806,14 @@@ F:   sound/soc/codecs/da[79]*.[ch
  
  DIGI NEO AND CLASSIC PCI PRODUCTS
  M:    Lidza Louina <[email protected]>
 +M:    Mark Hounschell <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/staging/dgnc/
  
  DIGI EPCA PCI PRODUCTS
  M:    Lidza Louina <[email protected]>
 +M:    Mark Hounschell <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/staging/dgap/
@@@ -3177,9 -3158,10 +3177,9 @@@ S:     Maintaine
  F:    drivers/scsi/eata_pio.*
  
  EBTABLES
 -M:    Bart De Schuymer <[email protected]>
  L:    [email protected]
  W:    http://ebtables.sourceforge.net/
 -S:    Maintained
 +S:    Orphan
  F:    include/linux/netfilter_bridge/ebt_*.h
  F:    include/uapi/linux/netfilter_bridge/ebt_*.h
  F:    net/bridge/netfilter/ebt*.c
  S:    Supported
  F:    drivers/uio/uio_pci_generic.c
  
 +GET_MAINTAINER SCRIPT
 +M:    Joe Perches <[email protected]>
 +S:    Maintained
 +F:    scripts/get_maintainer.pl
 +
  GFS2 FILE SYSTEM
  M:    Steven Whitehouse <[email protected]>
  L:    [email protected]
@@@ -4039,8 -4016,9 +4039,8 @@@ S:      Odd Fixe
  F:    drivers/media/usb/hdpvr/
  
  HWPOISON MEMORY FAILURE HANDLING
 -M:    Andi Kleen <[email protected]>
 +M:    Naoya Horiguchi <[email protected]>
  L:    [email protected]
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-mce-2.6.git hwpoison
  S:    Maintained
  F:    mm/memory-failure.c
  F:    mm/hwpoison-inject.c
@@@ -4231,11 -4209,9 +4231,11 @@@ S:    Maintaine
  F:    fs/hpfs/
  
  HSI SUBSYSTEM
 -M:    Sebastian Reichel <[email protected]>
 +M:    Sebastian Reichel <[email protected]>
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-bus-hsi
 +F:    Documentation/hsi.txt
  F:    drivers/hsi/
  F:    include/linux/hsi/
  F:    include/uapi/linux/hsi/
@@@ -4390,7 -4366,7 +4390,7 @@@ S:      Supporte
  F:    drivers/crypto/nx/
  
  IBM Power 842 compression accelerator
- M:    Robert Jennings <rcj@linux.vnet.ibm.com>
+ M:    Nathan Fontenot <nfont@linux.vnet.ibm.com>
  S:    Supported
  F:    drivers/crypto/nx/nx-842.c
  F:    include/linux/nx842.h
  S:    Supported
  F:    drivers/net/ethernet/ibm/ibmveth.*
  
- IBM Power Virtual SCSI/FC Device Drivers
- M:    Robert Jennings <rcj@linux.vnet.ibm.com>
+ IBM Power Virtual SCSI Device Drivers
+ M:    Nathan Fontenot <nfont@linux.vnet.ibm.com>
  L:    [email protected]
  S:    Supported
- F:    drivers/scsi/ibmvscsi/
- X:    drivers/scsi/ibmvscsi/ibmvstgt.c
+ F:    drivers/scsi/ibmvscsi/ibmvscsi*
+ F:    drivers/scsi/ibmvscsi/viosrp.h
+ IBM Power Virtual FC Device Drivers
+ M:    Brian King <[email protected]>
+ L:    [email protected]
+ S:    Supported
+ F:    drivers/scsi/ibmvscsi/ibmvfc*
  
  IBM ServeRAID RAID DRIVER
  P:    Jack Hammer
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
  F:    kernel/irq/
 +
 +IRQCHIP DRIVERS
 +M:    Thomas Gleixner <[email protected]>
 +M:    Jason Cooper <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
 +T:    git git://git.infradead.org/users/jcooper/linux.git irqchip/core
  F:    drivers/irqchip/
  
  IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
@@@ -5522,15 -5496,15 +5528,15 @@@ F:   Documentation/hwmon/ltc426
  F:    drivers/hwmon/ltc4261.c
  
  LTP (Linux Test Project)
 -M:    Shubham Goyal <[email protected]>
  M:    Mike Frysinger <[email protected]>
  M:    Cyril Hrubis <[email protected]>
 -M:    Caspar Zhang <[email protected]>
  M:    Wanlong Gao <[email protected]>
 +M:    Jan Stancek <[email protected]>
 +M:    Stanislav Kholmanskikh <[email protected]>
 +M:    Alexey Kodanev <[email protected]>
  L:    [email protected] (subscribers-only)
 -W:    http://ltp.sourceforge.net/
 +W:    http://linux-test-project.github.io/
  T:    git git://github.com/linux-test-project/ltp.git
 -T:    git git://ltp.git.sourceforge.net/gitroot/ltp/ltp-dev
  S:    Maintained
  
  M32R ARCHITECTURE
@@@ -5774,6 -5748,17 +5780,6 @@@ F:     include/linux/memory_hotplug.
  F:    include/linux/vmalloc.h
  F:    mm/
  
 -MEMORY RESOURCE CONTROLLER
 -M:    Johannes Weiner <[email protected]>
 -M:    Michal Hocko <[email protected]>
 -M:    Balbir Singh <[email protected]>
 -M:    KAMEZAWA Hiroyuki <[email protected]>
 -L:    [email protected]
 -L:    [email protected]
 -S:    Maintained
 -F:    mm/memcontrol.c
 -F:    mm/page_cgroup.c
 -
  MEMORY TECHNOLOGY DEVICES (MTD)
  M:    David Woodhouse <[email protected]>
  M:    Brian Norris <[email protected]>
@@@ -6028,6 -6013,28 +6034,28 @@@ M:    Petr Vandrovec <[email protected]
  S:    Odd Fixes
  F:    fs/ncpfs/
  
+ NCR 5380 SCSI DRIVERS
+ M:    Finn Thain <[email protected]>
+ M:    Michael Schmitz <[email protected]>
+ L:    [email protected]
+ S:    Maintained
+ F:    Documentation/scsi/g_NCR5380.txt
+ F:    drivers/scsi/NCR5380.*
+ F:    drivers/scsi/arm/cumana_1.c
+ F:    drivers/scsi/arm/oak.c
+ F:    drivers/scsi/atari_NCR5380.c
+ F:    drivers/scsi/atari_scsi.*
+ F:    drivers/scsi/dmx3191d.c
+ F:    drivers/scsi/dtc.*
+ F:    drivers/scsi/g_NCR5380.*
+ F:    drivers/scsi/g_NCR5380_mmio.c
+ F:    drivers/scsi/mac_scsi.*
+ F:    drivers/scsi/pas16.*
+ F:    drivers/scsi/sun3_NCR5380.c
+ F:    drivers/scsi/sun3_scsi.*
+ F:    drivers/scsi/sun3_scsi_vme.c
+ F:    drivers/scsi/t128.*
  NCR DUAL 700 SCSI DRIVER (MICROCHANNEL)
  M:    "James E.J. Bottomley" <[email protected]>
  L:    [email protected]
@@@ -6436,7 -6443,6 +6464,7 @@@ F:      drivers/usb/*/*omap
  F:    arch/arm/*omap*/usb*
  
  OMAP GPIO DRIVER
 +M:    Javier Martinez Canillas <[email protected]>
  M:    Santosh Shilimkar <[email protected]>
  M:    Kevin Hilman <[email protected]>
  L:    [email protected]
@@@ -6533,10 -6539,10 +6561,10 @@@ T:   git git://openrisc.net/~jonas/linu
  F:    arch/openrisc/
  
  OPENVSWITCH
 -M:    Jesse Gross <jesse@nicira.com>
 +M:    Pravin Shelar <pshelar@nicira.com>
  L:    [email protected]
  W:    http://openvswitch.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jesse/openvswitch.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/pshelar/openvswitch.git
  S:    Maintained
  F:    net/openvswitch/
  
@@@ -6726,7 -6732,6 +6754,7 @@@ F:      Documentation/PCI
  F:    drivers/pci/
  F:    include/linux/pci*
  F:    arch/x86/pci/
 +F:    arch/x86/kernel/quirks.c
  
  PCI DRIVER FOR IMX6
  M:    Richard Zhu <[email protected]>
  S:    Maintained
  F:    drivers/pci/host/*designware*
  
 +PCI DRIVER FOR GENERIC OF HOSTS
 +M:    Will Deacon <[email protected]>
 +L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pci/host-generic-pci.txt
 +F:    drivers/pci/host/pci-host-generic.c
 +
  PCMCIA SUBSYSTEM
  P:    Linux PCMCIA Team
  L:    [email protected]
@@@ -6966,6 -6963,7 +6994,6 @@@ F:      drivers/power
  
  PNP SUPPORT
  M:    Rafael J. Wysocki <[email protected]>
 -M:    Bjorn Helgaas <[email protected]>
  S:    Maintained
  F:    drivers/pnp/
  
@@@ -7432,14 -7430,6 +7460,14 @@@ F:    drivers/rpmsg
  F:    Documentation/rpmsg.txt
  F:    include/linux/rpmsg.h
  
 +RESET CONTROLLER FRAMEWORK
 +M:    Philipp Zabel <[email protected]>
 +S:    Maintained
 +F:    drivers/reset/
 +F:    Documentation/devicetree/bindings/reset/
 +F:    include/linux/reset.h
 +F:    include/linux/reset-controller.h
 +
  RFKILL
  M:    Johannes Berg <[email protected]>
  L:    [email protected]
@@@ -7689,6 -7679,7 +7717,6 @@@ L:      [email protected]
  Q:    https://patchwork.linuxtv.org/project/linux-media/list/
  S:    Supported
  F:    drivers/media/platform/exynos4-is/
 -F:    include/media/s5p_fimc.h
  
  SAMSUNG S3C24XX/S3C64XX SOC SERIES CAMIF DRIVER
  M:    Sylwester Nawrocki <[email protected]>
@@@ -7991,26 -7982,6 +8019,26 @@@ M:    Robin Holt <[email protected]
  S:    Maintained
  F:    drivers/misc/sgi-xp/
  
 +SI2157 MEDIA DRIVER
 +M:    Antti Palosaari <[email protected]>
 +L:    [email protected]
 +W:    http://linuxtv.org/
 +W:    http://palosaari.fi/linux/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/anttip/media_tree.git
 +S:    Maintained
 +F:    drivers/media/tuners/si2157*
 +
 +SI2168 MEDIA DRIVER
 +M:    Antti Palosaari <[email protected]>
 +L:    [email protected]
 +W:    http://linuxtv.org/
 +W:    http://palosaari.fi/linux/
 +Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 +T:    git git://linuxtv.org/anttip/media_tree.git
 +S:    Maintained
 +F:    drivers/media/dvb-frontends/si2168*
 +
  SI470X FM RADIO RECEIVER I2C DRIVER
  M:    Hans Verkuil <[email protected]>
  L:    [email protected]
@@@ -8310,7 -8281,6 +8338,7 @@@ L:      [email protected] (moderat
  W:    http://www.alsa-project.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
  T:    git git://git.alsa-project.org/alsa-kernel.git
 +Q:    http://patchwork.kernel.org/project/alsa-devel/list/
  S:    Maintained
  F:    Documentation/sound/
  F:    include/sound/
@@@ -8531,7 -8501,7 +8559,7 @@@ S:      Maintaine
  F:    drivers/staging/olpc_dcon/
  
  STAGING - OZMO DEVICES USB OVER WIFI DRIVER
 -M:    Rupesh Gujare <rupesh.gujare@atmel.com>
 +M:    Shigekatsu Tateno <shigekatsu.tateno@atmel.com>
  S:    Maintained
  F:    drivers/staging/ozwpan/
  
@@@ -8546,13 -8516,6 +8574,13 @@@ M:    Florian Schilhabel <florian.c.schilh
  S:    Odd Fixes
  F:    drivers/staging/rtl8712/
  
 +STAGING - REALTEK RTL8723U WIRELESS DRIVER
 +M:    Larry Finger <[email protected]>
 +M:    Jes Sorensen <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/staging/rtl8723au/
 +
  STAGING - SILICON MOTION SM7XX FRAME BUFFER DRIVER
  M:    Teddy Wang <[email protected]>
  S:    Odd Fixes
@@@ -9115,6 -9078,7 +9143,6 @@@ F:      drivers/char/tpm
  
  TRACING
  M:    Steven Rostedt <[email protected]>
 -M:    Frederic Weisbecker <[email protected]>
  M:    Ingo Molnar <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
  S:    Maintained
@@@ -9171,9 -9135,6 +9199,9 @@@ F:      arch/um/os-Linux/drivers
  
  TURBOCHANNEL SUBSYSTEM
  M:    "Maciej W. Rozycki" <[email protected]>
 +M:    Ralf Baechle <[email protected]>
 +L:    [email protected]
 +Q:    http://patchwork.linux-mips.org/project/linux-mips/list/
  S:    Maintained
  F:    drivers/tc/
  F:    include/linux/tc.h
index a8d721ff19ebff8b5f11e4cfc1b17e715defec30,b51aa54ecf0f412534e0b83c10be9f1cdb1e8ee7..b522134528d6185bb54ab4afbc3b9fcc02b881c4
  
  #include <linux/module.h>
  
- #define NDEBUG (0)
- #define NDEBUG_ABORT          0x00100000
- #define NDEBUG_TAGS           0x00200000
- #define NDEBUG_MERGING                0x00400000
  #define AUTOSENSE
  /* For the Atari version, use only polled IO or REAL_DMA */
  #define       REAL_DMA
@@@ -314,7 -308,7 +308,7 @@@ static irqreturn_t scsi_tt_intr(int irq
  
        dma_stat = tt_scsi_dma.dma_ctrl;
  
-       INT_PRINTK("scsi%d: NCR5380 interrupt, DMA status = %02x\n",
+       dprintk(NDEBUG_INTR, "scsi%d: NCR5380 interrupt, DMA status = %02x\n",
                   atari_scsi_host->host_no, dma_stat & 0xff);
  
        /* Look if it was the DMA that has interrupted: First possibility
        if ((dma_stat & 0x02) && !(dma_stat & 0x40)) {
                atari_dma_residual = HOSTDATA_DMALEN - (SCSI_DMA_READ_P(dma_addr) - atari_dma_startaddr);
  
-               DMA_PRINTK("SCSI DMA: There are %ld residual bytes.\n",
+               dprintk(NDEBUG_DMA, "SCSI DMA: There are %ld residual bytes.\n",
                           atari_dma_residual);
  
                if ((signed int)atari_dma_residual < 0)
                         * other command.  These shouldn't disconnect anyway.
                         */
                        if (atari_dma_residual & 0x1ff) {
-                               DMA_PRINTK("SCSI DMA: DMA bug corrected, "
+                               dprintk(NDEBUG_DMA, "SCSI DMA: DMA bug corrected, "
                                           "difference %ld bytes\n",
                                           512 - (atari_dma_residual & 0x1ff));
                                atari_dma_residual = (atari_dma_residual + 511) & ~0x1ff;
@@@ -438,7 -432,7 +432,7 @@@ static irqreturn_t scsi_falcon_intr(in
                               "ST-DMA fifo\n", transferred & 15);
  
                atari_dma_residual = HOSTDATA_DMALEN - transferred;
-               DMA_PRINTK("SCSI DMA: There are %ld residual bytes.\n",
+               dprintk(NDEBUG_DMA, "SCSI DMA: There are %ld residual bytes.\n",
                           atari_dma_residual);
        } else
                atari_dma_residual = 0;
@@@ -474,11 -468,11 +468,11 @@@ static void atari_scsi_fetch_restbytes(
                /* there are 'nr' bytes left for the last long address
                   before the DMA pointer */
                phys_dst ^= nr;
-               DMA_PRINTK("SCSI DMA: there are %d rest bytes for phys addr 0x%08lx",
+               dprintk(NDEBUG_DMA, "SCSI DMA: there are %d rest bytes for phys addr 0x%08lx",
                           nr, phys_dst);
                /* The content of the DMA pointer is a physical address!  */
                dst = phys_to_virt(phys_dst);
-               DMA_PRINTK(" = virt addr %p\n", dst);
+               dprintk(NDEBUG_DMA, " = virt addr %p\n", dst);
                for (src = (char *)&tt_scsi_dma.dma_restdata; nr != 0; --nr)
                        *dst++ = *src++;
        }
@@@ -639,7 -633,7 +633,7 @@@ static int __init atari_scsi_detect(str
                                        "double buffer\n");
                        return 0;
                }
 -              atari_dma_phys_buffer = virt_to_phys(atari_dma_buffer);
 +              atari_dma_phys_buffer = atari_stram_to_phys(atari_dma_buffer);
                atari_dma_orig_addr = 0;
        }
  #endif
@@@ -827,7 -821,7 +821,7 @@@ static int atari_scsi_bus_reset(Scsi_Cm
        } else {
                atari_turnon_irq(IRQ_MFP_FSCSI);
        }
-       if ((rv & SCSI_RESET_ACTION) == SCSI_RESET_SUCCESS)
+       if (rv == SUCCESS)
                falcon_release_lock_if_possible(hostdata);
  
        return rv;
@@@ -883,7 -877,7 +877,7 @@@ static unsigned long atari_scsi_dma_set
  {
        unsigned long addr = virt_to_phys(data);
  
-       DMA_PRINTK("scsi%d: setting up dma, data = %p, phys = %lx, count = %ld, "
+       dprintk(NDEBUG_DMA, "scsi%d: setting up dma, data = %p, phys = %lx, count = %ld, "
                   "dir = %d\n", instance->host_no, data, addr, count, dir);
  
        if (!IS_A_TT() && !STRAM_ADDR(addr)) {
@@@ -1063,7 -1057,7 +1057,7 @@@ static unsigned long atari_dma_xfer_len
                possible_len = limit;
  
        if (possible_len != wanted_len)
-               DMA_PRINTK("Sorry, must cut DMA transfer size to %ld bytes "
+               dprintk(NDEBUG_DMA, "Sorry, must cut DMA transfer size to %ld bytes "
                           "instead of %ld\n", possible_len, wanted_len);
  
        return possible_len;
index afc84814e9bb3b5db7682c4e5b7751edd8b051e4,0f9cdb38703b7bf1018f931a96eca99bbd550618..d96bfb55e57b25359b1180140e2973ae1af2a045
@@@ -1,6 -1,6 +1,6 @@@
  /*
   * QLogic Fibre Channel HBA Driver
-  * Copyright (c)  2003-2013 QLogic Corporation
+  * Copyright (c)  2003-2014 QLogic Corporation
   *
   * See LICENSE.qla2xxx for copyright and licensing details.
   */
@@@ -616,7 -616,7 +616,7 @@@ qla2x00_sp_free_dma(void *vha, void *pt
  
        if (sp->flags & SRB_CRC_CTX_DSD_VALID) {
                /* List assured to be having elements */
-               qla2x00_clean_dsd_pool(ha, sp);
+               qla2x00_clean_dsd_pool(ha, sp, NULL);
                sp->flags &= ~SRB_CRC_CTX_DSD_VALID;
        }
  
@@@ -781,7 -781,7 +781,7 @@@ static in
  qla2x00_eh_wait_on_command(struct scsi_cmnd *cmd)
  {
  #define ABORT_POLLING_PERIOD  1000
- #define ABORT_WAIT_ITER               ((10 * 1000) / (ABORT_POLLING_PERIOD))
+ #define ABORT_WAIT_ITER               ((2 * 1000) / (ABORT_POLLING_PERIOD))
        unsigned long wait_iter = ABORT_WAIT_ITER;
        scsi_qla_host_t *vha = shost_priv(cmd->device->host);
        struct qla_hw_data *ha = vha->hw;
@@@ -844,11 -844,8 +844,8 @@@ qla2x00_wait_for_hba_online(scsi_qla_ho
  }
  
  /*
-  * qla2x00_wait_for_reset_ready
-  *    Wait till the HBA is online after going through
-  *    <= MAX_RETRIES_OF_ISP_ABORT  or
-  *    finally HBA is disabled ie marked offline or flash
-  *    operations are in progress.
+  * qla2x00_wait_for_hba_ready
+  * Wait till the HBA is ready before doing driver unload
   *
   * Input:
   *     ha - pointer to host adapter structure
   *    Does context switching-Release SPIN_LOCK
   *    (if any) before calling this routine.
   *
-  * Return:
-  *    Success (Adapter is online/no flash ops) : 0
-  *    Failed  (Adapter is offline/disabled/flash ops in progress) : 1
   */
- static int
- qla2x00_wait_for_reset_ready(scsi_qla_host_t *vha)
+ static void
+ qla2x00_wait_for_hba_ready(scsi_qla_host_t *vha)
  {
-       int             return_status;
-       unsigned long   wait_online;
        struct qla_hw_data *ha = vha->hw;
-       scsi_qla_host_t *base_vha = pci_get_drvdata(ha->pdev);
  
-       wait_online = jiffies + (MAX_LOOP_TIMEOUT * HZ);
-       while (((test_bit(ISP_ABORT_NEEDED, &base_vha->dpc_flags)) ||
-           test_bit(ABORT_ISP_ACTIVE, &base_vha->dpc_flags) ||
-           test_bit(ISP_ABORT_RETRY, &base_vha->dpc_flags) ||
-           ha->optrom_state != QLA_SWAITING ||
-           ha->dpc_active) && time_before(jiffies, wait_online))
+       while ((!(vha->flags.online) || ha->dpc_active ||
+           ha->flags.mbox_busy))
                msleep(1000);
-       if (base_vha->flags.online &&  ha->optrom_state == QLA_SWAITING)
-               return_status = QLA_SUCCESS;
-       else
-               return_status = QLA_FUNCTION_FAILED;
-       ql_dbg(ql_dbg_taskm, vha, 0x8019,
-           "%s return status=%d.\n", __func__, return_status);
-       return return_status;
  }
  
  int
@@@ -945,7 -922,7 +922,7 @@@ qla2xxx_eh_abort(struct scsi_cmnd *cmd
        int ret;
        unsigned int id, lun;
        unsigned long flags;
-       int wait = 0;
+       int rval, wait = 0;
        struct qla_hw_data *ha = vha->hw;
  
        if (!CMD_SP(cmd))
        sp_get(sp);
  
        spin_unlock_irqrestore(&ha->hardware_lock, flags);
-       if (ha->isp_ops->abort_command(sp)) {
-               ret = FAILED;
+       rval = ha->isp_ops->abort_command(sp);
+       if (rval) {
+               if (rval == QLA_FUNCTION_PARAMETER_ERROR) {
+                       /*
+                        * Decrement the ref_count since we can't find the
+                        * command
+                        */
+                       atomic_dec(&sp->ref_count);
+                       ret = SUCCESS;
+               } else
+                       ret = FAILED;
                ql_dbg(ql_dbg_taskm, vha, 0x8003,
-                   "Abort command mbx failed cmd=%p.\n", cmd);
+                   "Abort command mbx failed cmd=%p, rval=%x.\n", cmd, rval);
        } else {
                ql_dbg(ql_dbg_taskm, vha, 0x8004,
                    "Abort command mbx success cmd=%p.\n", cmd);
        }
  
        spin_lock_irqsave(&ha->hardware_lock, flags);
+       /*
+        * Clear the slot in the oustanding_cmds array if we can't find the
+        * command to reclaim the resources.
+        */
+       if (rval == QLA_FUNCTION_PARAMETER_ERROR)
+               vha->req->outstanding_cmds[sp->handle] = NULL;
        sp->done(ha, sp, 0);
        spin_unlock_irqrestore(&ha->hardware_lock, flags);
  
@@@ -1236,7 -1229,11 +1229,11 @@@ qla2xxx_eh_host_reset(struct scsi_cmnd 
        ql_log(ql_log_info, vha, 0x8018,
            "ADAPTER RESET ISSUED nexus=%ld:%d:%d.\n", vha->host_no, id, lun);
  
-       if (qla2x00_wait_for_reset_ready(vha) != QLA_SUCCESS)
+       /*
+        * No point in issuing another reset if one is active.  Also do not
+        * attempt a reset if we are updating flash.
+        */
+       if (qla2x00_reset_active(vha) || ha->optrom_state != QLA_SWAITING)
                goto eh_host_reset_lock;
  
        if (vha != base_vha) {
@@@ -2270,6 -2267,13 +2267,13 @@@ qla2x00_set_isp_flags(struct qla_hw_dat
                ha->device_type |= DT_IIDMA;
                ha->fw_srisc_address = RISC_START_ADDRESS_2400;
                break;
+       case PCI_DEVICE_ID_QLOGIC_ISP2271:
+               ha->device_type |= DT_ISP2271;
+               ha->device_type |= DT_ZIO_SUPPORTED;
+               ha->device_type |= DT_FWI2;
+               ha->device_type |= DT_IIDMA;
+               ha->fw_srisc_address = RISC_START_ADDRESS_2400;
+               break;
        }
  
        if (IS_QLA82XX(ha))
@@@ -2346,7 -2350,8 +2350,8 @@@ qla2x00_probe_one(struct pci_dev *pdev
            pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8031 ||
            pdev->device == PCI_DEVICE_ID_QLOGIC_ISPF001 ||
            pdev->device == PCI_DEVICE_ID_QLOGIC_ISP8044 ||
-           pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2071) {
+           pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2071 ||
+           pdev->device == PCI_DEVICE_ID_QLOGIC_ISP2271) {
                bars = pci_select_bars(pdev, IORESOURCE_MEM);
                mem_only = 1;
                ql_dbg_pci(ql_dbg_init, pdev, 0x0007,
@@@ -2877,6 -2882,7 +2882,7 @@@ skip_dpc
  
        base_vha->flags.init_done = 1;
        base_vha->flags.online = 1;
+       ha->prev_minidump_failed = 0;
  
        ql_dbg(ql_dbg_init, base_vha, 0x00f2,
            "Init done and hba is online.\n");
@@@ -3136,6 -3142,8 +3142,8 @@@ qla2x00_remove_one(struct pci_dev *pdev
        base_vha = pci_get_drvdata(pdev);
        ha = base_vha->hw;
  
+       qla2x00_wait_for_hba_ready(base_vha);
        set_bit(UNLOADING, &base_vha->dpc_flags);
  
        if (IS_QLAFX00(ha))
@@@ -3645,6 -3653,7 +3653,7 @@@ qla2x00_free_fw_dump(struct qla_hw_dat
        ha->eft = NULL;
        ha->eft_dma = 0;
        ha->fw_dumped = 0;
+       ha->fw_dump_cap_flags = 0;
        ha->fw_dump_reading = 0;
        ha->fw_dump = NULL;
        ha->fw_dump_len = 0;
@@@ -4828,7 -4837,7 +4837,7 @@@ qla2x00_do_dpc(void *data
        ha = (struct qla_hw_data *)data;
        base_vha = pci_get_drvdata(ha->pdev);
  
 -      set_user_nice(current, -20);
 +      set_user_nice(current, MIN_NICE);
  
        set_current_state(TASK_INTERRUPTIBLE);
        while (!kthread_should_stop()) {
                                if (qlafx00_reset_initialize(base_vha)) {
                                        /* Failed. Abort isp later. */
                                        if (!test_bit(UNLOADING,
-                                           &base_vha->dpc_flags))
+                                           &base_vha->dpc_flags)) {
                                                set_bit(ISP_UNRECOVERABLE,
                                                    &base_vha->dpc_flags);
                                                ql_dbg(ql_dbg_dpc, base_vha,
                                                    0x4021,
                                                    "Reset Recovery Failed\n");
+                                       }
                                }
                        }
  
@@@ -5077,8 -5087,10 +5087,10 @@@ intr_on_check
                        ha->isp_ops->enable_intrs(ha);
  
                if (test_and_clear_bit(BEACON_BLINK_NEEDED,
-                                       &base_vha->dpc_flags))
-                       ha->isp_ops->beacon_blink(base_vha);
+                                       &base_vha->dpc_flags)) {
+                       if (ha->beacon_blink_led == 1)
+                               ha->isp_ops->beacon_blink(base_vha);
+               }
  
                if (!IS_QLAFX00(ha))
                        qla2x00_do_dpc_all_vps(base_vha);
@@@ -5325,7 -5337,7 +5337,7 @@@ qla2x00_timer(scsi_qla_host_t *vha
  #define FW_ISP82XX    7
  #define FW_ISP2031    8
  #define FW_ISP8031    9
- #define FW_ISP2071    10
+ #define FW_ISP27XX    10
  
  #define FW_FILE_ISP21XX       "ql2100_fw.bin"
  #define FW_FILE_ISP22XX       "ql2200_fw.bin"
  #define FW_FILE_ISP82XX       "ql8200_fw.bin"
  #define FW_FILE_ISP2031       "ql2600_fw.bin"
  #define FW_FILE_ISP8031       "ql8300_fw.bin"
- #define FW_FILE_ISP2071       "ql2700_fw.bin"
+ #define FW_FILE_ISP27XX       "ql2700_fw.bin"
  
  
  static DEFINE_MUTEX(qla_fw_lock);
@@@ -5353,7 -5365,7 +5365,7 @@@ static struct fw_blob qla_fw_blobs[FW_B
        { .name = FW_FILE_ISP82XX, },
        { .name = FW_FILE_ISP2031, },
        { .name = FW_FILE_ISP8031, },
-       { .name = FW_FILE_ISP2071, },
+       { .name = FW_FILE_ISP27XX, },
  };
  
  struct fw_blob *
@@@ -5382,8 -5394,8 +5394,8 @@@ qla2x00_request_firmware(scsi_qla_host_
                blob = &qla_fw_blobs[FW_ISP2031];
        } else if (IS_QLA8031(ha)) {
                blob = &qla_fw_blobs[FW_ISP8031];
-       } else if (IS_QLA2071(ha)) {
-               blob = &qla_fw_blobs[FW_ISP2071];
+       } else if (IS_QLA27XX(ha)) {
+               blob = &qla_fw_blobs[FW_ISP27XX];
        } else {
                return NULL;
        }
@@@ -5714,6 -5726,7 +5726,7 @@@ static struct pci_device_id qla2xxx_pci
        { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISPF001) },
        { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP8044) },
        { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2071) },
+       { PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2271) },
        { 0 },
  };
  MODULE_DEVICE_TABLE(pci, qla2xxx_pci_tbl);
diff --combined drivers/scsi/scsi_lib.c
index a0c95cac91f0fe55681830af4477e9513ec19a32,9f841df6add8c2feba2a8df4698183bcf040d9d6..be0d5fad999d149cba321080cc7c5ee30a9da572
@@@ -140,7 -140,7 +140,7 @@@ static void __scsi_queue_insert(struct 
        cmd->result = 0;
        spin_lock_irqsave(q->queue_lock, flags);
        blk_requeue_request(q, cmd->request);
 -      kblockd_schedule_work(q, &device->requeue_work);
 +      kblockd_schedule_work(&device->requeue_work);
        spin_unlock_irqrestore(q->queue_lock, flags);
  }
  
@@@ -512,68 -512,6 +512,6 @@@ void scsi_run_host_queues(struct Scsi_H
                scsi_run_queue(sdev->request_queue);
  }
  
- static void __scsi_release_buffers(struct scsi_cmnd *, int);
- /*
-  * Function:    scsi_end_request()
-  *
-  * Purpose:     Post-processing of completed commands (usually invoked at end
-  *            of upper level post-processing and scsi_io_completion).
-  *
-  * Arguments:   cmd    - command that is complete.
-  *              error    - 0 if I/O indicates success, < 0 for I/O error.
-  *              bytes    - number of bytes of completed I/O
-  *            requeue  - indicates whether we should requeue leftovers.
-  *
-  * Lock status: Assumed that lock is not held upon entry.
-  *
-  * Returns:     cmd if requeue required, NULL otherwise.
-  *
-  * Notes:       This is called for block device requests in order to
-  *              mark some number of sectors as complete.
-  * 
-  *            We are guaranteeing that the request queue will be goosed
-  *            at some point during this call.
-  * Notes:     If cmd was requeued, upon return it will be a stale pointer.
-  */
- static struct scsi_cmnd *scsi_end_request(struct scsi_cmnd *cmd, int error,
-                                         int bytes, int requeue)
- {
-       struct request_queue *q = cmd->device->request_queue;
-       struct request *req = cmd->request;
-       /*
-        * If there are blocks left over at the end, set up the command
-        * to queue the remainder of them.
-        */
-       if (blk_end_request(req, error, bytes)) {
-               /* kill remainder if no retrys */
-               if (error && scsi_noretry_cmd(cmd))
-                       blk_end_request_all(req, error);
-               else {
-                       if (requeue) {
-                               /*
-                                * Bleah.  Leftovers again.  Stick the
-                                * leftovers in the front of the
-                                * queue, and goose the queue again.
-                                */
-                               scsi_release_buffers(cmd);
-                               scsi_requeue_command(q, cmd);
-                               cmd = NULL;
-                       }
-                       return cmd;
-               }
-       }
-       /*
-        * This will goose the queue request function at the end, so we don't
-        * need to worry about launching another command.
-        */
-       __scsi_release_buffers(cmd, 0);
-       scsi_next_command(cmd);
-       return NULL;
- }
  static inline unsigned int scsi_sgtable_index(unsigned short nents)
  {
        unsigned int index;
@@@ -625,30 -563,10 +563,10 @@@ static void scsi_free_sgtable(struct sc
        __sg_free_table(&sdb->table, SCSI_MAX_SG_SEGMENTS, scsi_sg_free);
  }
  
- static void __scsi_release_buffers(struct scsi_cmnd *cmd, int do_bidi_check)
- {
-       if (cmd->sdb.table.nents)
-               scsi_free_sgtable(&cmd->sdb);
-       memset(&cmd->sdb, 0, sizeof(cmd->sdb));
-       if (do_bidi_check && scsi_bidi_cmnd(cmd)) {
-               struct scsi_data_buffer *bidi_sdb =
-                       cmd->request->next_rq->special;
-               scsi_free_sgtable(bidi_sdb);
-               kmem_cache_free(scsi_sdb_cache, bidi_sdb);
-               cmd->request->next_rq->special = NULL;
-       }
-       if (scsi_prot_sg_count(cmd))
-               scsi_free_sgtable(cmd->prot_sdb);
- }
  /*
   * Function:    scsi_release_buffers()
   *
-  * Purpose:     Completion processing for block device I/O requests.
+  * Purpose:     Free resources allocate for a scsi_command.
   *
   * Arguments:   cmd   - command that we are bailing.
   *
   * Notes:       In the event that an upper level driver rejects a
   *            command, we must release resources allocated during
   *            the __init_io() function.  Primarily this would involve
-  *            the scatter-gather table, and potentially any bounce
-  *            buffers.
+  *            the scatter-gather table.
   */
  void scsi_release_buffers(struct scsi_cmnd *cmd)
  {
-       __scsi_release_buffers(cmd, 1);
+       if (cmd->sdb.table.nents)
+               scsi_free_sgtable(&cmd->sdb);
+       memset(&cmd->sdb, 0, sizeof(cmd->sdb));
+       if (scsi_prot_sg_count(cmd))
+               scsi_free_sgtable(cmd->prot_sdb);
  }
  EXPORT_SYMBOL(scsi_release_buffers);
  
+ static void scsi_release_bidi_buffers(struct scsi_cmnd *cmd)
+ {
+       struct scsi_data_buffer *bidi_sdb = cmd->request->next_rq->special;
+       scsi_free_sgtable(bidi_sdb);
+       kmem_cache_free(scsi_sdb_cache, bidi_sdb);
+       cmd->request->next_rq->special = NULL;
+ }
  /**
   * __scsi_error_from_host_byte - translate SCSI error code into errno
   * @cmd:      SCSI command (unused)
@@@ -725,16 -657,9 +657,9 @@@ static int __scsi_error_from_host_byte(
   *
   * Returns:     Nothing
   *
-  * Notes:       This function is matched in terms of capabilities to
-  *              the function that created the scatter-gather list.
-  *              In other words, if there are no bounce buffers
-  *              (the normal case for most drivers), we don't need
-  *              the logic to deal with cleaning up afterwards.
-  *
-  *            We must call scsi_end_request().  This will finish off
-  *            the specified number of sectors.  If we are done, the
-  *            command block will be released and the queue function
-  *            will be goosed.  If we are not done then we have to
+  * Notes:       We will finish off the specified number of sectors.  If we
+  *            are done, the command block will be released and the queue
+  *            function will be goosed.  If we are not done then we have to
   *            figure out what to do next:
   *
   *            a) We can call scsi_requeue_command().  The request
   *               be used if we made forward progress, or if we want
   *               to switch from READ(10) to READ(6) for example.
   *
-  *            b) We can call scsi_queue_insert().  The request will
+  *            b) We can call __scsi_queue_insert().  The request will
   *               be put back on the queue and retried using the same
   *               command as before, possibly after a delay.
   *
@@@ -801,6 -726,8 +726,8 @@@ void scsi_io_completion(struct scsi_cmn
                        req->next_rq->resid_len = scsi_in(cmd)->resid;
  
                        scsi_release_buffers(cmd);
+                       scsi_release_bidi_buffers(cmd);
                        blk_end_request_all(req, 0);
  
                        scsi_next_command(cmd);
        }
  
        /*
-        * A number of bytes were successfully read.  If there
-        * are leftovers and there is some kind of error
-        * (result != 0), retry the rest.
+        * If we finished all bytes in the request we are done now.
         */
-       if (scsi_end_request(cmd, error, good_bytes, result == 0) == NULL)
-               return;
+       if (!blk_end_request(req, error, good_bytes))
+               goto next_command;
+       /*
+        * Kill remainder if no retrys.
+        */
+       if (error && scsi_noretry_cmd(cmd)) {
+               blk_end_request_all(req, error);
+               goto next_command;
+       }
+       /*
+        * If there had been no error, but we have leftover bytes in the
+        * requeues just queue the command up again.
+        */
+       if (result == 0)
+               goto requeue;
  
        error = __scsi_error_from_host_byte(cmd, result);
  
        switch (action) {
        case ACTION_FAIL:
                /* Give up and fail the remainder of the request */
-               scsi_release_buffers(cmd);
                if (!(req->cmd_flags & REQ_QUIET)) {
                        if (description)
                                scmd_printk(KERN_INFO, cmd, "%s\n",
                                scsi_print_sense("", cmd);
                        scsi_print_command(cmd);
                }
-               if (blk_end_request_err(req, error))
-                       scsi_requeue_command(q, cmd);
-               else
-                       scsi_next_command(cmd);
-               break;
+               if (!blk_end_request_err(req, error))
+                       goto next_command;
+               /*FALLTHRU*/
        case ACTION_REPREP:
+       requeue:
                /* Unprep the request and put it back at the head of the queue.
                 * A new command will be prepared and issued.
                 */
                __scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY, 0);
                break;
        }
+       return;
+ next_command:
+       scsi_release_buffers(cmd);
+       scsi_next_command(cmd);
  }
  
  static int scsi_init_sgtable(struct request *req, struct scsi_data_buffer *sdb,
                return BLKPREP_DEFER;
        }
  
 -      req->buffer = NULL;
 -
        /* 
         * Next, walk the list, and fill in the addresses and sizes of
         * each segment.
@@@ -1128,15 -1073,7 +1071,7 @@@ static struct scsi_cmnd *scsi_get_cmd_f
  
  int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req)
  {
-       struct scsi_cmnd *cmd;
-       int ret = scsi_prep_state_check(sdev, req);
-       if (ret != BLKPREP_OK)
-               return ret;
-       cmd = scsi_get_cmd_from_req(sdev, req);
-       if (unlikely(!cmd))
-               return BLKPREP_DEFER;
+       struct scsi_cmnd *cmd = req->special;
  
        /*
         * BLOCK_PC requests may transfer data, in which case they must
                BUG_ON(blk_rq_bytes(req));
  
                memset(&cmd->sdb, 0, sizeof(cmd->sdb));
 -              req->buffer = NULL;
        }
  
        cmd->cmd_len = req->cmd_len;
@@@ -1179,15 -1117,11 +1114,11 @@@ EXPORT_SYMBOL(scsi_setup_blk_pc_cmnd)
   */
  int scsi_setup_fs_cmnd(struct scsi_device *sdev, struct request *req)
  {
-       struct scsi_cmnd *cmd;
-       int ret = scsi_prep_state_check(sdev, req);
-       if (ret != BLKPREP_OK)
-               return ret;
+       struct scsi_cmnd *cmd = req->special;
  
        if (unlikely(sdev->scsi_dh_data && sdev->scsi_dh_data->scsi_dh
                         && sdev->scsi_dh_data->scsi_dh->prep_fn)) {
-               ret = sdev->scsi_dh_data->scsi_dh->prep_fn(sdev, req);
+               int ret = sdev->scsi_dh_data->scsi_dh->prep_fn(sdev, req);
                if (ret != BLKPREP_OK)
                        return ret;
        }
         */
        BUG_ON(!req->nr_phys_segments);
  
-       cmd = scsi_get_cmd_from_req(sdev, req);
-       if (unlikely(!cmd))
-               return BLKPREP_DEFER;
        memset(cmd->cmnd, 0, BLK_MAX_CDB);
        return scsi_init_io(cmd, GFP_ATOMIC);
  }
  EXPORT_SYMBOL(scsi_setup_fs_cmnd);
  
- int scsi_prep_state_check(struct scsi_device *sdev, struct request *req)
+ static int
+ scsi_prep_state_check(struct scsi_device *sdev, struct request *req)
  {
        int ret = BLKPREP_OK;
  
        }
        return ret;
  }
- EXPORT_SYMBOL(scsi_prep_state_check);
  
- int scsi_prep_return(struct request_queue *q, struct request *req, int ret)
+ static int
+ scsi_prep_return(struct request_queue *q, struct request *req, int ret)
  {
        struct scsi_device *sdev = q->queuedata;
  
  
        return ret;
  }
- EXPORT_SYMBOL(scsi_prep_return);
  
- int scsi_prep_fn(struct request_queue *q, struct request *req)
static int scsi_prep_fn(struct request_queue *q, struct request *req)
  {
        struct scsi_device *sdev = q->queuedata;
-       int ret = BLKPREP_KILL;
+       struct scsi_cmnd *cmd;
+       int ret;
+       ret = scsi_prep_state_check(sdev, req);
+       if (ret != BLKPREP_OK)
+               goto out;
+       cmd = scsi_get_cmd_from_req(sdev, req);
+       if (unlikely(!cmd)) {
+               ret = BLKPREP_DEFER;
+               goto out;
+       }
  
-       if (req->cmd_type == REQ_TYPE_BLOCK_PC)
+       if (req->cmd_type == REQ_TYPE_FS)
+               ret = scsi_cmd_to_driver(cmd)->init_command(cmd);
+       else if (req->cmd_type == REQ_TYPE_BLOCK_PC)
                ret = scsi_setup_blk_pc_cmnd(sdev, req);
+       else
+               ret = BLKPREP_KILL;
+ out:
        return scsi_prep_return(q, req, ret);
  }
- EXPORT_SYMBOL(scsi_prep_fn);
+ static void scsi_unprep_fn(struct request_queue *q, struct request *req)
+ {
+       if (req->cmd_type == REQ_TYPE_FS) {
+               struct scsi_cmnd *cmd = req->special;
+               struct scsi_driver *drv = scsi_cmd_to_driver(cmd);
+               if (drv->uninit_command)
+                       drv->uninit_command(cmd);
+       }
+ }
  
  /*
   * scsi_dev_queue_ready: if we can send requests to sdev, return 1 else
@@@ -1723,6 -1680,7 +1677,7 @@@ struct request_queue *scsi_alloc_queue(
                return NULL;
  
        blk_queue_prep_rq(q, scsi_prep_fn);
+       blk_queue_unprep_rq(q, scsi_unprep_fn);
        blk_queue_softirq_done(q, scsi_softirq_done);
        blk_queue_rq_timed_out(q, scsi_times_out);
        blk_queue_lld_busy(q, scsi_lld_busy);
diff --combined drivers/scsi/sd.c
index 96af195224f2b9dae866ea109afb1d894c142c80,321faf6030359604c1d918d8154eefcb7291af47..e9689d57ccb6cb558925b63091ff3a95accdef28
@@@ -109,6 -109,8 +109,8 @@@ static int sd_suspend_system(struct dev
  static int sd_suspend_runtime(struct device *);
  static int sd_resume(struct device *);
  static void sd_rescan(struct device *);
+ static int sd_init_command(struct scsi_cmnd *SCpnt);
+ static void sd_uninit_command(struct scsi_cmnd *SCpnt);
  static int sd_done(struct scsi_cmnd *);
  static int sd_eh_action(struct scsi_cmnd *, int);
  static void sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer);
@@@ -503,6 -505,8 +505,8 @@@ static struct scsi_driver sd_template 
                .pm             = &sd_pm_ops,
        },
        .rescan                 = sd_rescan,
+       .init_command           = sd_init_command,
+       .uninit_command         = sd_uninit_command,
        .done                   = sd_done,
        .eh_action              = sd_eh_action,
  };
@@@ -737,14 -741,16 +741,14 @@@ static int sd_setup_discard_cmnd(struc
                goto out;
        }
  
 +      rq->completion_data = page;
        blk_add_request_payload(rq, page, len);
        ret = scsi_setup_blk_pc_cmnd(sdp, rq);
 -      rq->buffer = page_address(page);
        rq->__data_len = nr_bytes;
  
  out:
 -      if (ret != BLKPREP_OK) {
 +      if (ret != BLKPREP_OK)
                __free_page(page);
 -              rq->buffer = NULL;
 -      }
        return ret;
  }
  
@@@ -836,13 -842,14 +840,13 @@@ static int scsi_setup_flush_cmnd(struc
        return scsi_setup_blk_pc_cmnd(sdp, rq);
  }
  
- static void sd_unprep_fn(struct request_queue *q, struct request *rq)
+ static void sd_uninit_command(struct scsi_cmnd *SCpnt)
  {
-       struct scsi_cmnd *SCpnt = rq->special;
+       struct request *rq = SCpnt->request;
  
 -      if (rq->cmd_flags & REQ_DISCARD) {
 -              free_page((unsigned long)rq->buffer);
 -              rq->buffer = NULL;
 -      }
 +      if (rq->cmd_flags & REQ_DISCARD)
 +              __free_page(rq->completion_data);
 +
        if (SCpnt->cmnd != rq->cmd) {
                mempool_free(SCpnt->cmnd, sd_cdb_pool);
                SCpnt->cmnd = NULL;
        }
  }
  
- /**
-  *    sd_prep_fn - build a scsi (read or write) command from
-  *    information in the request structure.
-  *    @SCpnt: pointer to mid-level's per scsi command structure that
-  *    contains request and into which the scsi command is written
-  *
-  *    Returns 1 if successful and 0 if error (or cannot be done now).
-  **/
- static int sd_prep_fn(struct request_queue *q, struct request *rq)
+ static int sd_init_command(struct scsi_cmnd *SCpnt)
  {
-       struct scsi_cmnd *SCpnt;
-       struct scsi_device *sdp = q->queuedata;
+       struct request *rq = SCpnt->request;
+       struct scsi_device *sdp = SCpnt->device;
        struct gendisk *disk = rq->rq_disk;
        struct scsi_disk *sdkp;
        sector_t block = blk_rq_pos(rq);
        } else if (rq->cmd_flags & REQ_FLUSH) {
                ret = scsi_setup_flush_cmnd(sdp, rq);
                goto out;
-       } else if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
-               ret = scsi_setup_blk_pc_cmnd(sdp, rq);
-               goto out;
-       } else if (rq->cmd_type != REQ_TYPE_FS) {
-               ret = BLKPREP_KILL;
-               goto out;
        }
        ret = scsi_setup_fs_cmnd(sdp, rq);
        if (ret != BLKPREP_OK)
         * is used for a killable error condition */
        ret = BLKPREP_KILL;
  
-       SCSI_LOG_HLQUEUE(1, scmd_printk(KERN_INFO, SCpnt,
-                                       "sd_prep_fn: block=%llu, "
-                                       "count=%d\n",
-                                       (unsigned long long)block,
-                                       this_count));
+       SCSI_LOG_HLQUEUE(1,
+               scmd_printk(KERN_INFO, SCpnt,
+                       "%s: block=%llu, count=%d\n",
+                       __func__, (unsigned long long)block, this_count));
  
        if (!sdp || !scsi_device_online(sdp) ||
            block + blk_rq_sectors(rq) > get_capacity(disk)) {
         */
        ret = BLKPREP_OK;
   out:
-       return scsi_prep_return(q, rq, ret);
+       return ret;
  }
  
  /**
@@@ -1686,12 -1678,12 +1675,12 @@@ static int sd_done(struct scsi_cmnd *SC
                                                   sshdr.ascq));
        }
  #endif
+       sdkp->medium_access_timed_out = 0;
        if (driver_byte(result) != DRIVER_SENSE &&
            (!sense_valid || sense_deferred))
                goto out;
  
-       sdkp->medium_access_timed_out = 0;
        switch (sshdr.sense_key) {
        case HARDWARE_ERROR:
        case MEDIUM_ERROR:
@@@ -2875,9 -2867,6 +2864,6 @@@ static void sd_probe_async(void *data, 
  
        sd_revalidate_disk(gd);
  
-       blk_queue_prep_rq(sdp->request_queue, sd_prep_fn);
-       blk_queue_unprep_rq(sdp->request_queue, sd_unprep_fn);
        gd->driverfs_dev = &sdp->sdev_gendev;
        gd->flags = GENHD_FL_EXT_DEVT;
        if (sdp->removable) {
@@@ -3025,8 -3014,6 +3011,6 @@@ static int sd_remove(struct device *dev
  
        async_synchronize_full_domain(&scsi_sd_pm_domain);
        async_synchronize_full_domain(&scsi_sd_probe_domain);
-       blk_queue_prep_rq(sdkp->device->request_queue, scsi_prep_fn);
-       blk_queue_unprep_rq(sdkp->device->request_queue, NULL);
        device_del(&sdkp->dev);
        del_gendisk(sdkp->disk);
        sd_shutdown(dev);
This page took 0.127705 seconds and 4 git commands to generate.