pdc_adma was overlooked and broken by the irq-pio patch:
Only HSM_ST_LAST interrupts should be delivered to this LLDD.
Adding ATA_FLAG_PIO_POLLING to pdc_adma fixes the problem (temporarily),
before we convert the irq handler of pdc_adma to handle all interrupts.
Signed-off-by: Albert Lee <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Also, moved ATA_MAX_SECTORS and ATA_MAX_SECTORS_LBA48 from
linux/libata.h to linux/ata.h, now that they truly reflect the standard
(well... mostly; note TODO comment).
This changes the performance profile (and potential bug profile)
for a bunch of drivers, so be wary.
Implement dummy port which can be requested by setting appropriate bit
in probe_ent->dummy_port_mask. The dummy port is used as placeholder
for stolen legacy port. This allows libata to guarantee that
index_of(ap) == ap->port_no == actual_device_port_no, and thus to
remove error-prone ap->hard_port_no.
As it's used only when one port of a legacy controller is reserved by
some other entity (e.g. IDE), the focus is on keeping the added *code*
complexity at minimum, so dummy port allocates all libata core
resources and acts as a normal port. It just has all dummy port_ops.
This patch only implements dummy port. The following patch will make
libata use it for stolen legacy ports.
Signed-off-by: Tejun Heo <[email protected]>
Kill host_set->next
Fix simplex support
Allow per platform setting of IDE legacy bases
Some of this can be tidied further later on, in particular all the
legacy port gunge belongs as a PCI quirk/PCI header decode to understand
the special legacy IDE rules in the PCI spec.
Longer term Jeff also wants to move the request_irq/free_irq out of core
which will make this even cleaner.
tj: folded in three followup patches - ata_piix-fix, broken-arch-fix
and fix-new-legacy-handling, and separated per-dev xfermask into
separate patch preceding this one. Folded in fixes are...
* ata_piix-fix: fix build failure due to host_set->next removal
* broken-arch-fix: add missing include/asm-*/libata-portmap.h
* fix-new-legacy-handling:
* In ata_pci_init_legacy_port(), probe_num was incorrectly
incremented during initialization of the secondary port and
probe_ent->n_ports was incorrectly fixed to 1.
* Both legacy ports ended up having the same hard_port_no.
* When printing port information, both legacy ports printed
the first irq.
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Implement per-dev xfermask. libata used to determine xfermask
per-port - the fastest mode of the slowest device on the port. This
patch enables per-dev xfermask.
Original patch is from Alan Cox <[email protected]>. The following
changes are made by me.
* simplex warning message is added
* remove disabled device handling code which is never invoked
(originally for choosing port-wide lowest PIO mode)
Cc: Alan Cox <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
s/ata_host_add/ata_port_add/
s/ata_host_init/ata_port_init/
libata naming got stuck in the middle of a Great Renaming:
ata_host -> ata_port
ata_host_set -> ata_host
To eliminate confusion, let's just give up for now, and simply ensure
that things are internally consistent.
Signed-off-by: Jeff Garzik <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
Update ata_host_init() such that it only initializes SCSI host related
stuff and doesn't call into ata_port_init(), and rename it to
ata_port_init_shost().
Signed-off-by: Tejun Heo <[email protected]>
We recently fixed an out-of-space deadlock in XFS, and part of that fix
involved the addition of the XFS_ALLOC_FLAG_FREEING flag to some of the
space allocator calls to indicate they're freeing space, not allocating
it. There was a missed xfs_alloc_fix_freelist condition test that did not
correctly test "flags". The same test would also test an uninitialised
structure field (args->userdata) and depending on its value either would
or would not return early with a critical buffer pointer set to NULL.
This fixes that up, adds asserts to several places to catch future botches
of this nature, and skips sections of xfs_alloc_fix_freelist that are
irrelevent for the space-freeing case.
SGI-PV: 955303
SGI-Modid: xfs-linux-melb:xfs-kern:26743a
Signed-off-by: Nathan Scott <[email protected]>
The ifa lock is expected to be taken in BH context (by addrconf timers)
so we must disable BH when accessing it from user context.
Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
When the IDE fix for Jmicron went in one piece went walking somewhere
(send log shows my end somehow). Without this sometimes you get an oops
on boot.
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
When recoveries are aborted by other recoveries we can get replies to
status or names requests that we've given up on. This can cause problems
if we're making another request and receive an old reply. Add a sequence
number to status/names requests and reject replies that don't match. A
field already exists for the seq number that's used in other message
types.
Signed-off-by: David Teigland <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
To aid debugging, it's useful to be able to see what nodeid the dlm is
waiting on for a message reply.
Signed-off-by: David Teigland <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
When the debug buffer has filled up, break from the loop and return the
correct number of bytes that have been written.
Signed-off-by: David Teigland <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
When we abort one recovery to do another, break out of the ping_members()
routine more quickly, and wake up the dlm_recoverd thread more quickly
instead of waiting for it to time out.
Signed-off-by: David Teigland <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
Print the violating name length in the assertion.
Signed-off-by: David Teigland <[email protected]>
Signed-off-by: Steven Whitehouse <[email protected]>
Patch from Dmitry Mishin <[email protected]>:
Replace add_timer() by mod_timer() in dst_run_gc
in order to avoid BUG message.
CPU1 CPU2
dst_run_gc() entered dst_run_gc() entered
spin_lock(&dst_lock) .....
del_timer(&dst_gc_timer) fail to get lock
.... mod_timer() <--- puts
timer back
to the list
add_timer(&dst_gc_timer) <--- BUG because timer is in list already.
Found during OpenVZ internal testing.
At first we thought that it is OpenVZ specific as we
added dst_run_gc(0) call in dst_dev_event(),
but as Alexey pointed to me it is possible to trigger
this condition in mainstream kernel.
F.e. timer has fired on CPU2, but the handler was preeempted
by an irq before dst_lock is tried.
Meanwhile, someone on CPU1 adds an entry to gc list and
starts the timer.
If CPU2 was preempted long enough, this timer can expire
simultaneously with resuming timer handler on CPU1, arriving
exactly to the situation described.
Signed-off-by: Dmitry Mishin <[email protected]>
Signed-off-by: Kirill Korotaev <[email protected]>
Signed-off-by: Alexey Kuznetsov <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
The request queue flush function of the dasd driver has to dequeue
the requests first and then call the end request function. Otherwise
a kernel bug in ll_rw_block.c might get triggered.
Signed-off-by: Horst Hummel <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
SCSI EH locks door if sdev->locked is set. Sometimes door lock
command fails continuously (e.g. when medium is not present) and as
libata uses EH to acquire sense data, this easily creates a loop where
a failed lock door invokes EH and EH issues lock door on completion.
This patch clears sdev->locked on door lock failure to break this
loop. This problem has been spotted and diagnosed by Unicorn Chang
<[email protected]>.
Signed-off-by: Tejun Heo <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Fix a sata debug print statement that still uses an old variable name.
Signed-off-by: Keith Owens <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Initial IRQ mask clearing is done by libata-core by freezing all ports
prior to requesting IRQ. Remove redundant IRQ clearing from
init_controller().
Signed-off-by: Tejun Heo <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Dummy RDMA are always enabled on device startup since commit
9a71db721a (to work around buggy
PCIe chipsets which do not implement resending properly). But,
we also need to always re-enable them when resuming the device.
Signed-off-by: Brice Goglin <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
The following patch enhances libata to allow SAS device drivers
to utilize libata to talk to SATA devices. It introduces some
new APIs which allow libata to be used without allocating a
virtual scsi host.
New APIs:
ata_sas_port_alloc - Allocate an ata_port
ata_sas_port_init - Initialize an ata_port (probe device, etc)
ata_sas_port_destroy - Free an ata_port allocated by ata_sas_port_alloc
ata_sas_slave_configure - configure scsi device
ata_sas_queuecmd - queue a scsi command, similar to ata_scsi_queuecomand
These new APIs can be used either directly by a SAS LLDD or could be used
by the SAS transport class.
Possible usage for a SAS LLDD would be:
scsi_scan_host
target_alloc
ata_sas_port_alloc
slave_alloc
ata_sas_port_init
slave_configure
ata_sas_slave_configure
Commands received by the LLDD for SATA devices would call ata_sas_queuecmd.
Device teardown would occur with:
slave_destroy
port_disable
target_destroy
ata_sas_port_destroy
Signed-off-by: Brian King <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Move ata_probe_ent_alloc to libata-core. It will also be used by
future SAS/SATA integration patches.
Signed-off-by: Brian King <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Separate out the ata_port initialization from ata_host_init
so that it can be used in future SAS patches.
Signed-off-by: Brian King <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Add ata_host_set_init in preparation for SAS attached SATA.
Signed-off-by: Brian King <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
This patch uses the sundance_reset function everywhere a reset is done,
and adds a link to the archives of the original mailing list.
Signed-off-by: Philippe De Muyter <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
Revised version of the forcedeth NAPI support.
This version is based against netdev-2.6#upstream
(after the MAC patches from Ayaz today).
Can't use nv_disable_hw_interrupts because NAPI only wants to
mask off receive irq's and leave the others alone.
Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
This patch will correct the mac address and set a flag to indicate that
it is already corrected in case nv_probe is called again. For example,
when you use kexec to restart the kernel.
Signed-Off-By: Ayaz Abdulla <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
This patch moves the mac address setup/teardown to the
nv_probe/nv_remove functions. This fixes WOL wakeup since on nv_close we
would reverse the mac address. Also, bonding driver will reset address
after nv_close is called.
Signed-Off-By: Ayaz Abdulla <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
'mdio_reset' has bad side effects that moves the phy_id.
DL10022-based cards work properly without 'mdio_reset'.
Signed-off-by: [email protected]
Signed-off-by: Jeff Garzik <[email protected]>
ALPS touchpad on Amoi laptops (Amoi is a vendor in China) is not
detected when keyboard controller is in MUX mode, add to blacklist.
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>