Commit Graph

23798 Commits (a6bcbc2f5ddd6de8a0e08ea3871585abcc82ecd6)

Author SHA1 Message Date
Alex Dubov dfef26d9aa tifm_sd: merge dma and pio request processing paths
To allow for switching of trasfer mode (dma/pio) on a per-request basis,
pio and dma request issue and completion function are now merged.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:14 +02:00
Alex Dubov 0007d4837a tifm_sd: separate command flags, socket flags and register bit masks
host->flags variable was hosting a collection of bits with different
semantics. For clarity, hardware bit masks are now defined as macros,
socket flags represented as bit fields and flags (now cmd_flags) only
hosts command processing modifiers.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:14 +02:00
Alex Dubov 592d372ae8 tifm_sd: remove wait for power off on remove
This wait was needed because of the mmc layer failure to wait for completion
of all outstanding commands before host removal. It should be fixed now in
the mmc layer.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:14 +02:00
Alex Dubov b039d4a187 tifm_sd: remove tifm_sd_terminate function
tifm_sd_terminate can only lawfully be called on device removal so it can be
merged with tifm_sd_remove.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:14 +02:00
Alex Dubov 4e64f22385 tifm: add sysfs attribute for tifm devices
A sysfs attribute reflecting current media type is added.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:14 +02:00
Alex Dubov 88de1b2fed tifm_7xx1: fix adapter resume function
Fixes to the adapter resume function to correctly handle all possible cases:
1. Card is removed during suspend
2. Card is inserted during suspend into previously empty socket
3. Card is replaced during suspend by same or different media type card.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:13 +02:00
Alex Dubov 2428a8fe22 tifm: move common device management tasks from tifm_7xx1 to tifm_core
Some details of the device management (create, add, remove) are really
belong to the tifm_core, as they are not hardware specific.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:13 +02:00
Alex Dubov 6113ed73e6 tifm: move common adapter management tasks from tifm_7xx1 to tifm_core
Some details of the adapter management (create, add, remove) are really
belong to the tifm_core, as they are not hardware specific.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:13 +02:00
Alex Dubov 342c0ec485 tifm_7xx1: improve card detection routine
Remove unneeded conditions and change a sleeping regime a little in the
card type detection routine.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:13 +02:00
Alex Dubov 3540af8ffd tifm: replace per-adapter kthread with freezeable workqueue
Freezeable workqueue makes sure that adapter work items (device insertions
and removals) would be handled after the system is fully resumed. Previously
this was achieved by explicit freezing of the kthread.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:13 +02:00
Alex Dubov e23f2b8a1a tifm: simplify bus match and uevent handlers
Remove code duplicating the kernel functionality and clean up data
structures involved in driver matching.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:13 +02:00
Alex Dubov 8dc4a61eca tifm: use bus methods to handle probe/remove instead of driver ones.
Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:12 +02:00
Alex Dubov 4552f0cbd4 tifm: hide details of interrupt processing from socket drivers
Instead of passing transformed value of adapter interrupt status to
socket drivers, implement two separate callbacks - one for card events
and another for dma events.

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:12 +02:00
Pierre Ossman 5721dbf217 wbsd: remove block crc test
Block completion interrupts occur faster than we can process
them, so just ignore them competely.

Commit also fixes up some incorrect register defines.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:12 +02:00
Pierre Ossman 976d9276c8 mmc: enforce correct sg list
Now that we've fixed our only offender when it comes to strange sg
list, add a check so that future users keep the sg list proper with
regard to transfer size.

Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:12 +02:00
Alex Dubov 14d836e749 mmc: cull sg list to match mmc request size
mmc layer may introduce additional (compared to block layer) limits on
request size. Culling of the sg list to match adjusted request size
simplifies the handling of such cases in the low level driver, allowing
it to skip block count checks while processing sg entries.

(fixes for wbsd and sdhci by Pierre Ossman)

Signed-off-by: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
2007-05-01 13:04:12 +02:00
Roman Moravcik 84767d00a8 Input: gpio_keys - add support for switches (EV_SW)
Signed-off-by: Roman Moravcik <roman.moravcik@gmail.com>
Signed-off-by: Paul Sokolovsky <pmiscml@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-01 00:39:13 -04:00
Dmitry Torokhov bc95f3669f Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/usb/input/Makefile
	drivers/usb/input/gtco.c
2007-05-01 00:24:54 -04:00
Linus Torvalds dc87c3985e libata: honour host controllers that want just one host
The Marvell IDE interface on my machine would hit a BUG_ON() in
lib/iomem.c because it was calling ata_pci_init_one() specifying just a
single port on the host, but that would actually end up trying to
initialize two ports, the second one with bogus information.

This fixes "ata_pci_init_one()" so that it actually passes down the
n_ports variable that it got from the low-level driver to the host
allocation routine ("ata_host_alloc_pinfo()"), which results in the ATA
layer actually having the correct port number information.

