Skip to contentSkip to conversation

hptiop: add more adapter models and other fixes

PATCH In review HighPoint Linux Team 2 participants 3 messages Dec 10, 2007 – Dec 11, 2007

Subsystems (3)
lore
Share & tools
lore

HighPoint Linux Team

author maintainer
#0 lore raw

PATCH 1/1 hptiop: add more adapter models and other fixes

Most code changes were made to support adapters based on Marvell IOP, plus some other fixes.

- add more PCI device IDs
- support for adapters based on Marvell IOP
- fix a result code translation error on big-endian systems
- fix resource releasing bug when scsi_host_alloc() fail in hptiop_probe()
- update scsi_cmnd.resid when finishing a request
- correct some coding style issues

---

 Documentation/scsi/hptiop.txt |   30 ++-
 drivers/scsi/Kconfig          |    4 +-
 drivers/scsi/hptiop.c         |  589 ++++++++++++++++++++++++++++++++---------
 drivers/scsi/hptiop.h         |  101 ++++++--
 4 files changed, 568 insertions(+), 156 deletions(-)
Documentation/scsi/hptiop.txt +21 -9
index d28a312..a6eb4ad 100644
@@ -1,9 +1,9 @@
-HIGHPOINT ROCKETRAID 3xxx RAID DRIVER (hptiop)
+HIGHPOINT ROCKETRAID 3xxx/4xxx ADAPTER DRIVER (hptiop)
 
 Controller Register Map
 -------------------------
 
-The controller IOP is accessed via PCI BAR0.
+For Intel IOP based adapters, the controller IOP is accessed via PCI BAR0:
 
      BAR0 offset    Register
             0x10    Inbound Message Register 0
@@ -18,6 +18,24 @@ The controller IOP is accessed via PCI BAR0.
             0x40    Inbound Queue Port
             0x44    Outbound Queue Port
 
+For Marvell IOP based adapters, the IOP is accessed via PCI BAR0 and BAR1:
+
+     BAR0 offset    Register
+         0x20400    Inbound Doorbell Register
+         0x20404    Inbound Interrupt Mask Register
+         0x20408    Outbound Doorbell Register
+         0x2040C    Outbound Interrupt Mask Register
+
+     BAR1 offset    Register
+             0x0    Inbound Queue Head Pointer
+             0x4    Inbound Queue Tail Pointer
+             0x8    Outbound Queue Head Pointer
+             0xC    Outbound Queue Tail Pointer
+            0x10    Inbound Message Register
+            0x14    Outbound Message Register
+     0x40-0x1040    Inbound Queue
+   0x1040-0x2040    Outbound Queue
+
 
 I/O Request Workflow
 ----------------------
@@ -73,15 +91,9 @@ The driver exposes following sysfs attributes:
      driver-version        R     driver version string
      firmware-version      R     firmware version string
 
-The driver registers char device "hptiop" to communicate with HighPoint RAID
-management software. Its ioctl routine acts as a general binary interface 
-between the IOP firmware and HighPoint RAID management software. New management
-functions can be implemented in application/firmware without modification
-in driver code.
-
 
 -----------------------------------------------------------------------------
-Copyright (C) 2006 HighPoint Technologies, Inc. All Rights Reserved.
+Copyright (C) 2006-2007 HighPoint Technologies, Inc. All Rights Reserved.
 
   This file is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
drivers/scsi/Kconfig +2 -2
index 86cf10e..ba118ba 100644
@@ -573,10 +573,10 @@ config SCSI_ARCMSR_AER
 source "drivers/scsi/megaraid/Kconfig.megaraid"
 
 config SCSI_HPTIOP
-	tristate "HighPoint RocketRAID 3xxx Controller support"
+	tristate "HighPoint RocketRAID 3xxx/4xxx Controller support"
 	depends on SCSI && PCI
 	help
-	  This option enables support for HighPoint RocketRAID 3xxx
+	  This option enables support for HighPoint RocketRAID 3xxx/4xxx
 	  controllers.
 
 	  To compile this driver as a module, choose M here; the module
drivers/scsi/hptiop.c +462 -127

924 lines not on this page · raw message

drivers/scsi/hptiop.h +83 -18

156 lines not on this page · raw message

#1 lore raw
Quoted 5 lines · HighPoint Linux Team

Most code changes were made to support adapters based on Marvell IOP, plus some other fixes.

- add more PCI device IDs
- support for adapters based on Marvell IOP

Are you sure it's a good idea to do this? This patch is 1200 lines long ... the same size as the existing driver:

$ wc drivers/scsi/hptiop.*
  947  2273 24531 drivers/scsi/hptiop.c
  256   612  6175 drivers/scsi/hptiop.h
  1203  2885 30706 total

That suggests to me there's not much commonality between the two drivers, and you'd be better off adding a second driver for the 4xxx cards.

Signature · 4 lines
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
author maintainer
#2 lore raw
Quoted 6 lines · Matthew Wilcox
Quoted 2 lines

- add more PCI device IDs
- support for adapters based on Marvell IOP

Are you sure it's a good idea to do this? This patch is 1200 lines long ... the same size as the existing driver:

Quoted 7 lines
$ wc drivers/scsi/hptiop.*
  947  2273 24531 drivers/scsi/hptiop.c
  256   612  6175 drivers/scsi/hptiop.h
  1203  2885 30706 total

That suggests to me there's not much commonality between the two drivers, and you'd be better off adding a second driver for the 4xxx cards

The new adapter implementation adds to the driver about 300 lines of code (some lines in the original driver was changed slightly to accommodate the difference). It is only different from the original models on the messaging interface, and still shares same firmware command block structures and work flow.

HighPoint Linux Team