summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
Commit message (Collapse)AuthorAgeFilesLines
...
* [SCSI] hpsa: factor out the code to reset controllers on driver loadStephen M. Cameron2010-07-271-19/+30
| | | | | | | for kdump support Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_find_cfg_addrs.Stephen M. Cameron2010-07-271-12/+22
| | | | | | | | Rationale for this is that I will also need to use this code in fixing kdump host reset code prior to having the hba structure. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: make hpsa_find_memory_BAR not require the per HBA structure.Stephen M. Cameron2010-07-271-6/+6
| | | | | | | | | Rationale for this is that in order to fix the hard reset code used by kdump, we need to use this function before we even have the per HBA structure. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Make "hpsa_allow_any=1" boot param enable Compaq Smart Arrays.Stephen M. Cameron2010-07-271-1/+5
| | | | | | | We were previously only accepting HP boards. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: add new controllersStephen M. Cameron2010-07-271-0/+10
| | | | | | | Add 5 CCISSE smart array controllers Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: fix block fetch table problem.Stephen M. Cameron2010-07-271-1/+20
| | | | | | | | | | | | | | | | | | We have 32 (MAXSGENTRIES) scatter gather elements embedded in the command. With all these, the total command size is about 576 bytes. However, the last entry in the block fetch table is 35. (the block fetch table contains the number of 16-byte chunks the firmware needs to fetch for a given number of scatter gather elements.) 35 * 16 = 560 bytes, which isn't enough. It needs to be 36. (36 * 16 == 576) or, MAXSGENTRIES + 4. (plus 4 because there's a bunch of stuff at the front of the command before the first scatter gather element that takes up 4 * 16 bytes.) Without this fix, the controller may have to perform two DMA operations to fetch the command since the first one may not get the whole thing. Signed-off-by: Don Brace <brace@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: expose controller firmware revision via /sys.Stephen M. Cameron2010-07-271-0/+20
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: remove unused firm_ver member of the per-hba structureStephen M. Cameron2010-07-271-6/+0Star
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_enter_performant_modeStephen M. Cameron2010-07-271-24/+30
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: remove unused variable trans_offsetStephen M. Cameron2010-07-271-2/+0Star
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_wait_for_mode_change_ackStephen M. Cameron2010-07-271-23/+17Star
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: mark hpsa_mark_hpsa_put_ctlr_into_performant_mode as __devinitStephen M. Cameron2010-07-271-2/+2
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: clean up debug ifdefsStephen M. Cameron2010-07-271-6/+2Star
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: check that simple mode is supportedStephen M. Cameron2010-07-271-0/+5
| | | | | | | before trying to enter simple mode transport method. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_enter_simple_modeStephen M. Cameron2010-07-271-27/+35
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_p600_dma_prefetch_quirkStephen M. Cameron2010-07-271-11/+15
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_enable_scsi_prefetchStephen M. Cameron2010-07-271-9/+13
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa-CISS-signature-presentStephen M. Cameron2010-07-271-5/+13
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: hpsa factor out hpsa_find_board_paramsStephen M. Cameron2010-07-271-21/+25
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: fix leak of ioremapped memory in hpsa_pci_init error path.Stephen M. Cameron2010-07-271-1/+12
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_find_cfgtablesStephen M. Cameron2010-07-271-20/+30
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_wait_for_board_readyStephen M. Cameron2010-07-271-12/+17
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_find_memory_BARStephen M. Cameron2010-07-271-15/+19
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: remove redundant board_id parameter from hpsa_interrupt_modeStephen M. Cameron2010-07-271-9/+4Star
| | | | | | | and delete duplicated comment Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_board_disabledStephen M. Cameron2010-07-271-7/+9
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: factor out hpsa_lookup_board_idStephen M. Cameron2010-07-271-27/+31
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: save pdev pointer in per hba structure early to avoid passing ↵Stephen M. Cameron2010-07-271-37/+38
| | | | | | | it around so much. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: remove unneeded definesMike Miller2010-05-021-8/+0Star
| | | | | | | | This patch removes unnecessary #define's from hpsa. The SCSI midlayer handles all this for us. Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Increase the number of scatter gather elements supported.Stephen M. Cameron2010-03-031-11/+123
| | | | | | | | | | | | | | This uses the scatter-gather chaining feature of Smart Array controllers. 32 scatter-gather elements are embedded in the "command list", and the last element in the list may be marked as a "chain pointer", and point to an additional block of scatter gather elements. The precise number of scatter gather elements supported is dependent on the particular kind of Smart Array, and is determined at runtime by querying the hardware. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: mark hpsa_pci_init as __devinitStephen M. Cameron2010-03-031-1/+1
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: remove scan threadMike Miller2010-03-031-163/+4Star
| | | | | | | | | | | | | | | | The intent of the scan thread was to allow a UNIT ATTENTION/LUN DATA CHANGED condition encountered in the interrupt handler to trigger a rescan of devices, which can't be done in interrupt context. However, we weren't able to get this to work, due to multiple such UNIT ATTENTION conditions arriving during the rescan, during updating of the SCSI mid layer, etc. There's no way to tell the devices, "stand still while I scan you!" Since it doesn't work, there's no point in having the thread, as the rescan triggered via ioctl or sysfs can be done without such a thread. Signed-off-by: Mike Miller <mikem@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: return -ENOMEM, not -1Stephen M. Cameron2010-03-031-1/+1
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: fix scsi status mis-shiftStephen M. Cameron2010-03-031-1/+1
| | | | | | | The SCSI status does not need to be shifted. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: fix firmwart typoStephen M. Cameron2010-03-031-1/+1
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: allow modifying device queue depth.Stephen M. Cameron2010-03-031-0/+21
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: update driver version to 2.0.1-3Stephen M. Cameron2010-02-171-1/+1
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Reorder compat ioctl functions to eliminate some forward ↵Stephen M. Cameron2010-02-171-34/+30Star
| | | | | | | declarations. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: eliminate lock_kernel in compat_ioctlStephen M. Cameron2010-02-171-13/+3Star
| | | | | | | | The use of the big kernel lock here appears to be ancient cruft that is no longer needed. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: fix bug in adjust_hpsa_scsi_tableStephen M. Cameron2010-02-171-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix bug in adjust_hpsa_scsi_table which caused devices which have changed size, etc. to do the wrong thing. The problem was as follows: The driver maintains its current idea of what devices are present in the h->dev[] array. When it updates this array, it scans the hardware, and produces a new list of devices, call it sd[], for scsi devices. Then, it compares each item in h->dev[] vs. sd[], and any items which are not present sd it removes from h->dev[], and any items present in sd[], but different, it modifies in h->dev[]. Then, it looks for items in sd[] which are not present in h->dev[], and adds those items into h->dev[]. All the while, it keeps track of what items were added and removed to/from h->dev[]. Finally, it updates the SCSI mid-layer by removing and adding the same devices it removed and added to/from h->dev[]. (modified devices count as a remove then add.) originally, when a "changed" device was discovered, it was removed then added to h->dev[]. The item was added to the *end* of h->dev[]. And, the item was removed from sd[] as well (nulled out). As it processed h->dev[], these newly added items at the end of the list were encountered, and sd[] was searched, but those items were nulled out. So they ended up getting removed immediately after they were added. The solution is to have a way to replace items in the h->dev[] array instead of doing a remove + add. Then the "changed" items. are not encountered a second time, and removed. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Fix hpsa_find_scsi_entry so that it doesn't try to dereference ↵Stephen M. Cameron2010-02-171-0/+2
| | | | | | | NULL pointers Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: clarify obscure comment in adjust_hpsa_scsi_tableStephen M. Cameron2010-02-171-1/+5
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: print all the bytes of the CDB, not just the first one.Mike Miller2010-02-171-1/+5
| | | | | | Signed-off-by: Mike Miller <mikem@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: when resetting devices, print out which deviceStephen M. Cameron2010-02-171-2/+2
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: use scan_start and scan_finished entry points for scanningStephen M. Cameron2010-02-171-3/+52
| | | | | | | | | use scan_start and scan_finished entry points for scanning and route the CCISS_REGNEWD ioctl and sysfs triggering of same functionality through hpsa_scan_start. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Add an shost_to_hba helper function.Stephen M. Cameron2010-02-171-2/+7
| | | | | Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Don't return DID_NO_CONNECT when a device is merely not readyMatt Gates2010-02-171-1/+0Star
| | | | | | Signed-off-by: Matt Gates <matthew.gates@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Retry commands completing with a sense key of ABORTED_COMMANDMatt Gates2010-02-171-2/+9
| | | | | | Signed-off-by: Matt Gates <matthew.gates@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Return DID_RESET for commands which complete with status of ↵Matt Gates2010-02-171-1/+1
| | | | | | | | | | | UNSOLICITED ABORT The commands should be retried, and this will make that happen, instead of resulting in an i/o error. Signed-off-by: Matt Gates <matthew.gates@hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: Fix p1210m LUN assignment.Stephen M. Cameron2010-02-171-20/+97
| | | | | | | | | | The p1210m responsds to SCSI report LUNs, unlike traditional Smart Array controllers. This means that the bus, target, and lun assignments done by the driver cannot be arbitrary, but must match what SCSI REPORT LUNS returns. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* [SCSI] hpsa: add pci ids for storageworks 1210m, remove p400, p800, p700mMike Miller2010-02-171-6/+5Star
| | | | | | | | and update pci_ids.h to include new PCI ID for StorageWorks 1210m variant. Signed-off-by: Mike Miller <mikem@beardog.cce.hp.com> Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>