And in order to make it all work, I also needed to fix a few places that
had incorrectly hard-coded the fact that a host always had exactly two
ports (both ata_pci_init_bmdma() and ata_request_legacy_irqs() would
just always iterate over both ports).

Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-30 17:43:48 -07:00
Johannes Berg e8c9c50269 power management: implement pm_ops.valid for everybody
Almost all users of pm_ops only support mem sleep, don't check in .valid and
don't reject any others in .prepare so users can be confused if they check
/sys/power/state, especially when new states are added (these would then
result in s-t-r although they're supposed to be something different).

This patch implements a generic pm_valid_only_mem function that is then
exported for users and puts it to use in almost all existing pm_ops.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: David Brownell <david-b@pacbell.net>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: linux-pm@lists.linux-foundation.org
Cc: Len Brown <lenb@kernel.org>
Acked-by: Russell King <rmk@arm.linux.org.uk>
Cc: Greg KH <greg@kroah.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-30 16:40:40 -07:00
Linus Torvalds 40caf5ea5a Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6: (56 commits)
  ieee1394: remove garbage from Kconfig
  ieee1394: more help in Kconfig
  ieee1394: ohci1394: Fix mistake in printk message.
  ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register
  ieee1394: ohci1394: fix cosmetic problem in error logging
  ieee1394: eth1394: send async streams at S100 on 1394b buses
  ieee1394: eth1394: fix error path in module_init
  ieee1394: eth1394: correct return codes in hard_start_xmit
  ieee1394: eth1394: hard_start_xmit is called in atomic context
  ieee1394: eth1394: some conditions are unlikely
  ieee1394: eth1394: clean up fragment_overlap
  ieee1394: eth1394: don't use alloc_etherdev
  ieee1394: eth1394: omit useless set_mac_address callback
  ieee1394: eth1394: CONFIG_INET is always defined
  ieee1394: eth1394: allow MTU bigger than 1500
  ieee1394: unexport highlevel_host_reset
  ieee1394: eth1394: contain host reset
  ieee1394: eth1394: shorter error messages
  ieee1394: eth1394: correct a memset argument
  ieee1394: eth1394: refactor .probe and .update
  ...
2007-04-30 08:59:57 -07:00
Linus Torvalds d6454706c3 Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid: (21 commits)
  USB HID: don't warn on idVendor == 0
  USB HID: add 'quirks' module parameter
  USB HID: add support for dynamically-created quirks
  USB HID: clarify static quirk handling as squirks
  USB HID: encapsulate quirk handling into hid-quirks.c
  USB HID: EMS USBII device needs HID_QUIRK_MULTI_INPUT
  HID: update copyright and authorship macro
  HID: introduce proper zeroing of unused bits in output reports
  USB HID: add support for WiseGroup MP-8800 Quad Joypad
  USB HID: add FF support for Logitech Force 3D Pro Joystick
  USB HID: numlock quirk for dell W7658 keyboard
  USB HID: Logitech MX3000 keyboard needs report descriptor quirk
  USB HID: extend quirk for Logitech S510 keyboard
  USB HID: usbkbd/usbmouse - handle errors when registering devices
  USB HID: add QUIRK_HIDDEV for Belkin Flip KVM
  HID: enable dead keys on a belkin wireless keyboard
  USB HID: Thustmaster firestorm dual power v1 support
  USB HID: specify explicit size for hid_blacklist.quirks
  USB HID: fix retry & reset logic
  USB HID: consolidate vendor/product ids
  ...
2007-04-30 08:58:21 -07:00
Eric Moore 7297824581 [SCSI] fusion: fix domain validation loops
After host reset, the device are programmed to default asyn narrow nego.
We need to reprogram the parameter back to previous values.  If the host
reset is called as a result of spi_dv_device() commands timing out, its
possible to get into an infinite loop of dv to host reset.  This will
prevent that case, as we merely program old values.  If host reset is
called outside context of domain validation, then we can  call
spi_dv_device.

Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-30 10:22:00 -05:00
Linus Torvalds 152a6a9da1 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
  [IPV4] SNMP: Support OutMcastPkts and OutBcastPkts
  [IPV4] SNMP: Support InMcastPkts and InBcastPkts
  [IPV4] SNMP: Support InTruncatedPkts
  [IPV4] SNMP: Support InNoRoutes
  [SNMP]: Add definitions for {In,Out}BcastPkts
  [TCP] FRTO: RFC4138 allows Nagle override when new data must be sent
  [TCP] FRTO: Delay skb available check until it's mandatory
  [XFRM]: Restrict upper layer information by bundle.
  [TCP]: Catch skb with S+L bugs earlier
  [PATCH] INET : IPV4 UDP lookups converted to a 2 pass algo
  [L2TP]: Add the ability to autoload a pppox protocol module.
  [SKB]: Introduce skb_queue_walk_safe()
  [AF_IUCV/IUCV]: smp_call_function deadlock
  [IPV6]: Fix slab corruption running ip6sic
  [TCP]: Update references in two old comments
  [XFRM]: Export SPD info
  [IPV6]: Track device renames in snmp6.
  [SCTP]: Fix sctp_getsockopt_local_addrs_old() to use local storage.
  [NET]: Remove NETIF_F_INTERNAL_STATS, default to internal stats.
  [NETPOLL]: Remove CONFIG_NETPOLL_RX
  ...
2007-04-30 08:14:42 -07:00
Linus Torvalds cd9bb7e736 Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block:
  [PATCH] elevator: elv_list_lock does not need irq disabling
  [BLOCK] Don't pin lots of memory in mempools
  cfq-iosched: speedup cic rb lookup
  ll_rw_blk: add io_context private pointer
  cfq-iosched: get rid of cfqq hash
  cfq-iosched: tighten queue request overlap condition
  cfq-iosched: improve sync vs async workloads
  cfq-iosched: never allow an async queue idling
  cfq-iosched: get rid of ->dispatch_slice
  cfq-iosched: don't pass unused preemption variable around
  cfq-iosched: get rid of ->cur_rr and ->cfq_list
  cfq-iosched: slice offset should take ioprio into account
  [PATCH] cfq-iosched: style cleanups and comments
  cfq-iosched: sort IDLE queues into the rbtree
  cfq-iosched: sort RT queues into the rbtree
  [PATCH] cfq-iosched: speed up rbtree handling
  cfq-iosched: rework the whole round-robin list concept
  cfq-iosched: minor updates
  cfq-iosched: development update
  cfq-iosched: improve preemption for cooperating tasks
2007-04-30 08:12:39 -07:00
Linus Torvalds 24a77daf3d Merge branch 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'for-2.6.22' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (255 commits)
  [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
  [POWERPC] remove kernel module option for booke wdt
  [POWERPC] Avoid putting cpu node twice
  [POWERPC] Spinlock initializer cleanup
  [POWERPC] ppc4xx_sgdma needs dma-mapping.h
  [POWERPC] arch/powerpc/sysdev/timer.c build fix
  [POWERPC] get_property cleanups
  [POWERPC] Remove the unused HTDMSOUND driver
  [POWERPC] cell: cbe_cpufreq cleanup and crash fix
  [POWERPC] Declare enable_kernel_spe in a header
  [POWERPC] Add dt_xlate_addr() to bootwrapper
  [POWERPC] bootwrapper: CONFIG_ -> CONFIG_DEVICE_TREE
  [POWERPC] Don't define a custom bd_t for Xilixn Virtex based boards.
  [POWERPC] Add sane defaults for Xilinx EDK generated xparameters files
  [POWERPC] Add uartlite boot console driver for the zImage wrapper
  [POWERPC] Stop using ppc_sys for Xilinx Virtex boards
  [POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
  [POWERPC] Merge common virtex header files
  [POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
  [POWERPC] Clean up cpufreq Kconfig dependencies
  ...
2007-04-30 08:10:12 -07:00
David Miller 4e08df3f91 [SCSI] qla2xxx: fix regression on sparc64
Some sparc64 boxes don't have a valid NVRAM (from which the driver
takes its WWPN) try to extract this from open firmware instead and if
that fails, fall back to a default, which would be invalid if more
than one machine on the same SAN does this, since two machines with
the same WWPN would be illegal, so warn when taking this potentially
invalid default.

Tested on SunBlade-1000:

Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-04-30 09:58:52 -05:00
James Chapman 65def812ab [L2TP]: Add the ability to autoload a pppox protocol module.
This patch allows a name "pppox-proto-nnn" to be used in modprobe.conf
to autoload a PPPoX protocol nnn.

Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-30 00:21:02 -07:00
Jens Axboe 5972511b77 [BLOCK] Don't pin lots of memory in mempools
Currently we scale the mempool sizes depending on memory installed
in the machine, except for the bio pool itself which sits at a fixed
256 entry pre-allocation.

There's really no point in "optimizing" this OOM path, we just need
enough preallocated to make progress. A single unit is enough, lets
scale it down to 2 just to be on the safe side.

This patch saves ~150kb of pinned kernel memory on a 32-bit box.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-04-30 09:08:17 +02:00
Dmitry Torokhov 3d29cdff99 Input: cobalt_btns - convert to use polldev library
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
2007-04-29 23:43:06 -04:00
Dmitry Torokhov 0dcd807367 Input: add skeleton for simple polled devices
input-polldev provides a skeleton for supporting simple input
devices that need to be periodically scanned or polled to
detect changes in their state.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-04-29 23:42:45 -04:00
Eric Piel fd013ce8d4 Input: wistron - fix typo in keymap for Acer TM610
This patch fixes typo that prevented PROG2 key from working
on Acer Travelmate 610.

Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-04-29 23:41:53 -04:00
Paul Mackerras f900e9777f [POWERPC] Remove dev_dbg redefinition in drivers/ps3/vuart.c
Commit 404d5b185b changed the definition
of dev_dbg in the !DEBUG case from being a #define to being a static
inline.  There was code in drivers/ps3/vuart.c to do exactly that,
which fails to compile now.  This fixes it by removing the redefinition,
as the redefinition is now superfluous.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-30 13:03:39 +10:00
Paul Mackerras 49e1900d4c Merge branch 'linux-2.6' into for-2.6.22 2007-04-30 12:38:01 +10:00
Dave Jiang 34f6d749c0 [POWERPC] remove kernel module option for booke wdt
Remove option of making booke_wdt into a kernel module. This watchdog
cannot be disabled. No point being a kernel module.

Signed-off-by: Dave Jiang <djiang@mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-30 11:05:48 +10:00
Stefan Richter bcfd09ee48 ieee1394: remove garbage from Kconfig
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:33 +02:00
Stefan Richter 3f94aa4d69 ieee1394: more help in Kconfig
- s/Device Drivers/Controllers/
  - clarify who needs pcilynx
  - don't recommend Y for raw1394; M is typically used

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:33 +02:00
Simon Arlott 749cf76620 ieee1394: ohci1394: Fix mistake in printk message.
Fix the "attempting to setting" message in ohci1394.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:32 +02:00
Bernhard Kauer 2ab7752469 ieee1394: ohci1394: remove unnecessary rcvPhyPkt bit flipping in LinkControl register
Remove the unneeded code that clears, sets and again clears the
rcvPhyPkt bit in the ohci1394 LinkControl register in ohci_initialize().

Signed-off-by: Bernhard Kauer <kauer@os.inf.tu-dresden.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:32 +02:00
Stefan Richter c13596b0e5 ieee1394: ohci1394: fix cosmetic problem in error logging
If posted write failed, an "Unhandled interrupt(s) 0x00000100" message
was logged by mistake.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:32 +02:00
Stefan Richter 21b2c5647b ieee1394: eth1394: send async streams at S100 on 1394b buses
eth1394 did not work on buses consisting of S100B...S400B hardware
because it attempted to send GASP packets at S800.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:32 +02:00
Akinobu Mita 809e905ce7 ieee1394: eth1394: fix error path in module_init
This patch fixes some error handlings in eth1394:

- check return value of kmem_cache_create()
- cleanup resources if hpsb_register_protocol() fails

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (whitespace)
2007-04-30 00:00:32 +02:00
Stefan Richter fdc0092bfd ieee1394: eth1394: correct return codes in hard_start_xmit
This patch actually doesn't change anything because there was always 0
== NETDEV_TX_OK returned before.

TODO: Return NETDEV_TX_BUSY in error case and test in different error
conditions.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:32 +02:00
Stefan Richter 53f374e76c ieee1394: eth1394: hard_start_xmit is called in atomic context
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:32 +02:00
Stefan Richter 099398719b ieee1394: eth1394: some conditions are unlikely
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:32 +02:00
Stefan Richter 2e2173df68 ieee1394: eth1394: clean up fragment_overlap
offset > fi->offset + fi->len - 1  ==  !(offset < fi->offset + fi->len)
offset + len - 1 < fi->offset      ==  !(offset + len > fi->offset)
!(A || B)  ==  (!A && !B)

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Stefan Richter 01590d20b4 ieee1394: eth1394: don't use alloc_etherdev
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Stefan Richter 8a62bf7978 ieee1394: eth1394: omit useless set_mac_address callback
We can't reconfigure the MAC address, hence we don't need the callback.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Stefan Richter 599bba9647 ieee1394: eth1394: CONFIG_INET is always defined
because CONFIG_IEEE1394_ETH1394 depends on it.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Stefan Richter 17bab407d5 ieee1394: eth1394: allow MTU bigger than 1500
RFC 2734 says: "IP-capable nodes may operate with an MTU size larger
than the default [1500 octets], but the means by which a larger MTU is
configured are beyond the scope of this document."

Allow users to set an MTU bigger than 1500.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Adrian Bunk f982e5ffcf ieee1394: unexport highlevel_host_reset
highlevel_host_reset no longer has any modular users.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Stefan Richter 246a5fdade ieee1394: eth1394: contain host reset
Call only eth1394's own host reset handler from .tx_timeout, not the
reset hooks of all other IEEE 1394 drivers.

A minor drawback of this patch is that ether1394_host_reset by timeout
is not serialized against ether1394_host_reset by bus reset.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Stefan Richter 5009d26961 ieee1394: eth1394: shorter error messages
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Stefan Richter 027611b842 ieee1394: eth1394: correct a memset argument
The old argument calculated the correct value in a wrong way.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Stefan Richter d06c1ddad9 ieee1394: eth1394: refactor .probe and .update
Move common code into an extra function.  This implicitly adds a missing
node_info->fifo = CSR1212_INVALID_ADDR_SPACE; to .update.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:31 +02:00
Stefan Richter 5e7abccd38 ieee1394: eth1394: .probe and .update may sleep
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Stefan Richter efbeccf174 ieee1394: eth1394: coding style
Adjust white space and line wraps.  Remove unnecessary parentheses and
braces, unused macros, and some of the more redundant comments.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Jean Delvare 09d7a96f5a ieee1394: eth1394: Move common recv_init code to helper function
There is some common code between ether1394_open and ether1394_add_host
which can be moved to a separate helper function for a slightly smaller
eth1394 driver (-160 bytes on i386.)

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Stefan Richter 70093cfde8 ieee1394: eth1394: don't autoload by hotplug when ohci1394 starts
Until now, ieee1394 put an IP-over-1394 capability entry into each new
host's config ROM.  As soon as the controller was initialized --- i.e.
right after modprobe ohci1394 --- this entry triggered a hotplug event
which typically caused auto-loading of eth1394.

This irritated or annoyed many users and distributors.  Of course they
could blacklist eth1394, but then ieee1394 wrongly advertized IP-over-
1394 capability to the FireWire bus.

Therefore
  - remove the offending kernel config option
    IEEE1394_CONFIG_ROM_IP1394,
  - let eth1394 add the ROM entry by itself, i.e. only after eth1394 was
    loaded.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7793 .

To emulate the behaviour of older kernels, simply add the following to
to /etc/modprobe.conf:

install ohci1394 /sbin/modprobe eth1394; \
                 /sbin/modprobe --ignore-install ohci1394

Note, autoloading of eth1394 when an _external_ IP-over-1394 capable
device is discovered is _not_ affected by this patch.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Stefan Richter e00f04a70f ieee1394: eth1394: reduce excessive function inlining
Shrinks eth1394.ko by about 5%.

Many of these functions have only one caller and are therefore auto-
inlined anyway.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Stefan Richter 2cd556ae61 ieee1394: eth1394: clean up host removal
ether1394_add_host() guarantees that hi->dev != NULL if hi != NULL.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Stefan Richter 157188cb54 ieee1394: eth1394: unregister address space in failure case
Warn if hpsb_allocate_and_register_addrspace() failed.
Unregister the address space if something else failed.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Stefan Richter ea9057ad62 ieee1394: send async streams at S100
The comment says it all.  This affects only asynchronous streams sent
via raw1394; the eth1394 driver has own code and needs an own fix.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Milind Arun Choudhary df18ce85de ieee1394: SPIN_LOCK_UNLOCKED cleanup
SPIN_LOCK_UNLOCKED cleanup,use DEFINE_SPINLOCK instead

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Stefan Richter 9be51c5d78 ieee1394: nodemgr: unify some error messages
Shrinks object file size a little bit.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:30 +02:00
Stefan Richter 9324547235 ieee1394: nodemgr: less noise in dmesg
Everytime when eth1394 or a libraw1394 client updates the configuration
ROM, a certain sysfs attribute cannot be added since it already exists.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Stefan Richter d4c60085a9 ieee1394: unroll a weird macro
This is a coding style touch-up for ieee1394's handle_incoming_packet().

A preprocessor macro contained hardwired variable names and, even worse,
the 'break' keyword.  This macro is now unrolled and removed.

Also, all 'break's which had the effect of a return are replaced by
return.  And a FIXME comment is brought up to date.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Andrew Morton b9e5eb067b ieee1394: iso.c needs sched.h
alpha:

drivers/ieee1394/iso.c: In function 'hpsb_iso_xmit_sync':
drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct'
drivers/ieee1394/iso.c:440: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/ieee1394/iso.c:440: error: (Each undeclared identifier is reported only once
drivers/ieee1394/iso.c:440: error: for each function it appears in.)
drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'signal_pending'
drivers/ieee1394/iso.c:440: error: invalid use of undefined type 'struct task_struct'
drivers/ieee1394/iso.c:440: warning: implicit declaration of function 'schedule'
drivers/ieee1394/iso.c: In function 'hpsb_iso_wake':
drivers/ieee1394/iso.c:562: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
2007-04-30 00:00:29 +02:00
Stefan Richter 9543a931dc ieee1394: some more includes
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Torsten Kaiser 3a23a81e83 ieee1394: ieee1394_transactions needs sched.h
drivers/ieee1394/ieee1394_transactions.c fails for me if CONFIG_SMP=n

gcc complains:
  CC      drivers/ieee1394/ieee1394_transactions.o
drivers/ieee1394/ieee1394_transactions.c: In function 'hpsb_get_tlabel':
drivers/ieee1394/ieee1394_transactions.c:183: error:
'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/ieee1394/ieee1394_transactions.c:183: error: (Each undeclared
identifier is reported only once

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added comment)
2007-04-30 00:00:29 +02:00
Randy Dunlap 504945c9c6 ieee1394: ieee1394_core printk format
Fix printk format string:
drivers/ieee1394/ieee1394_core.c:702: warning: format '%d' expects type 'int', but argument 2 has type 'size_t'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Stefan Richter 7542e0e696 ieee1394: remove usage of skb_queue as packet queue
This considerably reduces the memory requirements for a packet and
eliminates ieee1394's dependency on CONFIG_NET.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Stefan Richter d265250341 ieee1394: csr1212: log if devices have CRC errors in their ROM
This will point out firmware bugs.

I tested with 11 SBP-2 devices and one OS X PC and got these errors from
two old CD-RWs only.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Stefan Richter 511f7b3227 ieee1394: csr1212: more sensible names for jump targets
Code beneath two labels called "fail" is actually also reached in case
of success.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Stefan Richter c94ccf9e33 ieee1394: csr1212: warn on unreachable code
We want bugs to show themselves.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:29 +02:00
Stefan Richter a1c6250cb6 ieee1394: shrink csr1212_new_string_descriptor_leaf
Make unnecessarily generic code specific and thus simpler.
Shrink a lookup table from 128 to 16 bytes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter c868ae2a1d ieee1394: csr1212: coding style
Whitespace, line breaks, braces...

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter fd2f3bddae ieee1394: replace vmalloc by kmalloc in csr1212
The biggest chunk ever allocated by CSR1212_MALLOC is 1024 Bytes +
sizeof(struct csr1212_csr_rom_cache) big.  Most of the time much
smaller data structures are allocated.  Therefore vmalloc is a waste.

The one exception is csr1212_append_new_cache() which is called to
append a chunk of CSR1212_EXTENDED_ROM_SIZE + sizeof(struct
csr1212_csr_rom_cache) if the currently allocated ROM cache is too
small.  CSR1212_EXTENDED_ROM_SIZE is generously defined as 256 kBytes.
In SVN commit 1220, Steve Kinneberg lowered this to 2 kBytes in the
config_rom_2.4 branch.  This same commit also switched CSR1212_MALLOC
from kmalloc to vmalloc in the SVN trunk branch:

> r1220 | kberg | 2004-05-31 01:51:44 +0200 (Mon, 31 May 2004) | 13 lines
>
> CSR1212 Extended ROM bug fixes:
> trunk line changes:
>   - Use vmalloc instead of kmalloc
>   - Change delayed_reset_bus() to operate in a work_queue instead of a
>     timer interrupt.
>   - Fix hpsb_allocate_and_register_addrspace() to not allocate space
>     on top of already allocated space.
>   - Fix problems in csr1212.c filling ConfigROM images when extend
>     ROMs are present.
> config-rom-2.4 changes:
>   - Changed extended rom allocation from 256K to 8K.
(It was actually 2 kB, not 8 kB.)
>   - Fix hpsb_allocate_and_register_addrspace() to not allocate space
>     on top of already allocated space.
>   - Fix problems in csr1212.c filling ConfigROM images when extend
>     ROMs are present.

I am now setting CSR1212_EXTENDED_ROM_SIZE to 2 kB minus the overhead of
struct csr1212_csr_rom_cache.  Note, this code path is not used by the
in-kernel drivers though.  raw1394 could trigger it, but the respective
libraw1394 functions don't exist yet.

Furthermore, userspace programs can replace the entire local ROM via
raw1394.  If kmalloc does not fulfill their needs --- well, tough luck.
I decree that nobody needs such huge extended ROMs.  (Extended ROMs are
defined by IEEE 1212 clause 7.7.18.  The spec does not impose
practically relevant restrictions on the size of extended ROM chunks.)

Another potentially demanding use of CSR1212_MALLOC is if external
FireWire devices come with Extended ROM entries.  If they are too big
for kmalloc (or have been too big for vmalloc) we just fail to read
their ROM.  This is quite unlikely though, to my knowledge.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter c1a37f2c65 ieee1394: de-inline some functions
This small reorganization of public csr1212 functions saves one
exported symbol and a few bytes in the driver modules.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter 64ff712321 ieee1394: stricter error checks in csr1212
return -EINVAL becomes BUG_ON in checks of function call parameters.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter 982610bd0d ieee1394: csr1212: rename some types
Use u8, u32 etc. instead of u_int8_t, csr1212_quad_t etc.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter 7fb9addba8 ieee1394: drop csr1212's support for external compilation
csr1212 was written to be compiled either as part of the ieee1394 kernel
driver or of an anticipated IEEE 1212 userspace library.  We now drop
support for the latter.  The costs in terms of code footprint and depth
of abstraction are not countered by any actual benefit.

Also remove some obsolete #includes.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter 6c88e47566 ieee1394: remove unused csr1212 code
Delete unused code.
Make some extern functions static.
Remove superfluous inline keywords.
Move private definitions from csr1212.h to csr1212.c.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter e167c88ebb ieee1394: small header cleanup
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter afd6546d8d ieee1394: move some comments from declaration to definition
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:28 +02:00
Stefan Richter ef8153348f ieee1394: remove declarations of nonexisting functions
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:27 +02:00
Andrew Morton f84c922ba1 ieee1394: sbp2: include fixes
drivers/ieee1394/sbp2.c: In function 'sbp2util_access_timeout':
drivers/ieee1394/sbp2.c:399: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/ieee1394/sbp2.c:399: error: (Each undeclared identifier is reported only once
drivers/ieee1394/sbp2.c:399: error: for each function it appears in.)
drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'signal_pending'
drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'schedule_timeout'
drivers/ieee1394/sbp2.c: In function 'sbp2_prep_command_orb_sg':
drivers/ieee1394/sbp2.c:1438: warning: implicit declaration of function 'page_address'
drivers/ieee1394/sbp2.c:1438: warning: passing argument 2 of 'dma_map_single' makes pointer from integer without a cast
drivers/ieee1394/sbp2.c: In function 'sbp2_handle_status_write':
drivers/ieee1394/sbp2.c:1842: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)

Possibly due to changes in -mm, but this file should explicitly include the
headers for the stuff it uses.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
2007-04-30 00:00:27 +02:00
Stefan Richter 3d269cb50c ieee1394: sbp2: move some memory allocations into non-atomic context
When the command ORB pool is created, the ORB list won't be accessed
concurrently.  Therefore we don't have to take the spinlock there.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:27 +02:00
Stefan Richter 2446a79f4f ieee1394: sbp2: optimize DMA direction of s/g tables
Unlike the name suggests, "cmd->scatter_gather_element" holds only the
s/g table, not the actual s/g elements.  Since the table is only read
but never written by the device, DMA_BIDIRECTIONAL can be replaced by
DMA_TO_DEVICE which may be cheaper on some architectures.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:27 +02:00
Stefan Richter 0555659d63 ieee1394: sbp2: enforce 32bit DMA mapping
In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables,
ORBs, and response buffers have to reside within the first 4 GB of the
FireWire controller's physical address space.  Set the correct mask for
DMA mappings.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:27 +02:00
Stefan Richter f412bf440b ieee1394: sbp2: remove unnecessary alignments of struct members
The members "dma_addr_t command_orb_dma" and "dma_addr_t sge_dma" of
sbp2.h::sbp2_command_info do not have to be aligned themselves --- only
the memory which they point to has to be.

The member "struct sbp2_command_orb command_orb" has to be aligned on
4 bytes boundary which is guaranteed because it contains u32 members.

The member "struct sbp2_unrestricted_page_table scatter_gather_element",
i.e. the SBP-2 s/g table, has to be aligned on 8 bytes boundary
according to the SBP-2 spec.  This is not a requirement for FireWire
controllers but could be expected by SBP-2 targets.

I see no need to align the members command_orb and
scatter_gather_element on CPU cacheline boundaries.  It could have
performance benefits, but on the other hand sbp2 has a somewhat wasteful
allocation scheme which should be optimized first before further tweaks
like cacheline alignments.  (E.g. don't always allocate SG_ALL s/g table
elements.)

Note, before as well as after the patch, the code relies on the
assumption that memory alignment in the virtual address space is
preserved in the physical address space after DMA mapping.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30 00:00:27 +02:00
Jiri Kosina 11941a321d Merge branch 'field-zeroing' into for-linus 2007-04-29 22:19:02 +02:00
Linus Torvalds e389f9aec6 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (107 commits)
  smc911x: fix compilation breakage wjen debug is on
  [netdrvr] eexpress: minor corrections
  add NAPI support to sb1250-mac.c
  ixgb: ROUND_UP macro cleanup in drivers/net/ixgb
  e1000: ROUND_UP macro cleanup in drivers/net/e1000
  Generic HDLC sparse annotations
  e100: Optionally use I/O mode only to access register space
  e100: allow bad MAC address when running with invalid eeprom csum
  ehea: fix for dlpar support
  ehea: fix for sysfs entries
  3C509: Remove unnecessary include of <linux/pm_legacy.h>
  NetXen: Fix for vmalloc issues
  NetXen: Fixes for Power PC architecture
  NetXen: Port swap feature for multi port cards
  NetXen: Removal of redundant macros
  NetXen: Multi PCI support for Quad cards
  NetXen: Removal of redundant argument passing
  NetXen: Use multiple PCI functions
  [netdrvr e100] experiment with doing RX in a similar manner to eepro100
  [PATCH] ieee80211: add missing global needed by IEEE80211_DEBUG_XXXX
  ...
2007-04-29 10:48:48 -07:00
Linus Torvalds f73b0a08ea Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: (86 commits)
  SPIN_LOCK_UNLOCKED cleanup in drivers/ata/pata_winbond.c
  drivers/ata/pata_cmd640.c: fix build with CONFIG_PM=n
  pata_hpt37x: Further small fixes
  pata_hpt3x2n: Add HPT371N support and other bits
  ata: printk warning fixes
  libata: separate ATA_EHI_DID_RESET into DID_SOFTRESET and DID_HARDRESET
  ahci: consolidate common port flags
  ata_timing: ensure t->cycle is always correct
  libata: add missing call to ->cable_detect() in new EH path
  pata_amd: remove contamination added during cable_detect conversion
  libata: Handle drives that require a spin-up command before first access
  libata: HPA support
  libata: kill probe_ent and related helpers
  libata: convert the remaining PATA drivers to new init model
  libata: convert the remaining SATA drivers to new init model
  libata: convert ata_pci_init_native_mode() users to new init model
  libata: convert drivers with combined SATA/PATA ports to new init model
  libata: add init helpers including ata_pci_prepare_native_host()
  libata: convert native PCI host handling to new init model
  libata: convert legacy PCI host handling to new init model
  ...
2007-04-29 10:48:21 -07:00
Linus Torvalds 6b06d2cc6d Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (105 commits)
  sonypi: use mutex instead of semaphore
  sony-laptop: remove user visible camera controls as platform attributes
  meye: make meye use sony-laptop instead of sonypi
  sony-laptop: add a meye-usable include file for camera ops
  sony-laptop: complete the motion eye camera support in sony-laptop
  sonypi: try to detect if sony-laptop has already taken one of the known ioports
  sonypi: suggest sonypi users to try sony-laptop instead
  sony-laptop: add edge modem support (also called WWAN)
  sony-laptop: add locking on accesses to the ioport and global vars
  sony-laptop: add camera enable/disable parameter, better handle possible infinite loop
  thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex static
  ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers
  ACPI: thinkpad-acpi: add sysfs support to hotkey subdriver
  ACPI: thinkpad-acpi: improve dock subdriver initialization
  ACPI: thinkpad-acpi: improve debugging for acpi helpers
  ACPI: thinkpad-acpi: improve fan control documentation
  ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfs
  ACPI: thinkpad-acpi: fix a fan watchdog invocation
  ACPI: thinkpad-acpi: do not arm fan watchdog if it would not work
  ACPI: thinkpad-acpi: add a fan-control feature master toggle
  ...
2007-04-29 10:47:25 -07:00
Jiri Kosina f61c9127b9 USB HID: don't warn on idVendor == 0
It turns out that there are broken devices out there that incorrectly
report VID/PID as 0x000, see http://lkml.org/lkml/2007/4/27/496

Therefore we should not confuse users by dumping warnings and stacktraces
in such situation. It is not possible to add quirks for such horribly
broken devices, but currently that's not needed.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-29 13:14:56 +02:00
Rusty Russell 5a1b5898ee [NET]: Remove NETIF_F_INTERNAL_STATS, default to internal stats.
Herbert Xu conviced me that a new flag was overkill; every driver
currently overrides get_stats, so we might as well make the internal
one the default.  If someone did fail to set get_stats, they would now
get all 0 stats instead of "No statistics available".

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-28 21:04:03 -07:00
Sergei Shtylyov d16bfd0c77 [NETPOLL]: Remove CONFIG_NETPOLL_RX
Get rid of the CONFIG_NETPOLL_RX option completely since all the
dependencies have been removed long ago...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-28 20:58:22 -07:00
Len Brown aac60c1113 Pull bugzilla-8346 into release branch 2007-04-28 23:19:25 -04:00
Len Brown 12a5a71212 Pull sbs into release branch 2007-04-28 23:16:59 -04:00
Len Brown 14d2178588 Pull dock into release branch 2007-04-28 23:13:03 -04:00
Len Brown 03feb05246 Pull ec into release branch 2007-04-28 23:12:56 -04:00
Len Brown fb16596997 Pull misc-for-upstream into release branch 2007-04-28 23:12:03 -04:00
Len Brown f188291aec Pull thinkpad into release branch
Conflicts:

	drivers/misc/Kconfig

Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 23:11:19 -04:00
Len Brown cfaae3ee4a Pull sony into release branch 2007-04-28 23:09:57 -04:00
Len Brown eaf60d6924 Pull asus into release branch 2007-04-28 22:18:21 -04:00
Matthias Kaehlcke c6c60106b9 sonypi: use mutex instead of semaphore
the Sony Programmable I/O Control driver uses a semaphore as
mutex. use the mutex API instead of the (binary) semaphore

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:13:34 -04:00
malattia@linux.it 1b20d34406 sony-laptop: remove user visible camera controls as platform attributes
Avoid giving the user the possibility to shoot his own foot and let
the meye driver enable/disable the camera wisely (PCI_ID based).

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:06:03 -04:00
malattia@linux.it cbefb762b6 meye: make meye use sony-laptop instead of sonypi
Change sonypi_camera_command() calls to sony_pic_camera_command() and use
the renamed macros.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:06:02 -04:00
malattia@linux.it 1ce82c14d0 sony-laptop: add a meye-usable include file for camera ops
Copy and rename (for easier co-existence) the MEYE-wise exported interface.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:06:01 -04:00
malattia@linux.it e364632e74 sony-laptop: complete the motion eye camera support in sony-laptop
Add the exported sony_pic_camera_command() function to make the MEYE
driver happy.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:06:00 -04:00
malattia@linux.it 1a3e323907 sonypi: try to detect if sony-laptop has already taken one of the known ioports
Get the IO resources list in sony-laptop in the same order as listed
in sonypi and make sonypi check if one of those is already busy.
The sonypi check can be disabled by a module parameter in case the user
thinks we are plainly wrong (check_ioport=0).

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:59 -04:00
malattia@linux.it 74a882e485 sonypi: suggest sonypi users to try sony-laptop instead
Try to migrate sonypi users to sony-laptop gracefully.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:56 -04:00
malattia@linux.it 9476cdfae6 sony-laptop: add edge modem support (also called WWAN)
Some SZ Vaios have a gsm built-in modem. Allow powering on/off this device.
Thanks to Joshua Wise for the base code.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:55 -04:00
malattia@linux.it 9f9f076171 sony-laptop: add locking on accesses to the ioport and global vars
Better avoid having ioport commands mixing and global variables reading/writing.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:53 -04:00
malattia@linux.it 5f3d2898d7 sony-laptop: add camera enable/disable parameter, better handle possible infinite loop
Use a parameter to enable/disable motion eye camera (for C1VE/C1VN models)
controls and avoid entering an infinite loop if the camera is not present
and the HW doesn't answer as we expect on io commands.

Signed-off-by: Mattia Dongili <malattia@linux.it>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 22:05:48 -04:00
Adrian Bunk 836a53f42f thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex static
This patch makes the needlessly global fan_mutex static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 21:52:49 -04:00
Henrique de Moraes Holschuh d3a6ade4f8 ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers
Add support to sysfs to the wan and bluetooth subdrivers.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 21:41:20 -04:00
Henrique de Moraes Holschuh a0416420e2 ACPI: thinkpad-acpi: add sysfs support to hotkey subdriver
Add the hotkey sysfs support.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 21:41:20 -04:00
Henrique de Moraes Holschuh d94a7f16ca ACPI: thinkpad-acpi: improve dock subdriver initialization
The dock sub-driver has split-personality (two subdrivers), and it was
doing some unoptimal things on init because of that.  Fix it so that the
second half of it will only init when necessary, and only if the first half
initialized sucessfully in the first place.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 21:41:20 -04:00
Henrique de Moraes Holschuh 5ae930e685 ACPI: thinkpad-acpi: improve debugging for acpi helpers
Some issues with the dock subdriver proved that a slightly improved
debugging setup for ACPI notifiers and handler helpers would be useful.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 21:41:19 -04:00
Henrique de Moraes Holschuh c573ddb998 ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfs
Currently, all fan control operations return ENXIO if unsupported
operations are requested, but return EINVAL if invalid fan modes are
requested on a given ThinkPad.

This is not strictly correct for sysfs, so map ENXIO to EINVAL in the sysfs
attribute store handlers, as we do benefit from the ENXIO in other parts of
the driver code.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 21:41:19 -04:00
Henrique de Moraes Holschuh ca4ac2f48a ACPI: thinkpad-acpi: fix a fan watchdog invocation
The fan control watchdog was being called in one place even when the fan
control operation had failed.  Fix it.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 21:41:18 -04:00
Henrique de Moraes Holschuh 4985cd0a63 ACPI: thinkpad-acpi: do not arm fan watchdog if it would not work
Do not enable/rearm the fan control safety watchdog if we would not be able
to do anything to the fan anyway.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 21:41:16 -04:00
Henrique de Moraes Holschuh ecf2a80a97 ACPI: thinkpad-acpi: add a fan-control feature master toggle
Len Brown considers that an active by default fan control interface in
laptops may be too close to giving users enough rope.  There is a good
chance he is quite correct on this, especially if someone decides to use
that interface in applets and users are not aware of its risks.

This patch adds a master switch to thinkpad-acpi that enables or disables
the entire fan-control feature as a module parameter: "fan_control".  It
defaults to disabled.  Set it to non-zero to enable fan control.

Also, the patch removes the expermiental status from fan control, since it
is stable enough to not be called experimental, and the master switch makes
it safe enough to do so.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 21:41:14 -04:00
Bob Moore 79fff27002 ACPICA: clear fields reserved before FADT r3
Linux-2.6.21 stopped booting on a P4/HT because Linux
wrote the FADT.CST_CNT value to the SMI_CMD.
Apparently this stumbled over some SMM instability,
such as confusing SMM when invoking it from cpu1.

Linux did this because even though the r2 FADT reserves
the CST_CNT field, this BIOS set that field and Linux
used it.

Turns out that up through 2.6.20 we explicitly cleared
cst_control for r2 FADTs.  So here we go back to doing that,
plus also clear some additional fields that are reserved
until FADT r3.

http://bugzilla.kernel.org/show_bug.cgi?id=8346

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28 20:55:06 -04:00
Milind Arun Choudhary 225036314e SPIN_LOCK_UNLOCKED cleanup in drivers/ata/pata_winbond.c
remove SPIN_LOCK_UNLOCKED, use DEFINE_SPINLOCK instead

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 15:16:40 -04:00
Andrew Morton 4b22afd743 drivers/ata/pata_cmd640.c: fix build with CONFIG_PM=n
This is grubby, but all the ata drivers do it this way.

Would it not be better to do

#define ata_scsi_device_resume NULL

in libata.h, remove all those ifdefs?

(updated version, ug, ug)

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 15:16:40 -04:00
Alan Cox a473446856 pata_hpt37x: Further small fixes
Further HPT37x changes

- No 66MHz 370/370A
- Remove dead special case check now we use the DPLL (as per the IDE driver)

Pointed out by Sergei

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 15:16:39 -04:00
Alan Cox 28e21c8c0d pata_hpt3x2n: Add HPT371N support and other bits
Yes its no longer 3x2n but 3xxn, I can rename it if you want Jeff

- Don't reset both ports each time (Sergei)
- If we can't get a DPLL then abort entirely
- Use ioport access for clock (from drivers/ide)
- Add HPT371N support (from drivers/ide)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 15:16:39 -04:00
Andrew Morton bd1d5ec64f ata: printk warning fixes
drivers/ata/libata-core.c: In function 'ata_hpa_resize':
drivers/ata/libata-core.c:986: warning: format '%lld' expects type 'long long int', but argument 5 has type 'u64'
drivers/ata/libata-core.c:986: warning: format '%lld' expects type 'long long int', but argument 6 has type 'u64'
drivers/ata/libata-core.c:990: warning: format '%lld' expects type 'long long int', but argument 4 has type 'u64'
drivers/ata/libata-core.c:990: warning: format '%lld' expects type 'long long int', but argument 5 has type 'u64'
drivers/ata/libata-core.c:1003: warning: format '%lld' expects type 'long long int', but argument 4 has type 'u64'

Also fix various 80-col bustage.

Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 15:16:21 -04:00
Tejun Heo 0d64a233fe libata: separate ATA_EHI_DID_RESET into DID_SOFTRESET and DID_HARDRESET
Separate ATA_EHI_DID_RESET into ATA_EHI_DID_SOFTRESET and
ATA_EHI_DID_HARDRESET.  ATA_EHI_DID_RESET is redefined as OR of the
two flags.  This patch doesn't introduce any behavior change.  This
will be used later to determine whether _SDD is necessary or not.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:51:33 -04:00
Tejun Heo 1188c0d83c ahci: consolidate common port flags
Consolidate common port flags into AHCI_FLAG_COMMON.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:51:33 -04:00
Alan Cox 4f701d1e9a ata_timing: ensure t->cycle is always correct
Russell King hit a case where quantisation errors accumulated such that
the cycle time was shorter than rather than equal to the active/recovery
time. The code already knows how to stretch times to fit the cycle time
but does not know about the reverse.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:51:33 -04:00
Tejun Heo c1c4e8d557 libata: add missing call to ->cable_detect() in new EH path
->cable_detect() used to be called on by the old ata_bus_probe() path.
Add invocation to ata_eh_revalidate_and_attach() right after IDENTIFYs
are done.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:46:18 -04:00
Tejun Heo abcfa88bd4 pata_amd: remove contamination added during cable_detect conversion
This is added by added by cff63dfceb52c564fe1ba5394d50ab7d599a11b9
 - pata: cable methods.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:46:18 -04:00
Mark Lord 169439c2e3 libata: Handle drives that require a spin-up command before first access
(S)ATA drives can be configured for "power-up in standby",
a mode whereby a specific "spin up now!" command is required
before the first media access.

Currently, a drive with this feature enabled can not be used at all
with libata, and once in this mode, the drive becomes a doorstop.

The older drivers/ide subsystem at least enumerates the drive,
so that it can be woken up after the fact from a userspace HDIO_*
command, but not libata.

This patch adds support to libata for the "power-up in standby"
mode where a "spin up now!" command (SET_FEATURES) is needed.
With this, libata will recognize such drives, spin them up,
and then re-IDENTIFY them if necessary to get a full/complete
set of drive features data.

Drives in this state are determined by looking for
special values in id[2], as documented in the current ATA specs.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:40:40 -04:00
Alan Cox 1e999736ca libata: HPA support
Signed-off-by: Alan Cox <alan@redhat.com>

Add support for ignoring the BIOS HPA result (off by default) and setting
the disk to the full available size unless already frozen.

Tested with various platforms/disks and confirmed to work with the
Macintosh (which broke earlier) and ata_piix (breakage due to the LBA48
readback that Tejun fixed).

For normal users this brings us, I believe, to feature parity with old IDE
(and of course more featured in some areas too).
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:06 -04:00
Tejun Heo 6bfff31e77 libata: kill probe_ent and related helpers
All drivers are converted to new init model.  Kill probe_ent,
ata_device_add() and ata_pci_init_native_mode().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:06 -04:00
Tejun Heo 5d728824ef libata: convert the remaining PATA drivers to new init model
Convert pdc_adma, pata_cs5520, pata_isapnp, pata_ixp4xx_cf,
pata_legacy, pata_mpc52xx, pata_mpiix, pata_pcmcia, pata_pdc2027x,
pata_platform, pata_qdi, pata_scc and pata_winbond to new init model.

* init_one()'s now follow more consistent init order

* cs5520 now registers one host with two ports, not two hosts.  If any
  of the two ports are disabled, it's made dummy as other drivers do.

Tested pdc_adma and pata_legacy.  Both are as broken as before.  The
rest are compile tested only.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:06 -04:00
Tejun Heo 4447d35156 libata: convert the remaining SATA drivers to new init model
Convert ahci, sata_sil, sata_sil24, sata_svw, sata_qstor, sata_mv,
sata_sx4, sata_vsc and sata_inic162x to new init model.

Now that host and ap are available during intialization, functions are
converted to take either host or ap instead of low level parameters
which were inevitable for functions shared between init and other
paths.  This simplifies code quite a bit.

* init_one()'s now follow more consistent init order

* ahci_setup_port() and ahci_host_init() collapsed into
  ahci_init_one() for init order consistency

* sata_vsc uses port_info instead of setting fields manually

* in sata_svw, k2_board_info converted to port_info (info is now in
  port flags).  port number is honored now.

Tested on ICH7/8 AHCI, jmb360, sil3112, 3114, 3124 and 3132.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:06 -04:00
Tejun Heo 9a829ccfc8 libata: convert ata_pci_init_native_mode() users to new init model
Convert drivers which use ata_pci_init_native_mode() to new init
model.  ata_pci_init_native_host() is used instead.  sata_nv, sata_uli
and sata_sis are in this category.

Tested on nVidia Corporation CK804 Serial ATA Controller [10de:0054]
in both BMDMA and ADMA mode.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:03 -04:00
Tejun Heo eca25dca17 libata: convert drivers with combined SATA/PATA ports to new init model
Convert sata_via and sata_promise to new init model.  Both controllers
can have combined configuration (SATA + PATA) and used twisted
initialization method (modifying port in ->port_start) to overcome
probe_ent limitations.

This patch converts both drivers to new init model in which such
configuration is natively supported.

* promise: Combined pata port now uses separate port_info entry right
  after the sata counterpart entry.

* promise: Controller configuration is discerned using ap->flags.
  This simplifies init path and makes it look more like other LLDs.

* via: Both SATA and PATA ports in vt6421 are represented in their
  own port_info structure.

Tested on PDC20375 (SATA150 TX2plus) [105a:3375] and PDC40775 (SATA
300 TX2plus) [105a:3d73].  Couldn't test via cuz my c3 won't boot the
current kernel.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:03 -04:00
Tejun Heo 21b0ad4fb8 libata: add init helpers including ata_pci_prepare_native_host()
These will be used to convert LLDs to new init model.

* Add irq_handler field to port_info.  In new init model, requesting
  IRQ is LLD's responsibility and libata doesn't need to know about
  irq_handler.  Most LLDs can simply register their irq_handler but
  some need different irq_handler depending on specific chip.  The
  added port_info->irq_handler field can be used by LLDs to select
  the matching IRQ handler in such cases.

* Add ata_dummy_port_info.

* Implement ata_pci_prepare_native_host(), a helper to alloc ATA host,
  acquire all resources and init the host in one go.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:03 -04:00
Tejun Heo d491b27b19 libata: convert native PCI host handling to new init model
Convert native PCI host handling to alloc-init-register model.  New
function ata_pci_init_native_host() follows the new init model and
replaces ata_pci_init_native_mode().  As there are remaining LLD
users, the old function isn't removed yet.

ata_pci_init_one() is reimplemented using the new function and now
fully converted to new init model.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:03 -04:00
Tejun Heo 0f834de3ea libata: convert legacy PCI host handling to new init model
Convert legacy PCI host handling to alloc-init-register model.
ata_init_legacy_host(), ata_request_legacy_irqs() and
ata_pci_init_bmdma() are separated out and follow the new init model.

The two legacy handling functions use separate ata_legacy_devres
instead of generic devm_* resources.  This reduces devres overhead for
legacy hosts which was a bit high because it didn't use PCI/iomap
merged resoruces.

ata_pci_init_one() is rewritten in terms of the aboved functions but
native mode handling is still using the old method.  Conversion will
be completed when native mode handling is updated.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:03 -04:00
Tejun Heo f5cda25729 libata: implement ata_host_alloc_pinfo() and ata_host_register()
Implement ata_host_alloc_pinfo() and ata_host_register().  These helpers
will be used in the following patches to adopt new init model.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:03 -04:00
Tejun Heo f31871951b libata: separate out ata_host_alloc() and ata_host_register()
Reorganize ata_host_alloc() and its subroutines into the following
three functions.

* ata_host_alloc() : allocates host and its ports.  shost is not
  registered automatically.

* ata_scsi_add_hosts() : allocates and adds shosts associated with an
  ATA host.  Used by ata_host_register().

* ata_host_register() : takes a fully initialized ata_host structure
  and registers it to libata layer and probes it.

Only ata_host_alloc() and ata_host_register() are exported.
ata_device_add() is rewritten using the above functions.  This patch
does not introduce any observable behavior change.  Things worth
mentioning.

* print_id is assigned at registration time and LLDs are allowed to
  overallocate ports and reduce host->n_ports during initialization.
  ata_host_register() will throw away unused ports automatically.

* All SCSI host initialization stuff now resides in
  ata_scsi_add_hosts() in libata-scsi.c, where it should be.

* ipr is now the only user of ata_host_init().  Either kill it by
  converting ipr to use ata_host_alloc() and friends or rename and
  move it to libata-scsi.c

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:03 -04:00
Tejun Heo ecef725323 libata: separate out ata_host_start()
Separate out ata_host_start() from ata_device_add().  ata_host_start()
calls ->port_start on each port if available and freezes the port.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:02 -04:00
Tejun Heo 4911487a34 libata: allocate ap separately from shost
Don't embed ap inside shost.  Allocate it separately and point it back
from shosts's hostdata.  This makes port allocation more flexible and
allows regular ATA and SAS share host alloc/init paths.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:02 -04:00
Tejun Heo bf33554290 ahci: add PCI ID for new VIA chip
Add PCI ID for new VIA chip.  Original patch is from Maarten Vanraes.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Maarten Vanraes <maarten.vanraes@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:02 -04:00
Tejun Heo 03ec52dea0 libata: kill type mismatch compile warning
kill the following compile warning.

drivers/ata/libata-core.c:1786: warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:02 -04:00
Conke Hu c65ec1c25d ahci.c: remove non-existing SB600 raid id (re-send)
SB600 RAID and SB600 SATA is the same controller and share the
same PCI ID 0x4380. There is no such PCI ID 0x4381.

    Signed-off-by: Conke Hu <conke.hu@gmail.com>
 ---------

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:02 -04:00
Tejun Heo a51d644af6 libata: improve AC_ERR_DEV handling for ->post_internal_cmd
->post_internal_cmd is simplified EH for internal commands.  Its
primary mission is to stop the controller such that no rogue memory
access or other activities occur after the internal command is
released.  It may provide error diagnostics by setting qc->err_mask
but this hasn't been a requirement.

To ignore SETXFER failure for CFA devices, libata needs to know
whether a command was failed by the device or for any other reason.
ie. internal command needs to get AC_ERR_DEV right.

This patch makes the following changes to AC_ERR_DEV handling and
->post_internal_cmd semantics to accomodate this need and simplify
callback implementation.

1. As long as the correct bits in the result TF registers are set,
   there is no need to set AC_ERR_DEV explicitly.  libata EH core
   takes care of that for both normal and internal commands.

2. The only requirement for ->post_internal_cmd() is to put the
   controller into quiescent state.  It needs not to set any err_mask.

3. ata_exec_internal_sg() performs minimal error analysis such that
   AC_ERR_DEV is automatically set as long as result_tf is filled
   correctly.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:02 -04:00
Tejun Heo 55a6adeea4 libata: fix native mode disabled port handling
Disabled port handling in ata_pci_init_native_mode() is slightly
broken in that it may end up using the wrong port_info.  This patch
updates it such that disables ports are made dummy as done in the
legacy and other cases.

While at it, fix indentation in ata_resources_present().

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:02 -04:00
Tejun Heo 17199b187b ahci: move port_map handling to ahci_save_initial_config()
Move cross checking between port_map and cap.n_ports into
ahci_save_initial_config().  After save_initial_config is done,
hpriv->port_map is always setup properly.

Tested on JMB363, ICH7 and ICH8 (with dummy ports).

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
Tejun Heo d447df140d ahci: implement ata_save/restore_initial_config()
There are several registers which describe how the controller is
configured.  These registers are sometimes implemented as r/w
registers which are configured by firmware and get cleared on
controller reset or after suspend/resume cycle.  ahci saved and
restored those values inside ahci_reset_controller() which is a bit
messy and doesn't work over suspend/resume cycle.

This patch implements ahci_save/restore_initial_config().  The save
function is called during driver initialization and saves cap and
port_map to hpriv.  The restore function is called after the
controller is reset to restore the initial values.

Sometimes the initial firmware values are inconsistent and need to be
fixed up.  This is handled by ahci_save_initial_config().  For this,
there are two versions of saved registers.  One to write back to the
hardware register, the other to use during driver operation.  This is
necessary to keep ahci's behavior unchanged (write back fixed up
port_map while keeping cap as-is).

