Commit graph

20 commits

Author SHA1 Message Date
Matthew Wilcox 14ac8bf58d [SCSI] Enable clustering and large transfers
This patch enables clustering and sets max_sectors to 0xffff to enable
reading and writing of large blocks with tapes (and large transfers with
sg). This change is needed after the sg and st drivers started using
chained bios through scsi_request_async() in 2.6.16.

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:26 -05:00
Matthew Wilcox b4e93a739e [SCSI] Simplify error handling
Use wait_for_completion_timeout() instead of using a timer (as
Christoph Hellwig did for aic7xxx).

That lets me eliminate the sym_eh_wait structure; the struct completion,
the old_done pointer and the to_do flag can be folded into the sym_ucmd
(which overrides the scsi_pointer in scsi_cmnd).

The sym_eh_done() function becomes much simpler as the timeout handling
is done in sym_eh_handler() directly.

The host_lock can be unlocked earlier, and I cache the host in
a local variable to make accesses to it quicker.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:25 -05:00
Matthew Wilcox 3bea15a76e [SCSI] Disable sym2 driver queueing
Undef SYM_OPT_HANDLE_DEVICE_QUEUEING.
Call sym_put_start_queue instead of sym_start_next_ccbs.
Turn asserts into checks that we can send the command to the adapter,
and return busy from queuecommand if we can't.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:24 -05:00
Matthew Wilcox ab19d52bec [SCSI] Simplify error handling a bit
- to_do was never set to SYM_EH_DO_COMPLETE, so remove that code
 - move the spinlocks inside the common error handler code path

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:23 -05:00
Matthew Wilcox b6d105d7ee [SCSI] Use pcibios_resource_to_bus()
We had our own code (pci_get_base_address()) to get the bus address of
a BAR.  We can get this using pcibios_resource_to_bus() instead.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:23 -05:00
Matthew Wilcox 1f61d82490 [SCSI] Change Kconfig option from IOMAPPED to MMIO
Most of the Kconfig options for switching between IO Port and MMIO
operations use the opposite sense from sym2.  Really, this option
should be set at a chipset level rather than per-driver.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:22 -05:00
Matthew Wilcox 66e8d1cc64 [SCSI] sym2: Report disabled devices and LUNs more attractively
Rather than print a list of targets at driver init time, print each
disabled target as we attempt to scan it.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13 18:11:47 -07:00
Matthew Wilcox b37df48923 [SCSI] sym2: Allow NVRAM settings to limit speed and width
The NVRAM for both Tekram and Symbios boards allows the user to set the
speed and width for individual targets.  I took that code out in March
2004 when we introduced Domain Validation, but it seems there's still
a legitimate need for it in some configurations.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13 18:11:45 -07:00
Matthew Wilcox 1e8eb21ea7 [SCSI] sym2: Use DMA_40BIT_MASK constant
Now that this constant has been added to dma-mapping.h, we don't need our
own definition

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13 18:11:41 -07:00
Matthew Wilcox 44f30b0f59 [SCSI] sym2: Remove code to handle DMA_BIDIRECTION requests
The upper layer doesn't send these down since 2.4.x (or 2.6 in
practice), so no need to handle it.  Inline sym_setup_data_pointers
into its only caller so we can fail gracefully in the case we'd get
one neverless.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13 18:11:39 -07:00
Matthew Wilcox 84e203a279 [SCSI] sym2: Manage sym_lcb properly
Allocate the lcb in slave_alloc and free it in slave_destroy.  This allows
us to remove all the code that checks to see if it's already been allocated.

From: Christoph Hellwig <hch@lst.de>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13 18:11:33 -07:00
Matthew Wilcox 8b2f81385a [SCSI] sym2: Disable IU and QAS negotiation
Enabling these features causes problems with some drives, so disable
them until they're debugged

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-01 15:59:50 -06:00
Jeff Garzik df0ae2497d [SCSI] allow sleeping in ->eh_host_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:05:18 -05:00
Jeff Garzik 68b3aa7c98 [SCSI] allow sleeping in ->eh_bus_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:05:10 -05:00
Jeff Garzik 94d0e7b805 [SCSI] allow sleeping in ->eh_device_reset_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:05:03 -05:00
Jeff Garzik 8fa728a268 [SCSI] allow sleeping in ->eh_abort_handler()
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-06-17 12:04:55 -05:00
Matthew Wilcox 53222b9069 [SCSI] sym2 version 2.2.1
sym2 version 2.2.1:
 - Fix MMIO BAR detection (Thanks to Bob Picco)
 - Fix odd-sized transfers with a wide bus (Thanks to Larry Stephens)
 - Write posting fixes (Thanks to Thibaut Varene)
 - Change one of the GFP_KERNEL allocations back into a GFP_ATOMIC
 - Make CCB_BA() return a script-endian address
 - Move range checks and disabling of devices from the queuecommand path
   to slave_alloc()
 - Remove a warning in sym_setup_cdb()
 - Keep a pointer to the scsi_target instead of the scsi_dev in the tcb
 - Remove a check for the upper layers passing an oversized cmd
 - Replace CAM_REQ_ constants with the Linux DID_ constants
 - Replace CAM_DIR_ constants with the Linux DMA_ constants
 - Inline sym_read_parisc_pdc() on non-parisc systems

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-26 08:41:14 -05:00
James Bottomley e4862fedbc [SCSI] correct the sym2 period setting routines
There's a slight bug in the routines in that if the period requires dt,
then the routine will unconditionally set it.  DT may only be set if
Wide is also set, so this turns back on the wide bit.

For domain validation to work correctly, we need to observe the wide bit
absolutely.

Acked by: Matthew Wilcox <willy@debian.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-05-06 15:12:02 -05:00
c6295cdf65 [PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field
scsi_cmnd->serial_number_at_timeout doesn't serve any purpose
anymore.  All serial_number == serial_number_at_timeout tests
are always true in abort callbacks.  Kill the field.  Also, as
->pid always equals ->serial_number and ->serial_number
doesn't have any special meaning anymore, update comments
above ->serial_number accordingly.  Once we remove all uses of
this field from all lldd's, this field should go.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18 12:33:15 -05:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00