Commit Graph

12 Commits

Author SHA1 Message Date
Boaz Harrosh
3892d88ae6 [SCSI] gdth: !use_sg cleanup and use of scsi accessors
gdth_execute() will issue an internal, none scsi-standard commands
onto __gdth_queuecommand(). Since it is not recommended to set
struct scsi_cmnd IO members in llds, gdth now uses internal IO
members for IO. In the case of gdth_execute() these members will be
set properly. In case the command was issued from scsi-ml
(by gdth_queuecommand) they will be set from scsi IO accessors.

  * define gdth IO accessors and use them throughout the driver.
  * use an sg-of-one in gdth_execute() and fix gdth_special_cmd()
    accordingly.
  * Clean the not use_sg code path and company

Signed-off-by Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12 14:56:13 -04:00
Boaz Harrosh
f842b64e0f [SCSI] gdth: Move members from SCp to gdth_cmndinfo, stage 2
- Cleanup the rest of the scsi_cmnd->SCp members and move them
    to gdth_cmndinfo:
    SCp.this_residual 	 => priority
    SCp.buffers_residual => timeout
    SCp.Status 		 => status and dma_dir
    SCp.Message 	 => info
    SCp.have_data_in 	 => volatile wait_for_completion
    SCp.sent_command 	 => OpCode
    SCp.phase 		 => phase

  - Two more members will be naturally removed in the !use_sg cleanup

  TODO: What is the meaning of gdth_cmndinfo.phase? (rhetorically)

Signed-off-by Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12 14:56:09 -04:00
Boaz Harrosh
3058d5de47 [SCSI] gdth: Setup proper per-command private data
- scsi_cmnd and specifically ->SCp of, where heavily abused
    with internal meaning members and flags. So introduce a new
    struct gdth_cmndinfo, put it on ->host_scribble and define a
    gdth_cmnd_priv() accessor to retrieve it from a scsi_cmnd.

  - The structure now holds two members:
    internal_command - replaces the IS_GDTH_INTERNAL_CMD() croft.
    sense_paddr - which was a 64-bit spanning on 2 32-bit members of SCp.
    More overloaded members from SCp and scsi_cmnd will be moved in a later
    patch (For easy review).

  - Split up gdth_queuecommand to an additional internal_function. The later
    is the one called by gdth_execute(). This will be more evident later in
    the scsi accessors patch, but it also facilitates in the differentiation
    between internal_command and external. And the setup of gdth_cmndinfo of
    each command.

Signed-off-by Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12 14:56:05 -04:00
Christoph Hellwig
835cc24aff [SCSI] gdth: switch to modern scsi host registration
- Use scsi_add_host and friends and track instances ourselves. And
    generally modernize the driver's structure.

  - TODO: Next we can remove the controller table
  - TODO: Fix use of deprecated pci_find_device()

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12 14:55:55 -04:00
Boaz Harrosh
45f1a41b2b [SCSI] gdth: clean up host private data
- Based on same patch from Christoph Hellwig <hch@lst.de>

  - Get rid of all the indirection in the Scsi_Host private data and always
    put the gdth_ha_str directly into it.

  - Change all internal functions prototype to recieve an "gdth_ha_str *ha"
    pointer directlly and kill all that redundent access to the "gdth_ctr_tab[]"
    controller-table.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12 14:55:46 -04:00
Jeff Garzik
8d7a5da4fc [SCSI] gdth: Remove 2.4.x support, in-kernel changelog
* Remove in-source changelog.  It's archived permanently in git and
    various kernel archives, and changelogs should exist purely in git.

  * Remove 2.4.x kernel support.  It is an active obstacle to
    modernizing this driver, at this point.  This includes killing
    gdth_kcompat.h which is 100% redundant in modern kernels.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12 14:55:29 -04:00
Jeff Garzik
8e9a8a0d56 [SCSI] gdth: remove redundant PCI stuff
This patch

* removes struct members that duplicate pci_dev members
* replaces ha->stype usage with ha->pdev->device usage where feasible

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Acked-by: Christoph Hellwig <hch@lst.de>
Acked-by: Achim Leubner <Achim_Leubner@adaptec.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-07-31 10:36:30 -05:00
Michal Piotrowski
c03d10ab6a [SCSI] drivers/scsi/gdth.h: removal of old scsi code
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-09-26 11:35:16 -07:00
Leubner, Achim
cbd5f69b98 [SCSI] remove the scsi_request interface from the gdth driver
Initial pass at converting the gdth driver away from the scsi_request
interface so that the request interface can be removed post 2.6.18
without breaking gdth.  Based on changes from Christoph Hellwig
<hch@lst.de>

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10 10:24:40 -05:00
Christoph Hellwig
f64a181d89 [SCSI] remove Scsi_Device typedef
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-11-09 15:48:20 -05:00
8e8790415e [PATCH] drivers/scsi/gdth.c: cleanups
This patch contains the following cleanups:
- make some needlessly global functions static
- remove one more kernel 2.2 #ifdef

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18 13:50:23 -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