This patch makes ahci save the register values once before the first
controller reset, not after it's been reset.  Also, the same stored
values are used written back after each reset, so the register values
are properly recovered after suspend/resume cycle.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
Mikael Pettersson ce2d3abc29 sata_promise: fix error decode regression
Promise ATA ports should always be reset by pdc_reset_port()
when errors are detected, but the recent error reason decoding
update to sata_promise replaced that reset with a freeze.

This patch changes the error detection to do a reset again.
This makes the error decoding update safer, as it now only
adds error decoding without changing any other behaviour.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
Alan Cox 9bedb799f2 pata_pdc2027x: Updates
Signed-off-by: Alan Cox <alan@redhat.com>

Correct missing modefilter (crash if BAR4 unassigned)
Use Cable Detect method
Wrap ->set_mode instead ready for ->post_set_mode removal
Maxtor errata as per Jeff Garzik report
Remove duplicated private udma_mask hacking
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
Alan Cox ad648c0883 pata_winbond
Not a PCI device so doesn't need PCI includes

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
Alan Cox eb4a2c7f03 pata: cable methods
Versus upstream as requested

Last of the trivial switches to cable_detect methods.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
Mark Lord 5a5dbd18a7 libata: add support for READ/WRITE LONG
The READ/WRITE LONG commands are theoretically obsolete,
but the majority of drives in existance still implement them.

