summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-linus' of ↵Linus Torvalds2007-08-093-16/+16
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: mmc: at91_mci: remove whitespace at the end of lines mmc: reorganize bounce buffer init wbsd: fix section mismatch warnings
| * mmc: at91_mci: remove whitespace at the end of linesNicolas Ferre2007-08-091-4/+4
| | | | | | | | | | | | | | Some cleanup with whitespace/tab at the end of lines. Signed-off-by: Nicolas Ferre <nicolas.ferre@rfo.atmel.com> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * mmc: reorganize bounce buffer initPierre Ossman2007-08-091-7/+7
| | | | | | | | | | | | | | Reorganize the code that initializes mmc_block's bounce buffer in order to avoid warnings when MMC_BLOCK_BOUNCE isn't used. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
| * wbsd: fix section mismatch warningsGabriel C2007-08-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following section mismatch warnings ... WARNING: vmlinux.o(.init.text+0x29d40): Section mismatch: reference to .exit.text:wbsd_release_resources (between 'wbsd_init' and 'wbsd_probe') WARNING: vmlinux.o(.init.text+0x29d49): Section mismatch: reference to .exit.text:wbsd_free_mmc (between 'wbsd_init' and 'wbsd_probe') WARNING: vmlinux.o(.init.text+0x29f28): Section mismatch: reference to .exit.text:wbsd_free_mmc (between 'wbsd_init' and 'wbsd_probe') ... Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
* | lguest: Fix Malicious Guest GDT Host CrashRusty Russell2007-08-095-67/+29Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a Guest makes hypercall which sets a GDT entry to not present, we currently set any segment registers using that GDT entry to 0. Unfortunately, this is not sufficient: there are other ways of altering GDT entries which will cause a fault. The correct solution to do what Linux does: let them set any GDT value they want and handle the #GP when popping causes a fault. This has the added benefit of making our Switcher slightly more robust in the case of any other bugs which cause it to fault. We kill the Guest if it causes a fault in the Switcher: it's the Guest's responsibility to make sure it's not using segments when it changes them. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Fix non-TSC guest clocksource lockupRusty Russell2007-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lguest uses a host-supplied wallclock-based clocksource when the TSC is not reliable. As this is already in nanoseconds, I naively used a multiplier of 1 and a shift of 0. But update_wall_time() in its infinite wisdom decides to adjust the clock a little (where does it think it's getting a more accurate time from?) It will happily tweak the multiplier... to 0, then -1. So the "fix" is to use a shift of 22 like everyone else, and a multiplier of 1 << 22. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | drivers/net/ibmveth.c: memset fixMariusz Kozlowski2007-08-071-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > >> Looks like memset() is zeroing wrong nr of bytes. > > > > Good catch, however, I think we can just remove this memset altogether > > since the memory gets allocated via kzalloc. > > Correct, that memset() is superfluous. Ok. Then this should do it. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> drivers/net/ibmveth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | phy layer: fix phy_mii_ioctl for autonegotiationDomen Puncer2007-08-071-2/+2
| | | | | | | | | | | | | | Fix a thinko (?) in setting phydev->autoneg. Signed-off-by: Domen Puncer <domen.puncer@telargo.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | ehea: Eliminated some compiler warningsThomas Klein2007-08-071-15/+10Star
| | | | | | | | | | | | | | Fixed wrongly casted pointers Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | ehea: Simplify resource usage checkThomas Klein2007-08-071-12/+6Star
| | | | | | | | | | | | | | Use shorter method to determine whether adapter has configured ports Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | ehea: Fix workqueue handlingThomas Klein2007-08-072-1/+2
| | | | | | | | | | | | | | Fix: Workqueue ehea_driver_wq was not destroyed Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | ibmveth: Fix rx pool deactivate oopsBrian King2007-08-072-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following oops which can occur when trying to deallocate receive buffer pools using sysfs with the ibmveth driver. NIP: d00000000024f954 LR: d00000000024fa58 CTR: c0000000000d7478 REGS: c00000000ffef9f0 TRAP: 0300 Not tainted (2.6.22-ppc64) MSR: 8000000000009032 <EE,ME,IR,DR> CR: 24242442 XER: 00000010 DAR: 00000000000007f0, DSISR: 0000000042000000 TASK = c000000002f91360[2967] 'bash' THREAD: c00000001398c000 CPU: 2 GPR00: 0000000000000000 c00000000ffefc70 d000000000262d30 c00000001c4087a0 GPR04: 00000003000000fe 0000000000000000 000000000000000f c000000000579d80 GPR08: 0000000000365688 c00000001c408998 00000000000007f0 0000000000000000 GPR12: d000000000251e88 c000000000579d80 00000000200957ec 0000000000000000 GPR16: 00000000100b8808 00000000100feb30 0000000000000000 0000000010084828 GPR20: 0000000000000000 000000001014d4d0 0000000000000010 c00000000ffefeb0 GPR24: c00000001c408000 0000000000000000 c00000001c408000 00000000ffffb054 GPR28: 00000000000000fe 0000000000000003 d000000000262700 c00000001c4087a0 NIP [d00000000024f954] .ibmveth_remove_buffer_from_pool+0x38/0x108 [ibmveth] LR [d00000000024fa58] .ibmveth_rxq_harvest_buffer+0x34/0x78 [ibmveth] Call Trace: [c00000000ffefc70] [c0000000000280a8] .dma_iommu_unmap_single+0x14/0x28 (unreliable) [c00000000ffefd00] [d00000000024fa58] .ibmveth_rxq_harvest_buffer+0x34/0x78 [ibmveth] [c00000000ffefd80] [d000000000250e40] .ibmveth_poll+0xd8/0x434 [ibmveth] [c00000000ffefe40] [c00000000032da8c] .net_rx_action+0xdc/0x248 [c00000000ffefef0] [c000000000068b4c] .__do_softirq+0xa8/0x164 [c00000000ffeff90] [c00000000002789c] .call_do_softirq+0x14/0x24 [c00000001398f6f0] [c00000000000c04c] .do_softirq+0x68/0xac [c00000001398f780] [c000000000068ca0] .irq_exit+0x54/0x6c [c00000001398f800] [c00000000000c8e4] .do_IRQ+0x170/0x1ac [c00000001398f890] [c000000000004790] hardware_interrupt_entry+0x18/0x1c Exception: 501 at .plpar_hcall_norets+0x24/0x94 LR = .veth_pool_store+0x15c/0x298 [ibmveth] [c00000001398fb80] [d000000000250b2c] .veth_pool_store+0x5c/0x298 [ibmveth] (unreliable) [c00000001398fc30] [c000000000145530] .sysfs_write_file+0x140/0x1d8 [c00000001398fcf0] [c0000000000de89c] .vfs_write+0x120/0x208 [c00000001398fd90] [c0000000000df2c8] .sys_write+0x4c/0x8c [c00000001398fe30] [c0000000000086ac] syscall_exit+0x0/0x40 Instruction dump: fba1ffe8 fbe1fff8 789d0022 f8010010 f821ff71 789c0020 1d3d00a8 7b8a1f24 38000000 7c7f1b78 7d291a14 e9690128 <7c0a592a> e8030000 e9690120 80a90100 Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | Merge branch 'r8169-for-jeff-20070806' of ↵Jeff Garzik2007-08-071-8/+16
|\ \ | | | | | | | | | git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 into upstream-fixes
| * | r8169: avoid needless NAPI poll schedulingFrancois Romieu2007-08-071-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Theory : though needless, it should not have hurt. Practice: it does not play nice with DEBUG_SHIRQ + LOCKDEP + UP (see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=242572). The patch makes sense in itself but I should dig why it has an effect on #242572 (assuming that NAPI do not change in a near future). Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Edward Hsu <edward_hsu@realtek.com.tw>
| * | r8169: PHY power-on fixRoger So2007-08-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix extracted from Realtek's driver (8.002.00/20070713) for the PHY attached to 8111/8168b chipsets. The check against mac_version is just usual paranoia during the bugfix period of the kernel cycle. -- FR Tested on Asus M2A-VM motherboard by Roger So. No regression on my Asrock 945G DVI either (built-in 8168 + 2x8169). Signed-off-by: Roger So <roger.so@gmail.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Cc: Edward Hsu <edward_hsu@realtek.com.tw>
* | | Merge branch 'fixes-jgarzik' of ↵Jeff Garzik2007-08-073-3/+3
|\ \ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
| * | | [PATCH] zd1211rw: fix filter for PSPOLL framesUlrich Kunitz2007-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While filling the control set the driver tests for a PSPOLL frame. But it tested only the subtype of the packet. The full type needs to be tested to identify those packets reliably. [dsd@gentoo.org: backport to mainline] Signed-off-by: Ulrich Kunitz <kune@deine-taler.de> Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | | [PATCH] rtl8187: ensure priv->hwaddr is always validMichael Wu2007-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | conf->mac_addr is not guaranteed to be set. This ensures priv->hwaddr is always set to a valid mac address. Thanks to Johannes Berg <johannes@sipsolutions.net> for finding this problem. Signed-off-by: Michael Wu <flamingice@sourmilk.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | | Revert "[PATCH] bcm43xx: Fix deviation from specifications in ↵John W. Linville2007-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | set_baseband_attenuation" This reverts commit 77548f58070894cf5970a110981e511ffe793369. David Woodhouse wrote: >This broke my shinybook. I seem to get absolutely _no_ outgoing packets, >although I can receive OK. Larry Finger wrote: >Please revert this patch. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | | Merge branch 'ucc_geth' of ↵Jeff Garzik2007-08-072-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/leo/fsl-soc into upstream-fixes
| * | | | ucc_geth: remove get_perm_addr from ucc_geth_ethtool.cJan Altenberg2007-08-031-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed because commit 313674afa8fdced2fe79f50f38e1c387b63d8790 inlines the generic function to the caller. Signed-off-by: Jan Altenberg <jan.altenberg@linutronix.de> Signed-off-by: Li Yang <leoli@freescale.com>
| * | | | ucc_geth: fix section mismatchDomen Puncer2007-08-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix section mismatch: reference to .exit.text:uec_mdio_exit (between 'ucc_geth_init' and 'uec_mdio_init') void __exit uec_mdio_exit(void) is called from - static int __init ucc_geth_init(void) - static void __exit ucc_geth_exit(void) First one would make error path more than just an error. Signed-off-by: Domen Puncer <domen.puncer@telargo.com> Signed-off-by: Li Yang <leoli@freescale.com>
* | | | | sis190 check for ISA bridge on SiS966Neil Muller2007-08-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sis190 driver assumes to find ISA only on SiS965. similar fix is in sis900 driver, see bug report http://bugs.debian.org/435547 Signed-off-by: maximilian attems <max@stro.at> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | | | | atl1: use spin_trylock_irqsave()Ingo Molnar2007-08-071-3/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use the simpler spin_trylock_irqsave() API to get the adapter lock. [ this is also a fix for -rt where adapter->lock is a sleeping lock. ] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | | | | net: smc91x: Build fixes for general sh boards.Paul Mundt2007-08-071-3/+1Star
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SH boards in general only wire this up in 8 or 16-bit mode, and as we never had the wrappers for 32-bit mode defined, SMC_CAN_USE_32BIT caused build failure for the non-Solution Engine boards. This gets it building again. Also kill off the straggling set_irq_type() definition, this is left over cruft that was missed when the rest of it switched to IRQ flags. Signed-off-by: Paul Mundt <lethal@linux-sh.org> -- drivers/net/smc91x.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | | | Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2007-08-071-17/+11Star
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] rpc: update defconfig [ARM] pata_icside: fix the FIXMEs [ARM] 4542/1: AT91: include atmel_lcdc.h in at91sam926{1,3}_devices.c [ARM] 4541/1: iop: defconfig updates [ARM] 4531/1: remove is_in_rom() protptype
| * | | | [ARM] pata_icside: fix the FIXMEsRussell King2007-08-061-17/+11Star
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alan Cox suggested that the solution to the FIXMEs in pata_icside is to use a private postreset method to detect the lack of devices on a port, and in such a case, disable the interrupt for the port. This patch implements such a method, and removes the hard coded disable of port 0. Tested as working. Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* | | | Enable lguest drivers in KconfigRusty Russell2007-08-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lguest drivers need to default to "Y" otherwise they're never selected for new builds. (We don't bother prompting, because they're less than 4k combined, and implied by selecting lguest support). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | KVM: x86 emulator: fix debug reg mov instructionsAvi Kivity2007-08-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More fallout from the writeback fixes: debug register transfer instructions do their own writeback and thus need to disable the general writeback mechanism. This fixes oopses and some guest failures on AMD machines (the Intel variant decodes the instruction in hardware and thus does not need emulation). Cc: Alistair John Strachan <alistair@devzero.co.uk> Signed-off-by: Avi Kivity <avi@qumranet.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | | Merge branch 'master' of ↵Linus Torvalds2007-08-072-11/+18
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [NETFILTER]: Add xt_statistic.h to the header list for usermode programs [BNX2]: Fix suspend/resume problem. [TG3]: Fix suspend/resume problem.
| * | | | [BNX2]: Fix suspend/resume problem.Michael Chan2007-08-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device would not resume properly if it was shutdown before the system was suspended. In such scenario where the netif_running state is 0, bnx2_suspend() would not save the PCI state and so the memory enable bit and bus master enable bit would be lost. We fix this by always saving and restoring the PCI state in bnx2_suspend() and bnx2_resume() regardless of netif_running() state. Update version to 1.6.4. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | | [TG3]: Fix suspend/resume problem.Michael Chan2007-08-041-7/+10
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Joachim Deguara <joachim.deguara@amd.com> reported that tg3 devices would not resume properly if the device was shutdown before the system was suspended. In such scenario where the netif_running state is 0, tg3_suspend() would not save the PCI state and so the memory enable bit and bus master enable bit would be lost. We fix this by always saving and restoring the PCI state in tg3_suspend() and tg3_resume() regardless of netif_running() state. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds2007-08-0742-2039/+2821
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (32 commits) [SCSI] aacraid: prevent panic on adapter resource failure [SCSI] aha152x: use data accessors and !use_sg cleanup [SCSI] aha152x: Fix check_condition code-path [SCSI] aha152x: Clean Reset path [SCSI] aha152x: preliminary fixes and some comments [SCSI] aha152x: use bounce buffer [SCSI] aha152x: fix debug mode symbol conflict [SCSI] sd: disentangle barriers in SCSI [SCSI] lpfc : scsi command accessor fix for 8.2.2 [SCSI] qlogicpti: Some cosmetic changes [SCSI] lpfc 8.2.2 : Change version number to 8.2.2 [SCSI] lpfc 8.2.2 : Style cleanups [SCSI] lpfc 8.2.2 : Miscellaneous Bug Fixes [SCSI] lpfc 8.2.2 : Miscellaneous management and logging mods [SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macro [SCSI] lpfc 8.2.2 : Attribute and Parameter splits for vport and physical port [SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list [SCSI] lpfc 8.2.2 : Error messages and debugfs updates [SCSI] initialize shost_data to zero [SCSI] mptsas: add SMP passthrough support via bsg ...
| * | | | [SCSI] aacraid: prevent panic on adapter resource failureSalyzyn, Mark2007-08-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the driver fails to allocate the contiguous (DMAable) memory for system reasons, we fail to load the instance, but then we try to free the <nul> allocation in the cleanup code and we get a panic in pci_free_consistent(). This is reported against an older kernel, hope this is relevant for latest/greatest. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] aha152x: use data accessors and !use_sg cleanupBoaz Harrosh2007-08-041-44/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And finally this is the regular !use_sg cleanup and use of data accessors. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] aha152x: Fix check_condition code-pathBoaz Harrosh2007-08-041-28/+27Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | check_condition code-path was similar but more complicated to Reset. It went like this: 1. extra space was allocated at aha152x_scdata for mirroring scsi_cmnd members. 2. At aha152x_internal_queue() every not check_condition (REQUEST_SENSE) command was copied to above members in case of error. 3. At busfree_run() in the DONE_CS phase if a Status of SAM_STAT_CHECK_CONDITION was detected. The command was re-queued Internally using aha152x_internal_queue(,,check_condition,) The old command members are over written with the REQUEST_SENSE info. 4. At busfree_run() in the DONE_CS phase again. If it is a check_condition command, info was restored from mirror made at first call to aha152x_internal_queue() (see 2) and the command is completed. What I did is: 1. Allocate less space in aha152x_scdata only for the 16-byte original command. (which is actually not needed by scsi-ml anymore at this stage. But this is to much knowledge of scsi-ml) 2. If Status == SAM_STAT_CHECK_CONDITION, then like before re-queue a REQUEST_SENSE command. But only now save original command members. (Less of them) 3. In aha152x_internal_queue(), just like for Reset, use the check_condition hint to set differently the working members. execute the command. 4. At busfree_run() in the DONE_CS phase again. restore needed members. While at it. This patch fixes a BUG. Old code when sending a REQUEST_SENSE for a failed command. Would than return with cmd->resid == 0 which was the status of the REQUEST_SENSE. The failing command resid was lost. And when would resid be interesting if not on a failing command? Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] aha152x: Clean Reset pathBoaz Harrosh2007-08-041-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | What Reset code was doing: Save command's important/dangerous Info on stack. NULL those members from scsi_cmnd. Issue a Reset. wait for it to finish than restore members and return. What I do is save or NULL nothing. But use the "resetting" hint in aha152x_internal_queue() to NULL out working members and leave struct scsi_cmnd alone. The indent here looks funny but it will change/drop in last patch and it is clear this way what changed. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] aha152x: preliminary fixes and some commentsBoaz Harrosh2007-08-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | hunk by hunk: - CHECK_CONDITION is what happens to cmnd->status >> 1 or after status_byte() macro. But here it is used directly on status which means 0x1 which is an undefined bit in the standard. And is a status that will never return from a target. - in busfree_run at the DONE_SC phase we have 3 distinct operation: 1-if(DONE_SC->SCp.phase & check_condition) The REQUEST_SENSE command return. - Restore original command - Than continue to operation 3. 2-if(DONE_SC->SCp.Status==SAM_STAT_CHECK_CONDITION) A regular command returned with a status. - Internally re-Q a REQUEST_SENSE. - Do not do operation 3. 3- - Complete the command and return it to scsi-ml So the 0x2 in both these operations (1,2) means the scsi check-condition status, hence SAM_STAT_CHECK_CONDITION - Here the code asks about !(DONE_SC->SCp.Status & not_issued) but "not_issued" is an enum belonging to the "phase" member and not to the Status returned from target. The reason this works is because not_issued==1 and Also CHECK_CONDITION==1 (remember from hunk 1). So actually the code was asking !(DONE_SC->SCp.Status & CHECK_CONDITION). Which means "Has the status been read from target yet?" Staus is read at status_run(). "not_issued" is cleared in seldo_run() which is usually earlier than status_run(). So this patch does nothing as far as assembly is concerned but it does let the reader understand what is going on. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] aha152x: use bounce bufferBoaz Harrosh2007-08-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cause highmem buffers to be bounced to low memory until this driver supports highmem addresses. Otherwise it just oopses on NULL buffer addresses. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] aha152x: fix debug mode symbol conflictBoaz Harrosh2007-08-042-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symbol <debug_locks> conflicts with the rather global one in include/linux/locks.h. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] sd: disentangle barriers in SCSIJames Bottomley2007-08-042-20/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our current implementation has a generic set of barrier functions that go through the SCSI driver model. Realistically, this is unnecessary, because the only device that can use barriers (sd) can set the flush functions up at probe or revalidate time. This patch pulls the barrier functions out of the mid layer and scsi driver model and relocates them directly in sd. Acked-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] lpfc : scsi command accessor fix for 8.2.2James Smart2007-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was pointed out by Boaz Harrosh <bharrosh@panasas.com> that our 8.2.2 lpfc patches revert a change to using SCSI command accessor functions. This patch, to be applied on top of the 8.2.2. patches, updates the driver for the accessor functions. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] qlogicpti: Some cosmetic changesMark Fortescue2007-08-021-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change a printk sequencing issue where <6> ... was coming up in the middle of a line when scsi_add_host was being called. Reduce the length of some printk messages and make the messages more consistant. All cosmetic but it makes it easier to read as it scrolles off the screen during boot. Signed-off-by: Mark Fortescue <mark@mtfhpc.demon.co.uk> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] lpfc 8.2.2 : Change version number to 8.2.2James Smart2007-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] lpfc 8.2.2 : Style cleanupsJames Smart2007-08-0111-54/+23Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Clean up all instances of mixed tab-space indentation - Clean up sparse build errors - Add appropriate static's Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] lpfc 8.2.2 : Miscellaneous Bug FixesJames Smart2007-08-0116-246/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix vport ndlp ref counting errors - Fix use after free of ndlp structure - Use the correct flag to check for LOADING setting. - Fix driver unload bugs (related to shost references) after link down or rscn - Fix up HBQ initialization - Fix port_list locking around driver unload. - Fix references to hostdata as a phba - Fix GFFID type offset to work correctly with big endian structure. - Only call pci_disable_msi if the pci_enable_msi succeeded - Fix vport_delete wait/fail if in discovery - Put a reference on the nameservers ndlp when performing CT traffic. - Remove unbalanced hba unlock. - Fix up HBQ processing - Fix lpfc debugfs discovery trace output for ELS rsp cmpl - Send ADISC when rpi is 0 - Stop FDISC retrying forever - Unable to retrieve correct config parameter for vport - Fix sli_validate_fcp_iocb, sli_sum_iocb, sli_abort_iocb to be vport-aware. - Fix index-out-of-range error in iocb. Spotted by Coverity. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] lpfc 8.2.2 : Miscellaneous management and logging modsJames Smart2007-08-017-23/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the "management_version" sysfs parameter (was unused) - Add HBQ information to lpfc debugfs - Change lpfc_npiv_enable name back to lpfc_enable_npiv (internal stds) - Remove "issue_lip" attribute from the vports transport template Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] lpfc 8.2.2 : Rework the lpfc_printf_log() macroJames Smart2007-08-0113-1137/+852Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the lpfc_printf_log() macro so that logging is enabled on a per-vport basis. Used to be on a physical-port basis, thus logging with large numbers of vports became a mess. Required redefinition of the macro, and an update of every use. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] lpfc 8.2.2 : Attribute and Parameter splits for vport and physical portJames Smart2007-08-0110-149/+354
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Split attributes up into vport and non-vport attributes. - Move vport specific cfg params to vport Many of the vport-specific behaviors were still global attributes on the physical port. Move them to the vport itself. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
| * | | | [SCSI] lpfc 8.2.2 : Fix locking around HBA's port_listJames Smart2007-08-0110-223/+308
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleans up a lot of bad behaviors that have been in this area a while Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>