Archived
14
0
Fork 0
Commit graph

27283 commits

Author SHA1 Message Date
Tejun Heo
f5914a461e [PATCH] libata-hp-prep: add prereset() method and implement ata_std_prereset()
With hotplug, every reset might be a probing reset and thus something
similar to probe_init() is needed.  prereset() method is called before
a series of resets to a port and is the counterpart of postreset().
prereset() can tell EH to use different type of reset or skip reset by
modifying ehc->i.action.

This patch also implements ata_std_prereset().  Most controllers
should be able to use this function directly or with some wrapping.
After hotplug, different controllers need different actions to resume
the PHY and detect the newly attached device.  Controllers can be
categorized as follows.

* Controllers which can wait for the first D2H FIS after hotplug.
  Note that if the waiting is implemented by polling TF status, there
  needs to be a way to set BSY on PHY status change.  It can be
  implemented by hardware or with the help of the driver.

* Controllers which can wait for the first D2H FIS after sending
  COMRESET.  These controllers need to issue COMRESET to wait for the
  first FIS.  Note that the received D2H FIS could be the first D2H
  FIS after POR (power-on-reset) or D2H FIS in response to the
  COMRESET.  Some controllers use COMRESET as TF status
  synchronization point and clear TF automatically (sata_sil).

* Controllers which cannot wait for the first D2H FIS reliably.
  Blindly issuing SRST to spinning-up device often results in command
  issue failure or timeout, causing extended delay.  For these
  controllers, ata_std_prereset() explicitly waits ATA_SPINUP_WAIT
  (currently 8s) to give newly attached device time to spin up, then
  issues reset.  Note that failing to getting ready in ATA_SPINUP_WAIT
  is not critical.  libata will retry.  So, the timeout needs to be
  long enough to spin up most devices.

LLDDs can tell ata_std_prereset() which of above action is needed with
ATA_FLAG_HRST_TO_RESUME and ATA_FLAG_SKIP_D2H_BSY flags.  These flags
are PHY-specific property and will be moved to ata_link later.

While at it, this patch unifies function typedef's such that they all
have named arguments.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:48 +09:00
Tejun Heo
d7bb4cc757 [PATCH] libata-hp-prep: implement sata_phy_debounce()
With hotplug, PHY always needs to be debounced before a reset as any
reset might find new devices.  Extract PHY waiting code from
sata_phy_resume() and extend it to include SStatus debouncing.  Note
that sata_phy_debounce() is superset of what used to be done inside
sata_phy_resume().

Three default debounce timing parameters are defined to be used by
hot/boot plug.  As resume failure during probing will be properly
handled as errors, timeout doesn't have to be long as before.
probeinit() uses the same timeout to retain the original behavior.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:46 +09:00
Tejun Heo
a9beec9535 [PATCH] libata-hp-prep: make probing related functions global
Hotplug will be implemented in libata-eh.c.  Make ata_dev_read_id()
and ata_dev_configure() global.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:44 +09:00
Tejun Heo
453b07accb [PATCH] libata-hp-prep: add ata_aux_wq
It's best to run ATA hotplug from EH but attaching SCSI devices needs
working EH.  ata_aux_wq is used to give SCSI hotplug operations a
separate context.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:42 +09:00
Tejun Heo
3edebac41b [PATCH] libata-hp-prep: store attached SCSI device
Add device persistent field dev->sdev and store the attached SCSI
device.  With hotplug, libata needs to know the attached SCSI device
to offline and detach it, but scsi_device_lookup() cannot be used
because libata will reuse SCSI ID numbers - dead but not gone devices
(due to zombie opens, etc...) interfere with the lookup.

dev->sdev doesn't hold reference to the SCSI device.  It's cleared
when the SCSI device goes away.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:40 +09:00
Tejun Heo
5a04bf4bef [PATCH] libata-hp-prep: implement ap->hw_sata_spd_limit
Add ap->hw_sata_spd_limit and initialize it once during the boot
initialization (or driver load initialization).  ap->sata_spd_limit is
reset to ap->hw_sata_spd_limit on hotplug.  This prevents spd limits
introduced by earlier devices from affecting new devices.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:38 +09:00
Tejun Heo
315343637b [PATCH] libata-hp-prep: use __ata_scsi_find_dev()
Convert direct sdev -> dev lookup to __ata_scsi_find_dev().

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:36 +09:00
Tejun Heo
ab5b3a5b2d [PATCH] libata-hp-prep: update ata_scsi_find_dev() and friends
Separate out ata_find_dev() and __ata_scsi_find_dev() from
ata_scsi_find_dev().  These will be used by later hotplug
implementation.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:34 +09:00
Tejun Heo
72fa4b742b [PATCH] libata-hp-prep: make some ata_device fields persistent
Lifetimes of some fields span over device plugging/unplugging.  This
patch moves such persistent fields to the top of ata_device and
separate them with ATA_DEVICE_CLEAR_OFFSET.  Fields above the offset
are initialized once during host initializatino while all other fields
are cleared before hotplugging.  Currently ->ap, devno and part of
flags are persistent.