The WRITE_LONG and WRITE_LONG_ONCE commands are of particular
interest for fault injection testing -- eg. creating "media errors"
at specific locations on a disk.

The fussy bit is that these commands require a non-standard
sector size, usually 520 bytes instead of 512.

This patch adds support to libata for READ/WRITE LONG commands
issued via SG_IO/ATA_16.

Signed-off-by:  Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
Robin H\. Johnson 1234010684 Add notation that the Asus W5F laptop has a short cable instead of 80-wire.
The Asus W5F laptop uses a short cable instead of the 80-wire style, and thus
needs to be in the ich_laptop special cases for correct detection and support
of UDMA/100 for the hard drive. I noticed this because I have the W5F laptop,
and was tracing apparent slowness.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
Alan Cox 5c25bf0d28 pata_optidma: rework for cable detect and to remove post_set_mode()
A lot of noise because I had to rename the optidma_set_mode() method to
avoid confusion with the new ->set_mode() method that was added. Cable
detect side is pretty trivial.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:01 -04:00
Alan Cox 2f5344b1be pata_winbond: restore cable method
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:00 -04:00
Alan Cox c45a632874 pata_sl82c105: restore cable detect method
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:00 -04:00
Alan Cox 3b4ba5910b pata_netcell: re-remove all the crud
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:00 -04:00
Alan Cox 3be40d7665 pata_qdI: restore cable detect
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:00 -04:00
Alan Cox b723d1448c pata_ali: remove all the crap again and switch to cable_detect method
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:00 -04:00
Robert Hancock f2fb344bea sata_nv: don't read shadow registers when in ADMA mode
Reading from the ATA shadow registers while we are in ADMA mode may cause
undefined behavior.  Don't read the ATA status register when completing
commands for this reason, it shouldn't be needed as the controller will
notify us if the command failed.  Also, don't allow commands with result
taskfile requested to execute in ADMA mode, since that requires accessing
the shadow registers.  We also still need to override tf_read since libata
will read the result taskfile on a command failure, and we need to go into
port register mode before allowing this.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:00 -04:00
Alan 4dc5200d70 pcmcia - spot slave decode flaws (for testing)
It tries to spot when the slave is a mirror of the master and to fix up
problems that causes.

