scsi: upstream arcmsr-1.20.00.15
Subsystems (3)
PATCH 1/1 scsi: upstream arcmsr-1.20.00.15
Subject: [PATCH] scsi: upstream arcmsr-1.20.00.15
From: Nick Cheng <[email protected]> Description:
** support ARC1200/1201/1202 SATA RAID adapter, which is named ACB_ADAPTER_TYPE_B
** modify the arcmsr_pci_slot_reset function
** modify the arcmsr_pci_ers_disconnect_forepart function ** modify the arcmsr_pci_ers_need_reset_forepart function
Documentation/scsi/ChangeLog.arcmsr +16 -1
@@ -53,4 +53,19 @@ ** for linux standard list ** enable usage of pci message signal interrupt ** follow Randy.Danlup kindness suggestion cleanup this code -************************************************************************** +** 1.20.00.14 05/02/2007 Erich Chen & Nick Cheng +** 1.implement PCI-Express error recovery function and AER capability +** 2.implement the selection of ARCMSR_MAX_XFER_SECTORS_B=4096 +** if firmware version is newer than 1.42 +** 3.modify arcmsr_iop_reset to improve the ability +** 4.modify the ISR, arcmsr_interrupt routine,to prevent the +** inconsistency with sg_mod driver if application directly calls +** the arcmsr driver w/o passing through scsi mid layer +** specially thanks to Yanmin Zhang's openhanded help about AER +** 1.20.00.15 08/30/2007 Erich Chen & Nick Cheng +** 1. support ARC1200/1201/1202 SATA RAID adapter, which is named +** ACB_ADAPTER_TYPE_B +** 2. modify the arcmsr_pci_slot_reset function +** 3. modify the arcmsr_pci_ers_disconnect_forepart function +** 4. modify the arcmsr_pci_ers_need_reset_forepart function +**************************************************************************
drivers/scsi/Kconfig +19 -6
@@ -524,19 +524,32 @@ config SCSI_IN2000 module will be called in2000. config SCSI_ARCMSR - tristate "ARECA ARC11X0[PCI-X]/ARC12X0[PCI-EXPRESS] SATA-RAID support" + tristate "ARECA (ARC11xx/12xx/13xx/16xx) SATA/SAS RAID Host Adapter" depends on PCI && SCSI help - This driver supports all of ARECA's SATA RAID controller cards. + This driver supports all of ARECA's SATA/SAS RAID controller cards. This is an ARECA-maintained driver by Erich Chen. - If you have any problems, please mail to: < [email protected] > - Areca supports Linux RAID config tools. - - < http://www.areca.com.tw > + If you have any problems, please mail to: <[email protected]>. + Areca supports Linux RAID config tools. + Please link <http://www.areca.com.tw> To compile this driver as a module, choose M here: the module will be called arcmsr (modprobe arcmsr). +config SCSI_ARCMSR_AER + bool "Enable PCI Error Recovery Capability in Areca Driver(ARCMSR)" + depends on SCSI_ARCMSR && PCIEAER + default n + help + The advanced error reporting(AER) capability is "NOT" provided by + ARC1200/1201/1202 SATA RAID controllers cards. + If your card is one of ARC1200/1201/1202, please use the default setting, n. + If your card is other models, you could pick it + on condition that the kernel version is greater than 2.6.19. + This function is maintained driver by Nick Cheng. If you have any + problems or suggestion, you are welcome to contact with <[email protected]>. + To enable this function, choose Y here. + source "drivers/scsi/megaraid/Kconfig.megaraid" config SCSI_HPTIOP
drivers/scsi/arcmsr/arcmsr.h +143 -51
303 lines not on this page · raw message
drivers/scsi/arcmsr/arcmsr_attr.c +24 -40
178 lines not on this page · raw message
drivers/scsi/arcmsr/arcmsr_hba.c +1366 -893
2,460 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
Quoted 9 lines · nickcheng
Subject: [PATCH] scsi: upstream arcmsr-1.20.00.15
From: Nick Cheng <[email protected]> Description:
** support ARC1200/1201/1202 SATA RAID adapter, which is namedACB_ADAPTER_TYPE_B
** modify thearcmsr_pci_slot_resetfunction
** modify thearcmsr_pci_ers_disconnect_forepartfunction ** modify thearcmsr_pci_ers_need_reset_forepartfunctionSigned-off-by Nick Cheng <[email protected]>
OK, I fixed this up and applied it ... there was quite a fantastic amount of white space damage to the patch; could you run the next one through
scripts/checkpatch.pl
please?
However, even with this applied I get:
CC [M] drivers/scsi/arcmsr/arcmsr_hba.odrivers/scsi/arcmsr/arcmsr_attr.c:186: warning: initialization from incompatible pointer type drivers/scsi/arcmsr/arcmsr_attr.c:196: warning: initialization from incompatible pointer type drivers/scsi/arcmsr/arcmsr_attr.c:206: warning: initialization from incompatible pointer typedrivers/scsi/arcmsr/arcmsr_hba.c: In function 'arcmsr_alloc_ccb_pool':drivers/scsi/arcmsr/arcmsr_hba.c:329: warning: assignment from incompatible pointer typedrivers/scsi/arcmsr/arcmsr_hba.c: At top level:drivers/scsi/arcmsr/arcmsr_hba.c:101: warning:
'arcmsr_pci_error_detected' declared 'static' but never defined drivers/scsi/arcmsr/arcmsr_hba.c:102: warning: 'arcmsr_pci_slot_reset' declared 'static' but never defined
The majority being incorrect casting or the fact that binary attributes now take an additional argument. I fixed all of this up with the patch below.
Thanks,
James
drivers/scsi/arcmsr/arcmsr_attr.c +12 -3
@@ -59,7 +59,10 @@struct class_device_attribute *arcmsr_host_attrs[]; -static ssize_t arcmsr_sysfs_iop_message_read (struct kobject *kobj,char *buf,loff_t off,size_t count) +static ssize_t arcmsr_sysfs_iop_message_read (struct kobject *kobj, +struct bin_attribute *bin, +char *buf,loff_t off, +size_t count) { struct class_device *cdev = container_of(kobj,struct class_device,kobj);struct Scsi_Host *host =class_to_shost (cdev);
@@ -102,7 +105,10 @@ static ssize_t arcmsr_sysfs_iop_message_read(struct kobject *kobj, char *buf, loreturn (allxfer_len); } -static ssize_t arcmsr_sysfs_iop_message_write (struct kobject *kobj,char *buf,loff_t off,size_t count) +static ssize_t arcmsr_sysfs_iop_message_write (struct kobject *kobj, +struct bin_attribute *bin, +char *buf,loff_t off, +size_t count) { struct class_device *cdev = container_of(kobj,struct class_device,kobj);struct Scsi_Host *host =class_to_shost (cdev);
@@ -147,7 +153,10 @@ static ssize_t arcmsr_sysfs_iop_message_write(struct kobject *kobj, char *buf, l } } -static ssize_t arcmsr_sysfs_iop_message_clear (struct kobject *kobj,char *buf,loff_t off,size_t count) +static ssize_t arcmsr_sysfs_iop_message_clear (struct kobject *kobj, +struct bin_attribute *bin, +char *buf,loff_t off, +size_t count) { struct class_device *cdev = container_of(kobj,struct class_device,kobj);struct Scsi_Host *host =class_to_shost (cdev);
drivers/scsi/arcmsr/arcmsr_hba.c +1 -4
@@ -97,9 +97,6 @@ static void arcmsr_flush_hba_cache(struct AdapterControlBlock *acb);static void arcmsr_flush_hbb_cache (struct AdapterControlBlock *acb);static const char *arcmsr_info (struct Scsi_Host *);static irqreturn_t arcmsr_interrupt (struct AdapterControlBlock *acb); -static pci_ers_result_t arcmsr_pci_error_detected (struct pci_dev *pdev, -pci_channel_state_t state); -static pci_ers_result_t arcmsr_pci_slot_reset (struct pci_dev *pdev);static int arcmsr_adjust_disk_queue_depth (struct scsi_device *sdev,int queue_depth) {
@@ -326,7 +323,7 @@ static int arcmsr_alloc_ccb_pool(struct AdapterControlBlock *acb) reg = (struct MessageUnit_B *)(dma_coherent +ARCMSR_MAX_FREECCB_NUM *sizeof (struct CommandControlBlock )); - acb->pmu = (struct MessageUnit_B *)reg; + acb->pmu = (struct MessageUnit *)reg; mem_base0 =ioremap (pci_resource_start (pdev,0 ),pci_resource_len (pdev,0 )); mem_base1 = ioremap(pci_resource_start(pdev, 2),