Note that flags is partially cleared while holding host_set lock.
This is to synchronize with later warm plug implementation which will
record hotplug request in dev->flags.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:32 +09:00
Tejun Heo
3ef3b43d56 [PATCH] libata-hp-prep: implement ata_dev_init()
Move initialization of struct ata_device into ata_dev_init() in
preparation for hotplug.  This patch calls ata_dev_init() from
ata_host_init() and thus makes no functional difference.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:30 +09:00
Tejun Heo
abdda7331d [PATCH] libata-hp-prep: add flags and eh_info/context fields for hotplug
Add hotplug related flags and eh_info/context fields.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:29 +09:00
Tejun Heo
c6cf9e99d1 [PATCH] libata: implement ata_eh_wait()
Implement ata_eh_wait().  On return from this function, it's
guaranteed that the EH which was pending or in progress when the
function was called is complete - including the tailing part of SCSI
EH.  This will be used by hotplug and others to synchronize with EH.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:27 +09:00
Tejun Heo
7395acb2c8 [PATCH] libata: shift host flag constants
Nudge host flag constants to make a room after ATA_FLAG_EH_PENDING.
New EH flag will be added.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:25 +09:00
Tejun Heo
20952b6990 [PATCH] libata: set PIO-0 after successful EH reset
Set ata_device->pio_mode to XFER_PIO_0 after a successful reset.  This
is to keep EH resets consistent with probe resets as updated by the
commit b6079ca409.  Note that, with
soon-to-follow hotplug update, EH resets will include probe resets.

Signed-off-by: Tejun Heo <htejun@gmail.com>
2006-05-31 18:27:23 +09:00
Borislav Petkov
ef2824073f libata debugging: set initial dbg value
This patch sets the prerequisites for the new debugging scheme that more or
less resembles Donald Becker's net driver example. This one liner doesn't
change any functionality beside setting the appropriate debug level for the
msg_enable control in the ata_port struct, which will be later used by the
ata_msg_* macros to control the amount of debug information sent to printk.

Signed-off-by: <petkov@uni-muenster.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-29 01:06:23 -04:00
Jeff Garzik
89f8185e9b Merge branch 'master' into upstream 2006-05-29 01:03:37 -04:00
Linus Torvalds
d9ec5ad24c Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] the latest consensus libata resume fix
2006-05-28 16:35:52 -07:00
Paul Mackerras
b82e8005af ppc: Fix typo in TI_LOCAL_FLAGS definition
A typo crept in with commit ea1e847cc2
which defined TI_LOCAL_FLAGS to be the offset of the `flags' field
of struct thread_info, rather than the `local_flags' field.  This
fixes it.  The typo was pointed out by Guennadi Liakhovetski.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-05-29 08:42:34 +10:00
Jeff Garzik
e42d7be25c Merge branch 'upstream-fixes' into upstream
Conflicts:

	drivers/scsi/libata-core.c
2006-05-28 16:32:59 -04:00
Mark Lord
0737ac895a [PATCH] the latest consensus libata resume fix
Okay, just to sum things up.

This forces libata to wait for up to 2 seconds for BUSY|DRQ to clear
on resume before continuing.

[jgarzik adds...]  During testing we never saw DRQ asserted, but
nonetheless (a) this works and (b) testing for DRQ won't hurt.

Signed-off-by:  Mark Lord <liml@rtr.ca>
Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-28 16:32:08 -04:00
Linus Torvalds
371858568e Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [PATCH] powerpc: fix RTC/NVRAM accesses on Maple
  [PATCH] ppc32 CPM_UART: various fixes for pq2 uart users
  [PATCH] powerpc: linuxppc64.org no more
