* SEEK(6), SEEK(10), and REZERO_UNIT are no-ops. Unconditionally
complete these commands with success.
* MODE SENSE caching page work:
* correct page length
* set bit, if read-ahead is disabled
* set bit, if writeback caching is enabled
(previously, this bit was never set, even if
writeback caching was enabled)
* add MODE SENSE r/w error recovery page
Jeff Garzik [Sun, 16 May 2004 18:19:19 +0000 (14:19 -0400)]
[libata] comments and constants
* note a nasty problem with shared interrupts that must be fixed
before we turn on certain code paths.
* add a few comments to the READ CAPACITY scsi simulator
* remove a FIXME comment from the TEST UNIT READY scsi simulator
* add constant for ATA command CHECK POWER MODE, and associated
"mandatory" power management feature set bit.
The SCSI T10 committee is working on a document describing a standard
method for translating ATA<->SCSI, since it being done quite often
these days. Some of the recommendations are reasonable, and we implement
two here:
* Mirror that ATA 'removeable media' bit into INQUIRY output.
* Change behavior of INQUIRY output field 'product revision' from
the libata software version number to the first 4 bytes of the
ATA device's firmware revision number.
Rather than cache the firmware revision in struct ata_device, as was/is
done with two other strings, I took the opportunity to eliminate the
caching of the two other strings, 'vendor' and 'product'. These strings
are now retrieved as needed from the IDENTIFY [PACKET] DEVICE info page,
since we cache its entire contents.
Retrieving a string from the identify-device page is done via the
helper function ata_dev_id_string(), which is now exported.
This patch winds up making struct ata_device 40 bytes smaller, and
the libata core gets a bit smaller as well.
Jeff Garzik [Sun, 16 May 2004 14:48:08 +0000 (10:48 -0400)]
[libata] remove redundant use of ATA_QCFLAG_SG in ATAPI packet translation
ata_scsi_translate() sets this flag for all ATA->SCSI translated
commands, so it need not be done in atapi_xlat(). The now-removed
use in atapi_xlat() was also inconsistent WRT PIO versus DMA.
Jeff Garzik [Sun, 16 May 2004 14:35:15 +0000 (10:35 -0400)]
[libata] DMADIR support
DMADIR bit is necessary for some PATA->SATA bridges. These
bridges require the OS driver to specify the data xfer direction,
for PACKET (a.k.a. scsi) commands.
A reliable DMADIR detection method hasn't yet been developed,
and ATAPI is still a WIP, so DMADIR is enabled with an ifdef for
now.
Jeff Garzik [Sat, 15 May 2004 10:36:08 +0000 (06:36 -0400)]
[libata] minor stuff
* now that ATAPI is close to working, making ATAPI DMA interrupts
in ata_host_intr
* remove unnecessary space character in printk() output (oh, the horror)
Jeff Garzik [Sat, 15 May 2004 09:09:25 +0000 (05:09 -0400)]
[libata] internal cleanups
Remove unused 'done_late' arg to ata_qc_complete(), which was never
useful in 2.4, and never used at all in 2.6.
This allows us to eliminate the same arg from ata_dma_complete(),
and also make it more correct by passing the command rather than
the ATA port structure as arg0.
Santiago Leon [Fri, 14 May 2004 13:47:05 +0000 (06:47 -0700)]
[PATCH] PowerPC Virtual Ethernet duplicate MAC addresses
This fixes a bug where different partitions were assigned the same MAC
address. Also, according to Anton, gcc 3.5 didn't like our mac_addr_p
gymnastics, so this ends up fixing that as well.
Andrew Morton [Fri, 14 May 2004 12:56:29 +0000 (05:56 -0700)]
[PATCH] ppc64 iSeries: allow read only virtual disks
From: Stephen Rothwell <sfr@canb.auug.org.au>
It is possible to attach a virtual disk to a logical partition on an iSeries
machine so that it is read only to the partition. This patch allows Linux to
use such virtual disks.
Andrew Morton [Fri, 14 May 2004 12:56:19 +0000 (05:56 -0700)]
[PATCH] ppc64: strengthen I/O and memory barriers
From: Paul Mackerras <paulus@samba.org>
After I sent the recent patch to include/asm-ppc64/io.h which put stronger
barriers in the I/O accessor macros, Paul McKenney pointed out to me that a
writex/outx could still slide out from inside a spinlocked region. This patch
makes the barriers a bit stronger so that this can't happen. It means that we
need to use a sync instruction for wmb (a full "heavyweight" sync), since
drivers rely on wmb for ordering between writes to system memory and writes to
a device.
I have left smb_wmb() as a lighter-weight barrier that orders stores, and
doesn't impose an ordering between cacheable and non-cacheable accesses (the
amusingly-named eieio instruction). I am assuming here that smp_wmb is only
used for ordering stores to system memory so that another cpu will see them in
order. It can't be used for enforcing any ordering that a device will see,
because it is just a gcc barrier on UP.
This also changes the spinlock/rwlock unlock code to use lwsync ("light-weight
sync") rather than eieio, since eieio doesn't order loads, and we need to
ensure that loads stay inside the spinlocked region.
Andrew Morton [Fri, 14 May 2004 12:56:08 +0000 (05:56 -0700)]
[PATCH] ppc64: Kconfig bits for CONFIG_SPINLINE
From: Paul Mackerras <paulus@samba.org>
When I sent the patch to uninline the spinlocks, I inadvertently left out
the change to arch/ppc64/Kconfig which defines the config symbol for
inlining the locks (CONFIG_SPINLINE now). This patch adds it. It also
adds a symbol CONFIG_PPC_SPLPAR which enables the code for calling the
hypervisor on shared-processor logically-partitioned system to yield the
physical processor to the lock holder when spinning. (The code that
depends on this symbol is already present in arch/ppc64/lib/locks.c.)
Andrew Morton [Fri, 14 May 2004 12:55:37 +0000 (05:55 -0700)]
[PATCH] ppc64: align some heavily used variables
From: Anton Blanchard <anton@samba.org>
Based on feedback from the hardware guys align jiffies and tb_last_stamp.
We update both regularly and there are other read only, heavily accessed
things that share those cachelines.
Andrew Morton [Fri, 14 May 2004 12:55:05 +0000 (05:55 -0700)]
[PATCH] ppc32: Move declarations into headers
From: Paul Mackerras <paulus@samba.org>
The patch below moves some declarations from C files into the appropriate
header file in include/asm-ppc (and removes an unused local variable in a
function).
Andrew Morton [Fri, 14 May 2004 12:54:54 +0000 (05:54 -0700)]
[PATCH] ppc32: Fix pmac compile after OCP changes
From: Paul Mackerras <paulus@samba.org>
Matt Porter's recent changes broke the compile for non-4xx ppc32 systems,
unfortunately. I get an error that mfdcr is not defined in
include/asm-ppc/ocp.h when compiling for powermac (reasonable, since the
mfdcr instruction only exists on 4xx processors). The patch below fixes
it.
Andrew Morton [Fri, 14 May 2004 12:52:21 +0000 (05:52 -0700)]
[PATCH] PPC32: Fix copy prefetch on non coherent PPCs
From: Matt Porter <mporter@kernel.crashing.org>
This patch fixes the condition where prefetching cache lines beyond a
buffer can cause data corruption on non cache coherent PPCs. It is a port
of the version that went into 2.4. From Eugene Surovegin
<ebs@ebshome.net>.
Andrew Morton [Fri, 14 May 2004 12:52:10 +0000 (05:52 -0700)]
[PATCH] PPC32: Fix __flush_dcache_icache_phys() for Book E
From: Matt Porter <mporter@kernel.crashing.org>
This patch implements/uses __flush_dcache_icache_page() which kmaps on a
Book E part, but keeps the existing behavior on other PowerPCs which can
disable the MMU.
Andrew Morton [Fri, 14 May 2004 12:51:48 +0000 (05:51 -0700)]
[PATCH] befs: inode->i_flags thinko fix
Jorn Engel <joern@wohnheim.fh-wedel.de>
inode->i_flags should never contain fs-specific flags. In fact, it doesn't;
the checks against it cause "chattr +T" to be useless for ext[23]. Same bug
was in befs as well.
Andrew Morton [Fri, 14 May 2004 12:50:55 +0000 (05:50 -0700)]
[PATCH] befs: microoptimisation, use befs_bread() instead of befs_bread_iaddr()
From: "Sergey S. Kostyliov" <rathamahata@php4.ru>
We already have block number (inode->i_ino), so there is no need to calculate
it from befs_block_run before sb_bread() call (this is what befs_bread_iaddr()
do).
Andrew Morton [Fri, 14 May 2004 12:50:33 +0000 (05:50 -0700)]
[PATCH] s390: network driver
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
Network driver changes:
- lcs: Add missing irb error checking.
- lcs: Fix multicasting.
- lcs: Use a seperate lock (ipm_lock) for multicast list.
- lcs: Add missing in_dev_put in multicase address list handling.
- iucv: Set static variables to NULL after kfree.
- iucv: Do bus_unregister if module initialization fails.
- netiucv: Convert iucvMagic to EBCDIC in con_action_start.
- netiucv: Remove administration of ifno-stuff for device name,
- netiucv: Add attribute to remove a netiucv device.
- qeth: Add version string that is displayed at driver load time.
- qeth: Fix memory leak in qeth_arp_query.
- qeth: Remove duplicate case statements in qeth_do_ioctl.
- qeth: Fix OSA broadcast filtering.
- qeth: Increase timeout for purge ARP cache IPA.
- qeth: Fix hsi device naming.
- qeth: Add do_QDIO count to qeth performance statistics.
- qeth: Allow writing to IP address takeover attribute only in
state DOWN or RECOVER.
- qeth: Fix hang when removing a vlan device.
- qeth: Cleanup error messages for ARP commands.
- qeth: Return EOPNOTSUPP for purge ARP on HiperSockets.
- qeth: Drop skbs if the net_device of a qeth device is down.
- qeth: Simplify ip address list processing.
Andrew Morton [Fri, 14 May 2004 12:50:22 +0000 (05:50 -0700)]
[PATCH] s390: zfcp host adapter
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
zfcp host adapter change:
- Prevent infinite retry of SCSI commands when FCP adapter is unavailable.
- Always queue error recovery structure to the error recovery running list.
- Add help text to zfcp config option.
Andrew Morton [Fri, 14 May 2004 12:50:11 +0000 (05:50 -0700)]
[PATCH] s390: 3270 console driver
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
3270 device driver change:
- Don't allow activation of views while the initial size sensing is still
in progress. Replace RAW3270_FLAGS_SHUTDOWN with RAW3270_FLAGS_READY.
- Make 3270 views loadable as modules.
Andrew Morton [Fri, 14 May 2004 12:49:49 +0000 (05:49 -0700)]
[PATCH] s390: common i/o layer
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
Common i/o layer changes:
- Delay unregister/register of ccw devices reappering on a different
subchannel. Search for the old ccw_device & subchannel for the
reattached device and deregister it too to avoid inconsistencies.
- Fix path grouping for devices that present command reject for
SetPGID but not for SensePGID.
Andrew Morton [Fri, 14 May 2004 12:49:38 +0000 (05:49 -0700)]
[PATCH] s390: core
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
s390 core changes:
- Rename idle_cpu_mask to nohz_cpu_mask as agreed with Dipankar.
- Refine compiler version check for "Q" constraints in uaccess.h.
- Store per process ptrace information to the correct place.
- Fix per cpu data access for 64-bit modules.
- Add topology_init function for cpu hotplug.
- Define TASK_SIZE dependent on TIF_31BIT and define MM_VM_SIZE
to 4TB to get rid of elf_map32 and arch_get_unmapped_area.
Andrew Morton [Fri, 14 May 2004 12:46:55 +0000 (05:46 -0700)]
[PATCH] dentry qstr consolidation
When dentries are given an external name we currently allocate an entire qstr
for the external name.
This isn't needed. We can use the internal qstr and kmalloc only the string
itself. This saves 12 bytes from externally-allocated names and 4 bytes from
the dentry itself.
The saving of 4 bytes from the dentry doesn't actually decrease the dentry's
storage requirements, but it makes four more bytes available for internal
names, taking the internal/external ratio from 89% up to 93% on my 1.5M files.
Fix:
The qstr consolidation wasn't quite right, because it can cause qstr->len to
be unstable during lookup lockless traverasl.
Fix that up by taking d_lock earlier in lookup. This serialises against
d_move.
Take the lock after comparing the parent and hash to preserve the
mostly-lockless behaviour.
Andrew Morton [Fri, 14 May 2004 12:46:12 +0000 (05:46 -0700)]
[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-makefile-cleanup.patch
From: Markus Lidel <Markus.Lidel@shadowconnect.com>
* The Kconfig and Makefile in drivers/message/i2o still got a CONFIG_I2O_PCI
entry, which is not used anymore. This one is replaced by a
CONFIG_I2O_CONFIG entry, which now builds the i2o_config module.
Andrew Morton [Fri, 14 May 2004 12:46:01 +0000 (05:46 -0700)]
[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o-64-bit-fix.patch
From: Markus Lidel <Markus.Lidel@shadowconnect.com>
* provides i2o_context_list_*() functions, which maps 64-bit pointers to
32-bit context id's in a dynamic list. On 32-bit systems the functions are
replaced with a static inline.
* i2o_scsi now uses the i2o_context_list_*() functions for transaction
context, and therefore now work on 64-bit systems too.
Andrew Morton [Fri, 14 May 2004 12:45:50 +0000 (05:45 -0700)]
[PATCH] I2O subsystem fixing and cleanup for 2.6 - i2o_block-cleanup.patch
From: Markus Lidel <Markus.Lidel@shadowconnect.com>
* more than 3 "visible" disks (hda, hdb, hdc, hdd) lead to kernel panics.
* removes some unused code with partitions.
* I2O_LOCK was often called with the addresses of the controller, and not
with the address of the device. Fixed.
* the cleanup function for gendisk (del_gendisk) doesn't work if the queue
is shared between different devices. To workaround the queue is removed
before.
* redundant code removed in module initialization and remove, use
i2ob_new_device and i2ob_del_device instead.
* removed atomic_t queue_depth
* removed unnecessary and bogus code for queue handling
Andrew Morton [Fri, 14 May 2004 12:44:57 +0000 (05:44 -0700)]
[PATCH] ia64 cpu hotplug: core
From: Ashok Raj <ashok.raj@intel.com>
Supports basic ability to enable hotplug functions for IA64.
Code is just evolving, and there are several loose ends to tie up.
What this code drop does
- Support logical online and offline
- Handles interrupt migration without loss of interrupts.
- Handles stress fine > 24+ hrs with make -j/ftp/rcp workloads
- Handles irq migration from a dying cpu without loss of interrupts.
What needs to be done
- Boot CPU removal support, with platform level authentication
- Putting cpu being removed in BOOT_RENDEZ mode.
With a hotplug capable kernel, there is a requirement to distinguish a
possible CPU from one actually present. The set of possible CPU numbers
doesn't change during a single system boot, but the set of present CPUs
changes as CPUs are physically inserted into or removed from a system. The
cpu_possible_map does not change once initialized at boot, but the
cpu_present_map changes dynamically as CPUs are inserted or removed.
Paul Jackson <pj@sgi.com> provided an expanded explanation:
Ashok's cpu hot plug patch adds a cpu_present_map, resulting in the following
cpu maps being available. All the following maps are fixed size bitmaps of
size NR_CPUS.
#ifdef CONFIG_HOTPLUG_CPU
cpu_possible_map - map with all NR_CPUS bits set
cpu_present_map - map with bit 'cpu' set iff cpu is populated
cpu_online_map - map with bit 'cpu' set iff cpu available to scheduler
#else
cpu_possible_map - map with bit 'cpu' set iff cpu is populated
cpu_present_map - copy of cpu_possible_map
cpu_online_map - map with bit 'cpu' set iff cpu available to scheduler
#endif
In either case, NR_CPUS is fixed at compile time, as the static size of these
bitmaps. The cpu_possible_map is fixed at boot time, as the set of CPU id's
that it is possible might ever be plugged in at anytime during the life of
that system boot. The cpu_present_map is dynamic(*), representing which CPUs
are currently plugged in. And cpu_online_map is the dynamic subset of
cpu_present_map, indicating those CPUs available for scheduling.
If HOTPLUG is enabled, then cpu_possible_map is forced to have all NR_CPUS
bits set, otherwise it is just the set of CPUs that ACPI reports present at
boot.
If HOTPLUG is enabled, then cpu_present_map varies dynamically, depending on
what ACPI reports as currently plugged in, otherwise cpu_present_map is just a
copy of cpu_possible_map.
(*) Well, cpu_present_map is dynamic in the hotplug case. If not hotplug,
it's the same as cpu_possible_map, hence fixed at boot.
Andrew Morton [Fri, 14 May 2004 12:44:34 +0000 (05:44 -0700)]
[PATCH] ia64 cpu hotplug: /proc rework
From: Ashok Raj <ashok.raj@intel.com>
Changes proc entries for cpu hotplug to be created via the cpu hotplug
notifier callbacks. Also fixed a bug in the removal code that did not remove
proc entries as expected.
Andrew Morton [Fri, 14 May 2004 12:44:23 +0000 (05:44 -0700)]
[PATCH] ia64 cpu hotplug: IRQ affinity work
From: Ashok Raj <ashok.raj@intel.com>
irq affinity setting via /proc was forcing iosapic rte programming by force.
The correct way to do this is to perform this when a interrupt is pending.
Andrew Morton [Fri, 14 May 2004 12:44:13 +0000 (05:44 -0700)]
[PATCH] ia64 cpu hotplug: sysfs additions
From: Ashok Raj <ashok.raj@intel.com>
Creation of sysfs via topology_init() creates sysfs entries. The creation of
the online control file is created separately when the cpu_up is invoked in
arch independent code.
Andrew Morton [Fri, 14 May 2004 12:43:39 +0000 (05:43 -0700)]
[PATCH] swap speedups and fix
From: Andrea Arcangeli <andrea@suse.de>
I don't think we need an install_swap_bdev/remove_swap_bdev anymore, we should
use the swap_info->bdev, not the swap_bdevs. the swap_info already has a
->bdev field, the only point of remove_swap_bdev/install_swap_bdev was to
unplug all devices as efficiently as possible, we don't need that anymore with
the page parameter.
Plus the semaphore should be a rwsem to allow parallel unplug from multiple
pages.
After that I don't need to take the semaphore anymore during swapon, no
swapcache with swp_type() pointing to such bdev, will be allowed until swapon
is complete (SWP_ACTIVE is set a lot later after setting p->bdev).
In swapoff I only need a dummy serialization with the readers, after
try_to_unuse is complete:
Andrew Morton [Fri, 14 May 2004 12:43:07 +0000 (05:43 -0700)]
[PATCH] Add blk_run_page()
From: Andrea Arcangeli <andrea@suse.de>
From: Jens Axboe
Add blk_run_page() API. This is so that we can pass the target page all the
way down to (for example) the swap unplug function. So swap can work out
which blockdevs back this particular page.
Andrew Morton [Fri, 14 May 2004 12:42:56 +0000 (05:42 -0700)]
[PATCH] rmap-5-swap_unplug-page-revert
Revert the pre-2.6.6 per-address-space unplugging changes. This removes a
swapper_space exceptionality, syncs things with Andrea and provides for
simplification of the swap unplug function.
Andrew Morton [Fri, 14 May 2004 12:42:34 +0000 (05:42 -0700)]
[PATCH] filtered wakeups: apply to buffer_head functions
From: William Lee Irwin III <wli@holomorphy.com>
This patch implements wake-one semantics for buffer_head wakeups in a single
step. The buffer_head being waited on is passed to the waiter's wakeup
function by the waker, and the wakeup function compares that to the a pointer
stored in its on-stack structure and checking the readiness of the bit there
also. Wake-one semantics are achieved by using WQ_FLAG_EXCLUSIVE in the
codepaths waiting to acquire the bit for mutual exclusion.
Andrew Morton [Fri, 14 May 2004 12:42:25 +0000 (05:42 -0700)]
[PATCH] filtered wakeups: apply to pagecache functions
From: William Lee Irwin III <wli@holomorphy.com>
This patch implements wake-one semantics for page wakeups in a single step.
Discrimination between distinct pages is achieved by passing the page to the
wakeup function, which compares it to a pointer in its own on-stack structure
containing the waitqueue element and the page. Bit discrimination is achieved
by storing the bit number in that same structure and testing the bit in the
wakeup function. Wake-one semantics are achieved by using WQ_FLAG_EXCLUSIVE
in the codepaths waiting to acquire the bit for mutual exclusion.