Commit Graph

1002 Commits

Author SHA1 Message Date
Linus Torvalds d99cf9d679 Merge branch 'post-2.6.15' of git://brick.kernel.dk/data/git/linux-2.6-block
Manual fixup for merge with Jens' "Suspend support for libata", commit
ID 9b84754866.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 09:01:25 -08:00
Jens Axboe 9b84754866 [PATCH] Suspend support for libata
This patch adds suspend patch to libata, and ata_piix in particular. For
most low level drivers, they should just need to add the 4 hooks to
work. As I can only test ata_piix, I didn't enable it for more
though.

Suspend support is the single most important feature on a notebook, and
most new notebooks have sata drives. It's quite embarrassing that we
_still_ do not support this. Right now, it's perfectly possible to
suspend the drive in mid-transfer.

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-01-06 08:36:09 -08:00
Marko Kohtala 6a19b41b35 [PATCH] parport: Kconfig dependency fixes
Make drivers that use directly PC parport HW depend on PARPORT_PC rather than
HW independent PARPORT.

Signed-off-by: Marko Kohtala <marko.kohtala@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:57 -08:00
Martin Schwidefsky 347a8dc3b8 [PATCH] s390: cleanup Kconfig
Sanitize some s390 Kconfig options.  We have ARCH_S390, ARCH_S390X,
ARCH_S390_31, 64BIT, S390_SUPPORT and COMPAT.  Replace these 6 options by
S390, 64BIT and COMPAT.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-06 08:33:53 -08:00
Jens Axboe e650c305ec [SCSI] scsi_end_async() needs to take an uptodate parameter
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 12:38:30 +01:00
Tejun Heo 9a3dccc425 [BLOCK] add FUA support to libata
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:56:18 +01:00
Tejun Heo 93c9338713 [BLOCK] update libata to use new blk_ordered for barriers
Reflect changes in SCSI midlayer and updated to use new
ordered request implementation

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:55:00 +01:00
Tejun Heo 007365ad60 [BLOCK] scsi: add FUA support to sd
Add FUA support for barriers to SCSI disk.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:53:52 +01:00
Tejun Heo 461d4e90c8 [BLOCK] update SCSI to use new blk_ordered for barriers
All ordered request related stuff delegated to HLD.  Midlayer
now doens't deal with ordered setting or prepare_flush
callback.  sd.c updated to deal with blk_queue_ordered
setting.  Currently, ordered tag isn't used as SCSI midlayer
cannot guarantee request ordering.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-06 09:52:55 +01:00
Tejun Heo 8ffdc6550c [BLOCK] add @uptodate to end_that_request_last() and @error to rq_end_io_fn()
add @uptodate argument to end_that_request_last() and @error
to rq_end_io_fn().  there's no generic way to pass error code
to request completion function, making generic error handling
of non-fs request difficult (rq->errors is driver-specific and
each driver uses it differently).  this patch adds @uptodate
to end_that_request_last() and @error to rq_end_io_fn().

for fs requests, this doesn't really matter, so just using the
same uptodate argument used in the last call to
end_that_request_first() should suffice.  imho, this can also
help the generic command-carrying request jens is working on.

Signed-off-by: tejun heo <htejun@gmail.com>
Signed-Off-By: Jens Axboe <axboe@suse.de>
2006-01-06 09:49:03 +01:00
Dominik Brodowski f8cfa618dc [PATCH] pcmcia: unify attach, EVENT_CARD_INSERTION handlers into one probe callback
Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
probe() callback. As all in-kernel drivers are changed to this new
callback, there will be no temporary backwards-compatibility. Inside a
probe() function, each driver _must_ set struct pcmcia_device
*p_dev->instance and instance->handle correctly.

With these patches, the basic driver interface for 16-bit PCMCIA drivers
now has the classic four callbacks known also from other buses:

        int (*probe)            (struct pcmcia_device *dev);
        void (*remove)          (struct pcmcia_device *dev);

        int (*suspend)          (struct pcmcia_device *dev);
        int (*resume)           (struct pcmcia_device *dev);

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:24 +01:00
Dominik Brodowski b463581154 [PATCH] pcmcia: remove dev_list from drivers
The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:20 +01:00
Dominik Brodowski cc3b4866be [PATCH] pcmcia: unify detach, REMOVAL_EVENT handlers into one remove callback
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-06 00:03:10 +01:00
Dominik Brodowski 98e4c28b7e [PATCH] pcmcia: new suspend core
Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.

Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew Morton <akpm@osdl.org>

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
2006-01-05 23:59:02 +01:00
Linus Torvalds db9edfd7e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6
Trivial manual merge fixup for usb_find_interface clashes.
2006-01-04 18:44:12 -08:00
Linus Torvalds 25c862cc9e Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2006-01-04 16:36:52 -08:00
Linus Torvalds 1cb9e8e01d Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2006-01-04 16:32:33 -08:00
Linus Torvalds f61ea1b0c8 Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 2006-01-04 16:30:12 -08:00
Kay Sievers 312c004d36 [PATCH] driver core: replace "hotplug" by "uevent"
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 16:18:08 -08:00
Kay Sievers 5f123fbd80 [PATCH] merge kobject_uevent and kobject_hotplug
The distinction between hotplug and uevent does not make sense these
days, netlink events are the default.