2006-05-27 09:40:40 -07:00
Alan Cox
75e995855f [PATCH] libata: add pio_data_xfer_noirq
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 22:02:23 -04:00
Alan Cox
622b20fcb8 [PATCH] PCI identifiers for the pata_via update
These IDs are also used by the drivers/ide/pci changes submitted by
VIA.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 22:02:23 -04:00
Jeff Garzik
e82b0f2cc2 [netdrvr s/390] trim trailing whitespace
Previous fix patches added a bunch of trailing whitespace,
which git-applymbox complained loudly about.
2006-05-26 21:58:38 -04:00
Klaus Wacker
74ef872c8f [PATCH] s390: lcs driver bug fixes and improvements [2/2]
This is the second lcs driver patch containing the rest of lcs fixes.

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:57:45 -04:00
Klaus Wacker
27eb5ac8f0 [PATCH] s390: lcs driver bug fixes and improvements [1/2]
Several problems occured with lcs device driver:
	 - device not operational anymore after cable pull/plug-in.
       	 - unpredictable results occured, e.g. kernel panic
	   using cards of type QD8F.
	 - STOPLAN and delete multicast address command
           were not proper recognized by OSA card under heavy network workload.
       	 - channel/device error checks missing in interrupt handler.
	To fix all problems at once recovery of lcs devices has been improved.
	missing error checks in lcs interrupt handler has been added.
	Once a hardware problem occurs lcs will recover the device now properly.

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:57:45 -04:00
Ursula Braun
ba1aa084d6 [PATCH] s390: qeth driver fixes
From: Frank Blaschka <Frank.Blaschka@de.ibm.com>
From: Frank Pavlic <fpavlic@de.ibm.com>

        - fix fake_ll during initial device bringup. fake_ll was
	  not active after first start of the device.
	  Problem only occured when qeth was built without IPV6 support.
        - avoid skb usage after invocation of qeth_flush_buffers,
	  because skb might already be freed.
        - remove yet another useless netif_wake_queue in
	  qeth_softsetup_ipv6 since this function is only called
	  when device is going online. In this case card->state will
	  never be in state UP. So let the net_device queue down .

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:56:41 -04:00
Ursula Braun
b85e1fa196 [PATCH] s390: qeth driver fixes
From: Frank Pavlic <fpavlic@de.ibm.com>

	- correct checking of sscanf-%n value in qeth_string_to_ipaddr().
	- don't use netif_stop_queue outside the hard_start_xmit routine.
	  Rather use netif_tx_disable.
	- don't call qeth_netdev_init on a recovery.

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:56:40 -04:00
Cornelia Huck
7401a4670f [PATCH] s390: minor fix in cu3088
In case of a parse error for the cu3088 group attribute,
return -EINVAL instead of count.

Signed-off-by: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:56:40 -04:00
Don Fry
a24b163b7c [PATCH] pcnet32: remove incorrect pcnet32_free_ring
During a code scan for another change I discovered that this call to
pcnet32_free_ring must be removed.  If the open fails due to a lack of
memory all the ring structures are removed via the call to free_ring
and a subsequent call to open will dereference a null pointer in
pcnet32_init_ring.

Please apply to 2.6.17.

Signed-off-by:  Don Fry <brazilnut@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:33:18 -04:00
Auke Kok
80871e63e4 e1000: add shutdown handler back to fix WOL
Someone was waaay too aggressive and removed e1000's reboot notifier
instead of porting it to the new way of the shutdown handler.  This change
broke wake on lan.  Add the shutdown handler back in using the same method
as e100 uses.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>

(cherry picked from c653e6351e commit)
2006-05-26 21:31:56 -04:00
Jeff Garzik
835d39fcb5 Merge branch 'master' into upstream 2006-05-26 21:30:38 -04:00
Albert Lee
89bad5892a [PATCH] libata: add back ->data_xfer to ata_piix.c
Add back ->data_xfer and ->mode_filter to ata_piix.c.

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-26 21:30:12 -04:00
Jeff Garzik
8fc29ba65b Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes 2006-05-26 21:26:22 -04:00
Linus Torvalds
ecd68853b8 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:
  [NET]: dev.c comment fixes
  [IPV6] ROUTE: Don't try less preferred routes for on-link routes.
  [IRDA]: *_DONGLE should depend on IRTTY_SIR
  [MAINTAINERS]: Add entry for netem
2006-05-26 15:13:33 -07:00
Stephen Hemminger
3041a06909 [NET]: dev.c comment fixes
Noticed that dev_alloc_name() comment was incorrect, and more spellung
errors.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-26 13:25:24 -07:00
YOSHIFUJI Hideaki
4d0c591166 [IPV6] ROUTE: Don't try less preferred routes for on-link routes.
In addition to the real on-link routes, NONEXTHOP routes
should be considered on-link.

