firs round of SCSI bug fixes for 2.6.29-rc1
James Bottomley
maintainerPATCH 1/1 firs round of SCSI bug fixes for 2.6.29-rc1
This is acutally four bug fixes and part of a fusion update which was a bit late processing through the merge window, but which should be perfectly acceptable for -rc1.
The patch is available here:
master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
The short changelog is:
Anirban Chakraborty (1):
qla2xxx: Fix ISP restart bug in multiq code
Hannes Reinecke (1):
Skip deleted devices in __scsi_device_lookup_by_target()
ILLES, Marton (1):
Add SUN Universal Xport to no attach blacklist
Karen Xie (1):
iscsi_tcp: make padbuf non-static
Kashyap, Desai (3):
mpt fusion: Add Firmware debug support
mpt fusion: Add separate msi enable disable for FC,SPI,SAS mpt fusion: Update MPI Headers to version 01.05.19
and the diffstat:
drivers/message/fusion/lsi/mpi.h | 7 +- drivers/message/fusion/lsi/mpi_cnfg.h | 47 +++++++++++++++ drivers/message/fusion/lsi/mpi_fc.h | 2 drivers/message/fusion/lsi/mpi_history.txt | 86 ++++++++++++++++++++-------- drivers/message/fusion/lsi/mpi_init.h | 2 drivers/message/fusion/lsi/mpi_ioc.h | 22 ++++++- drivers/message/fusion/lsi/mpi_lan.h | 2 drivers/message/fusion/lsi/mpi_log_fc.h | 2 drivers/message/fusion/lsi/mpi_log_sas.h | 37 ++++++++++-- drivers/message/fusion/lsi/mpi_raid.h | 11 +++ drivers/message/fusion/lsi/mpi_sas.h | 18 ++++-- drivers/message/fusion/lsi/mpi_targ.h | 2 drivers/message/fusion/lsi/mpi_tool.h | 2 drivers/message/fusion/lsi/mpi_type.h | 4 - drivers/message/fusion/mptbase.c | 87 ++++++++++++++++++++++++----- drivers/message/fusion/mptbase.h | 3 + drivers/message/fusion/mptscsih.c | 3 + drivers/scsi/libiscsi_tcp.c | 3 - drivers/scsi/qla2xxx/qla_init.c | 58 ++++++++++++------- drivers/scsi/qla2xxx/qla_mid.c | 1 drivers/scsi/qla2xxx/qla_os.c | 7 +- drivers/scsi/scsi.c | 5 + drivers/scsi/scsi_devinfo.c | 1 include/scsi/libiscsi_tcp.h | 1 24 files changed, 318 insertions(+), 95 deletions(-)
Full diff below.
James
drivers/message/fusion/lsi/mpi.h +5 -2
@@ -6,7 +6,7 @@* Title: MPI Message independent structures and definitions * Creation Date: July 27, 2000 * -* mpi.h Version: 01.05.13 +* mpi.h Version: 01.05.16 * * Version History * ---------------
@@ -79,6 +79,9 @@* 03-27-06 01.05.11 Bumped MPI_HEADER_VERSION_UNIT. * 10-11-06 01.05.12 Bumped MPI_HEADER_VERSION_UNIT. * 05-24-07 01.05.13 Bumped MPI_HEADER_VERSION_UNIT. +* 08-07-07 01.05.14 Bumped MPI_HEADER_VERSION_UNIT. +* 01-15-08 01.05.15 Bumped MPI_HEADER_VERSION_UNIT. +* 03-28-08 01.05.16 Bumped MPI_HEADER_VERSION_UNIT. * -------------------------------------------------------------------------- */
@@ -109,7 +112,7 @@/* Note: The major versions of 0xe0 through 0xff are reserved */ /* versioning for this MPI header set */ -#define MPI_HEADER_VERSION_UNIT (0x10) +#define MPI_HEADER_VERSION_UNIT (0x13)#define MPI_HEADER_VERSION_DEV (0x00)#define MPI_HEADER_VERSION_UNIT_MASK (0xFF00)#define MPI_HEADER_VERSION_UNIT_SHIFT (8)
drivers/message/fusion/lsi/mpi_cnfg.h +45 -2
95 lines not on this page · raw message
drivers/message/fusion/lsi/mpi_fc.h +1 -1
@@ -1,5 +1,5 @@/* -* Copyright (c) 2000-2004 LSI Corporation. +* Copyright (c) 2000-2008 LSI Corporation. * * * Name: mpi_fc.h
drivers/message/fusion/lsi/mpi_history.txt +60 -26
159 lines not on this page · raw message
drivers/message/fusion/lsi/mpi_init.h +1 -1
@@ -1,5 +1,5 @@/* -* Copyright (c) 2000-2007 LSI Corporation. +* Copyright (c) 2000-2008 LSI Corporation. * * * Name: mpi_init.h
drivers/message/fusion/lsi/mpi_ioc.h +20 -2
@@ -1,12 +1,12 @@/* -* Copyright (c) 2000-2007 LSI Corporation. +* Copyright (c) 2000-2008 LSI Corporation. * * * Name: mpi_ioc.h * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages * Creation Date: August 11, 2000 * -* mpi_ioc.h Version: 01.05.14 +* mpi_ioc.h Version: 01.05.16 * * Version History * ---------------
@@ -113,6 +113,16 @@* added _MULTI_PORT_DOMAIN. * 05-24-07 01.05.14 Added Common Boot Block type to FWDownload Request. * Added Common Boot Block type to FWUpload Request. +* 08-07-07 01.05.15 Added MPI_EVENT_SAS_INIT_RC_REMOVED define. +* Added MPI_EVENT_IR2_RC_DUAL_PORT_ADDED and +* MPI_EVENT_IR2_RC_DUAL_PORT_REMOVED for IR2 event data. +* Added SASAddress field to SAS Initiator Device Table +* Overflow event data structure. +* 03-28-08 01.05.16 Added two new ReasonCode values to SAS Device Status +* Change Event data to indicate completion of internally +* generated task management. +* Added MPI_EVENT_DSCVRY_ERR_DS_SATA_INIT_FAILURE define. +* Added MPI_EVENT_SAS_INIT_RC_INACCESSIBLE define. * -------------------------------------------------------------------------- */
@@ -612,6 +622,8 @@ typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE#define MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B)#define MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C)#define MPI_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION (0x0D) +#define MPI_EVENT_SAS_DEV_STAT_RC_CMPL_INTERNAL_DEV_RESET (0x0E) +#define MPI_EVENT_SAS_DEV_STAT_RC_CMPL_TASK_ABORT_INTERNAL (0x0F)/* SCSI Event data for Queue Full event */
@@ -708,6 +720,8 @@ typedef struct _MPI_EVENT_DATA_IR2#define MPI_EVENT_IR2_RC_PD_REMOVED (0x05)#define MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED (0x06)#define MPI_EVENT_IR2_RC_REBUILD_MEDIUM_ERROR (0x07) +#define MPI_EVENT_IR2_RC_DUAL_PORT_ADDED (0x08) +#define MPI_EVENT_IR2_RC_DUAL_PORT_REMOVED (0x09)/* defines for logical disk states */ #define MPI_LD_STATE_OPTIMAL (0x00)
@@ -867,6 +881,7 @@ typedef struct _EVENT_DATA_DISCOVERY_ERROR#define MPI_EVENT_DSCVRY_ERR_DS_UNSUPPORTED_DEVICE (0x00000800)#define MPI_EVENT_DSCVRY_ERR_DS_MAX_SATA_TARGETS (0x00001000)#define MPI_EVENT_DSCVRY_ERR_DS_MULTI_PORT_DOMAIN (0x00002000) +#define MPI_EVENT_DSCVRY_ERR_DS_SATA_INIT_FAILURE (0x00004000)/* SAS SMP Error Event data */
@@ -902,6 +917,8 @@ typedef struct _EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE/* defines for the ReasonCode field of the SAS Initiator Device Status Change event */ #define MPI_EVENT_SAS_INIT_RC_ADDED (0x01) +#define MPI_EVENT_SAS_INIT_RC_REMOVED (0x02) +#define MPI_EVENT_SAS_INIT_RC_INACCESSIBLE (0x03)/* SAS Initiator Device Table Overflow Event data */
@@ -910,6 +927,7 @@ typedef struct _EVENT_DATA_SAS_INIT_TABLE_OVERFLOWU8 MaxInit;/* 00h */ U8 CurrentInit;/* 01h */ U16 Reserved1;/* 02h */ +U64 SASAddress;/* 04h */ }EVENT_DATA_SAS_INIT_TABLE_OVERFLOW , MPI_POINTER PTR_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW, MpiEventDataSasInitTableOverflow_t,
drivers/message/fusion/lsi/mpi_lan.h +1 -1
@@ -1,5 +1,5 @@/* -* Copyright (c) 2000-2004 LSI Corporation. +* Copyright (c) 2000-2008 LSI Corporation. * * * Name: mpi_lan.h
drivers/message/fusion/lsi/mpi_log_fc.h +1 -1
@@ -1,5 +1,5 @@/* -* Copyright (c) 2000-2001 LSI Corporation. All rights reserved. +* Copyright (c) 2000-2008 LSI Corporation. All rights reserved. * * NAME: fc_log.h * SUMMARY: MPI IocLogInfo definitions for the SYMFC9xx chips
drivers/message/fusion/lsi/mpi_log_sas.h +31 -6
@@ -1,6 +1,6 @@/*************************************************************************** * * -* Copyright 2003 LSI Corporation. All rights reserved. * +* Copyright (c) 2000-2008 LSI Corporation. All rights reserved. * * * * Description * * ------------ *
@@ -73,6 +73,8 @@#define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO (0x00070004)#define IOP_LOGINFO_CODE_TARGET_MODE_ABORT_EXACT_IO_REQ (0x00070005) +#define IOP_LOGINFO_CODE_LOG_TIMESTAMP_EVENT (0x00080000) +/****************************************************************************/ /* PL LOGINFO_CODE defines, valid if IOC_LOGINFO_ORIGINATOR = PL */ /****************************************************************************/
@@ -92,7 +94,7 @@#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_OPEN_TIMEOUT_EXP (0x0000000C)#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_UNUSED_0D (0x0000000D)#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_DVTBLE_ACCSS_FAIL (0x0000000E) -#define PL_LOGINFO_SUB CODE_OPEN_FAIL_BAD_DEST (0x00000011) +#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_BAD_DEST (0x00000011)#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RATE_NOT_SUPP (0x00000012)#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_PROT_NOT_SUPP (0x00000013)#define PL_LOGINFO_SUB_CODE_OPEN_FAIL_RESERVED_ABANDON0 (0x00000014)
@@ -159,10 +161,11 @@#define PL_LOGINFO_SUB_CODE_INVALID_SGL (0x00000200)#define PL_LOGINFO_SUB_CODE_WRONG_REL_OFF_OR_FRAME_LENGTH (0x00000300) -#define PL_LOGINFO_SUB_CODE_FRAME_XFER_ERROR (0x00000400)/* Bits 0-3 encode Transport Status Register (offset 0x08) */ -/* Bit 0 is Status Bit 0: FrameXferErr */ -/* Bit 1 & 2 are Status Bits 16 and 17: FrameXmitErrStatus */ -/* Bit 3 is Status Bit 18 WriteDataLengthGTDataLengthErr */ +#define PL_LOGINFO_SUB_CODE_FRAME_XFER_ERROR (0x00000400) +/* Bits 0-3 encode Transport Status Register (offset 0x08) */ +/* Bit 0 is Status Bit 0: FrameXferErr */ +/* Bit 1 & 2 are Status Bits 16 and 17: FrameXmitErrStatus */ +/* Bit 3 is Status Bit 18 WriteDataLenghtGTDataLengthErr */ #define PL_LOGINFO_SUB_CODE_TX_FM_CONNECTED_LOW (0x00000500)#define PL_LOGINFO_SUB_CODE_SATA_NON_NCQ_RW_ERR_BIT_SET (0x00000600)
@@ -177,6 +180,11 @@#define PL_LOGINFO_SUB_CODE_DISCOVERY_REMOTE_SEP_RESET (0x00000E01)#define PL_LOGINFO_SUB_CODE_SECOND_OPEN (0x00000F00)#define PL_LOGINFO_SUB_CODE_DSCVRY_SATA_INIT_TIMEOUT (0x00001000) +#define PL_LOGINFO_SUB_CODE_BREAK_ON_SATA_CONNECTION (0x00002000) +/* not currently used in mainline */ +#define PL_LOGINFO_SUB_CODE_BREAK_ON_STUCK_LINK (0x00003000) +#define PL_LOGINFO_SUB_CODE_BREAK_ON_STUCK_LINK_AIP (0x00004000) +#define PL_LOGINFO_SUB_CODE_BREAK_ON_INCOMPLETE_BREAK_RCVD (0x00005000)#define PL_LOGINFO_CODE_ENCL_MGMT_SMP_FRAME_FAILURE (0x00200000)/* Can't get SMP Frame */ #define PL_LOGINFO_CODE_ENCL_MGMT_SMP_READ_ERROR (0x00200010)/* Error occured on SMP Read */
@@ -243,6 +251,8 @@#define IR_LOGINFO_VOLUME_ACTIVATE_VOLUME_FAILED (0x00010014)/* Activation failed trying to import the volume */ #define IR_LOGINFO_VOLUME_ACTIVATING_IMPORT_VOLUME_FAILED (0x00010015) +/* Activation failed trying to import the volume */ +#define IR_LOGINFO_VOLUME_ACTIVATING_TOO_MANY_PHYS_DISKS (0x00010016)/* Phys Disk failed, too many phys disks */ #define IR_LOGINFO_PHYSDISK_CREATE_TOO_MANY_DISKS (0x00010020)
@@ -285,6 +295,21 @@/* Compatibility Error : IME size limited to < 2TB */ #define IR_LOGINFO_COMPAT_ERROR_IME_VOL_NOT_CURRENTLY_SUPPORTED (0x0001003D) +/* Device Firmware Update: DFU can only be started once */ +#define IR_LOGINFO_DEV_FW_UPDATE_ERR_DFU_IN_PROGRESS (0x00010050) +/* Device Firmware Update: Volume must be Optimal/Active/non-Quiesced */ +#define IR_LOGINFO_DEV_FW_UPDATE_ERR_DEVICE_IN_INVALID_STATE (0x00010051) +/* Device Firmware Update: DFU Timeout cannot be zero */ +#define IR_LOGINFO_DEV_FW_UPDATE_ERR_INVALID_TIMEOUT (0x00010052) +/* Device Firmware Update: CREATE TIMER FAILED */ +#define IR_LOGINFO_DEV_FW_UPDATE_ERR_NO_TIMERS (0x00010053) +/* Device Firmware Update: Failed to read SAS_IO_UNIT_PG_1 */ +#define IR_LOGINFO_DEV_FW_UPDATE_ERR_READING_CFG_PAGE (0x00010054) +/* Device Firmware Update: Invalid SAS_IO_UNIT_PG_1 value(s) */ +#define IR_LOGINFO_DEV_FW_UPDATE_ERR_PORT_IO_TIMEOUTS_REQUIRED (0x00010055) +/* Device Firmware Update: Unable to allocate memory for page */ +#define IR_LOGINFO_DEV_FW_UPDATE_ERR_ALLOC_CFG_PAGE (0x00010056) +/****************************************************************************/ /* Defines for convenience */
drivers/message/fusion/lsi/mpi_raid.h +9 -2
@@ -1,12 +1,12 @@/* -* Copyright (c) 2001-2007 LSI Corporation. +* Copyright (c) 2001-2008 LSI Corporation. * * * Name: mpi_raid.h * Title: MPI RAID message and structures * Creation Date: February 27, 2001 * -* mpi_raid.h Version: 01.05.03 +* mpi_raid.h Version: 01.05.05 * * Version History * ---------------
@@ -34,6 +34,9 @@* _SET_RESYNC_RATE and _SET_DATA_SCRUB_RATE. * 02-28-07 01.05.03 Added new RAID Action, Device FW Update Mode, and * associated defines. +* 08-07-07 01.05.04 Added Disable Full Rebuild bit to the ActionDataWord +* for the RAID Action MPI_RAID_ACTION_DISABLE_VOLUME. +* 01-15-08 01.05.05 Added define for MPI_RAID_ACTION_SET_VOLUME_NAME. * -------------------------------------------------------------------------- */
@@ -93,6 +96,7 @@ typedef struct _MSG_RAID_ACTION#define MPI_RAID_ACTION_SET_RESYNC_RATE (0x13)#define MPI_RAID_ACTION_SET_DATA_SCRUB_RATE (0x14)#define MPI_RAID_ACTION_DEVICE_FW_UPDATE_MODE (0x15) +#define MPI_RAID_ACTION_SET_VOLUME_NAME (0x16)/* ActionDataWord defines for use with MPI_RAID_ACTION_CREATE_VOLUME action */ #define MPI_RAID_ACTION_ADATA_DO_NOT_SYNC (0x00000001)
@@ -105,6 +109,9 @@ typedef struct _MSG_RAID_ACTION#define MPI_RAID_ACTION_ADATA_KEEP_LBA0 (0x00000000)#define MPI_RAID_ACTION_ADATA_ZERO_LBA0 (0x00000002) +/* ActionDataWord defines for use with MPI_RAID_ACTION_DISABLE_VOLUME action */ +#define MPI_RAID_ACTION_ADATA_DISABLE_FULL_REBUILD (0x00000001) +/* ActionDataWord defines for use with MPI_RAID_ACTION_ACTIVATE_VOLUME action */ #define MPI_RAID_ACTION_ADATA_INACTIVATE_ALL (0x00000001)
drivers/message/fusion/lsi/mpi_sas.h +13 -5
@@ -1,12 +1,12 @@/* -* Copyright (c) 2004-2006 LSI Corporation. +* Copyright (c) 2004-2008 LSI Corporation. * * * Name: mpi_sas.h * Title: MPI Serial Attached SCSI structures and definitions * Creation Date: August 19, 2004 * -* mpi_sas.h Version: 01.05.04 +* mpi_sas.h Version: 01.05.05 * * Version History * ---------------
@@ -23,6 +23,10 @@* reply. * 10-11-06 01.05.04 Fixed the name of a define for Operation field of SAS IO * Unit Control request. +* 01-15-08 01.05.05 Added support for MPI_SAS_OP_SET_IOC_PARAMETER, +* including adding IOCParameter and IOCParameter value +* fields to SAS IO Unit Control Request. +* Added MPI_SAS_DEVICE_INFO_PRODUCT_SPECIFIC define. * -------------------------------------------------------------------------- */
@@ -60,6 +64,8 @@* Values for the SAS DeviceInfo field used in SAS Device Status Change Event * data and SAS IO Unit Configuration pages. */ +#define MPI_SAS_DEVICE_INFO_PRODUCT_SPECIFIC (0xF0000000) +#define MPI_SAS_DEVICE_INFO_SEP (0x00004000)#define MPI_SAS_DEVICE_INFO_ATAPI_DEVICE (0x00002000)#define MPI_SAS_DEVICE_INFO_LSI_DEVICE (0x00001000)
@@ -216,7 +222,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_REQUESTU8 ChainOffset;/* 02h */ U8 Function;/* 03h */ U16 DevHandle;/* 04h */ -U8 Reserved3;/* 06h */ +U8 IOCParameter;/* 06h */ U8 MsgFlags;/* 07h */ U32 MsgContext;/* 08h */ U8 TargetID;/* 0Ch */
@@ -225,7 +231,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_REQUESTU8 PrimFlags;/* 0Fh */ U32 Primitive;/* 10h */ U64 SASAddress;/* 14h */ -U32 Reserved4;/* 1Ch */ +U32 IOCParameterValue;/* 1Ch */ } MSG_SAS_IOUNIT_CONTROL_REQUEST, MPI_POINTER PTR_MSG_SAS_IOUNIT_CONTROL_REQUEST, SasIoUnitControlRequest_t, MPI_POINTER pSasIoUnitControlRequest_t;
@@ -241,6 +247,8 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_REQUEST#define MPI_SAS_OP_TRANSMIT_PORT_SELECT_SIGNAL (0x0C)#define MPI_SAS_OP_TRANSMIT_REMOVE_DEVICE (0x0D)/* obsolete name */ #define MPI_SAS_OP_REMOVE_DEVICE (0x0D) +#define MPI_SAS_OP_SET_IOC_PARAMETER (0x0E) +#define MPI_SAS_OP_PRODUCT_SPECIFIC_MIN (0x80)/* values for the PrimFlags field */ #define MPI_SAS_PRIMFLAGS_SINGLE (0x08)
@@ -256,7 +264,7 @@ typedef struct _MSG_SAS_IOUNIT_CONTROL_REPLYU8 MsgLength;/* 02h */ U8 Function;/* 03h */ U16 DevHandle;/* 04h */ -U8 Reserved3;/* 06h */ +U8 IOCParameter;/* 06h */ U8 MsgFlags;/* 07h */ U32 MsgContext;/* 08h */ U16 Reserved4;/* 0Ch */
drivers/message/fusion/lsi/mpi_targ.h +1 -1
@@ -1,5 +1,5 @@/* -* Copyright (c) 2000-2004 LSI Corporation. +* Copyright (c) 2000-2008 LSI Corporation. * * * Name: mpi_targ.h
drivers/message/fusion/lsi/mpi_tool.h +1 -1
@@ -1,5 +1,5 @@/* -* Copyright (c) 2001-2005 LSI Corporation. +* Copyright (c) 2001-2008 LSI Corporation. * * * Name: mpi_tool.h
drivers/message/fusion/lsi/mpi_type.h +2 -2
@@ -1,12 +1,12 @@/* -* Copyright (c) 2000-2004 LSI Corporation. +* Copyright (c) 2000-2008 LSI Corporation. * * * Name: mpi_type.h * Title: MPI Basic type definitions * Creation Date: June 6, 2000 * -* mpi_type.h Version: 01.05.01 +* mpi_type.h Version: 01.05.02 * * Version History * ---------------
drivers/message/fusion/mptbase.c +74 -13
118 lines not on this page · raw message
drivers/message/fusion/mptbase.h +3 -0
@@ -922,11 +922,14 @@ extern void mpt_free_fw_memory(MPT_ADAPTER *ioc);extern int mpt_findImVolumes (MPT_ADAPTER *ioc);extern int mptbase_sas_persist_operation (MPT_ADAPTER *ioc,u8 persist_opcode);extern int mpt_raid_phys_disk_pg0 (MPT_ADAPTER *ioc,u8 phys_disk_num,pRaidPhysDiskPage0_t phys_disk); +extern void mpt_halt_firmware (MPT_ADAPTER *ioc); +/* * Public data decl's... */ extern struct list_head ioc_list; +extern int mpt_fwfault_debug;/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ #endif /* } __KERNEL__ */
drivers/message/fusion/mptscsih.c +3 -0
@@ -1846,6 +1846,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)if (hd->timeouts <-1 ) hd->timeouts++; +if (mpt_fwfault_debug) +mpt_halt_firmware (ioc); +/* Most important! Set TaskMsgContext to SCpnt's MsgContext! * (the IO to be ABORT'd) *
drivers/scsi/libiscsi_tcp.c +1 -2
@@ -177,7 +177,6 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn, struct iscsi_segment *segment, int recv, unsigned copied) { - static unsigned char padbuf[ISCSI_PAD_LEN]; struct scatterlist sg;unsigned int pad;
@@ -233,7 +232,7 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn,debug_tcp ("consume %d pad bytes\n" , pad); segment->total_size += pad; segment->size = pad; - segment->data = padbuf; + segment->data = segment->padbuf;return 0 ; } }
drivers/scsi/qla2xxx/qla_init.c +36 -22
100 lines not on this page · raw message
drivers/scsi/qla2xxx/qla_mid.c +1 -0
@@ -629,6 +629,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, req->ring_index =0 ; req->cnt = req->length; req->id = que_id; + req->max_q_depth = ha->req_q_map[0 ]->max_q_depth;mutex_unlock (&ha->vport_lock); ret =qla25xx_init_req_que (base_vha, req, options);
drivers/scsi/qla2xxx/qla_os.c +3 -4
@@ -1158,8 +1158,8 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)struct req_que *req;spin_lock_irqsave (&ha->hardware_lock, flags); -for (que =0 ; que <QLA_MAX_HOST_QUES ; que++) { - req = ha->req_q_map[vha->req_ques[que]]; +for (que =0 ; que < ha->max_queues; que++) { + req = ha->req_q_map[que];if (!req)continue ;for (cnt =1 ; cnt <MAX_OUTSTANDING_COMMANDS ; cnt++) {
@@ -1193,7 +1193,7 @@ qla2xxx_slave_configure(struct scsi_device *sdev)scsi_qla_host_t *vha =shost_priv (sdev->host);struct qla_hw_data *ha = vha->hw;struct fc_rport *rport =starget_to_rport (sdev->sdev_target); -struct req_que *req = ha->req_q_map[0 ]; +struct req_que *req = ha->req_q_map[vha->req_ques[0 ]];if (sdev->tagged_supported)scsi_activate_tcq (sdev, req->max_q_depth);
@@ -1998,7 +1998,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)return 0 ; probe_failed: -qla2x00_free_que (ha, req, rsp);qla2x00_free_device (base_vha);scsi_host_put (base_vha->host);
drivers/scsi/scsi.c +4 -1
@@ -1095,7 +1095,8 @@ EXPORT_SYMBOL(__starget_for_each_device);* Description: Looks up the scsi_device with the specified @lun for a given * @starget. The returned scsi_device does not have an additional * reference. You must hold the host's host_lock over this call and -* any access to the returned scsi_device. +* any access to the returned scsi_device. A scsi_device in state +* SDEV_DEL is skipped. * * Note: The only reason why drivers should use this is because * they need to access the device list in irq context. Otherwise you
@@ -1107,6 +1108,8 @@ struct scsi_device *__scsi_device_lookup_by_target(struct scsi_target *starget,struct scsi_device *sdev;list_for_each_entry (sdev, &starget->devices, same_target_siblings) { +if (sdev->sdev_state ==SDEV_DEL ) +continue ;if (sdev->lun ==lun)return sdev; }
drivers/scsi/scsi_devinfo.c +1 -0
@@ -224,6 +224,7 @@ static struct { {"SGI", "TP9100", "*", BLIST_REPORTLUN2}, {"SGI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"IBM", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, + {"SUN", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36}, {"SONY", "CD-ROM CDU-8001", NULL, BLIST_BORKEN}, {"SONY", "TSL", NULL, BLIST_FORCELUN}, /* DDS3 & DDS4 autoloaders */
include/scsi/libiscsi_tcp.h +1 -0
@@ -39,6 +39,7 @@ struct iscsi_segment {unsigned int total_copied;struct hash_desc *hash; +unsigned char padbuf[ISCSI_PAD_LEN ];unsigned char recv_digest[ISCSI_DIGEST_SIZE ];unsigned char digest[ISCSI_DIGEST_SIZE ];unsigned int digest_len;
Quoted 7 lines · On Fri, 16 Jan 2009 09:56:11 -0500 James Bottomley…
This is acutally four bug fixes and part of a fusion update which was a bit late processing through the merge window, but which should be perfectly acceptable for -rc1.
...
Full diff below.
I like full diffs.
Quoted 17 lines
drivers/message/fusion/mptbase.c +8
-3@@ -79,9 +79,22 @@ MODULE_VERSION(my_VERSION);/* * cmd line parameters */ -static int mpt_msi_enable =-1 ; -module_param (mpt_msi_enable, int,0 ); -MODULE_PARM_DESC (mpt_msi_enable," MSI Support Enable (default=0)" ); + +static int mpt_msi_enable_spi; +module_param (mpt_msi_enable_spi, int,0 ); +MODULE_PARM_DESC (mpt_msi_enable_spi," Enable MSI Support for SPI \ +controllers (default=0)" ); + +static int mpt_msi_enable_fc; +module_param (mpt_msi_enable_fc, int,0 );
drivers/message/fusion/mptbase.c MODULE_VERSION(my_VERSION); · line 98
Quoted 10 lines
drivers/message/fusion/mptbase.c +8
-0+MODULE_PARM_DESC (mpt_msi_enable_fc," Enable MSI Support for FC \ +controllers (default=0)" ); + +static int mpt_msi_enable_sas; +module_param (mpt_msi_enable_sas, int,1 ); +MODULE_PARM_DESC (mpt_msi_enable_sas," Enable MSI Support for SAS \ +controllers (default=1)" ); +
Those MODULE_PARM_DESC strings are going to come out funny-looking, with extra tabs and stuff.
drivers/message/fusion/mptbase.c static int mpt_debug_level; · line 115
Quoted 9 lines
drivers/message/fusion/mptbase.c +9
-0+MODULE_PARM_DESC (mpt_debug_level," debug level - refer to mptdebug.h \ +- (default=0)" ); + +int mpt_fwfault_debug; +EXPORT_SYMBOL (mpt_fwfault_debug); +module_param_call (mpt_fwfault_debug, param_set_int, param_get_int, + &mpt_fwfault_debug,0600 ); +MODULE_PARM_DESC (mpt_fwfault_debug,"Enable detection of Firmware fault" +" and halt Firmware on fault - (default=0)" );
That one got it right.
Quoted 58 lines
#ifdef MFCNT
static int mfcounter = 0;drivers/message/fusion/mptbase.c +34
-9@@ -1751,16 +1774,25 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) ioc->bus_type =SAS ; } -if (mpt_msi_enable ==-1 ) { -/* Enable on SAS, disable on FC and SPI */ -if (ioc->bus_type ==SAS ) - ioc->msi_enable =1 ; -else - ioc->msi_enable =0 ; - }else -/* follow flag: 0 - disable; 1 - enable */ - ioc->msi_enable = mpt_msi_enable; +switch (ioc->bus_type) { + +case SAS : + ioc->msi_enable = mpt_msi_enable_sas; +break ; + +case SPI : + ioc->msi_enable = mpt_msi_enable_spi; +break ; + +case FC : + ioc->msi_enable = mpt_msi_enable_fc; +break ; + +default : + ioc->msi_enable =0 ; +break ; + }if (ioc->errata_flag_1064)pci_disable_io_access (pdev);@@ -6313,6 +6345,33 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh *size = y; } + +/** +* mpt_halt_firmware - Halts the firmware if it is operational and panic +* the kernel +* @ioc: Pointer to MPT_ADAPTER structure +* +**/ +void +mpt_halt_firmware (MPT_ADAPTER *ioc) +{ +u32 ioc_raw_state; + + ioc_raw_state =mpt_GetIocState (ioc,0 ); + +if ((ioc_raw_state &MPI_IOC_STATE_MASK ) ==MPI_IOC_STATE_FAULT ) { + printk(MYIOC_s_ERR_FMT "IOC is in FAULT state (%04xh)!!!\n",
drivers/message/fusion/mptbase.c mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh · line 6373
Quoted 10 lines
drivers/message/fusion/mptbase.c +10
-0+ ioc->name, ioc_raw_state & MPI_DOORBELL_DATA_MASK); +panic ("%s: IOC Fault (%04xh)!!!\n" , ioc->name, + ioc_raw_state &MPI_DOORBELL_DATA_MASK ); + }else { +CHIPREG_WRITE32 (&ioc->chip->Doorbell,0xC0FFEE00 ); +panic ("%s: Firmware is halted due to command timeout\n" , + ioc->name); + } +} +EXPORT_SYMBOL (mpt_halt_firmware);
Doing a panic() after we've already detected an error is plain nasty. Is there no way in which we can allow the kernel to continue?
Quoted 36 lines
drivers/message/fusion/mptbase.c +2
-0/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* * Reset Handling @@ -6345,6 +6404,8 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)printk (MYIOC_s_INFO_FMT"HardResetHandler Entered!\n" , ioc->name);printk ("MF count 0x%x !\n" , ioc->mfcnt);#endif +if (mpt_fwfault_debug) +mpt_halt_firmware (ioc);/* Reset the adapter. Prevent more than 1 call to * mpt_do_ioc_recovery at any instant in time. drivers/message/fusion/mptbase.h +3
-0@@ -922,11 +922,14 @@ extern void mpt_free_fw_memory(MPT_ADAPTER *ioc);extern int mpt_findImVolumes (MPT_ADAPTER *ioc);extern int mptbase_sas_persist_operation (MPT_ADAPTER *ioc,u8 persist_opcode);extern int mpt_raid_phys_disk_pg0 (MPT_ADAPTER *ioc,u8 phys_disk_num,pRaidPhysDiskPage0_t phys_disk); +extern void mpt_halt_firmware (MPT_ADAPTER *ioc); +/* * Public data decl's... */ extern struct list_head ioc_list; +extern int mpt_fwfault_debug;/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ #endif /* } __KERNEL__ */ drivers/message/fusion/mptscsih.c +0
-0
drivers/message/fusion/mptscsih.c mptscsih_abort(struct scsi_cmnd * SCpnt) · line 1850
Quoted 5 lines
drivers/message/fusion/mptscsih.c +2
-0@@ -1846,6 +1846,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)if (hd->timeouts <-1 ) hd->timeouts++; +if (mpt_fwfault_debug) +mpt_halt_firmware (ioc);
So one single global flag affects all controllers in the system?
I guess that's OK if it's just a debug/diag thing.
Quoted 32 lines
drivers/message/fusion/mptscsih.c +0
-0/* Most important! Set TaskMsgContext to SCpnt's MsgContext! * (the IO to be ABORT'd) * drivers/scsi/libiscsi_tcp.c +1
-2@@ -177,7 +177,6 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn, struct iscsi_segment *segment, int recv, unsigned copied) { - static unsigned char padbuf[ISCSI_PAD_LEN]; struct scatterlist sg;unsigned int pad;@@ -233,7 +232,7 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn,debug_tcp ("consume %d pad bytes\n" , pad); segment->total_size += pad; segment->size = pad; - segment->data = padbuf; + segment->data = segment->padbuf;return 0 ; } }drivers/scsi/qla2xxx/qla_init.c +0
-0@@ -1258,35 +1258,48 @@ qla2x00_init_rings(scsi_qla_host_t *vha) {int rval;unsigned long flags =0 ;
drivers/scsi/qla2xxx/qla_init.c qla2x00_init_rings(scsi_qla_host_t *vha) · line 1267
Quoted 10 lines
drivers/scsi/qla2xxx/qla_init.c +4
-3-int cnt; +int cnt, que;struct qla_hw_data *ha = vha->hw; -struct req_que *req = ha->req_q_map[0 ]; -struct rsp_que *rsp = ha->rsp_q_map[0 ]; +struct req_que *req; +struct rsp_que *rsp; +struct scsi_qla_host *vp;struct mid_init_cb_24xx *mid_init_cb = (struct mid_init_cb_24xx *) ha->init_cb;
This cast worries me. It's a cast between two complex data structures which appear to have nothing to do with each other.
Oh well. It _is_ a scsi driver :(
James Bottomley
maintainerQuoted 38 lines · Andrew Morton
Quoted 7 lines · On Fri, 16 Jan 2009 09:56:11 -0500 James Bottomley…
This is acutally four bug fixes and part of a fusion update which was a bit late processing through the merge window, but which should be perfectly acceptable for -rc1.
...
Full diff below.
I like full diffs.
Quoted 26 lines
drivers/message/fusion/mptbase.c +16
-3@@ -79,9 +79,22 @@ MODULE_VERSION(my_VERSION);/* * cmd line parameters */ -static int mpt_msi_enable =-1 ; -module_param (mpt_msi_enable, int,0 ); -MODULE_PARM_DESC (mpt_msi_enable," MSI Support Enable (default=0)" ); + +static int mpt_msi_enable_spi; +module_param (mpt_msi_enable_spi, int,0 ); +MODULE_PARM_DESC (mpt_msi_enable_spi," Enable MSI Support for SPI \ +controllers (default=0)" ); + +static int mpt_msi_enable_fc; +module_param (mpt_msi_enable_fc, int,0 ); +MODULE_PARM_DESC (mpt_msi_enable_fc," Enable MSI Support for FC \ +controllers (default=0)" ); + +static int mpt_msi_enable_sas; +module_param (mpt_msi_enable_sas, int,1 ); +MODULE_PARM_DESC (mpt_msi_enable_sas," Enable MSI Support for SAS \ +controllers (default=1)" ); +
Quoted 4 lines
Quoted 1 line
...
Those
MODULE_PARM_DESCstrings are going to come out funny-looking, with extra tabs and stuff.
Yes ... the compiler complained about a few of the other updates, which I told them to redo ... I didn't notice these.
Quoted 75 lines
drivers/message/fusion/mptbase.c static int mpt_debug_level; · line 115
Quoted 9 lines
drivers/message/fusion/mptbase.c +9
-0+MODULE_PARM_DESC (mpt_debug_level," debug level - refer to mptdebug.h \ +- (default=0)" ); + +int mpt_fwfault_debug; +EXPORT_SYMBOL (mpt_fwfault_debug); +module_param_call (mpt_fwfault_debug, param_set_int, param_get_int, + &mpt_fwfault_debug,0600 ); +MODULE_PARM_DESC (mpt_fwfault_debug,"Enable detection of Firmware fault" +" and halt Firmware on fault - (default=0)" );That one got it right.
Quoted 63 lines
#ifdef MFCNT
static int mfcounter = 0;drivers/message/fusion/mptbase.c +39
-9@@ -1751,16 +1774,25 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) ioc->bus_type =SAS ; } -if (mpt_msi_enable ==-1 ) { -/* Enable on SAS, disable on FC and SPI */ -if (ioc->bus_type ==SAS ) - ioc->msi_enable =1 ; -else - ioc->msi_enable =0 ; - }else -/* follow flag: 0 - disable; 1 - enable */ - ioc->msi_enable = mpt_msi_enable; +switch (ioc->bus_type) { + +case SAS : + ioc->msi_enable = mpt_msi_enable_sas; +break ; + +case SPI : + ioc->msi_enable = mpt_msi_enable_spi; +break ; + +case FC : + ioc->msi_enable = mpt_msi_enable_fc; +break ; + +default : + ioc->msi_enable =0 ; +break ; + }if (ioc->errata_flag_1064)pci_disable_io_access (pdev);@@ -6313,6 +6345,33 @@ mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh *size = y; } + +/** +* mpt_halt_firmware - Halts the firmware if it is operational and panic +* the kernel +* @ioc: Pointer to MPT_ADAPTER structure +* +**/ +void +mpt_halt_firmware (MPT_ADAPTER *ioc) +{ +u32 ioc_raw_state; + + ioc_raw_state =mpt_GetIocState (ioc,0 ); + +if ((ioc_raw_state &MPI_IOC_STATE_MASK ) ==MPI_IOC_STATE_FAULT ) { +printk (MYIOC_s_ERR_FMT"IOC is in FAULT state (%04xh)!!!\n" , + ioc->name, ioc_raw_state &MPI_DOORBELL_DATA_MASK ); +panic ("%s: IOC Fault (%04xh)!!!\n" , ioc->name, + ioc_raw_state &MPI_DOORBELL_DATA_MASK ); + }else { +CHIPREG_WRITE32 (&ioc->chip->Doorbell,0xC0FFEE00 );
Quoted 8 lines
drivers/message/fusion/mptbase.c mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh · line 6373
Quoted 5 lines
drivers/message/fusion/mptbase.c +5
-0+panic ("%s: Firmware is halted due to command timeout\n" , + ioc->name); + } +} +EXPORT_SYMBOL (mpt_halt_firmware);Doing a
panic()after we've already detected an error is plain nasty. Is there no way in which we can allow the kernel to continue?
There's a long thread discussing this very point on linux-scsi. The short version is "no, it's only used for debugging firmware and if you've corrupted your firmware to this point you need the machine halting".
Quoted 40 lines
Quoted 40 lines
drivers/message/fusion/mptbase.c +2
-0/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /* * Reset Handling @@ -6345,6 +6404,8 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)printk (MYIOC_s_INFO_FMT"HardResetHandler Entered!\n" , ioc->name);printk ("MF count 0x%x !\n" , ioc->mfcnt);#endif +if (mpt_fwfault_debug) +mpt_halt_firmware (ioc);/* Reset the adapter. Prevent more than 1 call to * mpt_do_ioc_recovery at any instant in time. drivers/message/fusion/mptbase.h +3
-0@@ -922,11 +922,14 @@ extern void mpt_free_fw_memory(MPT_ADAPTER *ioc);extern int mpt_findImVolumes (MPT_ADAPTER *ioc);extern int mptbase_sas_persist_operation (MPT_ADAPTER *ioc,u8 persist_opcode);extern int mpt_raid_phys_disk_pg0 (MPT_ADAPTER *ioc,u8 phys_disk_num,pRaidPhysDiskPage0_t phys_disk); +extern void mpt_halt_firmware (MPT_ADAPTER *ioc); +/* * Public data decl's... */ extern struct list_head ioc_list; +extern int mpt_fwfault_debug;/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ #endif /* } __KERNEL__ */ drivers/message/fusion/mptscsih.c +0
-0@@ -1846,6 +1846,9 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)if (hd->timeouts <-1 ) hd->timeouts++;
Quoted 6 lines
drivers/message/fusion/mptscsih.c mptscsih_abort(struct scsi_cmnd * SCpnt) · line 1850
Quoted 2 lines
drivers/message/fusion/mptscsih.c +2
-0+if (mpt_fwfault_debug) +mpt_halt_firmware (ioc);So one single global flag affects all controllers in the system?
I guess that's OK if it's just a debug/diag thing.
Yes, that's correct.
Quoted 37 lines
Quoted 37 lines
drivers/message/fusion/mptscsih.c +0
-0/* Most important! Set TaskMsgContext to SCpnt's MsgContext! * (the IO to be ABORT'd) * drivers/scsi/libiscsi_tcp.c +1
-2@@ -177,7 +177,6 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn, struct iscsi_segment *segment, int recv, unsigned copied) { - static unsigned char padbuf[ISCSI_PAD_LEN]; struct scatterlist sg;unsigned int pad;@@ -233,7 +232,7 @@ int iscsi_tcp_segment_done(struct iscsi_tcp_conn *tcp_conn,debug_tcp ("consume %d pad bytes\n" , pad); segment->total_size += pad; segment->size = pad; - segment->data = padbuf; + segment->data = segment->padbuf;return 0 ; } }drivers/scsi/qla2xxx/qla_init.c +1
-3@@ -1258,35 +1258,48 @@ qla2x00_init_rings(scsi_qla_host_t *vha) {int rval;unsigned long flags =0 ; -int cnt; +int cnt, que;struct qla_hw_data *ha = vha->hw; -struct req_que *req = ha->req_q_map[0 ]; -struct rsp_que *rsp = ha->rsp_q_map[0 ];
Quoted 8 lines
drivers/scsi/qla2xxx/qla_init.c qla2x00_init_rings(scsi_qla_host_t *vha) · line 1267
Quoted 5 lines
drivers/scsi/qla2xxx/qla_init.c +3
-0+struct req_que *req; +struct rsp_que *rsp; +struct scsi_qla_host *vp;struct mid_init_cb_24xx *mid_init_cb = (struct mid_init_cb_24xx *) ha->init_cb;This cast worries me. It's a cast between two complex data structures which appear to have nothing to do with each other.
Actually, it's a C++ type construct. ha->init_cb is of type init_cb_t, mid_init_cb actually contains this (via a second indirection) as the first element, so what it's doing is dynamically casting out based on the board type.
Quoted 1 line
Oh well. It _is_ a scsi driver :(
James
Quoted 19 lines · On Fri, 16 Jan 2009 13:48:53 -0500 James Bottomley…
Quoted 10 lines
Quoted 10 lines
+++
b/drivers/scsi/qla2xxx/qla_init.cdrivers/scsi/qla2xxx/qla_init.c +1
-3@@ -1258,35 +1258,48 @@ qla2x00_init_rings(scsi_qla_host_t *vha) {int rval;unsigned long flags =0 ; -int cnt; +int cnt, que;struct qla_hw_data *ha = vha->hw; -struct req_que *req = ha->req_q_map[0 ]; -struct rsp_que *rsp = ha->rsp_q_map[0 ];Quoted 8 lines
drivers/scsi/qla2xxx/qla_init.c qla2x00_init_rings(scsi_qla_host_t *vha) · line 1267
Quoted 5 lines
drivers/scsi/qla2xxx/qla_init.c +3
-0+struct req_que *req; +struct rsp_que *rsp; +struct scsi_qla_host *vp;struct mid_init_cb_24xx *mid_init_cb = (struct mid_init_cb_24xx *) ha->init_cb;This cast worries me. It's a cast between two complex data structures which appear to have nothing to do with each other.
Quoted 4 lines
Actually, it's a C++ type construct.
ha->init_cbis of typeinit_cb_t,mid_init_cbactually contains this (via a second indirection) as the first element, so what it's doing is dynamically casting out based on the board type.
Ah, OK, I got lost amongst the typedefs and pointers.
This code could/should use container_of() for this operation?
James Bottomley
maintainerQuoted 22 lines · Andrew Morton
Quoted 19 lines · On Fri, 16 Jan 2009 13:48:53 -0500 James Bottomley…
Quoted 18 lines
Quoted 5 lines
+++
b/drivers/scsi/qla2xxx/qla_init.cdrivers/scsi/qla2xxx/qla_init.c +0
-0@@ -1258,35 +1258,48 @@ qla2x00_init_rings(scsi_qla_host_t *vha) {int rval;unsigned long flags =0 ;drivers/scsi/qla2xxx/qla_init.c qla2x00_init_rings(scsi_qla_host_t *vha) · line 1267
Quoted 10 lines
drivers/scsi/qla2xxx/qla_init.c +4
-3-int cnt; +int cnt, que;struct qla_hw_data *ha = vha->hw; -struct req_que *req = ha->req_q_map[0 ]; -struct rsp_que *rsp = ha->rsp_q_map[0 ]; +struct req_que *req; +struct rsp_que *rsp; +struct scsi_qla_host *vp;struct mid_init_cb_24xx *mid_init_cb = (struct mid_init_cb_24xx *) ha->init_cb;This cast worries me. It's a cast between two complex data structures which appear to have nothing to do with each other.
Quoted 8 lines
Quoted 4 lines
Actually, it's a C++ type construct.
ha->init_cbis of typeinit_cb_t,mid_init_cbactually contains this (via a second indirection) as the first element, so what it's doing is dynamically casting out based on the board type.Ah, OK, I got lost amongst the typedefs and pointers.
This code could/should use
container_of()for this operation?
It could, but since it's a double cast out it would get a lot uglier. We don't really pick up any safety from this because the FW structure is shared with the device, so no-one can move the first element anyway.
James
From: James Bottomley <[email protected]>
Date: Fri, 16 Jan 2009 13:48:53 -0500
Quoted 8 lines · Andrew Morton
Quoted 2 lines
Doing a
panic()after we've already detected an error is plain nasty. Is there no way in which we can allow the kernel to continue?There's a long thread discussing this very point on linux-scsi. The short version is "no, it's only used for debugging firmware and if you've corrupted your firmware to this point you need the machine halting".
Long thread or not, taking out one's entire system because one device hits a fail state is always wrong.
If I have other block devices which are working, all I want is for this specific controller and it's block devices to fail.
This way I can get the failure log message and actually do something with that data without rebooting.
Or I guess digital cameras and serial/net consoles are the only sanctioned way to record kernel failure log messages of this kind?
Give me a break. :)
On Fri, Jan 16, 2009 at 9:09 AM, Andrew Morton
<[email protected]> wrote:
...
Quoted 9 lines
drivers/message/fusion/mptbase.c mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh · line 6373
Quoted 6 lines
drivers/message/fusion/mptbase.c +6
-0+CHIPREG_WRITE32 (&ioc->chip->Doorbell,0xC0FFEE00 ); +panic ("%s: Firmware is halted due to command timeout\n" , + ioc->name); + } +} +EXPORT_SYMBOL (mpt_halt_firmware);Doing a
panic()after we've already detected an error is plain nasty. Is there no way in which we can allow the kernel to continue?
Basically what James said. It's not long though: only 6 emails. I started that thread thinking the same thing you did:
http://marc.info/?t=123123569200003&r=1&w=2
TBH, I still wouldn't implement it the way LSI maintainers did. I'm happy they are the maintainers and it's their call.
grant
From: Grant Grundler <[email protected]>
Date: Fri, 16 Jan 2009 11:02:12 -0800
Quoted 13 lines
On Fri, Jan 16, 2009 at 9:09 AM, Andrew Morton
<[email protected]> wrote:
...Quoted 9 lines
drivers/message/fusion/mptbase.c mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buffer, int *size, int len, int sh · line 6373
Quoted 6 lines
drivers/message/fusion/mptbase.c +6
-0+CHIPREG_WRITE32 (&ioc->chip->Doorbell,0xC0FFEE00 ); +panic ("%s: Firmware is halted due to command timeout\n" , + ioc->name); + } +} +EXPORT_SYMBOL (mpt_halt_firmware);Doing a
panic()after we've already detected an error is plain nasty. Is there no way in which we can allow the kernel to continue?
Quoted 6 lines
Basically what James said. It's not long though: only 6 emails. I started that thread thinking the same thing you did:
http://marc.info/?t=123123569200003&r=1&w=2TBH, I still wouldn't implement it the way LSI maintainers did. I'm happy they are the maintainers and it's their call.
They are doing things which effect the entire system, not just their driver. So this doesn't fall under "maintainer's rights"
If they fail locally, that's fine and perfectly expected, but to take the whole machine out is another matter altogether.
On Fri, Jan 16, 2009 at 11:10 AM, David Miller <[email protected]> wrote:
...
Quoted 6 lines
Quoted 3 lines
TBH, I still wouldn't implement it the way LSI maintainers did. I'm happy they are the maintainers and it's their call.
They are doing things which effect the entire system, not just their driver. So this doesn't fall under "maintainer's rights"
Agreed. This case is about a debug option which is normally disabled. So most people will never see this.
The thread was more about how to make the failure visible in a sane way WITHOUT the debug flag enabled. Then when the debug flag is enabled, panic the machine as well.
Quoted 2 lines
If they fail locally, that's fine and perfectly expected, but to take the whole machine out is another matter altogether.
Agreed.
thanks,
grant
James Bottomley
maintainerQuoted 12 lines · Grant Grundler
On Fri, Jan 16, 2009 at 11:10 AM, David Miller <[email protected]> wrote:
...Quoted 6 lines
Quoted 3 lines
TBH, I still wouldn't implement it the way LSI maintainers did. I'm happy they are the maintainers and it's their call.
They are doing things which effect the entire system, not just their driver. So this doesn't fall under "maintainer's rights"
Agreed. This case is about a debug option which is normally disabled. So most people will never see this.
Quoted 8 lines
The thread was more about how to make the failure visible in a sane way WITHOUT the debug flag enabled. Then when the debug flag is enabled, panic the machine as well.
Quoted 2 lines
If they fail locally, that's fine and perfectly expected, but to take the whole machine out is another matter altogether.
Agreed.
Me too, but I rejected half of the LSI update because of other problems. Since this is isolated to actual firmware debugging, which no normal user will see, I let it go after a bit of arguing.
James
Quoted 1 line · James Bottomley
mpt fusion: Add separate msi enable disable for FC,SPI,SAS
I thought we rejected this one as being completely bogus? I certainly don't remember seeing even an excuse for it after I challenged it.
Signature · 4 lines
Matthew Wilcox Intel Open Source Technology Centre "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."
Quoted 5 lines · Matthew Wilcox
Quoted 1 line · James Bottomley
mpt fusion: Add separate msi enable disable for FC,SPI,SAS
I thought we rejected this one as being completely bogus? I certainly don't remember seeing even an excuse for it after I challenged it.
... no response?
Signature · 4 lines
Matthew Wilcox Intel Open Source Technology Centre "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."
James Bottomley
maintainerQuoted 10 lines · Matthew Wilcox
Quoted 5 lines · Matthew Wilcox
Quoted 1 line · James Bottomley
mpt fusion: Add separate msi enable disable for FC,SPI,SAS
I thought we rejected this one as being completely bogus? I certainly don't remember seeing even an excuse for it after I challenged it.
... no response?
From whom? It's no less bogus than what they were doing previously. I
happen to think the whole idea of drivers chosing msi/not msi by parameters is bogus ... we just don't have a good platform way of sorting it out at the moment. In that absence, the driver maintainer gets to fix up.
James