Commit Graph

14 Commits (f0d36efdc624beb3d9e29b9ab9e9537bf0f25d5b)

Author SHA1 Message Date
Ed Lin febb631c11 [SCSI] stex: version update
Update version to 3.1.0.1

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-12-05 11:33:58 -06:00
Ed Lin 76fbf96f82 [SCSI] stex: change wait loop code
The original wait loop may be much longer than intended time.
Use more accurate timer_after for it. Also adjust wait value to
avoid unnecessary long waiting.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-12-05 11:33:38 -06:00
Ed Lin 94e9108b5a [SCSI] stex: add new device type support
Add support for st_vsc1 type device (st_vsc is ok because it does not
require extra buffer).

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-12-05 11:33:24 -06:00
Ed Lin ee926b27a0 [SCSI] stex: update device id info
- add comments for various devices
- remove unused device ids(0xf350, 0x4301, 0x8301, 0x8302)
- add new device id(0xe350)
- fix vendor id of st_vsc
- modify Kconfig help info

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-12-05 11:33:06 -06:00
Ed Lin 529e7a62c8 [SCSI] stex: adjust default queue length
Firmware of new version may adjust default queue length. It is
backward compatible.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-12-05 11:32:46 -06:00
Ed Lin 47c4f997c7 [SCSI] stex: add value check in hard reset routine
During hard reset, an all-1 value from PCI_COMMAND should be invalid.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-12-05 11:32:30 -06:00
Ed Lin 4eea9dc45f [SCSI] stex: fix controller_info command handling
This command needs information from both firmware and driver. First copy
information from firmware to buffer, then fill in driver information.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-12-05 11:31:43 -06:00
Ed Lin b4b8bed123 [SCSI] stex: fix biosparam calculation
Fix biosparam calculation.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-12-05 11:31:26 -06:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Ed Lin fb4f66be59 [SCSI] stex: add new device (id 0x8650) support
A new device (id 0x8650, nickname 'yosemite') support is added.
It's basically the same, except for following items:
- mapping of id and lun by firmware
- special handling for some commands in interrupt routine
- change of internal copy function for these special commands
- different reset handling code
- different shutdown notification command

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:05:52 -05:00
Ed Lin f903d7b7a8 [SCSI] stex: cancel unused field in struct req_msg
The payload_sz field in struct req_msg is not big enough to indicate
the size of req_msg, as its type is u8.
It is confirmed that this field is not used by firmware, so cancel
it here.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-10-01 15:05:38 -05:00
James Bottomley deb81d80ba [SCSI] add failure return to scsi_init_shared_tag_map()
And use it in the stex driver.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:57:28 -05:00
Ed Lin cf355883f5 [SCSI] stex: add shared tags from block
Use block shared tags entirely within the driver. In the case of
shutdown, assume that there are no other outstanding commands, so tag
0 is fine.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:57:02 -05:00
Jeff Garzik 5a25ba1677 [SCSI] Add Promise SuperTrak driver
Add Promise SuperTrak 'stex' driver, supporting SuperTrak
EX8350/8300/16350/16300 controllers.  The controller's firmware accepts
SCSI commands, handing them to the underlying RAID or JBOD disks.

The driver consisted of the following cleanups and fixes, beyond its
initial submission:

Ed Lin:
      stex: cleanup and minor fixes
      stex: add new device ids
      stex: update internal copy code path
      stex: add hard reset function
      stex: adjust command timeout in slave_config routine
      stex: use more efficient method for unload/shutdown flush

Jeff Garzik:
      [SCSI] Add Promise SuperTrak 'shasta' driver.
      Rename drivers/scsi/shasta.c to stex.c ("SuperTrak EX").
      [SCSI] stex: update with community comments from 'Promise SuperTrak' thread
      [SCSI] stex: Fix warning, trim trailing whitespace.
      [SCSI] stex: remove last remnants of "shasta" project code name
      [SCSI] stex: removed 6-byte command emulation
      [SCSI] stex: minor cleanups
      [SCSI] stex: minor fixes: irq flag, error return value
      [SCSI] stex: use dma_alloc_coherent()

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-02 13:54:02 -05:00