Problem reported by Meelis Roos <mroos@linux.ee>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Acked-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-05-26 13:23:41 -07:00
Randy Dunlap
4541a5db0b [PATCH] arlan: fix section mismatch warnings
Fix section mismatch warnings:
WARNING: drivers/net/wireless/arlan.o - Section mismatch: reference to
.init.text:arlan_probe from .text between 'init_module' (at offset
0x3526) and 'cleanup_module'
WARNING: drivers/net/wireless/arlan.o - Section mismatch: reference to
.init.text:init_arlan_proc from .text between 'init_module' (at offset
0x3539) and 'cleanup_module'
WARNING: drivers/net/wireless/arlan.o - Section mismatch: reference to
.exit.text:cleanup_arlan_proc from .text between 'cleanup_module' (at
offset 0x356c) and 'arlan_diagnostic_info_string'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-26 16:11:56 -04:00
Randy Dunlap
53072d68cc [PATCH] wavelan: fix section mismatch
Fix section mismatch warning:
WARNING: drivers/net/wireless/wavelan.o - Section mismatch: reference to
.init.text: from .text between 'init_module' (at offset 0x371e) and
'cleanup_module'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-05-26 16:11:56 -04:00
Kylene Jo Hall
087377a430 [PATCH] tpm: fix bug for TPM on ThinkPad T60 and Z60
The TPM chip on the ThinkPad T60 and Z60 machines is returning 0xFFFF for
the vendor ID which is a check the driver made to double check it was
actually talking to the memory mapped space of a TPM.  This patch removes
the check since it isn't absolutely necessary and was causing device
discovery to fail on these machines.

Signed-off-by: Kylene Hall <kjhall@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:47 -07:00
Randy Dunlap
5d5daa162a [PATCH] scx200_acb: fix section mismatch warning
WARNING: drivers/i2c/busses/scx200_acb.o - Section mismatch: reference to
.init.text: from .text after 'scx200_add_cs553x' (at offset 0x528)

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
Ben Dooks
ac88bcff2f [PATCH] s3c24xx: fix spi driver with CONFIG_PM
Fix compile bug with the S3C24XX SPI driver when CONFIG_PM is set.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
Johannes Berg
0fba3a1f39 [PATCH] PowerMac: force only suspend-to-disk to be valid
For a very long time, echoing 'standby' or 'mem' into /sys/power/state has
killed the machine on powerpc.  This patch fixes that.

This patch adds the .valid callback to pm_ops on PowerMac so that only the
suspend to disk state can be entered.  Note that just returning 0 would
suffice since the upper layers don't pass PM_SUSPEND_DISK down, but we
handle it there regardless just in case that changes.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
Florin Malita
3ac8141366 [PATCH] affs: possible null pointer dereference in affs_rename()
If affs_bread() fails, the exit path calls mark_buffer_dirty_inode() with a
NULL argument.

Coverity CID: 312.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
David Brownell
9084533e79 [PATCH] ads7846 conversion accuracy
This improves accuracy of the touchscreen and hwmon sensor readings,
addressing an issue noted by Imre Deak: there's an extra bit written before
the sample (12 bits) gets written out.

It also catches up to various comments, and makes the /proc/interrupts
entry sensible again.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Imre Deak <imre.deak@nokia.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Dmitry Torokhov <dtor_core@ameritech.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
Jens Axboe
f09de595b5 [PATCH] x86: wire up vmsplice syscall
Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
Paul Mackerras
6bf08cb246 [PATCH] Add CMSPAR to termbits.h for powerpc and alpha
Some driver wants to use CMSPAR, but it was missing on alpha and powerpc.
This adds it, with the same value as every other architecture uses.

(akpm: fixes the build of an upcoming gregkh USB patch)

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:55:46 -07:00
Neil Brown
c71d48877e [PATCH] Unlock md devices when stopping them on reboot.
otherwise we get nasty messages about locks not being released.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-26 11:52:11 -07:00
Linus Torvalds
309c68cc17 Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mthca: Fix posting lists of 256 receive requests to SRQ for Tavor
2006-05-26 11:51:08 -07:00
Hollis Blanchard
54f4ee183a [PATCH] powerpc: fix RTC/NVRAM accesses on Maple
Due to a firmware device tree bug, RTC and NVRAM accesses (including
halt/reboot) on Maple have been broken since January, when an untested
build fix went in. This code patches the device tree in Linux.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-05-26 22:39:00 +10:00