I've got two confirmations so far that this plus the "can fail set_xfer" patch
work for folks who had problems before.  Also if you are unfortunate enough to
be running something like HAL then it'll automount the same disk twice for you
and corrupt it without the fix (aint that nice...)

Tested (successfully) by Komuro <komurojun-mbn@nifty.com>.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:00 -04:00
Andrew Morton 120bda35ff git-libata-all-ipr-fix
drivers/scsi/ipr.c: In function '__ipr_eh_dev_reset':
drivers/scsi/ipr.c:3865: warning: passing argument 4 of 'ata_do_eh' from incompatible pointer type

Cc: Tejun Heo <htejun@gmail.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:16:00 -04:00
Tejun Heo 771b8dad96 libata: hardreset on SERR_INTERNAL
There was a rare report where SB600 reported SERR_INTERNAL and SRST
couldn't get it out of the failure mode.  Hardreset on SERR_INTERNAL.
As the problem is intermittent, whether this fixes the problem or not
hasn't been verified yet, but hardresetting the channel on internal
error is a good idea anyway.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:59 -04:00
Mikael Pettersson 176efb0544 sata_promise: decode and report error reasons
This patch adds much needed error reason decoding and
reporting to sata_promise. It's simplistic but should
log all relevant error info the controller provides.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:59 -04:00
Mikael Pettersson 724114a573 sata_promise: separate SATA and PATA ops
This patch changes sata_promise so that the PATA ports
on TX2plus chips are bound to the pdc_pata_ops structure.
This means that operations called from the SATA ops
structures don't need any SATA-vs-PATA tests any more.
Instead, operations that depend on a port being SATA or
PATA are separated into different procedures.

