H. Peter Anvin [Thu, 6 Mar 2003 09:57:26 +0000 (01:57 -0800)]
[PATCH] bootsect removal
This is the "boot sector removal" patch for i386 updated for Linux
2.5.63-bk7. The only change against the 2.5.59 version is that the
FDOPTS Makefile variable, which lets one create a floppy image with
arbitrary kernel options, has been merged from the x86-64 version, and
the comments have been updated.
The patch removes the in-kernel boot sector, which these days rarely
work correctly (it only supports up to 1 MB kernels, and only work on
legacy floppies -- not on IDE or USB devices, nor on any kind of
emulated devices like El Torito), replaces it with a placeholder stub,
and sets up the Makefile targets to create floppies or floppy images
using SYSLINUX. The FDOPTS Makefile variable can be used to set
kernel command line options (thanks to a suggestion by Andi Kleen.)
Note that the same change has already been applied to the x86-64
architecture. The last hunk of the patch corrects a comment in that
architecture.
Russell King [Thu, 6 Mar 2003 09:49:37 +0000 (01:49 -0800)]
[PATCH] Fix up pci_scan_bridge and friends
Now we tackle pci_add_new_bus and pci_scan_bridge. The hotplug code
currently uses this, but I'd like it to die off; pci_scan_bridge()
should be used to scan behind bridges. This may mean hotplug needs
some changes to pci_scan_bridge - if so, we need to find out what
changes are required and fix it.
pci_alloc_child_bus() does what pci_add_new_bus() did, except it
doesn't attach the new bus to the parents list of child buses. The
only way this bus can be reached from the parent bus is by scanning
the parents devices list, and locating a device with a non-NULL
subordinate bus. The only code which should be doing this is the
PCI code.
Since the new bus will have an empty list head for bus->node, we can
detect unattached buses prety easily. (see pci-3.diff.)
pci_scan_bridge() changes slightly - we use our new pci_scan_child_bus()
function from pci-3.diff, which doesn't attach devices to the global
tree. This means callers of pci_scan_child_bus() and pci_scan_bridge()
(ie, hotplug) will need to call pci_bus_add_devices().
Russell King [Thu, 6 Mar 2003 09:49:30 +0000 (01:49 -0800)]
[PATCH] Convert setup-bus resource allocation to use bus->devices
- Convert setup-bus.c resource allocation to scan bus->devices rather
than bus->children. As noted previously, newly discovered child
buses will not be on the parents list of children buses, so when
we're trying to assign resources, we need to scan the bus for
devices with subordinate buses rather than using the list of children
buses.
Russell King [Thu, 6 Mar 2003 09:49:22 +0000 (01:49 -0800)]
[PATCH] Only add devices to bus->devices while scanning...
The pci_find* functions search using the following lists:
bus->children (for subordinate buses)
pci_root_buses (for all root buses)
pci_devices (for devices)
This leaves one list which we can add devices to without any drivers
finding the new devices before we've finished with them.
- initialise bus->node list head.
- pci_scan_slot will scan the specified slot, and add the discovered
devices to the bus->devices list only. These devices will not
appear on the global device list, and do not show in sysfs, procfs.
pci_scan_slot returns the number of functions found. If you want
to find the devices, you have to scan bus->devices and look for
devices where list_empty(&dev->global_list) is true.
- new function "pci_bus_add_devices" adds newly discovered devices
to the global device lists, and handles the sysfs and procfs
stuff, making the devices available to drivers. All our buses
which have an empty list head are treated as "new" (since they
are not attached to the parent buses list of children) and are
also added. Currently, no buses will be in this state when this
function is called.
- new function "pci_scan_child_bus" scans a complete bus, building
a list of devices on bus->devices only, performing bus fixups
via pcibios_fixup_bus() and scanning behind bridges. It does
make devices externally visible.
- pci_do_scan_bus retains its original behaviour - ie, it scans
and makes devices available immediately.
Russell King [Thu, 6 Mar 2003 09:49:14 +0000 (01:49 -0800)]
[PATCH] Eliminate stack allocation of struct pci_dev...
- Eliminate the stack allocation of a struct pci_dev, and make
pci_scan_slot() take a bus and a devfn argument.
- Add "dev->multifunction" to indicate whether this is a multifunction
device.
- Run header fixups before inserting the new pci device into any
device lists or announcing it to the drivers.
- Convert some more stuff to use the list_for_each* macro(s).
Alan Cox [Thu, 6 Mar 2003 09:43:28 +0000 (01:43 -0800)]
[PATCH] bring ide-disk driver into line with 2.4.21pre
This doesn't have the new -ac testing stuff from 2.4.21pre5-ac but it
has the stuff I now trust in it. This fixes the cache flush stuff and
also means ide-disk now should be safe shared IRQ
Alan Cox [Thu, 6 Mar 2003 09:43:18 +0000 (01:43 -0800)]
[PATCH] clean up all the console inits using an initcall variant
Dave Woodhouse did this a while ago and its been kicking around in my
tree just fine. This gets rid of a lot of the init lists of functions
still left in the kernel by having an __init type array built up for the
consoles as well
Alan Cox [Thu, 6 Mar 2003 09:42:55 +0000 (01:42 -0800)]
[PATCH] update PCI quirks
ALi Magik requires workarounds for TV chips
IDE controllers require proper handling in legacy mode
PXB must be disabled on C0 450NX or the IDE will corrupt memory
VIA northbridge devices require the interrupt line is written
NEC_CBUS_2/3 require ISA DMA workarounds
platform_device_register may only be called after all class-specific
device data is initialized, or else the class-type add_device call (which
enables the pcmcia sockets) will fail.
imm.c: spelling
scsi.h: remove old and now incorrect comment
scsi_scan.c: remove superfluous final return
scsi_error.c: apart from similar trivialities the only change:
If a command fails (e.g. because it belongs to a newer
SCSI version than the device), it is fed to
scsi_decide_disposition(). That routine must return
SUCCESS, unless the error handler should be invoked.
In the situation where host_byte is DID_OK, and message_byte
is COMMAND_COMPLETE, and status is CHECK_CONDITION, there is
no reason at all to invoke aborts and resets. The situation
is normal. I see here UNIT ATTENTION, Power on occurred
and ILLEGAL REQUEST, Invalid field in cdb.
The 2.5.64 code does not return SUCCESS, but it returns the
return code of scsi_check_sense(), and that may be FAILED
in case we do not have valid sense.
Andrew Morton [Thu, 6 Mar 2003 09:14:13 +0000 (01:14 -0800)]
[PATCH] remove __pgd_offset
Patch from Dave Hansen <haveblue@us.ibm.com>
__pgd_offset() and pgd_offset() are completely different functions.
__pgd_offset() is really just a helper to figure out which entry in a
pgd an address would fall into. pgd_offset() does all the leg work and
actually fetches the real pgd entry.
pgd_index() is a much saner name for what __pgd_offset() does. In fact,
we do this:
#define __pgd_offset(address) pgd_index(address)
The attached patch removes all instances of __pgd_offset and just
replaces them with pgd_index.
Andrew Morton [Thu, 6 Mar 2003 09:14:05 +0000 (01:14 -0800)]
[PATCH] fix inode reclaim imbalance
Well I thought we were shooting down unused inodes a bit aggressively. With
30,000 inodes total and 1000 unused, the 1000 are getting reclaimed
instantly.
shrink_icache_memory() needs to return the number of reclaimable inodes to
page reclaim, not the total number.
Andrew Morton [Thu, 6 Mar 2003 09:13:43 +0000 (01:13 -0800)]
[PATCH] cciss: fix initialization for PCI hotplug
Patch from Stephen Cameron <steve.cameron@hp.com>
* Fix driver to wait for firmware to indicate that it is ready.
(Needed for PCI hotplug case, but for normal warm/cold reboot, by the
time driver inits, firmware will already be ready.)
Russell King investigated a failure case I introduced: When booting
with "load_ramdisk=1", we use the kernel root= parameter to determine
from what device to get the contents to copy into a ramdisk and then
mount that ramdisk as root.
For the copy to work, /dev/root needs to point to the device to load the
ramdisk from.
Russell King [Thu, 6 Mar 2003 19:27:52 +0000 (19:27 +0000)]
[ARM] CPUFREQ - allow ARM to work with userspace governor.
Patch from Dominik Brodowski.
This patch is necessary to update the ARM drivers so that they can
live with the new cpufreq governor "userspace" (which I sent to Linus a
moment ago).
Russell King [Thu, 6 Mar 2003 16:49:18 +0000 (16:49 +0000)]
[CPUFREQ] Update ARM CPUFREQ drivers
A 4 patch set from Dominik Brodowski, tested and fixed up by rmk
for ARM.
(1)
- the system3.c cpufreq notifier couldn't possibly compile before because
cpufreq_updateminmax has been undefined for ages.
- clean up sa1100fb.c notifier to specify exactly what's left TBD.
- double #include of cpufreq.c in drivers/pcmcia/sa1100_generic.c
(2)
Split up config symbols, add help text for CPU_FREQ_PROC_INTF
(3)
- update the Integrator CPUfreq driver so that it can get along with
cpufreq policies.
- modularize Integrator CPUfreq driver (all it did with
!CONFIG_CPU_FREQ was to print out some debug information)
(4)
- update the SA11x0 CPUfreq drivers so that they can get along with
cpufreq policies and governors.
- update the cpufreq core so that cpufreq_get() returns something
sensible during the first ->setpolicy or ->target call.
Russell King [Thu, 6 Mar 2003 16:27:13 +0000 (16:27 +0000)]
[ARM] Clean up ARM PCI support (bios32.c)
Eliminate have_isa_bridge - use isa_bridge instead.
Clean up PCI bus walking.
Clean up detection of fast back to back capability.
Ensure we set the bridge control register appropriately.
Pin swizzle functions are never called with pin == 0.
Russell King [Thu, 6 Mar 2003 16:01:00 +0000 (16:01 +0000)]
[ARM] Power management updates
This provides an element of core PM support to ARM, providing an APM
like user space interface, and separating the core PM support from
the SA1100 PM implementation.
Russell King [Thu, 6 Mar 2003 14:07:07 +0000 (14:07 +0000)]
[ARM] Kill old mkdep dependency hack.
We include a header file in an indirect method, which mkdep didn't
understand. Now that mkdep is gone, we don't need the hack to make
mkdep do the right thing.
Russell King [Thu, 6 Mar 2003 13:14:56 +0000 (13:14 +0000)]
[ARM] Convert ecard.c shutdown/reboot to use driver model
ecard.c used to use the reboot notifier to ensure that the expansion
cards are in the correct state for rebooting. Use the driver model
shutdown method instead.
Russell King [Thu, 6 Mar 2003 13:01:35 +0000 (13:01 +0000)]
[ARM] Remove set_mac_address from acorn drivers.
Acorn Ethernet drivers provided a duplicate set_mac_address
implementation which reflects the generic ethernet version in
drivers/net/net_init.c. Use the generic version instead.
David Brownell [Thu, 6 Mar 2003 07:46:40 +0000 (23:46 -0800)]
[PATCH] USB: track usb ch9 device state
This patch merges the USB state definitions from the ARM Linux
code (inside the sa1100 driver) and uses them to track what can
be done with the device. That replaces the recently added
"udev->present" flag with a more complete/standard state model.
There are a few changes that might affect behavior if things
start to go really haywire:
- usb_set_address() and usb_set_configuration(), used while
enumerating, handle some unlikely cases more correctly:
don't allow setting address to zero (undefined behavior),
and do allow un-configuring (config 0). (Adds a FIXME
for an existing set-configuration bug too.)
- usb_disconnect() flags the state change earlier (as soon
as it's known).
- usb_submit_urb() works in the states where messaging is
allowed, and also enforces the "unless configured, only
control traffic is legal" rule.
- usb_unlink_urb() doesn't care any more about that state.
(There seemed to be agreement that it must not matter.)
This will help with some further cleanups in the complex of
issues relating to driver removal, device removal, config
changing (with driver unbind and rebind), reset, and so on.