udev depends entirely on netlink uevents. Only during early boot and
in initramfs, /sbin/hotplug is needed. So merge the two functions and
provide only one interface without all the options.

The netlink layer got a nice generic interface with named slots
recently, which is probably a better facility to plug events for
subsystem specific events.
Also the new poll() interface to /proc/mounts is a nicer way to
notify about changes than sending events through the core.
The uevents should only be used for driver core related requests to
userspace now.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 16:18:07 -08:00
Jeff Garzik a18ceba7b4 Merge branch 'master' 2006-01-03 10:58:53 -05:00
Brian Gerst 352dd1df32 gitignore: misc files
Ignore all files generated from *_shipped files, plus a few others.

Signed-off-by: Brian Gerst <bgerst@didntduck.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-01-01 22:21:50 +01:00
James Bottomley 04333393b9 [PATCH] Fix Fibre Channel boot oops
The oops is characteristic of the underlying device being removed from
visibility before the class device, and sure enough we do device_del()
before transport_unregister() in the scsi_target_reap() routines.  I've
no idea why this is suddenly showing up, since the code has been in
there since that function was first invented.  However, I've confirmed
this fixes Andrew Vasquez's boot oops.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-26 10:17:43 -08:00
Linus Torvalds cdcdb28623 Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev 2005-12-24 12:40:43 -08:00
Tony Battersby fd71da468d [PATCH] fix libata inquiry VPD for ATAPI devices
The following patch prevents libata from incorrectly modifying inquiry
VPD pages and command support data from ATAPI devices.  I have tested
the patch with a SATA ATAPI tape drive on an AHCI controller.

Patch is against kernel 2.4.32 with 2.4.32-libata1.patch applied.

Anthony J. Battersby
Cybernetics

Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
2005-12-24 10:02:24 -05:00
Jeff Garzik aaadff8119 Merge branch 'master' 2005-12-24 09:31:05 -05:00
Linus Torvalds d5ea4e2660 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6 2005-12-21 15:09:50 -08:00
Salyzyn, Mark e5508c13ac [PATCH] dpt_i2o fix for deadlock condition
Miquel van Smoorenburg <miquels@cistron.nl> forwarded me this fix to
resolve a deadlock condition that occurs due to the API change in
2.6.13+ kernels dropping the host locking when entering the error
handling.  They all end up calling adpt_i2o_post_wait(), which if you
call it unlocked, might return with host_lock locked anyway and that
causes a deadlock.

Signed-off-by: Mark Salyzyn <aacraid@adaptec.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18 11:19:44 -08:00
Matthew Wilcox 7b32b8e018 [SCSI] Missing const in sr_vendor
Fix compile warnings with current scsi-misc git tree

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-17 10:50:23 -06:00
James Bottomley 863a930a40 [SCSI] fix scsi_reap_target() device_del from atomic context
scsi_reap_target() was desgined to be called from any context.
However it must do a device_del() of the target device, which may only
be called from user context.  Thus we have to reimplement
scsi_reap_target() via a workqueue.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-17 10:48:08 -06:00
Matthew Wilcox 19c65091c1 [SCSI] Merge sym53c8xx_comm.h and sym53c8xx_defs.h into ncr driver
When the sym1 driver was in the tree, it used to share various parts of
its infrastructure with the ncr driver.  Now it's gone, these files are
just an annoyance, so merge sym53c8xx_comm.h into ncr53c8xx.c and merge
sym53c8xx_defs.h into ncr53c8xx.h.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-16 10:53:47 -08:00
Matthew Wilcox cd453c6353 [SCSI] Use spi_print_msg in ncr53c8xx driver
The ncr53c8xx driver had its own loop to print scsi messages.  Use the
SPI one instead.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-16 10:52:38 -08:00
James Bottomley 8f23d47558 [SCSI] 53c700: update endian processing macros
This update now allows this driver to be used on big endian bus
machines that aren't parisc.  To do that, the driver must set a
CONFIG_53C700_BE_BUS in Kconfig to compile the right macro versions.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-16 09:51:01 -08:00
James.Smart@Emulex.Com 42e33148df [SCSI] fix for fc transport recursion problem.
In the scenario that a link was broken, the devloss timer for each
rport was expire at roughly the same time, causing lots of "delete"
workqueue items being queued. Depth is dependent upon the number of
rports that were on the link.

