Alexander Viro [Thu, 1 Aug 2002 06:33:24 +0000 (23:33 -0700)]
[PATCH] split "gendisk" to be per-disk, part 2
we are starting to split gendisks - now we can do that. Done for
ide, sd, pd, hd and mfm
It's in transit - what we are aiming at is getting ->nr_real to 1 for
all gendisks. Once that will be done we will be able to simplify a lot
stuff and remove ad-hackery. First thing that will happen after that
is death of ->nr_real, obviouslye. Then we
(a) will merge ->major and ->first_minor into ->dev
(b) strip one level of indirection from ->driverfs_dev_arr, ->de_arr
and ->flags - they turn into single-element arrays and we will simply pull
the (only) element into struct gendisk. Kills a lot of ad-hackery in splitup
code (fewer things to allocate).
(c) replace ->major_name with ->disk_name; kills most of the crap in
disk_name(9) - it only has to care about adding partition number to the name.
Alexander Viro [Thu, 1 Aug 2002 06:31:15 +0000 (23:31 -0700)]
[PATCH] split "gendisk" to be per-disk, part 1
now that gendisks don't have shared stuff (we used to set blk_size[]
from ->sizes) we can start splitting them into per-disk ones.
Step 1:
we introduce a new field - ->first_minor (to be merged with ->major
into dev_t of entire disk once all gendisks are split). All arrays
are assumed to start at that minor (i.e. gd->part[minor] got replaced
with gd->part[minor - gd->first_minor], etc.). get_gendisk() is
taught to pick the right gendisk if there are several with the same
major.
Ingo Molnar [Thu, 1 Aug 2002 05:50:00 +0000 (22:50 -0700)]
[PATCH] sanitize TLS API
This removes the TLS clear operation. I've left the flags mask and the
writable flag just so that we have the option to introduce extensions
without breaking the ABI.
William Stinson [Thu, 1 Aug 2002 05:25:55 +0000 (22:25 -0700)]
[PATCH] small region change for boardergo.c
this is a small patch for boardergo.c linux driver for isdn HYSDN cards to
1) remove call to check_region using request_region instead
2) check the status of call to request_region
3) release allocated region resource in case of error.
I don't have this hardware so compilation checked only.
[PATCH] 2.5 Trivial patch - 1400x1050 video mode added twice in 2.5.28
I am not sure if you are the actual maintainer for this, but your name
adorns the source :
2.5.28 introduced video mode 1400x1050 twice into drivers/video/modedb.c
Both instances use indentical timings, so I guess it's a mistake.
William Stinson [Thu, 1 Aug 2002 05:24:03 +0000 (22:24 -0700)]
[PATCH] small region change for baycom_ser_hdx.c
this is a small patch for baycom_ser_hdx.c -- baycom ser12 halfduplex radio modem driver to
1) remove call to check_region using request_region instead
2) check the status of call to request_region
3) release allocated region resource in case of error.
I don't have this hardware so compilation checked only.
[PATCH] explicit signed char cast in i386 spin_is_locked
To make spinlock debugging work with -funsigned-char the i386 version
of spin_is_locked() needs to cast to signed char explicitly instead of
just char. XFS needed -funsigned-char (and currently still has it),
but it doesn't evert hurt.
Tom Rini [Thu, 1 Aug 2002 05:22:42 +0000 (22:22 -0700)]
[PATCH] Export synchronize_irq on CONFIG_SMP=y
Currently, all arches which support SMP define synchronize_irq(irq)
to be a real function (generally defined in arch/$(ARCH)/kernel/irq.c).
This export was removed inadvertanly I believe in the "bit IRQ lock"
removal and IRQ cleanups ChangeSet.
William Stinson [Thu, 1 Aug 2002 05:22:12 +0000 (22:22 -0700)]
[PATCH] region changes for rocket
this is a small patch for Rocketport device driver for Linux to
1) remove two calls to check_region using request_region instead
2) release allocated region resource in case of error.
I don't have this hardware so compilation checked only.
This patch does not remove all references to check_region in this driver
(one reference still left unchanged).
Greg Banks [Thu, 1 Aug 2002 05:21:58 +0000 (22:21 -0700)]
[PATCH] PATCH 2.5: kconfig EXPERIMENTAL variant form
The convention is that symbols that depend on $CONFIG_EXPERIMENTAL are
marked in the banner with the string (EXPERIMENTAL). There are some
cases where that string is correctly used but is Capitalised instead of
uppercase.
Greg Banks [Thu, 1 Aug 2002 05:21:47 +0000 (22:21 -0700)]
[PATCH] PATCH: kconfig choice defaults 2 (3_3)
The default value specified as the last word of the "choice" statement
should be a unique abbreviation of one of the sub-prompts. Using one
of the sub-symbols is not legal. Fix 'Type of PHY'.
[Rusty: this is 3/3 partial resends of 'PATCH: kconfig choice defaults (1/2)']
Patrick Mochel [Thu, 1 Aug 2002 05:07:33 +0000 (22:07 -0700)]
driverfs: define struct driverfs_ops and remove struct device dependencies
In order to read/write attributes, you have to deal directly with the object that owns them. driverfs really
wants to be generic and not deal directly with those objects. So, we create an intermediate layer that
subsystems must implement that converts between the generic objects and the specific objects that own the
attributes.
This allows allows attributes to be exported for any object type.
In doing so, it places the responsibility on the subsystems to do the following:
- define their own object-specific attribute structures
- define their own driverfs_ops
- set the ops pointer in struct driver_dir_entry when creating an object's directory
- do object reference counting on open() and close()
- call the show() and store() callbacks of their attribute structure
- convert between the generic objects and the specific objects from the struct driver_dir_entry and
struct attribute pointers (using container_of)
The implementation of this layer for struct device is intended to be used as an example of the interface.
Because this layer of abstraction is now in place, we can move the device attribute structure into
include/linux/device.h, and driverfs should be free of references to it completely.
Jens Axboe [Thu, 1 Aug 2002 04:46:36 +0000 (21:46 -0700)]
[PATCH] misc elevator/block updates
I've got a new i/o scheduler in testing, some changes where needed in
the block layer to accomodate it. Basically because right now
assumptions are made about q->queue_head being the sort list. The
changes in detail:
o elevator_merge_requests_fn takes queue argument as well
o __make_request() inits insert_here to NULL instead of
q->queue_head.prev, which means that the i/o schedulers must
explicitly check for this condition now.
o incorporate elv_queue_empty(), it was just a place holder before
o add elv_get_sort_head(). it returns the sort head of the elevator for
a given request. attempt_{back,front}_merge uses it to determine
whether a request is valid or not. Maybe attempt_{back,front}_merge
should just be killed, I doubt they have much relevance with the wake
up batching.
o call the merge_cleanup functions of the elevator _after_ the merge has
been done, not before. This way the elevator functions get the new
state of the request, which is the most interesting.
o Kill extra nr_sectors check in ll_merge_requests_fn()
o bi->bi_bdev is always set in __make_request(), so kill check.
Martin Dalecki [Thu, 1 Aug 2002 04:45:34 +0000 (21:45 -0700)]
[PATCH] 2.5.29 IDE 110
- cs5530 patches by Adam J. Richter. Small indent style adjustments.
- qd65xx cli()/sti() adjustments.
- Fix bogous command in ide.c pointed out by Peter Vendroviec.
- Eliminate ide_stall_queue(). For those worried: we didn't sleep at
all.
- Eliminate support for "sector remapping". loop devices can handle
stuff like that. All the custom DOS high system memmory loaded
BIOS workaround tricks are obsolete right now. If anywhere it should
be the FAT filesystem code which should be clever enough to deal with
it by adjusting it's read/write methods.
- PCI "scather gather" allocation handling revamp by Adam J. Richter.
- Simplify do_ide_request after ->sleep removal.
- Make do_ide_request prefer to handle the device matching the request
queue it was called for first. RQ-queues are unique for devices.
In a next step queuedata will be changed to point to the device
not the channel.
Patrick Mochel [Thu, 1 Aug 2002 04:17:11 +0000 (21:17 -0700)]
driverfs: Add struct attribute
driverfs can only handle passing struct device to read/write functions. In order to free it of this limitation,
we need a common data structure for driverfs to pass around.
The only thing that driverfs really needs are the name and mode of the file, which are now located in struct
attribute.
struct device_attribute gets a struct attribute member, which holds the name and mode. With the DEVICE_ATTR
macro, users of the structure require no modification.
device_create_file is modified to take a struct attribute parameter
a to_dev_attr() macro is introduced to convert between a struct attribute to a struct device_attribute
Trond Myklebust [Thu, 1 Aug 2002 01:43:20 +0000 (18:43 -0700)]
[PATCH] Fix brown paper bag race in RPC receive code
Changeset 1.403.142.29 introduces a pretty nasty race into the RPC
code. Once we've decoded the RPC reply, it needs to be protected
against being overwritten by any resends.
The following patch achieves this by ensuring that the request is
removed from the list xprt->recv in xprt_complete_rqst(). This again
ensures that xprt_lookup_rqst() will fail to find that request until
we put it back on the list.
David Brownell [Wed, 31 Jul 2002 10:48:57 +0000 (03:48 -0700)]
[PATCH] ohci, control/enumeration fix
One of the flakey things I see with 2.5.29 is that many
devices give trouble enumerating. uhci still oopses khubd
enumerating pegasus (many control message errors first).
But that's not the only troublesome combo.
This patch fixes a failure that would hang the ohci driver
It's basically avoiding a few less IRQs (most noticable
with ISO), in this case so that a wedged SET_ADDRESS completes.
(Instead of hanging khubd in 'D' state.) And it also updates
a diagnostic to provide more troubleshooting help for similar
issues in the future.
The following patches to nfs2xdr.c/nfs3xdr.c might be relevant: *entry
points into the page, and so the assignment should be made before we
kunmap().
Also includes a patch that converts references to inode->i_data into
inode->i_mapping. Not likely to be the source of your hang, but should
still be done for consistency with the rest of the kernel.
Jeff Garzik [Wed, 31 Jul 2002 07:17:02 +0000 (03:17 -0400)]
alpha pid-reporting POSIX comformance bug fix:
2.4 kernels were changed to support POSIX thread groups, such that,
sys_getpid() now returns $task->tgid, the thread group id.
Since alpha implements its own getpid syscall, it missed this change,
which is now included here.
Dan Aloni [Wed, 31 Jul 2002 01:58:38 +0000 (04:58 +0300)]
Make s390 and s390x print the right freed init memory size.
The expression (&__init_begin - &__init_end) depends on the type
of this adhoc extern variables, which was changed from char to long
when the code was copied from another arch.
This simplifies the software autorepeat code in input/input.c,
also killing a race which could be the cause of autorepeat not
stopping after a key was released.
Patrick Mochel [Tue, 30 Jul 2002 13:43:13 +0000 (06:43 -0700)]
driverfs: Change the name of struct driver_file_entry to struct device_attribute
It may seem gratuitous, but it's what we really want.
driverfs files are meant to expose attributes of various kernel objects, so in that sense,
the change adds more accurate meaning to the object.
Plus, we will soon gain the ability to expose attributes of drivers (both device and bus)
themselves, and we want to be able to have each mean something reasonable.
This changes driverfs and the device model core (but none of the other users)
Patrick Mochel [Tue, 30 Jul 2002 12:43:45 +0000 (05:43 -0700)]
device symlinks: just pass name, not struct driver_file_entry to driverfs_create_symlink
symlinks now only use the name field of the struct driver_file_entry, so instead of allocating
a new one each time we want to create one, this changes the API to only accept the name (since
the driverfs core will never use the other fields either)
This also guarantees that we won't leak the memory for the entry when the device goes away:
Since the other entries aren't dynamically allocated, and driverfs doesn't free them, we would
have to free them ourselves. It's not really necessary, so this is another win for us.
Patrick Mochel [Tue, 30 Jul 2002 12:14:39 +0000 (05:14 -0700)]
driverfs: don't dynamically allocate and duplicate struct driver_file_entry's any more
Now that all unique information about struct driver_file_entry's are gone (the dentry and parent pointers),
the data in them is shared among all users of the entry. So, we don't have any reason to dynamically allocate
and duplicate the data anymore.
Split up "do_fork()" into "copy_process()" and "do_fork()".
copy_process() just copies the process, it doesn't actually start it.
This is in preparation for doing a "atomically start process on CPU X"
or other cases where we want to change the state of the process before
we actually start running it.
Martin Dalecki [Tue, 30 Jul 2002 07:37:06 +0000 (00:37 -0700)]
[PATCH] 2.5.29 IDE 109
- Include first cut by Adam J. Richter on proper lock protection for
tuning functions.
- Rename ide_register_subdriver() to ata_register_device() and
ide_unregister_subdriver() accordingly to ata_unregister_device(),
since this is reflecting better what those functions are about.
- Remove tons of "curicum vite" style useless documentation here and
there.
Martin Dalecki [Tue, 30 Jul 2002 07:36:33 +0000 (00:36 -0700)]
[PATCH] 2.5.29 IDE 108
- typedef unsigned char byte; is finally gone. Everything using it should
be just ported to u8 if I missed some place where it still gets used.
- Next round of parameter parsing cleanups by Gerald Champagne.
Adjusted a bit to harmonize with hd.c.
- Move IDE register bitfields declarations over from hdparm.h to
ide.h.
- Declare constants needed by hd.c directly there. Those are standard
values not subject to change and we prefer a bit of code duplication
in favour of making the two drivers independant from each other.
- Move everything not ioctl related away from hdreg.h to ide.h.
This header is in effect not private to the ATA code and should
therefore not contain stuff only usefull there.
Alan Cox [Tue, 30 Jul 2002 07:36:23 +0000 (00:36 -0700)]
[PATCH] cs5530 IDE driver cli/sti fixes and cleanups
The CS5530 one seems unneeded looking at the databook. Try the patch
below instead, which removes the irq lock and uses the proper kernel
functions to enable MWI and master.