* pdc_cable_type() is split into a PATA version and a
  SATA version
* pdc_error_handler() is split into a PATA version and a
  SATA version, that both call a common version after
  setting up the `hardreset' function pointer
* pdc_old_check_atapi_dma() is now only used for SATAI
  ports, so is renamed to pdc_old_sata_check_atapi_dma()
  and simplified
* pdc_sata_scr_{read,write}() are now only used for SATA
  ports, so their is-not-SATA tests are removed
* pdc_port_start() is split into three procedures: a wrapper
  which performs the ->ops adjustment on TX2plus PATA ports,
  a procedure with the common code, and a procedure with
  the SATA-specific code (this bit might be cleaned up by
  Tejun's new init model)

Tested on 20619, 20575, and 20775 chips.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:59 -04:00
Mikael Pettersson 799331fda0 sata_promise: add missing cable_detect hooks
The recent change which moved cable detection from
pdc_pre_reset() to the new ->cable_detect hook only
added the hook for SATAII chips, leaving SATAI chips
and the 20619 without the hook. Fixed by this patch.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:59 -04:00
Jeff Garzik 8cdfb29c0c libata/IDE: remove combined mode quirk
Both old-IDE and libata should be able handle all controllers and
devices found using normal resource reservation methods.

This eliminates the awful, low-performing split-driver configuration
where old-IDE drove the PATA portion of a PCI device, in PIO-only mode,
and libata drove the SATA portion of the /same/ PCI device, in DMA mode.
Typically vendors would ship SATA hard drive / PATA optical
configuration, which would lend itself to slow (PIO-only) CD-ROM
performance.

For Intel users running in combined mode, it is now wholly dependent on
your driver choice (potentially link order, if you compile both drivers
in) whether old-IDE or libata will drive your hardware.

In either case, you will get full performance from both SATA and PATA
ports now, without having to pass a kernel command line parameter.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:59 -04:00
Jeff Garzik e424675f15 [libata] turn on !IORDY filter
The previous commit erroneously noted that the !IORDY filter was turned
on.  No true, that change was split out into this commit.

Originally authored and signed-off-by Alan Cox.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:59 -04:00
Jeff Garzik cffacd85bc [libata] sata_mv: support ->cable_detect
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:58 -04:00
Alan Cox a76b62ca70 libata: Change prototype of mode_filter to remove ata_port*
With Tejun having added adev->ap some time ago we can get rid of the
almost unused port being passed to mode filters. And while we are
doing filters, lets turn on the !IORDY filter as well.

Signed-off-by: Alan Cox <alan@redhat.com>

With some hand massaging from
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:58 -04:00
Alan Cox 9d2c7c75f8 sata_sil: First step to removing ->post_set_mode
Now that we have ata_do_set_mode() available for drivers to use we don't
actually need ->post_set_mode() as the driver can wrap set_mode nicely
and do stuff before or after (eg PCMCIA needs before), so we can kill off
a method in all the structs

While I was at it I added kernel-doc to the function involved.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:58 -04:00
Alan Cox 432729f0b0 libata-core: Fix the iordy methods
This alone isn't sufficient to save the universe from prehistoric disks
and controllers but it is a first important step. Split off a separate
function to provide a mode filter when controller iordy is not available.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:58 -04:00
Alan 04351821b4 pata: expose set_mode method so it can be wrapped
This splits set_mode into do_set_mode and the wrapper so that a driver can
call the standard method inside its own.  This in theory also obsoletes
->post_set_mode().

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:58 -04:00
Alan Cox fcc2f69a6f pata_hpt37x: Updates from drivers/ide work
Drag pata_hpt37x kicking and screaming in the direction of
drivers/ide/pci/hpt366.c and all the work that Sergei has been doing
there. Plenty left to be done but this is a good snapshot for folks to
work on and to review

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:58 -04:00
Jeff Garzik a73984a0d5 [libata] More PATA driver ->cable_detect support
Roll-up of ->cable_detect feature addition patches, authored and
signed-off-by Alan Cox.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:57 -04:00
Alan Cox fecfda5d88 pata_hpt366: support ->cable_detect
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:57 -04:00
Alan Cox 6bfed3fb03 pata_efar: support ->cable_detect
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:57 -04:00
Alan Cox 847086069c pata_atiixp: support ->cable_detect
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:57 -04:00
Alan Cox d36a76482c pata_radisys: support cable_detect
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:57 -04:00
Alan Cox 745975c052 pata_sc1200: restore cable type
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:57 -04:00
Alan Cox 2a25dfe4f4 pata_rz1000: support cable_detect
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:57 -04:00
Alan Cox 570cb62dee pata_platform: Add cable_detect method
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:57 -04:00
Alan Cox e2a9752a21 sata_promise: Switch to cable method, clean up some bits as a result
Signed-off-by: Alan Cox <number6@the-village.bc.nu>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:57 -04:00
Alan Cox 2e41e8e67a libata-core: fix comments on cable type
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:56 -04:00
Alan Cox 942d09470c libata: Restore Kconfig updated experimental levels and correct
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:56 -04:00
Alan Cox 7938a72db4 pata_cmd640: Multiple updates
Fix suspend/resume support
Write 0x5B to 0 not 0x5C

The former is important as we must kill the FIFO on a resume

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:56 -04:00
Alan Cox 97cb81c335 pata_via: Use cable_detect method
We end up shifting a few bits of logic around in this driver but the
basic change is the same.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:56 -04:00
Alan Cox 2e413f510f pata_sis: Clean up using cable_detect methods
This changeset revolves around the fact that all the SiS controllers have
the same enable bits, but differing cable detection methods. Previously
that meant each type had its own error_handler methods. Instead we can
now implement different ->cable_detect methods and share a single
error_handler which does the filtering by enable bits.

In addition we had some auto const arrays that should be static const. I'm
not sure if gcc already treats them intelligently but adding the static
will make sure.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:56 -04:00
Alan Cox 307c6054ad pata_marvell: Cable and reset fixes
There are two changes here. Firstly we switch to a cable detect method,
secondly the old code forgot to call ata_std_prereset() but somehow
managed to work anyway. Fix the missing call.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:56 -04:00
Alan Cox 5816fbbf22 pata_it8213: Cable detect
Another not-quite PIIX, another cable type conversion

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:56 -04:00
Jeff Garzik a0fcdc0259 [libata] Update several PATA drivers for new ->cable_detect hook
All patches authored and signed-off-by Alan Cox, sent on Mar 7, 2007.
I merely combined them all into a single patch.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:56 -04:00
Morrison, Tom 6a3d586d8e Support for Marvell 7042 Chip
Added Support for Marvell 7042 Chip - 7042 has same capabilities & behavior
as 6042.

Signed-off-by: Thomas A. Morrison <tmorrison@empirix.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:56 -04:00
Alan Cox b2248dac07 pata_cmd640: CMD640 PCI support
Support for the PCI CMD640 (not VLB)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:55 -04:00
Alan Cox be0d18dff5 libata: cable detection fixes
2.6.21-rc has horrible problems with libata and PATA cable types (and
thus speeds). This occurs because Tejun fixed a pile of other bugs and
we now do cable detect enforcement for drive side detection properly.

Unfortunately we don't do the process around cable detection right. Tejun
identified the problem and pointed to the right Annex in the spec, this patch
implements the rest of the needed changes.

We add a ->cable_detect() method called after the identify
sequence which allows a host to do host side detection at this point
should it wish, or to modify the results of the drive side identify.

This separate ->cable_detect method also cleans up a lot of code because
many drivers have their own error_handler methods which really just set
the cable type.

If there is no ->cable_detect method the cable type is left alone so a
driver setting it earlier (eg because it has the SATA flags set or
because it uses the old error_handler approach) will still do the right
thing (or at least the same thing) as before.

This patch simply adds the cable_detect method and helpers it doesn't use
them but other follow up patches will (ie Adrian please don't submit
patches to unexport them ;))

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:55 -04:00
Dmitriy Monakhov 5aea408df5 libata: handle ata_pci_device_do_resume() failure while resuming
Since commit:553c4aa630af7bc885e056d0436e4eb7f238579b
ata_pci_device_do_resume() can return error code, all callers was updated
except this one.

Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:55 -04:00
Robert Hancock 8343f88999 libata: warn if speed limited due to 40-wire cable
Warn the user if a drive's transfer rate is limited because of a 40-wire
cable detection.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:55 -04:00
Mark Lord f0ef88ed41 RESEND: libata: check cdb len per dev instead of per host
Resending, with s/printk/DPRINTK/ as pointed out by Alan.

Fix libata to perform CDB len validation per device
rather than per host.  This way, validation still works
when we have a mix of 12-byte and 16-byte devices on
a common host interface.

Signed-off-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:55 -04:00
Alan cd0d3bbcdd libata: dev_config does not need ap and adev passing
It used to be impossible to get from ata_device to ata_port but that is
no longer true. Various methods have been cleaned up over time but
dev_config still takes both and most users don't need both anyway. Tidy
this one up

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:55 -04:00
Jeff Garzik d88184fb23 [libata] sata_mv: clean up DMA boundary issues, turn on 64-bit DMA
The chips covered by sata_mv have a 32-bit DMA boundary they must not
cross, not a 64K boundary.  We are merely limited to a 64K maximum
segment size.  Therefore, the DMA scatter/gather table fill code can be
greatly simplified, and we need not cut in half the S/G table size as
reported to the SCSI layer.

Also, the driver forget to turn on 64-bit DMA at the PCI layer.  All
other data structures (both hardware and software) have been prepped for
64-bit PCI DMA.  It was simply never turned on.  <fingers crossed> let's
see if it still works...

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:55 -04:00
Jeff Garzik 43727fbc75 [libata] export sata_print_link_status()
To be used in sata_mv's exception handling code, and overall is a
generally useful function.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:54 -04:00
Jeff Garzik 351772658a [libata] sata_mv: remove extra braces
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 14:15:54 -04:00
Vitaly Wool b4cf205846 smc911x: fix compilation breakage wjen debug is on
the patch below fixes compilation breakage of smc911x driver when
ENABLE_SMC_DEBUG_PKTS equals to 1.

Signed-off-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:34:30 -04:00
Shani Moideen 1c0d6dcf88 [netdrvr] eexpress: minor corrections
A few corrections related to time_after and time_before in
drivers/net/eexpress.c as suggested by Marcin slusarz.

Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:05:43 -04:00
Mark Mason 693aa9470d add NAPI support to sb1250-mac.c
Patch to add NAPI support to sb1250-mac.c (rev 2).  This patch differs from
the last in that the NAPI support isn't marked as experimental, nor is it
configurable (ie.  once applied - NAPI is enabled all the time).  This was
based on feedback from Ralf and others.

Signed-off-by: Mark Mason <mason@broadcom.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:07 -04:00
Milind Arun Choudhary 55e924cf57 ixgb: ROUND_UP macro cleanup in drivers/net/ixgb
IXGB_ROUNDUP macro cleanup ,use ALIGN

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:07 -04:00
Milind Arun Choudhary 9099cfb917 e1000: ROUND_UP macro cleanup in drivers/net/e1000
E1000_ROUNDUP macro cleanup, use ALIGN

Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:07 -04:00
Krzysztof Halasa abf17ffda7 Generic HDLC sparse annotations
Sparse annotations, including two minor bugfixes.

Signed-off-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:07 -04:00
Jesse Brandeburg 27345bb684 e100: Optionally use I/O mode only to access register space
It appears that some systems still like e100 better if it uses
I/O access mode.  Setting the new parameter use_io=1 will cause
all driver instances to use io mapping to access the register
space on the e100 device.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:07 -04:00
Jesse Brandeburg 948cd43fed e100: allow bad MAC address when running with invalid eeprom csum
Seved Torstendahl <seved.torstendahl@netinsight.net> suggested to
let the module parameter for invalid eeprom checksum control the valid
mac address test.

If this bypass happens we should print a different message,
or at least one that is correct, maybe something like below

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:07 -04:00
Thomas Klein 1211bb6dcd ehea: fix for dlpar support
Certain resources may only be allocated when first logical port is available,
and must be removed when last logical port has been removed.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:06 -04:00
Thomas Klein d1dea38d54 ehea: fix for sysfs entries
Create symbolic link from each logical port to ehea driver

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:06 -04:00
Robert P. J. Day 3b0dc5c1cf 3C509: Remove unnecessary include of <linux/pm_legacy.h>
Remove the apparently redundant include of <linux/pm_legacy.h>.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:06 -04:00
Mithlesh Thukral 78403a929a NetXen: Fix for vmalloc issues
NetXen: Fix vmalloc errors on seen on some X86 high end machines.

Signed-off by: Milan Bag <mbag@netxen.com>
Acked-by: Mithlesh Thukral <mithlesh@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:06 -04:00
Mithlesh Thukral 6d1495f29a NetXen: Fixes for Power PC architecture
NetXen: Fix PPC architecture specific bugs
Fixes some issues seen on Big endian machines.

Signed-off by: Milan Bag <mbag@netxen.com>
Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:06 -04:00
Mithlesh Thukral 6c80b18df3 NetXen: Port swap feature for multi port cards
NetXen: Port Swap feature
This patch will allow a port numbers on the card to be swapped in
host driver. This feature is applicable to cards having more than
1 port.

Signed-off by: Milan Bag <mbag@netxen.com>
Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:06 -04:00
Mithlesh Thukral 5d512f5594 NetXen: Removal of redundant macros
NetXen: Remove 2 redundant macro definitions from header file.

Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:06 -04:00
Mithlesh Thukral 595e3fb8cf NetXen: Multi PCI support for Quad cards
NetXen: Fix the multi PCI function for cards with more than 2 ports.
This patch fixes the working of multi PCI capable driver on cards with
more than 2 ports by adding the addresses for their rings and sizes.

Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:05 -04:00
Mithlesh Thukral 13ba9c7714 NetXen: Removal of redundant argument passing
NetXen: Removal of redundant function call parameters and bug fixes.
This patch will remove the redundant paramters which were being passed to
many functions since now adapter->portnum can be used.

Signed-off-by: Mithlesh Thukral <mithlesh@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:05 -04:00
Mithlesh Thukral 3176ff3ee7 NetXen: Use multiple PCI functions
NetXen: Make driver use multiple PCI functions.
This patch will make NetXen driver work with multiple PCI functions. This will
make the usage of memory resources as well as interrupts more independent
among different functions which results in better throughput. This change has
been done after the multiport support is added in firmware.

Signed-off by: Mithlesh Thukral <mithlesh@netxen.com>

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:05 -04:00
Scott Feldman d52df4a35a [netdrvr e100] experiment with doing RX in a similar manner to eepro100
I was going to say that eepro100's speedo_rx_link() does the same DMA
abuse as e100, but then I noticed one little detail: eepro100 sets  both
EL (end of list) and S (suspend) bits in the RFD as it chains it  to the
RFD list.  e100 was only setting the EL bit.  Hmmm, that's  interesting.
That means that if HW reads a RFD with the S-bit set,  it'll process
that RFD and then suspend the receive unit.  The  receive unit will
resume when SW clears the S-bit.  There is no need  for SW to restart
the receive unit.  Which means a lot of the receive  unit state tracking
code in the driver goes away.

So here's a patch against 2.6.14.  (Sorry for inlining it; the mailer
I'm using now will mess with the word wrap).  I can't test this on
XScale (unless someone has an e100 module for Gumstix :) .  It should
be doing exactly what eepro100 does with RFDs.  I don't believe this
change will introduce a performance hit because the S-bit and EL-bit  go
hand-in-hand meaning if we're going to suspend because of the S- bit,
we're on the last resource anyway, so we'll have to wait for SW  to
replenish.
(cherry picked from 29e79da9495261119e3b2e4e7c72507348e75976 commit)
2007-04-28 11:01:05 -04:00
Randy Dunlap 32684ec616 mii: add kernel-doc notation
Add kernel-doc notation to drivers/net/mii.c functions.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:05 -04:00
Michael Ellerman 493a684ab8 Fix sparse errors in drivers/net/ibmveth.c
drivers/net/ibmveth.c:96:46: error: marked inline, but without a definition
drivers/net/ibmveth.c:96: warning: 'ibmveth_rxq_harvest_buffer' declared inline after being called
drivers/net/ibmveth.c:96: warning: previous declaration of 'ibmveth_rxq_harvest_buffer' was here

Just let the compiler decide, as it happens gcc 4.~ inlines it anyway.

drivers/net/ibmveth.c:957:71: warning: Using plain integer as NULL pointer
drivers/net/ibmveth.c:964:85: warning: Using plain integer as NULL pointer

Split the long lines as well, ugly, but < 80 columns.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:05 -04:00
Kim Phillips c2bcf00b43 ucc_geth: version 1.1
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:05 -04:00
Nicu Ioan Petru 3a8205ead4 ucc_geth: fixes for ucc_geth_memclean
The ucc_geth_memclean function can be called before the Tx BD rings, Rx
BD rings and associated socket buffers are allocated (for example if
ucc_fast_init fails). The current code doesn't check if p_tx_bd_ring[i]
is null, generating a kernel panic when trying to free the associated
socket buffers.

The function can also fail when accessing the uninitialized list_head
structures ugeth->group_hash_q and ugeth->ind_hash_q. In the current
implementation the list heads are initialized only when
maxGroupAddrInHash and maxIndAddrInHash are positive values, although I
think it's better to always initialize them.

Signed-off-by: Ionut Nicu <ionut.nicu@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:05 -04:00
Michael Reiss d5b9049df2 ucc_geth: Implement Transmit on Demand support
Transmit on Demand: Fix spelling in config option, and make it actually enable TOD.

Signed-off-by: Michael Reiss <michael.f.reiss@freescale.com>
Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:04 -04:00
Michael Barkowski 7563907eb8 ucc_geth: Fix interrupt coalescing size and alignment
The rx interrupt coalescing table alignment was "guessed" to be 4,
but should be 64. The size should be 8 * number of queues + 4.
Verified in the MPC8323E manual.

Signed-off-by: Michael Barkowski <Michael.Barkowski@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:04 -04:00
Michael Reiss 702ff12ce7 ucc_geth: NAPI-related bug fixes
Based partly on the gianfar driver, this patch fixes several
bugs which were causing NAPI to be completely unusable.
* An IRQ is still needed in NAPI, to kick off NAPI task,
  and for Tx processing.  Request the IRQ.
* If rx_work_limit = 0 we are not complete.
* While running Rx NAPI processing we must mask Rx events,
  including Rx busy.
* ucc_geth_rx function does not need a lock.
  Could lead to deadlock in NAPI case.
* There's no need to loop reading ucce multiple times in the ISR,
  so while adding the call to schedule NAPI which was not there,
  simplify the event processing into if-else format.
* Rx Busy now kicks off NAPI processing, while still
  being counted as an error.

Signed-off-by: Michael Reiss <michael.f.reiss@freescale.com>
Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:04 -04:00
Kim Phillips 728de4c927 ucc_geth: migrate ucc_geth to phylib
migrate ucc_geth to use the common phylib code.

There are several side effects from doing this:

o deprecate 'interface' property specification present
  in some old device tree source files in
  favour of a split 'max-speed' and 'interface-type'
  description to appropriately match definitions
  in include/linux/phy.h.  Note that 'interface' property
  is still honoured if max-speed or interface-type
  are not present (backward compatible).
o compile-time CONFIG_UGETH_HAS_GIGA is eliminated
  in favour of probe time speed derivation logic.
o adjust_link streamlined to only operate on maccfg2
  and upsmr.r10m, instead of reapplying static initial
  values related to the interface-type.
o Addition of UEC MDIO of_platform driver requires
  platform code add 'mdio' type to id list
  prior to calling of_platform_bus_probe (separate patch).
o ucc_struct_init introduced to reduce ucc_geth_startup
  complexity.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:04 -04:00
Daniel Drake 5d082fe85b [PATCH] zd1211rw: Add ID for ZyXEL AG-220
Tested by Christoph Sager and Tomas Klas

zd1211b chip 0586:3412 v4810 high 00-13-49 AL7230B_RF pa0 g----

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:04 -04:00
Daniel Drake ba528c4587 [PATCH] zd1211rw: Add AL7230B RF support for ZD1211B
This patch adds support for some new ZD1211B devices which ship with
the AL7230B RF.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:04 -04:00
Daniel Drake 72018b223d [PATCH] zd1211rw: rework band edge patching
This change allows RF drivers to provide their own 6M band edge patching
implementation, while providing a generic implementation shared by most
currently supported RF's.

The upcoming ZD1211B/AL7230B code will use this to define its own
patching function, which is different from the other RF configurations.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:03 -04:00
Daniel Drake dc536a7069 [PATCH] zd1211rw: Remove invalid CR write during ZD1211 phy reset
The vendor driver only does the CR123 write for non-USB devices (which
don't exist on the consumer market)

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:03 -04:00
Marcin Juszkiewicz 25ac6c2627 [PATCH] hostap_cs: support ADLINK 345 CF
Add ADLINK 345 CF card into hostap_cs

product info: "ADLINK 345 CF"
 manfid 0xd601, 0x0005

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:03 -04:00
Larry Finger 3a5c393e6f [PATCH] bcm43xx: Change initialization for 2050 radios
This patch implements the changes in the specifications for
2050radio_init that were recently posted.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:03 -04:00
Adrian Bunk b1fc1fa9b3 make drivers/net/qla3xxx.c:PHY_DEVICES[] static
On Fri, Mar 30, 2007 at 01:05:59AM -0700, Andrew Morton wrote:
>...
> Changes since 2.6.21-rc5-mm2:
>...
>  git-netdev-all.patch
>...
>  git trees
>...

This patch makes the needlessly global PHY_DEVICES[] static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:03 -04:00
Ramkrishna Vepa 3ef34b807d S2io: Change of driver maintainers
- Changed the maintainers for the S2io driver.

Signed-off-by: Ramkrishna Vepa <ram.vepa@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:03 -04:00
Shani d7ef45b049 Patch:replace with time_after in drivers/net/eexpress.c
Replacing with time_after in drivers/net/eexpress.c
Applies and compiles clean on latest tree.Not tested.

Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:03 -04:00
Jan-Bernd Themann acbddb591b ehea: removing unused functionality
This patch includes:
- removal of unused fields in structs
- ethtool statistics cleanup
- removes unsed functionality from send path

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:02 -04:00
Gabriel Paubert 144213d71c mv643xx_eth: make eth_port_uc_addr_{get,set}() calls symmetric
There is no good reason for the asymmetry in the parameters of
eth_port_uc_addr_get() and eth_port_uc_addr_set().  Make them
symmetric.  Remove some gratuitous block comments while we're here.

Signed-off-by: Gabriel Paubert <paubert@iram.es>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:02 -04:00
Ron Mercer 201f27e625 qla3xxx: Bumping driver version number to v2.03.00-k4
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:02 -04:00
Ron Mercer 3efedf2e5b qla3xxx: Adding support for the Agere PHY (ET1011C)
This PHY support patch was written by Benjamin Li.
Signed-off-by: Benjamin Li <benjamin.li@qlogic.com>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:02 -04:00
Ron Mercer ec8263839a qla3xxx: Add ethtool get_pauseparam for improved bonding support.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:02 -04:00
Robert P. J. Day f930e46a85 remove unused header file: drivers/net/skfp/h/lnkstat.h
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:02 -04:00
Folkert van Heusden 939456ac51 baycom_ser_fdx: also allow i/o ports >= 0x1000 and enhanced failure logging
The baycom_ser_fdx driver did not allow i/o ports >= 0x1000.  Now that
there are pci cards (with rs232 ports) which use for example 0xb800 this
limit should not exists.

Also, for non kernel coders find the cause of problems was challenging so I
added extra logging.

Signed-off-by: Folkert van Heusden <folkert@vanheusden.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:02 -04:00
Jean Delvare 4eccccb362 strlcpy is smart enough
strlcpy already accounts for the trailing zero in its length
computation, so there is no need to substract one to the buffer size.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jan-Bernd Themann <themann@de.ibm.com>
Cc: Thomas Klein <osstklei@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:02 -04:00
Daniel Drake a3fa3aba7a [PATCH] zd1211rw: Add another ID for Linksys WUSBF54G
Tested by TiCPU on irc

zd1211 chip 13b1:001e v4802 high 00-14-bf AL2230_RF pa0 g---

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:02 -04:00
Daniel Drake 44713b1da5 [PATCH] zd1211rw: Don't handle broken frames in monitor mode
Using monitor mode, Johannes Berg observed out that lots of corrupted
and otherwise invalid frames were being passed to the host.

When in monitor mode we were disabling the hardware filtering here, but
this is not how monitor mode should work.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:01 -04:00
Daniel Drake d2d7c05210 [PATCH] zd1211rw: Mark some data const
This is a backport of Helge Deller's recent patch for wireless-dev.git

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:01 -04:00
Jouni Malinen 85d32e7b0e [PATCH] Update my email address from jkmaline@cc.hut.fi to j@w1.fi
After 13 years of use, it looks like my email address is finally going
to disappear. While this is likely to drop the amount of incoming spam
greatly ;-), it may also affect more appropriate messages, so let's
update my email address in various places. In addition, Host AP mailing
list is subscribers-only and linux-wireless can also be used for
discussing issues related to this driver which is now shown in
MAINTAINERS.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:01 -04:00
Jan-Bernd Themann e542aa6bd5 ehea: code cleanup
This patch includes:

- code cleanup related to resource management
- extended error data gathering for resource management
- removing trailing whitespaces

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:01 -04:00
Jan-Bernd Themann 1eef4e04c9 ehea: fix for dynamic lpar support
The patch fixes bugs related to the probe / remove adapter
functionality (handling of OFDT nodes)

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:01 -04:00
Deepak Saxena d683001828 Netpoll support for Sibyte MAC
NETPOLL support for Sibyte MAC

Signed-off-by: Manish Lachwani <mlachwani@mvista.com>
Signed-off-by: Deepak Saxena <dsaxena@mvista.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:01 -04:00
Ramkrishna Vepa 0c61ed5fe2 S2io: Remove unused variables
- Remove unused variables from s2io_nic structure

- Changed the memory failure printk messages to print only in debug mode

- Updated the copyright messages

(Resending; due to patch being corrupted)

Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:01 -04:00
Ralf Baechle 1e2b980fdf MIPSnet: Modernize use platform_device API.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:01 -04:00
Stephen Hemminger a5f8f3b6c9 skge: version 1.11
New version to track changes.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:00 -04:00
Stephen Hemminger 3f0dec7f60 skge: rearrange fields
Do some minor rearrangement of data structures to try and optimize
cache usage.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:00 -04:00
Stephen Hemminger 992c9623b1 skge: transmit locking improvements
Don't need to lock when processing transmit complete unless queue fills.
Modeled after tg3.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:00 -04:00
Stephen Hemminger 7e0038a414 skge: ignore unused error interrupts
The following hardware error bits only show up on Genesis chipset
and are handled elsewhere, so they can be masked off.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:01:00 -04:00
Tony Breeds d2f11e0991 [PATCH] libertas: use standard kernel macros
Cleanup drivers/net/wireless/libertas/debugfs.c to use standard kernel
macros and functions.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:00 -04:00
Michal Schmidt af5b5c9aa9 [PATCH] airo: Make /sys/bus/pci/drivers/airo/{,un}bind work
The way airo.c keeps track of all its devices is complicated and buggy
as well (del_airo_dev forgets to free the memory add_airo_dev allocates).
It's cleaner to use the standard list primitives.
While we're at it, it's not necessary to put PCI cards in the list, because
the kernel already keeps track of them. We can take advantage of it and
use the .remove callback as it was meant to be.
This makes /sys/bus/pci/drivers/airo/{,un}bind work.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:00 -04:00
Michal Schmidt fd48f8d3a3 [PATCH] airo: Don't check for NULL before kfree()
It's unnecessary to check for NULL before calling kfree().

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:01:00 -04:00
Larry Finger aa93c85d09 [PATCH] bcm43xx:Eliminate some 'G Mode Enable' magic numbers
In code manipulating the TM State Low register of 802.11 cores, two
different magic numbers are used to reference the 'G Mode Enable' bit.
One of these, 0x20000000, is clear, but the other, (0x800 << 18), is not.
This patch replaces both types with a defined constant. In addition, two
bits in the TM State High registers are given definitions to help in
following the code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:00:59 -04:00
Daniel Drake aec91028db [PATCH] zd1211rw: More device IDs
ASUS A9Rp
Tested by Serge
zd1211b chip 0b05:171b v4802 high 00-17-31 AL2230_RF pa0 g--

ZyXEL G-202
Tested by Marcus D. Hanwell
zd1211b chip 0586:3410 v4810 high 00-13-49 AL2230_RF pa0 g---

US Robotics USR805423
Tested by Pascal S. de Kloe
FCC ID: RAXWN4501H
zd1211b chip 0baf:0121 v4810 high 00-14-c1 AL2230_RF pa0 g--N
Julien Pinon reports this also comes in AL2230S form

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:00:59 -04:00
Daniel Drake f2a81a161d [PATCH] zd1211rw: Add AL2230S RF support
ZD1211 appears to be back in production: a number of new devices have
been appearing! Some of them are using new radios.

This patch adds support for the next generation AL2230 RF chip which has
been spotted in a few new devices.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:00:59 -04:00
Daniel Drake 832855dc5a [PATCH] zd1211rw: Use compare_ether_addr()
Suggested by Maxime Austruy, based on mac80211 changes from Stephen
Hemminger

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28 11:00:59 -04:00
Valerie Henson 6bab99be91 Rev tulip version
Rev tulip version... things have changed since 2002!

Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:59 -04:00
Valerie Henson 1ddb98618d Fix tulip SytemError typo
Fix an annoying typo - SytemError -> SystemError

Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:59 -04:00
Thibaut VARENE eb117b1786 TULIP: Natsemi dp83840a PHY fix
Fix a problem with Tulip 21142 HP branded PCI cards (PN#: B5509-66001),
which feature a NatSemi DP83840A PHY.

Without that patch, it is impossible to properly initialize the card's PHY,
and it's thus impossible to monitor/configure it.

[VAL: I'm happy with the 1.5 ms max delay; it doesn't seem excessive.]

Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:58 -04:00
Valerie Henson b3bff39a2b TULIP: Fix for 64-bit MIPS
From: Jim Gifford <maillist@jg555.com>, Grant Grundler <grundler@parisc-linux.org>, Peter Horton <pdh@colonel-panic.org>

With Grant's help I was able to get the tulip driver to work with 64 bit
MIPS.

[VAL: I'm happy with the 1.5 ms max delay; it doesn't seem excessive.]

Signed-off-by: Valerie Henson <val_henson@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:58 -04:00
Atsushi Nemoto c28896a424 tc35815: Zap changelog from source code
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:58 -04:00
Atsushi Nemoto 793bc0afbd tc35815: Fix an usage of streaming DMA API.
The tc35815 driver lacks a call to pci_dma_sync_single_for_device() on
receiving.  Recent fix of MIPS dma_sync_single_for_cpu() reveal this
bug.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:58 -04:00
Don Fry 1e56a4b402 pcnet32: change to use netdev_priv
use netdev_priv() instead of dev->priv

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Don Fry <pcnet32@verizon.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:58 -04:00
Don Fry 6ecb766710 pcnet32: only allocate init_block dma consistent
The patch below moves the init_block out of the private struct and
only allocates init block with pci_alloc_consistent.

This has two effects:

1. Performance increase for non cache coherent machines, because the
   CPU only data in the private struct are now cached

2. locks are working now for platforms, which need to have locks
   in cached memory

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Acked-by: Don Fry <pcnet32@verizon.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:58 -04:00
Ahmed S. Darwish 1c8816c6fe ixgb: Use ARRAY_SIZE macro when appropriate.
Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:58 -04:00
Ramkrishna Vepa 363dc36733 S2IO: Save/Restore unused buffer mappings in 2/3 buffer mode
- Save/Restore unused buffer mappings in 2/3 buffer mode to avoid
frequent mapping

- Save/Restore adapter reset count during adapter reset

  (Resending; forgot to cc netdev)

Signed-off-by: Santosh Rastapur <santosh.rastapur@neterion.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:58 -04:00
Yan Burman 1c7e5b125a e1000: Use kcalloc()
Replace kmalloc+memsetout the driver. Slightly modified by Auke Kok.

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:57 -04:00
Ahmed S. Darwish c38db30b22 e1000: Use ARRAY_SIZE macro when appropriate
A patch to use ARRAY_SIZE macro already defined in kernel.h.

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:57 -04:00
Shan Lu 024a0a3cfb network: add the missing phy_device speed information to phy_mii_ioctl
Function `phy_mii_ioctl' returns physical device's information based on
user requests.  When requested to return the basic mode control register
information (BMCR), the original implementation only returns the physical
device's duplex information and forgets to return speed information, which
should not be because BMCR register is used to hold both duplex and speed
information.