The rport target remove calls were calling flush_scheduled_work(),
which would interrupt the stream, and start the next workqueue item,
which did the same thing, and so on until recursion depth was large.

This fix stops the recursion in the initial delete path, and pushes it
off to a host-level work item that reaps the dead rports.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15 19:22:14 -08:00
Matthew Wilcox ef72582e7a [SCSI] Add PPR support to spi_print_msg
Introduce a new helper, print_nego() to handle SDTR/WDTR/PPR.
Split out the guts of show_spi_transport_period_helper() into period_to_str()
and use it in print_nego to get the period factor conversion right.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15 18:42:39 -08:00
Matthew Wilcox b32aaffcdc [SCSI] Use ARRAY_SIZE in spi_print_msg
Replace the custom NO_*_MSGS definitions with uses of ARRAY_SIZE.
This fixes a bug in the definition of NO_EXTENDED_MSGS.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15 18:42:18 -08:00
Matthew Wilcox 4797215389 [SCSI] Fix printing of two-byte messages
A missing comma meant that "Ordered Queue Tag" and "Ignore Wide Residue"
were being concatenated together.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15 18:41:55 -08:00
Matthew Wilcox 1abfd37013 [SCSI] Rename scsi_print_msg to spi_print_msg
Rename scsi_print_msg to spi_print_msg and move its prototype from
scsi_dbg.h to scsi_transport_spi.h

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15 18:41:27 -08:00
Matthew Wilcox 410ca5c7c6 [SCSI] Move scsi_print_msg to SPI class
scsi_print_msg() is an SPI-specific concept.  This patch moves it from
constants.c to scsi_transport_spi.c and updates the Kconfig to link in
the SPI class for the drivers which use scsi_print_msg().

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15 18:41:13 -08:00
James Bottomley 7b16318dea Fix up SCSI mismerge
I forgot to do a git-update-cache on the merged files ...
2005-12-15 20:17:02 -06:00
James Bottomley 2a1e1379ba Merge by hand (conflicts in scsi_lib.c)
This merge is pretty extensive.  The conflict is over the new
req->retries parameter, so I had to change the prototype to
scsi_setup_blk_pc_cmnd() and the usage in sd, sr and st.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15 17:35:24 -06:00
Kai Makisara 787926b1b2 [SCSI] Fix st oops with new scsi_execute infrastructure
Patch from Kai minus last sg_segs clearing which was merged already.

> > Was there a oops or lockup or any debug output you can send me? I will try
> > some more large request tests with scsi_debug. You also have to compile your
> > kernel with SCSI_MAX_PHYS_SEGMENTS == 255 to get larger requests now.
>
It was an oops in sgl_unmap_user_pages(). The reason is this:

		/* XXX: just for debug. Remove when PageReserved is removed */
		BUG_ON(PageReserved(page));

I was using /dev/zero as input and it triggers this. When I used a file as
input, this did not trigger. Should this BUG_ON be removed?

In the same log I noticed that there was another ->sg_segs inconsistency.
Also, the field ->last_SRpnt was not reset when scsi_execute_async()
failed. This caused the error message "Async command already active"
later and prevented proper close.

While doing the changes, I noticed that the current code (since
2.6.0-test4) does not set the pages dirty when reading with direct i/o.

All of these st problems (including the one I sent earlier) are fixed in
the patch at the end of this message. These fixes should probably be
included already in 2.6.15.

After these fixes, the tape seems to operate as expected. Without other
changes, the largest block size with sym53c896 SCSI adapter is 384 kB. The
maximum number of sg segments is set to 96 and clustering is disabled in
the driver. 96 x 4 kB = 384 kB. OK.

