Most 5784 / 5764 LED modes do not work as expected because of a hardware
bug. This patch forces the LED mode to be in MAC LED mode.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
New CPMU devices contend with the GPHY for power management. The GPHY
autopowerdown feature is enabled by default in the PHY and thus needs to
be disabled after every PHY reset.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds the LINK_SPEED mode to the list of CPMU modes that can
cause the loopback tests to fail. These bugs are planned to be fixed in
future revisions of the chip, so the patch qualifies the fixes as such.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Newer devices contain bootcode in the chip's private ROM area. This
bootcode is called selfboot. Selfboot can be patched in the device's
NVRAM and the patches can have several formats. In one particular
format, the checksum calculation needs to be slightly modified. This
patch adjusts the NVRAM test code for that case, and add support for the
missing formats.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5784 and 5764 devices lock up when the link speed is 10Mbps, the CPMU
link speed mode is enabled, and the MAC clock is running at 1.5Mhz. The
fix is to run the MAC clock at faster speeds.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This patch corrects a bug where the ENABLE_APE flag was tested against
the wrong flag variable.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5784 and 5764 devices fail to link / pass traffic after one load /
unload cycle. This happens because of a hardware bug in the new CPMU.
During normal operation, the MAC depends on the PHY clock being
available. When the PHY is powered down, the clock the MAC depends on
is disabled. The fix is to switch the MAC clock to an alternate source
before powering down the PHY, and to restore the MAC clock to the PHY
source upon device resume.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
When 5761 devices boot the machine using PXEboot, PXE leaves the device
active when it terminates. The tg3 driver has code to detect this
condition and resets the device during initialization. On 5761 devices,
device resets involve sending a driver state update message to the APE
on the 5761. However, during this initialization stage, communications
to the APE registers have not yet been set up. The driver then
dereferences a NULL pointer and crashes the machine. The fix is to move
the APE register access setup earlier in the initialization code to
cover this condition.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
When I removed net-modules.txt because it only contained ancient
information I missed that many Kconfig entries pointed to this ancient
information.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
...and fix a couple of bugs in the NBD, CIFS and OCFS2 socket handlers.
Looking at the sock->op->shutdown() handlers, it looks as if all of them
take a SHUT_RD/SHUT_WR/SHUT_RDWR argument instead of the
RCV_SHUTDOWN/SEND_SHUTDOWN arguments.
Add a helper, and then define the SHUT_* enum to ensure that kernel users
of shutdown() don't get confused.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: Mark Fasheh <mark.fasheh@oracle.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Commit bea3348e (the NAPI changes) made sungem unconditionally enable
NAPI when resuming and unconditionally disable when suspending, this,
however, makes napi_disable() hang when suspending when the interface
was taken down before suspend because taking the interface down also
disables NAPI. This patch makes touching the napi struct in
suspend/resume code paths depend on having the interface up, thereby
fixing the hang on suspend.
The patch also moves the napi_disable() in gem_close() under the lock so
that the NAPI state is always modified atomically together with the
"opened" variable.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
fix sparse warnings "Using plain integer as NULL pointer"
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
KVM: SVM: Intercept the 'invd' and 'wbinvd' instructions
KVM: x86 emulator: invd instruction
KVM: SVM: Defer nmi processing until switch to host state is complete
KVM: SVM: Fix SMP with kernel apic
KVM: x86 emulator: fix 'push imm8' emulation
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-virtio:
virtio: Force use of power-of-two for descriptor ring sizes
lguest: Fix lguest virtio-blk backend size computation
virtio: Fix used_idx wrap-around
virtio: more fallout from scatterlist changes.
virtio: fix vring_init for 64 bits
The virtio descriptor rings of size N-1 were nicely set up to be
aligned to an N-byte boundary. But as Anthony Liguori points out, the
free-running indices used by virtio require that the sizes be a power
of 2, otherwise we get problems on wrap (demonstrated with lguest).
So we replace the clever "2^n-1" scheme with a simple "align to page
boundary" scheme: this means that all virtio rings take at least two
pages, but it's safer than guessing cache alignment.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
The more_used() function compares the vq->vring.used->idx with last_used_idx.
Since vq->vring.used->idx is a 16-bit integer, and last_used_idx is an
unsigned int, this results in unpredictable behavior when vq->vring.used->idx
wraps around.
This patch corrects this by changing last_used_idx to the correct type.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Currently the Geode AES module fails to encrypt or decrypt if
the coherent bits are not set what is currently the case if the
encryption does not occur inplace. However, the encryption works
on my Geode machine _only_ if the coherent bits are always set.
Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This fixes the lowlevel bus access routines for
PCMCIA based devices.
There are still a few issues with register access sideeffects after
this patch. This will be addressed in a later patch.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Prior to this patch, iwlwifi would always use the first
registered rate control algorithm which, depending on system
setup, could be anything. After the mac80211 patch to make
the simple algorithm built-in, it would always be simple.
This has always been a bug in iwlwifi.
This fixes it by requesting that mac80211 selects the right
rate control algorithm.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ssb must init after PCI but before the ssb drivers.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Cc: Christian Casteyde <casteyde.christian@free.fr>
Fixes-bug: #9219
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Add documentation in Kconfig help about the move of /proc/acpi/battery
to /sys/class/power_supply when selecting ACPI_PROCFS. This will impact
a lot of users and should be documented.
Signed-off-by: Jerome Pinot <ngc891@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: Don't fail device revalidation for bad _GTF methods
libata: port and host should be stopped before hardware resources are released
libata: skip 0xff polling for PATA controllers
libata: pata_platform: Support polling-mode configuration.
libata: Support PIO polling-only hosts.
libata sata_qstor conversion to new error handling (EH).
libata sata_qstor workaround for spurious interrupts
libata sata_qstor nuke idle state
nv_hardreset: update dangling reference to bugzilla entry
ata_piix: add SATELLITE PRO U200 to broken suspend list
Oops.
The current code does not like being given an u16 with the highest
bit set as an argument to mdio_write. Let's enforce a correct range of
values for both the register address and value (resp. 5 and 16 bits).
The callers are currently left as-is.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
RTL_GIGA_MAC_VER_17 breaks as well.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Found a couple of more chips in the latest version of the vendor driver.
They are minor variations on existing chips.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
ax88796: add superh to kconfig dependencies
This patch adds sh architecture support to the ax88796 kconfig.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Luckily, this wasn't reported or reproduced. The logical operation for
setting duplex had wrong grouping.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The link state machine requires access to some resources that
are shared with the iSCSI function on the chip. (See iSCSI
driver at drivers/scsi/qla4xxx) If the interface is being
up/downed at a rapid pace this driver may need to sleep
waiting to get access to the common resources. For this we
are moving the state machine to run as a work thread.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Make sure we don't feed packets with bad CRC up the network stack,
and discount the packet length as reported from the MAC for the CRC
field.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Don't use the "replace source address with local MAC address" bits, since
it causes problems on some variations of the hardware due to an erratum.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The standard validate_addr handler refuses to accept the all zeroes address
as valid. However, it's common historical practice for the bonding
master to be configured up prior to having any slaves, at which time the
master will have a MAC address of all zeroes.
Resolved by setting the dev->validate_addr to NULL. The master still can't
end up with an invalid address, as the set_mac_address function tests
for validity.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Looks like I incorrectly merged one of the rtnl lock changes,
so that one function, bonding_show_active_slave, held rtnl but didn't
release it, and another, bonding_store_active_slave, never held rtnl but
did release it.
Fixed so the first function doesn't mess with rtnl, and the
second correctly acquires and releases rtnl.
Bug reported by Moni Shoua <monis@voltaire.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Netpoll will only work on port 0 because of the restrictive
relationship between NAPI and netpoll.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
PCMCIA needs an additional step to request the IRQ.
No need to add code to release the IRQ here, as that's done
automatically in pcmcia_disable_device().
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix an IRQ race condition in b43legacy. If we call
b43legacy_wireless_core_stop(), it will set the status of the device to
INITIALIZED and the IRQ handler won't care any longer about IRQs, thus the
kernel will disable the IRQ if it's shared (unless we boot it with the
'irqpoll' option). So we must disable IRQs before changing the device
status.
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix an IRQ race condition in b43. If we call b43_stop_wireless_core(), it
will set the status of the device to INITIALIZED and the IRQ handler won't
care any longer about IRQs, thus the kernel will disable the IRQ if it's
shared (unless we boot it with the 'irqpoll' option). So we must disable
IRQs before changing the device status.
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix possible buffer overrun.
The patch to b43 by Michael Buesch <mb@bu3sch.de> has been ported to
b43legacy.
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The rfkill subsystem doesn't like code like that
rfkill_allocate();
rfkill_register();
rfkill_unregister();
rfkill_register(); /* <- This will crash */
This sequence happens with
modprobe b43
ifconfig wlanX up
ifconfig wlanX down
ifconfig wlanX up
Fix this by always re-allocating the rfkill stuff before register.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
wl->mutex might already be locked on initialization.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
If i reaches zero, the loop ends, but the postfix decrement subtracts it to -1.
Testing for 'i == 0', later in the function, will not fulfill its purpose.
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix section mismatch warning:
WARNING: vmlinux.o(.data+0x36fcc): Section mismatch: reference to .init.data:prism2_pci_id_table (between 'prism2_pci_drv_id' and 'prism2_pci_funcs')
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
rt2x00 is broken when it comes down to adhoc and master mode.
The main problem is the beaconing, which is completely failing.
Untill a solution has been found, both beacon requiring modes
must be disabled to prevent numerous bug reports.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Properly account for queue commands, this fixes a problem reported
by Holger Schurig when using the debugfs interface.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Incoming packets have to be aligned or the IP stack becomes upset.
Make sure to shift them two bytes to achieve this.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fixes for slow hardware.
Signed-off-by: Vitaly V. Bursov <vitalyvb@ukr.net>
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
The Intel device supported by the hermes driver core is the IPW2011. The
"Intel PRO/Wireless" wording suggests the later Centrino devices and may
be confusing to some users.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Various symptoms depending on the .config options:
- the card stops working after some (short) time
- the card does not work at all
- the card disappears (nothing in lspci/dmesg)
A real power-off is needed to recover the card.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
The 8168c and the 8100e choke on it. I have not seen an indication
nor received a report that the TBI is being actively used on the
remaining 8168b and 8110. Let's disable it for now until someone
complains.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Matthias Winkler <m.winkler@unicon-ka.de>
Cc: Maarten Vanraes <maarten.vanraes@gmail.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
This patch adds LAN91C111 ethernet interface support for zylonite
(a.k.a Marvell's PXA3xx Development Platform) with smc91x driver.
It would be better if a patch would support zylonite along with all
other PXA boards with a single binary of smc91x driver, but it looks
quite difficult for the moment, so ugly #ifdef is still used here.
Signed-off-by: Aleksey Makarov <amakarov@ru.mvista.com>
Acked-by: eric miao <eric.miao@marvell.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The PCI AER support may not work for a couple of reasons.
It may not be configured into the kernel or there may be a BIOS
bug that prevents MMCONFIG from working. If MMCONFIG doesn't work
then the PCI registers that control AER will not be accessible via
pci_read_config functions; luckly there is another window to access
PCI space in the device, so use that.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The IRQ's is already masked on shutdown, and on startup avoid
touching PHY until after phy_init().
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Don't need to change LED's after auto negotiation, the chip
sets them correctly.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Increse phy delay and handle I/O errors.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The D-Link PCI-X board (and maybe others) can lie about status
ring entries. It seems it will update the register for last status
index before completing the DMA for the ring entry. To avoid reading
stale data, zap the old entry and check.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
On some boards, PCI configuration space access is turned off by default.
The 2.6.24 driver doesn't turn it on, and should have.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Experience suggests that the _GTF method may be bad. We currently fail
device revalidation in that case, which seems excessive.
Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: (26 commits)
sh: remove dead config symbols from SH code
sh: Kill off broken snapgear ds1302 code.
sh: Add a dummy vga.h.
rtc: rtc-sh: Zero out tm value for invalid rtc states.
rtc: sh-rtc: Handle rtc_device_register() failure properly.
sh: Fix heartbeart on Solution Engine series
sh: Remove SCI_NPORTS from sh-sci.h
sh: Fix up PAGE_KERNEL_PCC() for nommu.
sh: hs7751rvoip: Kill off dead IPR IRQ mappings.
sh: hs7751rvoip: irq.c needs linux/interrupt.h.
sh: Kill off __{copy,clear}_user_page().
sh: Optimized copy_{to,from}_user_page() for SH-4.
sh: Wire up clear_user_highpage().
sh: Kill off the remaining ST40 cruft.
superhyway: Handle device_register() retval properly.
sh: kgdb sysrq depends on magic sysrq.
sh: Add -Werror for clean directories.
sh: Fix up kgdb build with modular sh-sci.
sh: Export __{s,u}divsi3_i4i on all CPUs.
sh: Fix up kgdb-on-NMI branch target.
...
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (37 commits)
[POWERPC] EEH: Make sure warning message is printed
[POWERPC] Make altivec code in swsusp_32.S depend on CONFIG_ALTIVEC
[POWERPC] windfarm: Fix windfarm thread freezer interaction
[POWERPC] Fix si_addr value on low level hash failures
[POWERPC] Refresh ppc64_defconfig and enable pasemi-related options
[POWERPC] pasemi: Update defconfig
[POWERPC] iSeries: Fix ref counting in vio setup
[POWERPC] ] Fix memset size error
[POWERPC] Fix link errors for allyesconfig
[POWERPC] iSeries_init_IRQ non-PCI tidy
[POWERPC] Change fallocate to match unistd.h on powerpc
[POWERPC] EEH: Avoid crash on null device
[POWERPC] EEH: Drivers that need reset trump others
[POWERPC] EEH: Clean up comments
[POWERPC] Fix off-by-one error in setting decrementer on Book E/4xx (v2)
[POWERPC] Fix switch_slb handling of 1T ESID values
[POWERPC] Fix build failure when CONFIG_VIRT_CPU_ACCOUNTING is not defined
[POWERPC] Include udbg.h when using udbg_printf
[POWERPC] Fix cache line vs. block size confusion
[POWERPC] Fix sysctl table check failure on PowerMac
...
Added blk_unplug interface, allowing all invocations of unplugs to result
in a generated blktrace UNPLUG.
Signed-off-by: Alan D. Brunelle <Alan.Brunelle@hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Cyberpro: when user requests 16bpp, use it and not 24bpp.
There was a missing break causing requests for 16bpp mode
to end up in 24bpp mode.
Signed-off-by: Jan Rinze Peterzon <janrinze@home.nl>
Acked-by: Ralph Siemsen <ralphs@netwinder.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
If a battery is at a critical charge level and not being charged or
discharged, then the ACPI _BST method will return a state of 4, and
the current acpi_battery_get_property() code will not set any property
value for POWER_SUPPLY_PROP_STATUS. This will cause an oops in
power_supply_show_property() when it reads off the end of the
status_text array. This actually was causing a 100% reproducible
crash on boot on my laptop with two batteries, when one battery was
completely drained and the laptop was not plugged in.
Fix this by making sure acpi_battery_get_property() returns
POWER_SUPPLY_STATUS_UNKNOWN for any battery state it doesn't already
handle explicitly. There doesn't seem to be any status enum value
defined that makes more sense than 'unknown' for a battery at a
critical charge level.
Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <lenb@t61.(none)>
Port / host stop calls used to be made from ata_host_release() which
is called after all hardware resources acquired after host allocation
are released. This is wrong as port and host stop routines often
access the hardware.
Add separate devres for port / host stop which is invoked right after
IRQ is released but with all other hardware resources intact. The
devres is added iff ->host_stop and/or ->port_stop exist.
This problem has been spotted by Mark Lord.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Mark Lord <liml@rtr.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
In a presentation of true workmanship, pata_ali asserts IRQ
permanantly if the TF status register is read more than once when
there's no device attached to the port.
Avoid waiting polling for !0xff if it's PATA. It's needed only for
some rare SATA devices anyway.
This problem is reported by Luca Tettamanti in bugzilla bug 9298.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Tested-By: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Some SH boards (old R2D-1 boards) have generally not had working CF
under libata, due to both buswidth issues (handled by Aoi Shinkai
in 43f4b8c757), and buggy interrupt
controllers. For these sorts of boards simply disabling the IRQ and
polling ends up working fine.
This conditionalizes the IRQ resource for pata_platform and lets
platforms that want to use polling mode simply omit the resource
entirely.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
By default ata_host_activate() expects a valid IRQ in order to
successfully register the host. This patch enables a special case
for registering polling-only hosts that either don't have IRQs
or have buggy IRQ generation (either in terms of handling or
sensing), which otherwise work fine.
Hosts that want to use polling mode can simply set ATA_FLAG_PIO_POLLING
and pass in an invalid IRQ.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
sata_qstor conversion to new error handling (EH).
Convert sata_qstor to use the newer libata EH mechanisms.
Based on earlier work by Jeff Garzik.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
sata_qstor workaround for spurious interrupts.
The qstor hardware generates spurious interrupts from time to time when
switching in and out of packet mode. These eventually result in the
IRQ being disabled, which kills other devices sharing this IRQ with us.
This workaround isn't perfect, but it's about the best we can do for
this hardware. Spurious interrupts will still happen, but won't be
logged as such, and therefore won't cause the IRQ to be inadvertently
disabled.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
sata_qstor nuke idle state.
We're really only ever in one of two hardware states: packet, or mmio.
Get rid of unnecessary "qs_state_idle" state.
Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Please warmly welcome the PRO variant of Satellite U200 to the broken
suspend list.
Original patch is from Yann Chachkoff. Patch reformatted and
forwarded by Tejun Heo.
Signed-off-by: Yann Chachkoff <yann.chachkoff@myrealbox.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
akpm objected to some of the macros, so convert them into functions.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Missing curly braces cause an if statement to be evaluated when it
shouldn't. It happens to be harmless, but that's still worth fixing.
Thanks to Riku Voipio for reporting.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-By: Riku Voipio <riku.voipio@movial.fi>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
This patch changes the identification string for motherboards with an id of
0x001A from unknown to "Abit IP35 Pro". Thanks to James Scott who has an Abit
IP35 Pro.
Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Fix value check in set_pwm_mode(). Instead of checking for chip variant there,
make pwmX_mode sysfs nodes only writable on f75375 variant.
Signed-off-by: Riku Voipio <riku.voipio@movial.fi>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Allow initializing fans on systems where BIOS does not do that by
default.
- define f75375s_platform_data in new file f75375s.h
- if platform_data was provided, set fans accordingly in f75375_init()
- split set_pwm_enable() to a sysfs callback and directly usable
set_pwm_enable_direct()
Signed-off-by: Riku Voipio <riku.voipio@movial.fi>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Following the example of David Brownell's work on lm75:
- Create a second driver struct, using new-style driver binding methods.
- Rename the old driver struct as f75375_legacy_driver.
- Make the legacy bind/unbind logic delegate all its work.
Signed-off-by: Riku Voipio <riku.voipio@movial.fi>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
At least the 2x Quad-Core Apple Mac Pro appears to have some over-heat
protection which suddenly powers off the whole box under load. This adds
support for the fans and temerature sensors in the Mac Pro - later some
"windwarm" a-like code should probably monitor the values. For now
manually tweaking the fans prevents the sudden shutdown for me.
cd /sys/devices/platform/applesmc.768
for x in fan{1,2,3,4}; do
echo 1 > ${x}_manual
echo 1285 > ${x}_output
done
Two sensors are 0, while four are 129 °C, those might be removed again,
later.
Signed-off-by: René Rebe <rene@exactcode.de>
Cc: Nicolas Boichat <nicolas@boichat.ch>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Clean up printk use in ibmpex.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
New driver to read FB-DIMM temperature sensors on systems with the
Intel 5000 series chipsets.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Spotted by the Coverity checker. (Thanks Adrian Bunk)
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Don't dereference "data" when we know for sure it's NULL.
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Use sysfs_create_group instead of individual calls to device_create_file by
splitting sis5595_attributes_opt into sis5595_attributes_in4 and
sis5595_attributes_temp1.
Signed-off-by: Ivo Manca <pinkel@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Add individual alarm files needed by the new libsensors.
Signed-off-by: Ivo Manca <pinkel@gmail.com>
Acked-by: Jean Delvare <khali@linux.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
patch changes 2 macros to incorporate the +1, and drops the +1 from all the
callers. This also allows a 'reroll' of an expanded loop, and adjusting
indexes and loop limits on another.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
This hoists nr-1 offset out of (show|store)_temp_*(.*) callbacks, and into
SENSOR_DEVICE_ATTRs for sysfs tempN_X files. It also combines
temp[1] and temp_add[2] (array) fields in w83627hf_data into 3 elem arrays,
which simplifies special-case handling of nr, allowing simplification
of callback bodies and rerolling a flattened loop in
w83627hf_update_device(struct device *dev).
The array conversion changes temp[1] from u8 to u16, but this was
happening implicitly via the helper functions anyway.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Commit 45711f1a ("[SG] Update drivers to use sg helpers") had the
following bogus change in drivers/mmc/card/queue.c:
> - src_buf = page_address(src->page) + src->offset;
> + src_buf = sg_virt(dst);
(Notice that "src" is converted to "dst"). Turn this "dst" back into
the intended "src".
Signed-off-by: Roland Dreier <roland@digitalvampire.org>
Tested-by: Romano Giannetti <romano.giannetti@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
'invd' can destroy host data, and 'wbinvd' allows the guest to induce
long (milliseconds) latencies.
Noted by Ben Serebrin.
Signed-off-by: Avi Kivity <avi@qumranet.com>
If we stgi() too soon, nmis can reach the processor even though interrupts
are disabled, catching it in a half-switched state. Delay the stgi() until
we're done switching.
Signed-off-by: Avi Kivity <avi@qumranet.com>
'push imm8' found itself in the wrong switch somehow, so it is never executed.
This fixes Windows 2003 installation.
Signed-off-by: Avi Kivity <avi@qumranet.com>
pkt_setup_dev() expects module reference to be held on invocation.
This used to be true for sysfs callbacks but not anymore. Test and
grab module reference around pkt_setup_dev() in
class_pktcdvd_store_add().
Signed-off-by: Tejun Heo <htejun@gmail.com>
Acked-by: Peter Osterlund <petero2@telia.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
When I fixed the windfarm freezer interaction first in commit
1ed2ddf380, an earlier patch than the one
I came up with after comments was committed. This has come back to haunt
us now because commit d5d8c5976d changed
the freezer to no long send signals. Fix it by removing the windfarm
thread's signal logic and restoring the original try_to_freeze().
We could simply revert 1ed2ddf380 now
but I feel that the assertion that no signal is delivered to the
windfarm thread needs not be there.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Paul Mackerras <paulus@samba.org>
We conciously make a change here - we permit mode and speed setting to
be done in things like SLIP mode. There isn't actually a technical
reason to disallow this. It's usually a silly thing to do but we can
do it and soemone might wish to do so.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Dave Miller noted various cases where line disciplines for things like
ppp go poking around in termios themselves in ways that broke with the
new termios code. Rather than have them all learning about termios
internals provide proper methods for this
- tty_mode_ioctl()
This handles all the terminal mode handling for speed/carrier
etc and none of the methods are ldisc dependant so they can be called
by any user
- tty_perform_flush()
This extracts the flush functionality and enables pppd the ppp
layer to share it cleanly.
The existing n_tty_ioctl code is refactored in this patch to provide
the new functions and to call them itself appropriately. This patch
has no (intended) behaviour changes and simply prepares for the other
fixes.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
All this USB_USBNET_MII trickery is simply not worth it considering how
few code it saves.
As a side effect, this also fixes the following compile error reported
by Toralf Frster:
<-- snip -->
...
LD .tmp_vmlinux1
drivers/built-in.o: In function `usbnet_set_settings':
(.text+0xf1876): undefined reference to `mii_ethtool_sset'
drivers/built-in.o: In function `usbnet_get_settings':
(.text+0xf1836): undefined reference to `mii_ethtool_gset'
drivers/built-in.o: In function `usbnet_get_link':
(.text+0xf18d6): undefined reference to `mii_link_ok'
drivers/built-in.o: In function `usbnet_nway_reset':
(.text+0xf18f6): undefined reference to `mii_nway_restart'
make: *** [.tmp_vmlinux1] Error 1
<-- snip -->
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
It'd also be nice to mention "containers" somewhere in the help text
(I'm assuming that's what it's for?).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Changes made on 18-sep to fix skb handling in the pppol2tp driver
broke the transmit and receive paths. Users are only running into this
now because distros are now using 2.6.23 and I must have messed up
when I tested the change.
For receive, we now do our own calculation of how much to pull from
the skb (variable length L2TP header) rather than using
skb_transport_offset(). Also, if the skb isn't a data packet, it must
be passed back to UDP with skb->data pointing to the UDP header.
For transmit, make sure skb->sk is set up because ip_queue_xmit()
needs it.
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Follows the changes of some of the other RTC drivers. If the tm
value is bogus, just zero it out. Adds some sanity for RTC_RD_TIME.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Currently if rtc_device_register() fails we have an IS_ERR() on
the wrong pointer, which causes this to always be skipped. Fix
this up to actually check the right pointer. The return value
was always correct, even though the check was wrong.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
When SH7710 and SH7712 are used, SCI_NPORTS redefined.
Remove it.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
The ST40 stuff in-tree hasn't built for some time, and hasn't been
updated for over 3 years. ST maintains their own out-of-tree changes
and rebases occasionally, and that's ultimately where all of the ST40
users go anyways.
In order for the ST40 code to be brought up to date most of the stuff
removed in this changeset would have to be rewritten anyways, so there's
very little benefit in keeping the remnants around either.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Since patch "fw-sbp2: use an own workqueue (fix system responsiveness)"
increased parallelism between fw-sbp2 and fw-core, it was possible that
fw-sbp2 didn't release the SCSI device when the FireWire device was
disconnected.
This happened if sbp2_update() ran during sbp2_login(), because a bus
reset occurred during sbp2_login(). The sbp2_login() work would [try
to] reschedule itself because it failed due to the bus reset, and it
would _not_ drop its reference on the target. However, sbp2_update()
would schedule sbp2_login() too before sbp2_login() rescheduled itself
and hence sbp2_update() would take an additional reference. And then
we would have one reference too many.
The fix is to _always_ drop the reference when leaving the sbp2_login()
work. If the sbp2_login() work reschedules itself, it takes a
reference, but only if it wasn't already rescheduled by sbp2_update().
Ditto in the sbp2_reconnect() work.
The resulting code is actually simpler than before: We _always_ take
a reference when successfully scheduling work. And we _always_ drop
a reference when leaving a workqueue job. No exceptions.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
libata: handle broken cable reporting
pata_hpt37x: Fix outstanding bug reports on the HPT374 and 37x cable detect
ata_piix: Add additional PCI identifier for 40 wire short cable
pata_serverworks: Fix problem with some drive combinations
libata: Don't disable dipm with SET FEATURES
libata and bogus LBA48 drives
Keeping the list in sync with the old IDE driver
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Remove panic from phonedev. See
http://bugzilla.kernel.org/show_bug.cgi?id=9266
for details (phonedev panics if unregistering device not registered).
Signed-off-by: Matti Linnanvuori <mattilinnanvuori@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
commit 4ae3f847e4 ("md: raid5: fix
clearing of biofill operations") did not get applied correctly,
presumably due to substantial similarities between handle_stripe5 and
handle_stripe6.
This patch moves the chunk of new code from handle_stripe6 (where it isn't
needed (yet)) to handle_stripe5.
Signed-off-by: Neil Brown <neilb@suse.de>
Cc: "Dan Williams" <dan.j.williams@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Make virtcons_probe() __devinit.
Fixes this section warning:
WARNING: vmlinux.o(.text+0x14c10b): Section mismatch: reference to .init.text:hvc_alloc (between 'virtcons_probe' and 'ac_register_board')
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Change the name of this data to use a name (suffix) that is whitelisted
by MODPOST so that the section warning is fixed (not generated).
WARNING: vmlinux.o(.data+0x1b140): Section mismatch: reference to .init.text:m48t59_rtc_probe (between 'm48t59_rtc_platdrv' and 'm48t59_nvram_attr')
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/8250_early.c:80: warning: conflicting types for built-in function `putc'
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
One or two ancient drives predated the cable spec and didn't sent the
valid bits for the field. I had hoped to leave this out of libata as a
piece of historical annoyance but a recent CD drive shows the same bug so
we have to import support for it.
Same concept as Bartlomiej's changes old IDE except that as we have
centralised blacklists we can avoid keeping another private table of stuff
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The driver used the channel not the device number for deciding where to
load some timing parameters. Also change so that we clear the UDMA field
as the old driver did. Not believed neccessary but does no harm.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
It gets quite verbose to see every single PHY driver being registered
by default.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Add PHY IDs for Marvell 88E1240. It seems to have close enough programming
models to 1111/1112 for basic support at least.
Also clean up whitespace in the ID list a bit.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
During booting of last vanilla kernel I got:
Trying to free nonexistent resource...
This because of if "ENABLE_APRICOT" is on we do:
request_region(ioaddr,...)
if (checksum test failed)
goto out1;
dev->base_addr = ioaddr;//<-here mistake
out1:
release_region(dev->base_addr,...)
This change fixes this bug for me.
Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
PCI: Add Kconfig option to disable deprecated pci_find_* API
PCI: pciserial_resume_one ignored return value of pci_enable_device
PCI Hotplug: cpqhp_pushbutton_thread(): remove a pointless if() check
PCI: make pci_match_device() static
PCI: Remove 3 incorrect MSI quirks.
PCI: Add MSI INTX_DISABLE quirks for ATI SB700/800 SATA and IXP SB400 USB
PCI: Add quirk for devices which disable MSI when INTX_DISABLE is set.
PCI: Add MSI quirk for ServerWorks HT1000 PCIX bridge.
PCI: Revert "PCI: disable MSI by default on systems with Serverworks HT1000 chips"
Three bugfixes to the leds-gpio driver, plus minor whitespace tweaks:
- Do the INIT_WORK() before registering each LED, so if its trigger
becomes immediately active it can schedule work without oopsing..
- Use normal registration, not platform_driver_probe(), so that
devices appearing "late" (hotplug type) can still be bound.
- Mark the driver remove code as "__devexit", preventing oopses
when the underlying device is removed.
These issues came up when using this driver with some GPIO expanders
living on serial busses, which act unlike "normal" platform devices:
they can appear and vanish along with the serial bus driver.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
The Coverity checker spotted that we'd have already oops'ed if "ctrl"
was NULL.
Additionally, "func" had just been checked for not being NULL.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Now that we have dealt with the real issue, in that some ATI SATA and
USB controllers needed the INTX_DISABLE quirk, we can remove these AMD
chipset global MSI disabling quirks.
This reverts three changesets:
4be8f90643 (PCI: disable MSI on RS690)
aea6a433f5 (PCI: disable MSI on RD580)
f122392f67 (PCI: disable MSI on RX790)
This is based upon testing and feedback from
Shane Huang <Shane.Huang@amd.com>.
Cc: Shane Huang <Shane.Huang@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A reasonably common problem with some devices is that they will
disable MSI generation when the INTX_DISABLE bit is set in the
PCI_COMMAND register.
Quirk this explicitly, guarding the pci_intx() calls in msi.c with
this quirk indication.
The first entries for this quirk are for 5714 and 5780 Tigon3 chips,
and thus we can remove the workaround code from the tg3.c driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Michael Chan <mchan@broadcom.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is the fix for the following problem:
https://bugzilla.redhat.com/show_bug.cgi?id=227657
The bnx2 device 5706 complains about MSI not working behind a
ServerWorks HT1000 PCIX bridge. An earlier commit to fix the problem:
e3008dedff:
"PCI: disable MSI by default on systems with Serverworks HT1000 chips"
was not entirely correct, and has been reverted.
MSI does not work on the PCIX bus because the BIOS did not set the
HT_MSI_FLAGS_ENABLE bit in the HyperTransport MSI capability on the
bridge. We use the existing quirk_msi_ht_cap() to detect the problem
and disable MSI in all buses behind it.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Cc: Anantha Subramanyam <ananth@broadcom.com>
Cc: Naren Sankar <nsankar@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This reverts commit e3008dedff.
The real bug was an INTX issue in the tg3 ethernet chip, and
cured by commit c129d962a66c76964954a98b38586ada82cf9381
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
commit 33c1002ed9 incorrectly changed return
value from '0' to '-1', fix it (ns87415 was the only host driver affected
since it uses both IDE_HFLAG_TRUST_BIOS_FOR_DMA and IDE_HFLAG_NO_ATAPI_DMA).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drive_cmd_intr() is used by both REQ_TYPE_ATA_CMD and REQ_TYPE_ATA_TASK
but commands using PIO-in protocol are valid only for REQ_TYPE_ATA_CMD
(&args[4] in case of REQ_TYPE_ATA_TASK points to a value for IDE_LCYL_REG
register instead of the data buffer). This fix allows REQ_TYPE_ATA_TASK
commands to use non-zero values for IDE_SECTOR_REG (args[3]).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This config option is effective only for host drivers that use
IDE_HFLAG_OFF_BOARD host flag (aec62xx, generic, hpt34x, hpt366,
pdc202xx_new, pdc202xx_old and tc86c001).
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
ide_fix_driveid can now be unexported.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
In piix.c (and in ata_piix.c) are already included some patches to skip the
cable check on some laptops and to enable UDMA > 33 modes, but I've noticed
than theese doesn't work on my Acer Aspire 5602WLMi (maybe exist more
versions of this laptop). With this simple patch I can set transfer mode
to UDMA100.
From: "sebdeg@ngi.it" <sebdeg@ngi.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
[S390] tod clock: announce clocksource as perfect
[S390] Rename "idle_time" attribute to "idle_time_us".
[S390] Fix priority mistakes in drivers/s390/cio/cmf.c
[S390] Fix memory detection.
[S390] Fix compile on !CONFIG_SMP.
[S390] device_schedule_callback() for dcssblk.
[S390] Fix smsgiucv init on no iucv machines
[S390] cio: use INIT_WORK to initialize struct work.
The code calling brightness_set() can't handle EINTR/ERESTARTSYS well, nor
is it checking brightness_set() return status properly.
Fix it.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Map an mutex_lock_interruptible() error return into ERESTARTSYS, as the
only possible error from mutex_lock_interruptible is EINTR, and that will
only happen if signal_pending() causes the mutex lock attempt to abort.
This still allows signals to be delivered ASAP, which is much nicer than
just doing mutex_lock, and still shadows userspace from EINTR when
SA_RESTART is active.
Problem reported by Peter Jordan.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Peter Jordan <usernetwork@gmx.info>
Cc: Richard Neill <rn214@hermes.cam.ac.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
The lm-sensors 3.0.0/libsensors4 compatibility changes are reason enough to
bump up the version string. Do it.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Newer Lenovo BIOSes support the standard ACPI backlight brightness
interface (_BCM, _BQC, _BCL). It should be used instead of the native
thinkpad backlight brightness control interface when possible.
This patch disables the native brightness support in the driver by default
when we detect that the standard ACPI interface is available. The local
admin can still enable it using the module parameter "brightness_enable".
Note that we need to detect the standard ACPI backlight interface only in
boxes for which we would load the native backlight interface in the first
place, and that no ThinkPad BIOS has _BCL but misses the other methods, so
the detection routines can be really simple.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Add a "brightness_enable" module parameter that allows the local admin to
force the backlight support to not be enabled.
It can also be used to force the backlight support to be enabled, but that
is currently a no-op as the backlight support is enabled by default when
available. This will be changed by a different patch.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
Lenovo ThinkPads often have 16 brightness levels in EC, and not just eight
levels like older ThinkPads. They also have standard ACPI backlight
brightness control.
We detect the number of brightness levels by the presence of a BCLL package
with 16 entries. If BCLL is not there, we assume eight levels (Z6*). If
it is there, but it doesn't have 16 entries, we assume eight levels (T60).
Otherwise we assume sixteen levels (T61, X61, etc).
We don't use _BCL because it can have side-effects in thinkpads. Thanks to
Thomas Renninger <trenn@suse.de> for notifying me of this potential
problem.
Using the standard ACPI backlight brightness control *instead* of the
native thinkpad backlight control is a better idea, though. A different
patch will take care of this.
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Revert commit fba956c46a, "Map volume and
brightness events on thinkpads".
That commit made some modifications to the default keymaps that cause bad
behaviour on all IBM ThinkPads if HAL doesn't know to change them into
passive (on-screen-display only) events.
The proper solution for IBM ThinkPads is to use the _NOTIFY version of the
key codes for the IBM default map (which are not available in mainline
yet), and for the Lenovo keymap, it will take some studying of the various
DSDTs and testing to know the best path (which I will do shortly).
For more data, refer to:
http://thread.gmane.org/gmane.linux.kernel/591037/focus=591045
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Jeremy Katz <katzj@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Unregistering a device from within a device attribute handler leads to
a deadlock. Need to use device_schedule_callback() to unregister device
in error path.
Signed-off-by: Gerald Schaefer <geraldsc@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
smsgiucv is a driver that relies on iucv to work properly. If
iucv ans smsgiucv are compiled into the kernel and run on an
lpar the following scenario happens:
iucv is initialized early as a subsystem. It checks for z/VM and
returns with EPROTONOTSUPPORT. Later smsgiucv tries to run
driver_register with iucv_bus as bus. As this bus is not
initialized the driver core and list debugging issue several
warnings and oopses.
Solution is to let smsgiucv also check for z/VM and return
EPROTONOTSUPPORT as well.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Use INIT_WORK to initialize struct work and don't initialize a
struct work partial by explicitly initializing its private structures.
Fixes the following lockdep bug because no key was assigned:
INFO: trying to register non-static key.
the code is fine but needs lockdep annotation.
turning off the locking correctness validator.
0000000001f07bb8 0000000001f07bf8 0000000000000002 0000000000000000
0000000001f07c98 0000000001f07c10 0000000001f07c10 0000000000015406
0000000000000000 0000000000000002 0000000000000000 0000000000000000
0000000001f07bf8 000000000000000c 0000000001f07bf8 0000000001f07c68
000000000039ae60 0000000000015406 0000000001f07bf8 0000000001f07c48
Call Trace:
([<0000000000015376>] show_trace+0xda/0x104)
[<0000000000015460>] show_stack+0xc0/0xf8
[<00000000000154c6>] dump_stack+0x2e/0x3c
[<000000000006a71e>] __lock_acquire+0x47e/0x11a0
[<000000000006b4f0>] lock_acquire+0xb0/0xd8
[<00000000000555a6>] run_workqueue+0x1aa/0x24c
[<00000000000556de>] worker_thread+0x96/0xf4
[<000000000005c210>] kthread+0x90/0xb4
[<000000000001947a>] kernel_thread_starter+0x6/0xc
[<0000000000019474>] kernel_thread_starter+0x0/0xc
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
LPM seems to get hung up while disabling DIPM, and after thinking
about this a bit, I don't think we really need to manually disable it
anyway.
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
* 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm/sis: missing mutex unlock in error path.
radeon: set the address to access the GART table on the CPU side correctly
This code relied on the CPU and GPU address for the aperture being the same,
On some r5xx hardware I was playing with I noticed that this isn't always true.
This fixes issues seen on some r400 cards. (bugs.freedesktop.org 9957)
Signed-off-by: Dave Airlie <airlied@redhat.com>
The pvrusb2 driver is tearing down its sysfs related pieces in the
incorrect order. This leaves dangling pointers which causes the
kernel device core to oops. The problem has been present virtually
forever but became malignant with the changeover to the way of
handling /sys/class. Fix is just to make sure we don't tear down the
class structure until AFTER the driver instances are deregistered.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
vivi.c is a virtual driver that builds without PCI and should run on
non-pci hardware.
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This em28xx-video.c uses functions from this header, but doesn't include it.
It depends on some v4l headers included two levels down including poll.h,
which includes mm.h.
These v4l headers might change, so it's best to include the headers needed
directly.
It also causes problems for the out of core build system's backward
compatibility with older kernels, which is the real reason I bothered to
create a patch for something that would otherwise be so minor that it would
hardly be worth the trouble.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Trent Piepho wrote:
> I do not think the saa7134-alsa driver supports mmap. The cx88-alsa driver
> also claimed to support mmap, but it never worked until I fixed it. It's
> pretty clear that the code in saa7134-alsa was based on the same code as
> cx88-alsa, so it's likely it has the same bug.
You are right. The patch below (based on your cx88 patch, but I don't
really understand it) fixes mmap support in saa7134-alsa for me.
Recording via mmap (arecord -M -f S16_LE -c 2 -r 32000 -D hw:1) didn't
work at all before, works now, tested for at least 20 minutes (but,
unfortunately, with one overrun at least 0.719 ms long).
Signed-off-by: Alexander E. Patrakov <patrakov@ums.usu.ru>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The pvrusb2 driver's sysfs implementation had long since implemented a
dummy hotplug function because at the time the kernel would oops
without at least the empty function being present. Today - after
numerous class interface changes in the kernel - this pvrusb2 change
had been dutifully carried forward but an inspection of the kernel
sources shows that it is no longer needed. So remove the dummy
function and its reference. This also solves a recurring backwards
compatibility issue in the pvrusb2 driver as the class interface has
been getting thrashed in the kernel.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
if(!x & y) should either be if(!(x & y)) or if(!x && y)
I made changes as seemed appropriate, but please review
this is against current git.
Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fixes the signal strength value (higher value = higher signal strength)
and scales the value to the range of 0..ffff. The characteristic itself
is wrong. To get proper values on a TT-C2300 in the range of 40..60%
real signal strength, the values from the patch should be divide by two.
The attached patch doesn't fix the characteristic.
Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Fix reported signal strength value (higher value = higher signal strength).
Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Bit error counting fixed for the tda10021.
Signed-off-by: Hartmut Birr <e9hack@googlemail.com>
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Change the acquisition range for clock recovery from 120 ppm to
240ppm. Apparently, some cable providers in Germany are playing with
their parameters, and the capture range of the ves1820 is too small
to acquire a lock with the current setting... ;-(
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Two fixes for the 'saa7146_wait_for_debi_done' code:
(a) Timeout did not work when the routine was called with
interrupts disabled.
(b) Reduce PCI I/O load caused by saa7146_wait_for_debi_done.
Seems to be very important on fast machines!
Based on code posted by Hartmut Birr @vdr-portal.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
All of these drivers select VIDEO_IR, which uses the input subsystem,
so they should also depend on INPUT.
Problem examples:
drivers/built-in.o: In function `ir_input_key_event':
ir-functions.c:(.text+0x10849a): undefined reference to `input_event'
ir-functions.c:(.text+0x1084ac): undefined reference to `input_event'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11cc0a): undefined reference to `get_key_pinnacle_color'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11cc4f): undefined reference to `get_key_pinnacle_grey'
drivers/built-in.o: In function `saa7134_input_fini':
(.text+0x11cd8b): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d1fa): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d317): undefined reference to `input_register_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11d6ca): undefined reference to `input_free_device'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c3f3): undefined reference to `ir_codes_hauppauge_new'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c450): undefined reference to `ir_codes_pinnacle_color'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c480): undefined reference to `ir_codes_purpletv'
drivers/built-in.o: In function `saa7134_set_i2c_ir':
(.text+0x11c495): undefined reference to `ir_codes_pinnacle_grey'
drivers/built-in.o: In function `saa7134_ir_start':
(.text+0x11c622): undefined reference to `ir_rc5_timer_end'
drivers/built-in.o: In function `saa7134_ir_start':
(.text+0x11c637): undefined reference to `ir_rc5_timer_keyup'
drivers/built-in.o: In function `build_key':
saa7134-input.c:(.text+0x11c769): undefined reference to `ir_extract_bits'
saa7134-input.c:(.text+0x11c7ad): undefined reference to `ir_input_keydown'
saa7134-input.c:(.text+0x11c7f0): undefined reference to `ir_input_keydown'
saa7134-input.c:(.text+0x11c7f9): undefined reference to `ir_input_nokey'
saa7134-input.c:(.text+0x11c806): undefined reference to `ir_input_nokey'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ca07): undefined reference to `ir_codes_encore_enltv'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11caf6): undefined reference to `ir_input_init'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cbf2): undefined reference to `ir_codes_avermedia'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc24): undefined reference to `ir_codes_pctv_sedna'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc53): undefined reference to `ir_codes_flydvb'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cc85): undefined reference to `ir_codes_videomate_tv_pvr'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ccb7): undefined reference to `ir_codes_pixelview'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cce9): undefined reference to `ir_codes_eztv'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cd1b): undefined reference to `ir_codes_manli'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cda8): undefined reference to `ir_codes_cinergy'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cdd7): undefined reference to `ir_codes_flyvideo'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ce06): undefined reference to `ir_codes_asus_pc39'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11ce7d): undefined reference to `ir_codes_gotview7135'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0x11cee1): undefined reference to `ir_codes_proteus_2309'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Media ir-functions uses input_(*) functions so it should depend
on the INPUT config symbol.
drivers/built-in.o: In function `ir_input_key_event':
ir-functions.c:(.text+0x10849a): undefined reference to `input_event'
ir-functions.c:(.text+0x1084ac): undefined reference to `input_event'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
irq handlers have returned a return value for years now... catch up with
the times.
Also, ditch unneeded prototype.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
saa7134: fix analog audio in on medion md8800 quadro, aka CTX944
Signed-off-by: Hermann Pitton <hermann-pitton@arcor.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This patch enables QAM Annex-B support (US digital cable)
for the s5h1409 VSB/QAM demodulator.
Tested successfully with the mt2131 tuner,
present on the following supported boards:
Hauppauge WinTV-HVR-1250
Hauppauge WinTV-HVR-1800
Hauppauge WinTV-HVR-1800lp
This patch is also known to work with an upcoming XC5000 tuner driver.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Add a pointer to the (recently posted) Cafe data sheet.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
If the system is suspended while the camera is streaming, it will not
continue streaming on resume. Save the state properly so that resume
works.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The V4L1 spec says that the image size should be with with VIDIOCSWIN before
requesting buffers with VIDIOCGMBUF and capturing into them with
VIDIOCMCAPTURE.
But it seems that many apps don't do this. They set the size using the fields
in the VIDIOCMCAPTURE ioctl. The driver doesn't know what size to capture
until it actually starts to capture. In particular, it doesn't know what size
to capture until it has already mmap the captured buffers. Which is quite
stupid. Why V4L1 has size and format fields for VIDIOCMCAPTURE I have no idea.
Many drivers don't support this, including those using v4l1-compat.
The bttv does, which is probably the only reason such broken software is so
prevalent.
But, the driver doesn't adjust its idea of what size is being captured when it
is set this way. If you try to query the driver's current setting with
v4l2-ctl, it won't be correct.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
The bttv driver instists that the depth specified in the call to VIDIOCSPICT
match the pixel format specified in the same call.
vlc doesn't set the depth field, which makes the SPICT ioctl always fail.
The V4L1 standard is not clear on how most operation are supposed to work, and
this is no exception. The depth field would appear to be entirely redundant,
as the pixel format specifies a specific depth. It could be that this field
was only meant for output from the *G*PICT ioctl and should be ignored in
*S*PICT. This is in fact what the v4l1-compat wrapper does.
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
I have a system here that actively relies upon RTC wake alarms, and it
has been failing (again) for a few days when attempting to use the
/sys/class/rtc/rtc?/wakealarm interface.
The old (fixed by Linus) /proc/ interface still works, but I'd like to
get it using the new one.
This patch fixes rtc-cmos to ignore the two upper bits when reading the
BCD mday (day of month) register from CMOS. Some systems (eg. mine)
seem to have the top bit set to "1" for some reason.
The older /proc/ interface ignores the upper bits, and so we should too.
Signed-off-by: Mark Lord <mlord@pobox.com>
Acked-by: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Torsten Kaiser wrote:
> Looking that calltrace upwards, it seems replacing the
> memset(dma->sglist,...) with sg_init_table(...) would fix the BUG_ON()
> as that inits the SG_MAGIC.
Tested-by: Torsten Kaiser <just.for.lkml@googlemail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
[BLOCK] Don't allow empty barriers to be passed down to queues that don't grok them
dm: bounce_pfn limit added
Deadline iosched: Fix batching fairness
Deadline iosched: Reset batch for ordered requests
Deadline iosched: Factor out finding latter reques
* 'sg' of git://git.kernel.dk/linux-2.6-block:
[SG] Get rid of __sg_mark_end()
cleanup asm/scatterlist.h includes
SG: Make sg_init_one() use general table init functions
By setting the request_limit in send_srp_login to 1 we allowed login
requests to be sent to the server adapter. If this was not an initial
login, but was a login after a disconnect with the server, other I/O
requests could attempt to be processed before the login occured. These
I/O requests would fail, sometimes resulting in filesystems getting
marked read-only.
To address this we can set the request_limit to 0 while doing the login
and add an exception where login requests, along with task management
events, are always passed to the server.
There is a case where the request_limit had already reached 0 would result
in all events being sent rather than returning SCSI_MLQUEUE_HOST_BUSY; this
has also been fixed by this patch.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This patch corrects the lpfc tag handling issue identified by Hannes Reinecke
http://marc.info/?l=linux-scsi@m=119270235628850&w=2
The basis for this patch originated from Hajime Kai. Thank You Hajime.
Signed-off-by: hajime-kai@soft.fujitsu.com
Signed-off-by: James Smart <James.Smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
There's nothing to be gained by configuring downstream links faster
than the upstream link and such configurations cause problems on
certain PMPs. Limit downstream link speed by the upstream link speed.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
In sata_set_spd_needed(), if SControl read failed, it returned 0 and
skipped PHY speed configuration. However, if SControl access fails,
it's far more logical to request PHY speed configuration. Reverse the
logic.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
libata EH used to ignore errors not associated with commands when
determining whether speed down is necessary or not. This leads to the
following problems.
* Errors not associated with commands can occur indefinitely without
libata EH taking corrective actions.
* Upstream link errors don't trigger speed down when PMP is attached
to it and commands issued to downstream device trigger errors on the
upstream link.
This patch makes ata_eh_link_autopsy() consider errors not associated
with command for speed down.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Reset failure is a critical error. It results in disabling the link
requiring user intervention to re-enable it. Make reset failure
handling more robust such that libata EH doesn't give up too early.
* Temporary glitches during hardreset may lead to classification
failure when there's no softreset available. Retry instead of
giving up.
* Initial softreset or follow up softreset may fail classification.
Move classification error handling block out of followup softreset
block such that both cases are handled and retry instead of giving
up. Also, on the last try, give ATA class a blind shot.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Clean up and reorganize ata_eh_reset() to ease further changes.
* Cache ARRAY_SIZE(ata_eh_reset_timeouts) in @max_tries.
* Cache link->flags in @lflags.
* Move failure handling block to the end of the function and unnest
both success and failure handling blocks.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
As jiffies changes asynchronously, it needs to be cached if unchanging
timestamp is needed. The code in ata_eh_reset() intended to do that
with @now but never actually did it. Fix it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Commands sent to ATAPI tape drives via the SCSI generic (sg) driver are
limited in the amount of data that they can transfer by the max_sectors
value. The max_sectors value is currently calculated according to the
command set for disk drives, which doesn't apply to tape drives. The
default max_sectors value of 256 limits ATAPI tape drive commands to
128 KB. This patch against 2.6.24-rc1 increases the max_sectors value
for tape drives to 65535, which permits tape drive commands to transfer
just under 32 MB.
Tested with a SuperMicro PDSME motherboard, AHCI, and a Sony SDX-570V
SATA tape drive.
Note that some of the chipset drivers also set their own max_sectors
value, which may override the value set in libata-core. I don't have
any of these chipsets to test, so I didn't go messing with them. Also,
ATAPI devices other than tape drives may benefit from similar changes,
but I have only tape drives and disk drives to test.
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The original workaround for the Promise ASIC PRD bug
contained an endianess bug which I failed to detect:
the adjustment of the last PRD entry's length field
applied host arithmetic to little-endian data, which
is incorrect on big-endian machines.
We have the length available in host-endian format, so
do the adjustment on host-endian data and then convert
and store it in the PRD entry's little-endian data field.
Thanks to an anonymous reviewer for detecting this bug.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/libata-core.c:768: warning: 'ata_lpm_enable' defined but not used
drivers/ata/libata-core.c:784: warning: 'ata_lpm_disable' defined but not used
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Remove unneeded on-stack copy of FIS
in sata_fsl_cache_taskfile_from_d2h_fis().
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
SCRs in the driver map to the standard values found in include/linux/ata.h,
so no need for individual scr_read/scr_write case statements duplicating
the natural value.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The Jazz machines have to use the PIT timer for dyntick and highresolution
kernels. This may break because currently just like i386 used to do MIPS
uses two separate spinlocks in the actual PIT code and the PC speaker
code. So switch to do it the same that x86 currently does PIT locking.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: linux-input mailing list moved to vger.kernel.org
Input: inport, logibm - use KERN_INFO when reporting missing mouse
Input: appletouch - idle reset logic broke older Fountains
Input: hp_sdc.c - fix section mismatch
Input: appletouch - add Johannes Berg as maintainer
Input: Add Euro and Dollar key codes
Input: xpad - add more USB IDs