The patch checks the BMCR value against speed-related flags and fills the
return structure's speed field accordingly.

Signed-off-by: Shan <shanlu@cs.uiuc.edu>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:57 -04:00
Dmitriy Monakhov 2b272221ad sk98lin: handle pci_enable_device() return value in skge_resume()
Signed-off-by: Monakhov Dmitriy <dmonakhov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:57 -04:00
Maxim Levitsky f1069046b4 dmfe: add support for Wake on lan
Add support for WOL on Magic Packet and on link change

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Valerie Henson <val_henson@linux.intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:57 -04:00
Maxim Levitsky bc8a8387ba dmfe: add support for suspend/resume
This adds support for suspend resume

[akpm@linux-foundation.org: fix CONFIG_PM=n, coding style]
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Valerie Henson <val_henson@linux.intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:57 -04:00
Randy Dunlap b3df0da886 phy layer: add kernel-doc + DocBook
Convert function documentation in drivers/net/phy/ to kernel-doc
and add it to DocBook.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:57 -04:00
Arjan van de Ven 56e1393f82 user of the jiffies rounding code: e1000
Use the round_jiffies() function in e1000.

These timers all were of the "about once a second" or "about once every X
seconds" variety and several showed up in the "what wakes the cpu up" profiles
that the tickless patches provide.  Some timers are highly dynamic based on
network load; but even on low activity systems they still show up so the
rounding is done only in cases of low activity, allowing higher frequency
timers in the high activity case.