I enabled clustering and set max_sectors to 10000 in the SCSI HBA driver.
Now the block size limit is 5000 kB as expected.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15 15:17:03 -08:00
Mike Christie defd94b754 [SCSI] seperate max_sectors from max_hw_sectors
- export __blk_put_request and blk_execute_rq_nowait
needed for async REQ_BLOCK_PC requests
- seperate max_hw_sectors and max_sectors for block/scsi_ioctl.c and
SG_IO bio.c helpers per Jens's last comments. Since block/scsi_ioctl.c SG_IO was
already testing against max_sectors and SCSI-ml was setting max_sectors and
max_hw_sectors to the same value this does not change any scsi SG_IO behavior. It only
prepares ll_rw_blk.c, scsi_ioctl.c and bio.c for when SCSI-ml begins to set
a valid max_hw_sectors for all LLDs. Today if a LLD does not set it
SCSI-ml sets it to a safe default and some LLDs set it to a artificial low
value to overcome memory and feedback issues.

Note: Since we now cap max_sectors to BLK_DEF_MAX_SECTORS, which is 1024,
drivers that used to call blk_queue_max_sectors with a large value of
max_sectors will now see the fs requests capped to BLK_DEF_MAX_SECTORS.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15 15:11:40 -08:00
Al Viro b53cb2a4ab [PATCH] iscsi gfp_t annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15 10:04:29 -08:00
Mike Christie 8b05b773b6 [SCSI] convert st to use scsi_execute_async
convert st to always send scatterlists and kill scsi_request
usage.

This is the same as last time as it was posted, but with Kai's patches
merged and we now pass the bytes value to scsi_execute_async.

TODO:

- move DIO code to common place or make block layers usable for ULDs.
- move buffer allocation code to common place for all ULDs to use. And
make buffer allocation code handle all queue limits so we can find
out about problems before calling scsi_execute_async.
- move indirect (copy_to/from_user) paths commone place or make block
layers usable for ULDs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14 19:16:31 -08:00
Mike Christie d6b10348f9 [SCSI] convert sg to scsi_execute_async
Convert sg to always send scatterlists, and kill scsi_request usage.

TODO:

- move DIO code to common place or make block layers usable for ULDs.
- move buffer allocation code to common place for all ULDs to use. And
make buffer allocation code obey all queue limits so we can find
out about problems before calling scsi_execute_async. Currently, sg.c
could allocate a buffer that is too large, and send the request
to scsi_execute_async. scsi_execute_async will then check it against
all the queue limits and return a failure in this case. It would nicer
to know about the queue limit violation right away.
- move indirect (copy_to/from_user) paths commone place or make block
layers usable for ULDs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14 19:15:45 -08:00
Mike Christie aa7b5cd750 [SCSI] add kmemcache for scsi_io_context
Add kmemcache of scsi io contexts.

In the future when we finalize on where these functions will live
we can add a mempool for it and do a bioset for out REQ_BLOCK_PC
bios. This is needed becuase the dm-multipath handlers will
want to use the scsi_exectute* functions for failover and we cannot
have them and the bio device allocating from the same mempool.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14 19:09:09 -08:00
Mike Christie 0d95716d6a [SCSI] complete the whole command when it is REQ_BLOCK_PC
sd does not allow scsi_io_completion to retry commands for
SG_IO requests, and it make sense that it should not happen for st
SG_IO commands too. If for st we hit the bottom of scsi_io_completion
we will probably screw things up pretty bad. This patch returns to the
block layer that the whole command completed and relies on the caller to check
the request errors field. For initialization commands like in sd, this adds
the previous behavior where scsi_io_completion did not process the error.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14 19:08:16 -08:00
Mike Christie 17e01f216b [SCSI] add retries field to request for REQ_BLOCK_PC use
For tape we need to control the retries. This patch adds a retries
counter on the request for REQ_BLOCK_PC commands originating from
scsi_execute* to use. REQ_BLOCK_PC commands comming from the block
layer SG_IO path continue to use the retires set in the ULD init_command.
(scsi_execute* does not set the gendisk so we do not execute
the init_command in that path).

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14 19:04:11 -08:00
Mike Christie 6e68af666f [SCSI] Convert SCSI mid-layer to scsi_execute_async
Add scsi helpers to create really-large-requests and convert
scsi-ml to scsi_execute_async().

Per Jens's previous comments, I placed this function in scsi_lib.c.
I made it follow all the queue's limits - I think I did at least :), so
I removed the warning on the function header.

I think the scsi_execute_* functions should eventually take a request_queue
and be placed some place where the dm-multipath hw_handler can use them
if that failover code is going to stay in the kernel. That conversion
patch will be sent in another mail though.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-14 19:03:35 -08:00