Commit graph

26 commits

Author SHA1 Message Date
Grant Grundler b2b3c12107 [SCSI] sym2: claim only "Storage" class
The follow patch fixes a problem for Matt Taggart.
The Compaq system he had (dl380?) has a SmartArray device that exposes
the 53c1510 device in both RAID and "normal" modes. The difference
is in RAID mode, the smart array driver (IIRC) should claim the
device instead of sym2 driver. Patch below prevents sym2 from
claiming the device when the RAID "daughter board" is attached.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-28 11:46:38 -05:00
Thomas Gleixner 1d6f359a2e [PATCH] irq-flags: scsi: Use the new IRQF_ constants
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-02 13:58:53 -07:00
Linus Torvalds 28e4b22495 Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (85 commits)
  [SCSI] 53c700: remove reliance on deprecated cmnd fields
  [SCSI] hptiop: don't use cmnd->bufflen
  [SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
  [SCSI] aacraid: small misc. cleanups
  [SCSI] aacraid: Update supported product information
  [SCSI] aacraid: Fix return code interpretation
  [SCSI] scsi_transport_sas: fix panic in sas_free_rphy
  [SCSI] remove RQ_SCSI_* flags
  [SCSI] remove scsi_request infrastructure
  [SCSI] mptfusion: change driver revision to 3.03.10
  [SCSI] mptfc: abort of board reset leaves port dead requiring reboot
  [SCSI] mptfc: fix fibre channel infinite request/response loop
  [SCSI] mptfc: set fibre channel fw target missing timers to one second
  [SCSI] mptfusion: move fc event/reset handling to mptfc
  [SCSI] spi transport: don't allow dt to be set on SE or HVD buses
  [SCSI] aic7xxx: expose the bus setting to sysfs
  [SCSI] scsi: remove Documentation/scsi/cpqfc.txt
  [SCSI] drivers/scsi: Use ARRAY_SIZE macro
  [SCSI] Remove last page_address from dc395x.c
  [SCSI] hptiop: HighPoint RocketRAID 3xxx controller driver
  ...

Fixed up conflicts in drivers/message/fusion/mptbase.c manually (due to
the sparc interrupt cleanups)
2006-06-21 11:18:25 -07:00
David S. Miller c6387a48cf [SPARC]: Kill __irq_itoa().
This ugly hack was long overdue to die.

It was a way to print out Sparc interrupts in a more freindly format,
since IRQ numbers were arbitrary opaque 32-bit integers which vectored
into PIL levels.  These 32-bit integers were not necessarily in the
0-->NR_IRQS range, but the PILs they vectored to were.

The idea now is that we will increase NR_IRQS a little bit and use a
virtual<-->real IRQ number mapping scheme similar to PowerPC.

That makes this IRQ printing hack irrelevant, and furthermore only a
handful of drivers actually used __irq_itoa() making it even less
useful.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-06-20 01:21:29 -07:00
Christoph Hellwig 5d5ff44fe6 [SCSI] fix up request buffer reference in various scsi drivers
Various scsi drivers use scsi_cmnd.buffer and scsi_cmnd.bufflen in their
queuecommand functions.  Those fields are internal storage for the
midlayer only and are used to restore the original payload after
request_buffer and request_bufflen have been overwritten for EH.  Using
the buffer and bufflen fields means they do very broken things in error
handling.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-06 11:07:25 -04:00
Matthew Wilcox d637c4543f [SCSI] sym2: Fix build when spinlock debugging is enabled
When spinlock debugging is turned on, a struct completion grows beyond the
size allowed for the scsi_pointer.  So move the struct completion back onto
the stack.  The additional memory barriers are to keep us from completing
a random piece of kernel stack if the command happens to complete after
the error handling has finished.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:30 -05:00
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