The various hardware watchdogs are an obvious case; they run every 2 seconds
but aren't otherwise specific of exactly when they need to run.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Auke Kok <auke-jan.h.kok@intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:57 -04:00
Atsushi Nemoto eea221ce48 tc35815 driver update (take 2)
Current tc35815 driver is very obsolete and less maintained for a long
time.  Replace it with a new driver based on one from CELF patch
archive.

Major advantages of CELF version (version 1.23, for kernel 2.6.10) are:

* Independent of JMR3927.
  (Actually independent of MIPS, but AFAIK the chip is used only on
   MIPS platforms)
* TX4938 support.
* 64-bit proof.
* Asynchronous and on-demand auto negotiation.
* High performance on non-coherent architecture.
* ethtool support.
* Many bugfixes and cleanups.

And improvoments since version 1.23 are:

* TX4939 support.
* NETPOLL support.
* NAPI support. (disabled by default)
* Reduce memcpy on receiving.
* PM support.
* Many cleanups and bugfixes.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:56 -04:00
Adrian Bunk 3664006ab9 drivers/net/qla3xxx.c: make 2 functions static
This patch makes two needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:56 -04:00
Adrian Bunk 7b49034399 make drivers/net/s2io.c:vlan_strip_flag static
This patch makes the needlessly global vlan_strip_flag static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:56 -04:00
Ladislav Michl 78ee5b3cc8 Add support for Seeq 8003 on Challenge S Mezz board.
Thanks to Jö Fahlke for donating hardware.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

Forward porting of Ladis' 2.4 patch.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:56 -04:00
Jan-Bernd Themann 18604c5485 ehea: NAPI multi queue TX/RX path for SMP
This patch provides a functionality that allows parallel
RX processing on multiple RX queues by using dummy netdevices.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:56 -04:00
Jan-Bernd Themann 1acf2318dd ehea: dynamic add / remove port
This patch introduces functionality to dynamically add / remove
ehea ports via an userspace DLPAR tool. It creates a subnode for
each logical port in the sysfs.

Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:56 -04:00
Stephen Hemminger 459e536b1d chelsio: use const for virtual functions
There are several uses of _ops structure in this driver that
can be converted to const.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-28 11:00:56 -04:00